-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Add IERC6909ContentURI Detection to ERC6909ContentURI #6152
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
base: master
Are you sure you want to change the base?
Conversation
|
WalkthroughA public override Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
contracts/token/ERC6909/extensions/ERC6909ContentURI.sol(1 hunks)
🧰 Additional context used
🪛 GitHub Actions: checks
contracts/token/ERC6909/extensions/ERC6909ContentURI.sol
[error] 33-33: solidity-coverage/Hardhat compilation failed. TypeError: Function needs to specify overridden contracts "ERC6909" and "IERC165". (ERC6909ContentURI.sol:33)
🪛 GitHub Actions: formal verification
contracts/token/ERC6909/extensions/ERC6909ContentURI.sol
[error] 25-25: Compiler error: Function needs to specify overridden contracts "ERC6909" and "IERC165" in supportsInterface. This contract likely requires 'override(ERC6909, IERC165)' or similar in the function signature.
| /** | ||
| * @dev Signals support for the Content URI extension so off-chain clients can safely rely on it. | ||
| */ | ||
| function supportsInterface(bytes4 interfaceId) public view virtual override 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.
Critical: Fix the compilation error by specifying overridden contracts.
The Solidity compiler requires explicit declaration of which contracts are being overridden when multiple inheritance paths define the same function. The pipeline failures confirm this is blocking compilation.
Apply this diff to fix the compilation error:
- function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
+ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC6909, IERC165) returns (bool) {📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { | |
| function supportsInterface(bytes4 interfaceId) public view virtual override(ERC6909, IERC165) returns (bool) { |
🧰 Tools
🪛 GitHub Actions: formal verification
[error] 25-25: Compiler error: Function needs to specify overridden contracts "ERC6909" and "IERC165" in supportsInterface. This contract likely requires 'override(ERC6909, IERC165)' or similar in the function signature.
🤖 Prompt for AI Agents
In contracts/token/ERC6909/extensions/ERC6909ContentURI.sol around line 25, the
supportsInterface declaration must explicitly list the contracts it overrides to
compile; change the signature to declare the overridden bases (e.g.
override(ERC6909, ERC165)) and keep the body delegating to
super.supportsInterface(interfaceId) as before so the function becomes a proper
override of both parents.
Description
IERC6909ContentURIinERC6909ContentURIso clients can detect the extension viasupportsInterfacenpm run test -- test/token/ERC6909/extensions/ERC6909ContentURI.test.js, but Hardhat aborted with HH19 (“project is ESM, rename config to .cjs”).