Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Apr 9, 2025

This PR contains the following updates:

Package Type Update Change OpenSSF
@openzeppelin/contracts (source) dependencies minor 5.2.0 -> 5.3.0 OpenSSF Scorecard

Release Notes

OpenZeppelin/openzeppelin-contracts (@​openzeppelin/contracts)

v5.3.0

Compare Source

Breaking Changes
  • Replace GovernorCountingOverridable.VoteReceipt struct parameter member names hasOverriden and overridenWeight for hasOverridden and overriddenWeight respectively.
Custom error changes
  • Replace AccessControlNonRevokable with AccessControlNonRevocable.
  • Replace GovernorAlreadyOverridenVote with GovernorAlreadyOverriddenVote.
  • Replace GovernorOnlyProposer with GovernorUnableToCancel.
Changes by category
Account
  • ERC4337Utils: Update the hash function to call getUserOpHash on the specified entrypoint and add an ENTRYPOINT_V08 constant. (#​5614)
  • ERC7579Utils: Add ABI decoding checks on calldata bounds within decodeBatch. (#​5371)
  • ERC7579Utils: Replace address(0) with address(this) during execution for calldata compression efficiency. (#​5614)
Governance
  • IGovernor: Add the getProposalId function to the governor interface. (#​5290)
  • GovernorProposalGuardian: Add a governance extension that defines a proposal guardian who can cancel proposals at any stage in their lifecycle. (#​5303)
  • GovernorSequentialProposalId: Adds a Governor extension that sequentially numbers proposal ids instead of using the hash. (#​5290)
  • GovernorSuperQuorum: Add a governance extension to support a super quorum. Proposals that meet the super quorum (and have a majority of for votes) advance to the Succeeded state before the proposal deadline. (#​5526)
  • GovernorVotesSuperQuorumFraction: Add a variant of the GovernorSuperQuorum extensions where the super quorum is expressed as a fraction of the total supply. (#​5526)
  • TimelockController: Receive function is now virtual. (#​5509)
Structures
  • EnumerableSet: Add clear function to EnumerableSets which deletes all values in the set. (#​5486)
  • EnumerableMap: Add clear function to EnumerableMaps which deletes all entries in the map. (#​5486)
  • MerkleTree: Add an update function that replaces a previously inserted leaf with a new value, updating the tree root along the way. (#​5526)
Tokens
  • ERC4626: Use the asset getter in totalAssets, _deposit and _withdraw. (#​5322)
  • IERC6909: Add the interface for ERC-6909. (#​5343)
  • ERC6909: Add a standard implementation of ERC6909. (#​5394)
  • ERC6909TokenSupply: Add an extension of ERC6909 which tracks total supply for each token id. (#​5394)
  • ERC6909Metadata: Add an extension of ERC6909 which adds metadata functionality. (#​5394)
  • ERC6909ContentURI: Add an extension of ERC6909 which adds content URI functionality. (#​5394)
  • SafeERC20: Add trySafeTransfer and trySafeTransferFrom that do not revert and return false if the transfer is not successful. (#​5483)
Other
  • Address: bubble up revert data on sendValue failed call. (#​5379)
  • Calldata: Library with emptyBytes and emptyString functions to generate empty bytes and string calldata types. (#​5422)
  • ERC2771Forwarder: Expose the _isTrustedByTarget internal function to check whether a target trusts the forwarder. (#​5416)
  • Hashes: Expose efficientKeccak256 for hashing non-commutative pairs of bytes32 without allocating extra memory. (#​5442)
  • Initializable: Add _initializableStorageSlot function that returns a pointer to the storage struct. The function allows customizing with a custom storage slot with an override. (#​5526)
  • Math: Add add512, mul512 and mulShr. (#​5526)
  • Math: Add saturating arithmetic operations saturatingAdd, saturatingSub and saturatingMul. (#​5526)
  • MessageHashUtils: Add toDataWithIntendedValidatorHash(address, bytes32). (#​5526)
  • P256: Adjust precompile detection in verifyNative to consider empty returndata on invalid verification. Previously, invalid signatures would've reverted with a MissingPrecompile error in chains with RIP-7212 support. (#​5620)
  • Pausable: Stop explicitly setting paused to false during construction. (#​5448)
  • Strings: Add espaceJSON that escapes special characters in JSON strings. (#​5526)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Summary by Sourcery

Update OpenZeppelin Contracts dependency to version 5.3.0, incorporating various improvements and new features across governance, tokens, and utility contracts

New Features:

  • Added support for ERC6909 token standard
  • Introduced new governance extensions like GovernorProposalGuardian and GovernorSuperQuorum
  • Added new utility functions in Math, Strings, and other helper libraries

Enhancements:

  • Improved ERC4626 asset handling
  • Added clear functions to EnumerableSet and EnumerableMap
  • Enhanced error naming and handling in various contracts

Chores:

  • Upgrade OpenZeppelin Contracts from version 5.2.0 to 5.3.0

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@renovate renovate bot added the dependencies label Apr 9, 2025
@renovate renovate bot enabled auto-merge (squash) April 9, 2025 18:03
@sourcery-ai
Copy link

sourcery-ai bot commented Apr 9, 2025

Reviewer's Guide by Sourcery

This pull request updates the @openzeppelin/contracts dependency from version 5.2.0 to 5.3.0. This includes changes in the package.json and bun.lock files.

Updated class diagram for GovernorCountingOverridable.VoteReceipt

classDiagram
  class VoteReceipt {
    -bool hasOverridden
    -uint256 overriddenWeight
    +bool hasOverriden
    +uint256 overridenWeight
  }
  note for VoteReceipt "'hasOverriden' and 'overridenWeight' have been renamed to 'hasOverridden' and 'overriddenWeight' respectively."
Loading

Updated class diagram for AccessControl

classDiagram
  class AccessControl {
    <<custom error>>
    -AccessControlNonRevokable
    +AccessControlNonRevocable
  }
  note for AccessControl "'AccessControlNonRevokable' has been renamed to 'AccessControlNonRevocable'."
Loading

Updated class diagram for Governor

classDiagram
  class Governor {
    <<custom error>>
    -GovernorAlreadyOverridenVote
    +GovernorAlreadyOverriddenVote
    -GovernorOnlyProposer
    +GovernorUnableToCancel
  }
  note for Governor "'GovernorAlreadyOverridenVote' has been renamed to 'GovernorAlreadyOverriddenVote'. 'GovernorOnlyProposer' has been renamed to 'GovernorUnableToCancel'."
Loading

Class diagram for GovernorProposalGuardian

classDiagram
  class GovernorProposalGuardian {
    +function cancel(uint256 proposalId)
  }
  Governor --|> GovernorProposalGuardian : extends
  note for GovernorProposalGuardian "Adds a governance extension that defines a proposal guardian who can cancel proposals at any stage in their lifecycle."
Loading

Class diagram for GovernorSequentialProposalId

classDiagram
  class GovernorSequentialProposalId {
    +function getProposalId(uint256 proposalNumber) uint256
  }
  Governor --|> GovernorSequentialProposalId : extends
  note for GovernorSequentialProposalId "Adds a Governor extension that sequentially numbers proposal ids instead of using the hash."
Loading

Class diagram for GovernorSuperQuorum

classDiagram
  class GovernorSuperQuorum {
    +function hasSuperQuorum(uint256 proposalId) bool
  }
  Governor --|> GovernorSuperQuorum : extends
  note for GovernorSuperQuorum "Adds a governance extension to support a super quorum. Proposals that meet the super quorum advance to the Succeeded state before the proposal deadline."
Loading

Class diagram for GovernorVotesSuperQuorumFraction

classDiagram
  class GovernorVotesSuperQuorumFraction {
    +function superQuorumThreshold() uint256
  }
  Governor --|> GovernorVotesSuperQuorumFraction : extends
  note for GovernorVotesSuperQuorumFraction "Adds a variant of the GovernorSuperQuorum extensions where the super quorum is expressed as a fraction of the total supply."
Loading

Class diagram for EnumerableSet

classDiagram
  class EnumerableSet {
    +function clear()
  }
  note for EnumerableSet "Adds clear function to EnumerableSets which deletes all values in the set."
Loading

Class diagram for EnumerableMap

classDiagram
  class EnumerableMap {
    +function clear()
  }
  note for EnumerableMap "Adds clear function to EnumerableMaps which deletes all entries in the map."
Loading

Class diagram for MerkleTree

classDiagram
  class MerkleTree {
    +function update(bytes32 leaf, bytes32 newValue)
  }
  note for MerkleTree "Adds an update function that replaces a previously inserted leaf with a new value, updating the tree root along the way."
Loading

Class diagram for IERC6909

classDiagram
  class IERC6909 {
    <<interface>>
    +function balanceOf(address account, uint256 id) external view returns (uint256)
    +function balance0fBatch(address[] accounts, uint256[] ids) external view returns (uint256[])
    +function safeTransfer(address from, address to, uint256 id, uint256 amount, bytes data) external
    +function safeTransferBatch(address from, address to, uint256[] ids, uint256[] amounts, bytes data) external
  }
  note for IERC6909 "Adds the interface for ERC-6909."
Loading

Class diagram for ERC6909

classDiagram
  class ERC6909 {
    // Standard implementation of ERC6909
  }
  note for ERC6909 "Adds a standard implementation of ERC6909."
Loading

Class diagram for ERC6909TokenSupply

classDiagram
  class ERC6909TokenSupply {
    // Extension of ERC6909 which tracks total supply for each token id
  }
  ERC6909 --|> ERC6909TokenSupply : extends
  note for ERC6909TokenSupply "Adds an extension of ERC6909 which tracks total supply for each token id."
Loading

Class diagram for ERC6909Metadata

classDiagram
  class ERC6909Metadata {
    // Extension of ERC6909 which adds metadata functionality
  }
  ERC6909 --|> ERC6909Metadata : extends
  note for ERC6909Metadata "Adds an extension of ERC6909 which adds metadata functionality."
Loading

Class diagram for ERC6909ContentURI

classDiagram
  class ERC6909ContentURI {
    // Extension of ERC6909 which adds content URI functionality
  }
  ERC6909 --|> ERC6909ContentURI : extends
  note for ERC6909ContentURI "Adds an extension of ERC6909 which adds content URI functionality."
Loading

Class diagram for SafeERC20

classDiagram
  class SafeERC20 {
    +function trySafeTransfer(IERC20 token, address to, uint256 value) (bool, bytes memory)
    +function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) (bool, bytes memory)
  }
  note for SafeERC20 "Adds trySafeTransfer and trySafeTransferFrom that do not revert and return false if the transfer is not successful."
Loading

Class diagram for Calldata

classDiagram
  class Calldata {
    +function emptyBytes() bytes
    +function emptyString() string
  }
  note for Calldata "Library with emptyBytes and emptyString functions to generate empty bytes and string calldata types."
Loading

Class diagram for ERC2771Forwarder

classDiagram
  class ERC2771Forwarder {
    #function _isTrustedByTarget(address target) internal view returns (bool)
  }
  note for ERC2771Forwarder "Expose the _isTrustedByTarget internal function to check whether a target trusts the forwarder."
Loading

Class diagram for Hashes

classDiagram
  class Hashes {
    +function efficientKeccak256(bytes32 a, bytes32 b) pure returns (bytes32)
  }
  note for Hashes "Expose efficientKeccak256 for hashing non-commutative pairs of bytes32 without allocating extra memory."
Loading

Class diagram for Initializable

classDiagram
  class Initializable {
    +function _initializableStorageSlot() internal pure returns (bytes32)
  }
  note for Initializable "Adds _initializableStorageSlot function that returns a pointer to the storage struct. The function allows customizing with a custom storage slot with an override."
Loading

Class diagram for Math

classDiagram
  class Math {
    +function add512(uint256 a, uint256 b) internal pure returns (uint256)
    +function mul512(uint256 a, uint256 b) internal pure returns (uint256)
    +function mulShr(uint256 x, uint256 y, uint256 shift) internal pure returns (uint256)
    +function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256)
    +function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256)
    +function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256)
  }
  note for Math "Adds add512, mul512 and mulShr. Adds saturating arithmetic operations saturatingAdd, saturatingSub and saturatingMul."
Loading

Class diagram for MessageHashUtils

classDiagram
  class MessageHashUtils {
    +function toDataWithIntendedValidatorHash(address validator, bytes32 messageHash) internal pure returns (bytes memory)
  }
  note for MessageHashUtils "Adds toDataWithIntendedValidatorHash(address, bytes32)."
Loading

Class diagram for Strings

classDiagram
  class Strings {
    +function escapeJSON(string memory str) internal pure returns (string memory)
  }
  note for Strings "Adds espaceJSON that escapes special characters in JSON strings."
Loading

File-Level Changes

Change Details Files
Updated the @openzeppelin/contracts dependency to version 5.3.0.
  • Updated the @openzeppelin/contracts dependency from version 5.2.0 to 5.3.0 in package.json.
  • Updated the bun.lock file to reflect the new dependency version.
package.json
bun.lock

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

We have skipped reviewing this pull request. It seems to have been created by a bot (hey, renovate[bot]!). We assume it knows what it's doing!

@github-actions
Copy link

github-actions bot commented Apr 9, 2025

📦 Packages

Package Install
Template Set bun add @settlemint/settlemint/solidity-token-erc721a@7.12.8-pr8300d4b

@renovate renovate bot merged commit 66f59e0 into main Apr 9, 2025
3 checks passed
@renovate renovate bot deleted the renovate/openzeppelin-packages branch April 9, 2025 18:10
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.

1 participant