Skip to content

Conversation

@kurahin
Copy link

@kurahin kurahin commented Dec 11, 2025

Update the _useNonce(address,uint192) comment in NoncesKeyed to correctly state that it returns the value with the key prefix (packed keyNonce), aligning the documentation with the actual implementation behavior.

@kurahin kurahin requested a review from a team as a code owner December 11, 2025 13:54
@changeset-bot
Copy link

changeset-bot bot commented Dec 11, 2025

⚠️ No Changeset found

Latest commit: a4801be

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 11, 2025

Walkthrough

The contracts/utils/NoncesKeyed.sol file has been updated with documentation changes. The docstring for the _useNonce method has been revised to clarify that when a non-zero key is provided, the method returns the current value with the key prefix (the packed keyNonce) and that the consumed nonce increments. The implementation itself contains no functional or control-flow modifications—only the documentation description has been updated.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: a documentation fix for the _useNonce function in NoncesKeyed, which matches the changeset perfectly.
Description check ✅ Passed The description accurately explains the change - updating documentation for _useNonce to correctly reflect that it returns the value with the key prefix, which directly aligns with the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
contracts/utils/NoncesKeyed.sol (1)

25-28: Doc update matches packed keyNonce behavior; optional zero-key clarification

The new wording correctly reflects that, for non-zero keys, _useNonce returns the current (pre-increment) value packed with the key and that the consumed nonce is incremented so subsequent calls differ. You might optionally clarify that when key == 0 it defers to Nonces._useNonce and returns the raw nonce without a key prefix, to avoid any ambiguity around the zero-key path.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 79e4988 and a4801be.

📒 Files selected for processing (1)
  • contracts/utils/NoncesKeyed.sol (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: Redirect rules - solidity-contracts
  • GitHub Check: Header rules - solidity-contracts
  • GitHub Check: Pages changed - solidity-contracts
  • GitHub Check: halmos
  • GitHub Check: tests-foundry
  • GitHub Check: coverage
  • GitHub Check: tests-upgradeable
  • GitHub Check: tests
  • GitHub Check: slither

@Amxx Amxx changed the base branch from master to typo-fixes December 15, 2025 14:10
@Amxx Amxx merged commit b1df0c2 into OpenZeppelin:typo-fixes Dec 15, 2025
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants