-
Notifications
You must be signed in to change notification settings - Fork 12.2k
ReentrancyGuard & ReentrancyGuardTransient are stateless #5944
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
|
WalkthroughThe CHANGELOG updates the list of stateless/not-transpiled contracts to include ERC721Holder, ERC1155Holder, ReentrancyGuard, and ReentrancyGuardTransient, noting potential import updates for upgradeable variants. Existing breaking changes notes remain unchanged. In contracts/utils/ReentrancyGuard.sol and contracts/utils/ReentrancyGuardTransient.sol, only documentation was modified by adding the NatSpec tag "@Custom:stateless" (with a blank line). No code, storage layout, interfaces, or exported/public declarations were changed. Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. 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: 0
🧹 Nitpick comments (1)
CHANGELOG.md (1)
10-10
: Clarify migration with an import example.Add a quick import diff to reduce ambiguity for upgradeable users:
- // before - import {ReentrancyGuardUpgradeable} from '@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol'; + // after + import {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
CHANGELOG.md
(1 hunks)contracts/utils/ReentrancyGuard.sol
(1 hunks)contracts/utils/ReentrancyGuardTransient.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). (8)
- GitHub Check: Redirect rules - solidity-contracts
- GitHub Check: Header rules - solidity-contracts
- GitHub Check: Pages changed - solidity-contracts
- GitHub Check: coverage
- GitHub Check: tests-foundry
- GitHub Check: tests
- GitHub Check: halmos
- GitHub Check: slither
🔇 Additional comments (2)
contracts/utils/ReentrancyGuard.sol (1)
29-30
: NatSpec tag addition looks good; behavior unchanged.Tag aligns with the CHANGELOG note and does not alter storage layout or modifiers. One small ask: confirm (in PR description or a brief inline comment) that the constructor’s write is only a gas‑refund optimization so upgradeable use remains correct without initializer.
contracts/utils/ReentrancyGuardTransient.sol (1)
14-15
: Consistent stateless annotation—LGTM.No functional diffs; matches intent for non‑transpiled usage where EIP‑1153 is available.
…Guard is actually stateless
8de776d
to
fd7c8e7
Compare
Followup to #5942
PR Checklist
npx changeset add
)