Skip to content

Enhance IERC6372 NatSpec following the ERC definitions - #6651

Open
gonzaotc wants to merge 4 commits into
OpenZeppelin:masterfrom
gonzaotc:feat/IERC6372-natspec
Open

gonzaotc wants to merge 4 commits into
OpenZeppelin:masterfrom
gonzaotc:feat/IERC6372-natspec

Conversation

@gonzaotc

Copy link
Copy Markdown
Contributor

Alternative to #6648.

The IERC6372 NatSpec was grabbed back then directly from Votes.sol, where it's NatSpec does fit: clock() is virtual there and the context is voting checkpoints. Neither holds in the interface, and ERC-6372 never mentions checkpoints or voting.

It also dropped the normative part of the spec: clock() must be non-decreasing, and CLOCK_MODE() must return a URL-query-string descriptor with specified values. That is where I think the doc matters, since the return type is just string.

This rewrites both to describe the standard, and adds a contract-level @dev for consistency with the other interfaces under contracts/interfaces/ (IERC5313, IERC6093).

@gonzaotc
gonzaotc requested a review from a team as a code owner July 27, 2026 21:13
@changeset-bot

changeset-bot Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f3647f4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@gonzaotc
gonzaotc requested a review from Amxx July 27, 2026 21:14
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e402a944-6ed4-480b-b09c-b2aa5fc83376

📥 Commits

Reviewing files that changed from the base of the PR and between dd1d7df and 8eac813.

📒 Files selected for processing (1)
  • contracts/interfaces/IERC6372.sol

Walkthrough

Expanded the IERC6372 interface and clock() NatSpec documentation to describe non-decreasing timepoints, timestamp and block-number modes, URL-query formatting, CAIP-2 chain ID handling, and the NUMBER opcode default. No interface or function declarations changed.

Possibly related PRs

Suggested labels: ignore-changeset

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: improving IERC6372 NatSpec to match the ERC definition.
Description check ✅ Passed The description directly explains the NatSpec rewrite and its alignment with ERC-6372.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Amxx Amxx added this to the 5.7 milestone Jul 28, 2026
james-toussaint
james-toussaint previously approved these changes Aug 7, 2026
Comment thread contracts/interfaces/IERC6372.sol Outdated
Comment thread contracts/interfaces/IERC6372.sol Outdated
@Amxx Amxx modified the milestones: 5.7, 5.8 Aug 19, 2026
Co-authored-by: James Toussaint <33313130+james-toussaint@users.noreply.github.com>
Co-authored-by: James Toussaint <33313130+james-toussaint@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Inline comments, guides, and examples. ignore-changeset

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants