Skip to content

Commit

Permalink
change hooks comments for more descriptive ones
Browse files Browse the repository at this point in the history
  • Loading branch information
clauBv23 committed Jun 6, 2023
1 parent 38c4759 commit 6a8d20f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions contracts/governance/Governor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -603,15 +603,17 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor, IERC721Receive
}

/**
* @dev See {IERC721Receiver-onERC721Received}(disabled if executor is a third party contract).
* @dev See {IERC721Receiver-onERC721Received}.
* Receiving tokens is disabled if the governance executor is other than the governor itself (eg. when using with a timelock).
*/
function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) {
require(_executor() == address(this), "Governor: must send to executor");
return this.onERC721Received.selector;
}

/**
* @dev See {IERC1155Receiver-onERC1155Received}(disabled if executor is a third party contract).
* @dev See {IERC1155Receiver-onERC1155Received}.
* Receiving tokens is disabled if the governance executor is other than the governor itself (eg. when using with a timelock).
*/
function onERC1155Received(
address,
Expand All @@ -625,7 +627,8 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor, IERC721Receive
}

/**
* @dev See {IERC1155Receiver-onERC1155BatchReceived}(disabled if executor is a third party contract).
* @dev See {IERC1155Receiver-onERC1155BatchReceived}.
* Receiving tokens is disabled if the governance executor is other than the governor itself (eg. when using with a timelock).
*/
function onERC1155BatchReceived(
address,
Expand Down

0 comments on commit 6a8d20f

Please sign in to comment.