github OpenZeppelin/openzeppelin-contracts v5.3.0-rc.0

pre-releaseone day ago

Breaking Changes

  • Replace GovernorCountingOverridable.VoteReceipt struct parameter member names hasOverriden and overridenWeight for hasOverridden and overriddenWeight respectively.

Custom error changes

  • Replace GovernorAlreadyOverridenVote with GovernorAlreadyOverriddenVote.

Changes by category

Account

  • ERC7579Utils: Add ABI decoding checks on calldata bounds within decodeBatch. (#5371)

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)
  • Pausable: Stop explicitly setting paused to false during construction. (#5448)
  • Strings: Add espaceJSON that escapes special characters in JSON strings. (#5526)

Don't miss a new openzeppelin-contracts release

NewReleases is sending notifications on new releases.