-
Notifications
You must be signed in to change notification settings - Fork 39
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
protocol: Superchain ERC721 Design #194
base: main
Are you sure you want to change the base?
Conversation
} | ||
|
||
//// @inheritdoc IERC165 | ||
function supportsInterface(bytes4 _interfaceId) public view virtual returns (bool) { |
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.
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.
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.
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 |
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.
protocol/superchain-erc721/superchain-erc721-design.md
@@ -0,0 +1,239 @@ | |||
# Purpose | |||
|
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.
protocol/superchain-erc721/superchain-erc721-design.md
Description
Introduces new
SuperchainERC721
contract standard andSuperchainERC721Bridge
predeploy 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