4.0.0-beta.1 update
We just released the second preview of Contracts 4.0. This update includes some changes that have been requested by users. Some gas optimizations are also included.
Changes
ERC20
The ERC20Capped
extensions now enforces the check directly in the _mint
function, thus removing the addition gas cost this extension used to have on transfers.
ERC721
A new extension, ERC721URIStorage
re-implements the tokenURI
mechanism that used to be part of the simple ERC721
implementation in the 3.x releases. In particular, this includes the internal _setTokenURI
method that allows for custom URIs.
ERC777
Optimization of the constructor gas cost for the ERC777.
Proxy
proxy/UpgradeableProxy
has been moved and renamed to proxy/ERC1967/ERC1967Proxy.sol
. This is done to prepare the path to more proxy patterns such as ERC1822’s UUPS.
Get Started
Remember this is a beta release and there may be small breaking changes before the stable release.
- Check out the release branch on GitHub .
- Install from npm with
npm install @openzeppelin/contracts@next
,
or the upgradeable version withnpm install @openzeppelin/contracts-upgradeable@next
- See the Contracts 4.0 Timeline .
Leave your comments below.