-
Notifications
You must be signed in to change notification settings - Fork 12.2k
docs(interfaces): deprecate ERC1155InvalidApprover in IERC1155Errors #5994
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?
docs(interfaces): deprecate ERC1155InvalidApprover in IERC1155Errors #5994
Conversation
|
WalkthroughThe docblock for IERC1155Errors’s ERC1155InvalidApprover(error) in contracts/interfaces/draft-IERC6093.sol was updated to note it is non-standard for ERC-1155 and marked as deprecated. The error’s signature remains unchanged. No code or control-flow modifications were made, and no exported or public declarations were altered. Suggested labels
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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/interfaces/draft-IERC6093.sol
(1 hunks)
🧰 Additional context used
🪛 GitHub Actions: checks
contracts/interfaces/draft-IERC6093.sol
[error] 143-143: Hardhat compilation failed: DocstringParsingError: Documentation tag @deprecated not valid for errors.
🪛 GitHub Actions: formal verification
contracts/interfaces/draft-IERC6093.sol
[error] 143-143: Compiler run failed: Error (6546): Documentation tag @deprecated not valid for errors.
* @dev Non-standard for ERC-1155. ERC-1155 only defines operator-wide approvals via {setApprovalForAll}. | ||
* @deprecated Non-standard for ERC-1155; use {ERC1155InvalidOperator} or {ERC1155MissingApprovalForAll} instead. | ||
* @param approver Address initiating an approval operation. |
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.
Replace the unsupported @deprecated
tag
Hardhat is rejecting this docblock (DocstringParsingError: Documentation tag @deprecated not valid for errors
), so the contract no longer compiles. Please keep the deprecation note but phrase it without the NatSpec tag, e.g.:
- * @deprecated Non-standard for ERC-1155; use {ERC1155InvalidOperator} or {ERC1155MissingApprovalForAll} instead.
+ * Deprecated: non-standard for ERC-1155; use {ERC1155InvalidOperator} or {ERC1155MissingApprovalForAll} instead.
📝 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.
* @dev Non-standard for ERC-1155. ERC-1155 only defines operator-wide approvals via {setApprovalForAll}. | |
* @deprecated Non-standard for ERC-1155; use {ERC1155InvalidOperator} or {ERC1155MissingApprovalForAll} instead. | |
* @param approver Address initiating an approval operation. | |
* @dev Non-standard for ERC-1155. ERC-1155 only defines operator-wide approvals via {setApprovalForAll}. | |
* Deprecated: non-standard for ERC-1155; use {ERC1155InvalidOperator} or {ERC1155MissingApprovalForAll} instead. | |
* @param approver Address initiating an approval operation. |
🤖 Prompt for AI Agents
contracts/interfaces/draft-IERC6093.sol around lines 144-146: the NatSpec uses
the @deprecated tag on an error docblock which Hardhat rejects; remove the
@deprecated tag and rephrase the deprecation note as plain text in the comment
(e.g., "Deprecated — Non-standard for ERC-1155; use ERC1155InvalidOperator or
ERC1155MissingApprovalForAll instead.") so it is not treated as a NatSpec tag,
keeping the param and description intact.
This change deprecates the ERC1155InvalidApprover error in contracts/interfaces/draft-IERC6093.sol, clarifying it is non-standard for ERC-1155 which only defines operator-wide approvals via setApprovalForAll. The error is unused across the codebase and not part of ERC-6093’s canonical ERC-1155 set. The comment now directs users to ERC1155InvalidOperator and ERC1155MissingApprovalForAll to avoid confusion and align with the spec without introducing behavioral changes.