From eaab477a384a8ad30bac7fbfcd4de2ab8c662d0d Mon Sep 17 00:00:00 2001 From: davidbrai Date: Tue, 3 Dec 2024 15:37:37 +0000 Subject: [PATCH] minor refactor and natspec --- packages/nouns-contracts/contracts/StreamEscrow.sol | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/nouns-contracts/contracts/StreamEscrow.sol b/packages/nouns-contracts/contracts/StreamEscrow.sol index ed0185666..224735701 100644 --- a/packages/nouns-contracts/contracts/StreamEscrow.sol +++ b/packages/nouns-contracts/contracts/StreamEscrow.sol @@ -73,9 +73,10 @@ contract StreamEscrow is IStreamEscrow { address streamCreator_, uint32 minimumTickDuration_ ) { + require(nounsRecipient_ != address(0), 'zero address'); + daoExecutor = daoExecutor_; ethRecipient = ethRecipient_; - require(nounsRecipient_ != address(0), 'zero address'); nounsRecipient = nounsRecipient_; nounsToken = INounsToken(nounsToken_); allowedToCreateStream[streamCreator_] = true; @@ -278,6 +279,7 @@ contract StreamEscrow is IStreamEscrow { /** * @notice Allows the DAO to set the address that the Nouns tokens will be sent to when streams are canceled. + * The zero address is not allowed because it will cause the transfer to revert, which will cause all cancellations to revert. */ function setNounsRecipient(address newAddress) external onlyDAO { require(newAddress != address(0), 'zero address');