Skip to content

Conversation

@strmfos
Copy link
Contributor

@strmfos strmfos commented Nov 6, 2025

Adjusted the renounceRole comment so it now says the RoleRevoked event fires only when the caller actually held the role before renouncing, matching the guard in _revokeRole.

  • Documentation

@strmfos strmfos requested a review from a team as a code owner November 6, 2025 15:03
@changeset-bot
Copy link

changeset-bot bot commented Nov 6, 2025

⚠️ No Changeset found

Latest commit: ad31371

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 Nov 6, 2025

Walkthrough

A documentation comment in the AccessControl contract's renounceRole function is updated to correct the wording. The description is changed from stating the role was "revoked" to clarifying "If the calling account had been granted role". No functional code, control flow, or error handling is modified, and observable behavior remains unchanged.

Suggested labels

typo

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: correcting a comment in renounceRole to properly reflect RoleRevoked event behavior.
Description check ✅ Passed The description clearly explains the change: updating the renounceRole comment to correctly state that RoleRevoked fires only when the caller held the role, aligning with the _revokeRole guard logic.
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

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eb97fd3 and ad31371.

📒 Files selected for processing (1)
  • contracts/access/AccessControl.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: tests-upgradeable
  • GitHub Check: tests
  • GitHub Check: tests-foundry
  • GitHub Check: slither
  • GitHub Check: coverage
  • GitHub Check: Redirect rules - solidity-contracts
  • GitHub Check: Header rules - solidity-contracts
  • GitHub Check: Pages changed - solidity-contracts
  • GitHub Check: halmos
🔇 Additional comments (1)
contracts/access/AccessControl.sol (1)

146-147: Accurate documentation improvement.

The updated comment correctly clarifies that the RoleRevoked event is only emitted when the calling account actually held the role before renouncing, which accurately reflects the conditional check in _revokeRole (line 199). The wording is consistent with similar conditional phrasing used in grantRole (line 111) and revokeRole (line 127) documentation comments.


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

@Amxx Amxx closed this Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants