This release contains the first part of our work on governance contracts. The new ERC20Votes
and ERC20VotesComp
extensions to the ERC20 token include vote delegation mechanisms essential to using these tokens for voting in governance systems like Compound’s GovernorAlpha and GovernorBravo.
The full changelog is listed below. Try it out and provide any feedback before the final release one week from now!
Changelog
-
ERC20Votes
: add a new extension of theERC20
token with support for voting snapshots and delegation. (#2632) -
ERC20VotesComp
: Variant ofERC20Votes
that is compatible with Compound’sComp
token interface but restricts supply touint96
. (#2706) -
ERC20Wrapper
: add a new extension of theERC20
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
andEnumerableMap
. - Enumerables: Improve gas cost of lookup in
EnumerableSet
andEnumerableMap
. -
Counter
: add a reset method. (#2678) - Tokens: Wrap definitely safe subtractions in
unchecked
blocks. -
Math
: Add aceilDiv
method for performing ceiling division. -
ERC1155Supply
: add a newERC1155
extension that keeps track of the totalSupply of each tokenId. (#2593) -
BitMaps
: add a newBitMaps
library that provides a storage efficient datastructure foruint256
tobool
mapping with contiguous keys. (#2710)
Breaking Changes
-
ERC20FlashMint
is no longer a Draft ERC. (#2673))