v4.2.0
Read the full announcement in the blog!
ERC20Votes: add a new extension of theERC20token with support for voting snapshots and delegation. (#2632)ERC20VotesComp: Variant ofERC20Votesthat is compatible with Compound'sComptoken interface but restricts supply touint96. (#2706)ERC20Wrapper: add a new extension of theERC20token 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
EnumerableSetandEnumerableMap. - Enumerables: Improve gas cost of lookup in
EnumerableSetandEnumerableMap. Counter: add a reset method. (#2678)- Tokens: Wrap definitely safe subtractions in
uncheckedblocks. Math: Add aceilDivmethod for performing ceiling division.ERC1155Supply: add a newERC1155extension that keeps track of the totalSupply of each tokenId. (#2593)BitMaps: add a newBitMapslibrary that provides a storage efficient datastructure foruint256toboolmapping with contiguous keys. (#2710)
Breaking Changes
ERC20FlashMintis 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.