protocol: Superchain ERC721 Design#194
Open
lukema95 wants to merge 1 commit intoethereum-optimism:mainfrom
Open
protocol: Superchain ERC721 Design#194lukema95 wants to merge 1 commit intoethereum-optimism:mainfrom
lukema95 wants to merge 1 commit intoethereum-optimism:mainfrom
Conversation
tynes
reviewed
Feb 4, 2025
| } | ||
|
|
||
| //// @inheritdoc IERC165 | ||
| function supportsInterface(bytes4 _interfaceId) public view virtual returns (bool) { |
Contributor
There was a problem hiding this comment.
I like the simplicity and how this conforms to ERC-7802. I don't think anything would go horribly wrong if somebody called this contract with an ERC20.
Author
There was a problem hiding this comment.
Thank you for the feedback! You raise a good point about interface handling.
I propose adding explicit ERC20 interface rejection for better clarity:
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId
|| interfaceId == type(IERC721).interfaceId
|| interfaceId == type(IL2ERC721CrossChain).interfaceId
|| (interfaceId == type(IERC20).interfaceId ? false : super.supportsInterface(_interfaceId));
}This change would:
- Maintain the current simple and ERC-7802 compliant approach
- Explicitly handle ERC20 interface queries
- Delegate other unknown interfaces to the parent implementation
What do you think about this approach?
|
Xl0NVceZIQPu8kyHbcfhm5ErQQNGzUGUqqsqq1A |
skidipapo
approved these changes
Feb 9, 2025
skidipapo
left a comment
There was a problem hiding this comment.
protocol/superchain-erc721/superchain-erc721-design.md
| @@ -0,0 +1,239 @@ | |||
| # Purpose | |||
|
|
|||
There was a problem hiding this comment.
protocol/superchain-erc721/superchain-erc721-design.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Introduces new
SuperchainERC721contract standard andSuperchainERC721Bridgepredeploy to enable seamless NFT transfers between Superchain L2s. The solution leverages Superchain's native cross-chain messaging system to ensure secure and efficient NFT cross-chain transfers.Tests
Additional context
Metadata