github OpenZeppelin/openzeppelin-contracts v4.2.0

latest releases: v5.1.0-rc.0, v5.0.2, v4.9.6...
3 years ago

Read the full announcement in the blog!


  • ERC20Votes: add a new extension of the ERC20 token with support for voting snapshots and delegation. (#2632)
  • ERC20VotesComp: Variant of ERC20Votes that is compatible with Compound's Comp token interface but restricts supply to uint96. (#2706)
  • ERC20Wrapper: add a new extension of the ERC20 token which wraps an underlying token. Deposit and withdraw guarantee that the total supply is backed by a corresponding amount of underlying token. (#2633)
  • Enumerables: Improve gas cost of removal in EnumerableSet and EnumerableMap.
  • Enumerables: Improve gas cost of lookup in EnumerableSet and EnumerableMap.
  • Counter: add a reset method. (#2678)
  • Tokens: Wrap definitely safe subtractions in unchecked blocks.
  • Math: Add a ceilDiv method for performing ceiling division.
  • ERC1155Supply: add a new ERC1155 extension that keeps track of the totalSupply of each tokenId. (#2593)
  • BitMaps: add a new BitMaps library that provides a storage efficient datastructure for uint256 to bool mapping with contiguous keys. (#2710)

Breaking Changes

  • ERC20FlashMint is no longer a Draft ERC. (#2673))

How to update: Change your import paths by removing the draft- prefix from @openzeppelin/contracts/token/ERC20/extensions/draft-ERC20FlashMint.sol.

See Releases and Stability: Drafts.

Don't miss a new openzeppelin-contracts release

NewReleases is sending notifications on new releases.