Add validation in Governor on ERC-721 or ERC-1155 received#4314
Conversation
🦋 Changeset detectedLatest commit: 2d53fa7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Amxx
left a comment
There was a problem hiding this comment.
If possible, the expectRevert should not be unspecified.
|
@Amxx good catch! But what do you mean whit if possible, is there any specific reason for not specifying it? |
If there is no revert string, or if the revert is a panic, then unspecified might be the way. |
|
oh perfect makes sense @Amxx thanks! |
ernestognw
left a comment
There was a problem hiding this comment.
This looks good @clauBv23! Thanks. I'm adding a few suggestions and also requesting review from others.
Thanks!
a3e43b5 to
1c324a0
Compare
|
@frangio @ernestognw I merged master into this and realised the following: ERC1155 acceptance hook was written in a way that bubble error string, but not custom error. The result is that the Governor custom error ( Do we want to change the ERC1155 hook to use the syntax from ERC721 (which bubble the custom errors)? |
I'd say yes. |
Co-authored-by: Claudia Barcelo <claudiabarcelovaldes40@gmail.com>
Fixes #4307
Add validation to
onERC1155Received,onERC1155BatchReceived, andonERC721Receivedhooks in Governor to check it is the executor.Add test to the validations.
Note: This PR should be refactored after merging #4261 and #4284
PR Checklist
npx changeset add)