-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Agent: add ERC721Receiver support #1058
Conversation
apps/agent/contracts/Agent.sol
Outdated
@@ -56,6 +57,7 @@ contract Agent is IERC165, ERC1271Bytes, IForwarder, IsContract, Vault { | |||
event RemoveProtectedToken(address indexed token); | |||
event PresignHash(address indexed sender, bytes32 indexed hash); | |||
event SetDesignatedSigner(address indexed sender, address indexed oldSigner, address indexed newSigner); | |||
event ReceiveERC721(address indexed token, address operator, address from, uint256 tokenId, bytes data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might as well index the operator
and from
apps/agent/contracts/Agent.sol
Outdated
@@ -35,6 +35,7 @@ contract Agent is IERC165, ERC1271Bytes, IForwarder, IsContract, Vault { | |||
uint256 public constant PROTECTED_TOKENS_CAP = 10; | |||
|
|||
bytes4 private constant ERC165_INTERFACE_ID = 0x01ffc9a7; | |||
bytes4 private constant ERC721_RECEIVED = 0x150b7a02; // bytes4(keccak256("onERC721Received(address,address,uint256,bytes)")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rename the variable to ERC721_RECEIVED_INTERFACE_ID
to be consistent with the ERC165_INTERFACE_ID
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* Agent: add ERC721Receiver support * Lint * Test * Address review comments * cosmetic: small whitespace changes Co-authored-by: Brett Sun <qisheng.brett.sun@gmail.com>
* Agent: add ERC721Receiver support * Lint * Test * Address review comments * cosmetic: small whitespace changes Co-authored-by: Brett Sun <qisheng.brett.sun@gmail.com>
Close #1036, see aragonone/product#251
To do: