This repository was archived by the owner on Jan 24, 2022. It is now read-only.
v2.0.0
This is a new major release for ZeppelinOS, which includes new features and changes to the smart contracts, supporting library, and command line tool. It also includes a brand new vouching package that contains the contracts for the ZEP token and the first implementation of the vouching cryptoeconomics.
Some of the most important features in this release include:
- The CLI now handles the logic contracts registry entirely off chain, without needing to deploy a set of contracts (App, Factory, Package, and Directory) on every project, though this behaviour can be kept by running
zos publish. - Support for adding multiple dependencies to a project, instead of a single stdlib, fostering the development of new EVM packages.
- Automatic deployment and linking of Solidity libraries, allowing your contracts to declare the usage of a library which will be managed transparently by the CLI.
- More automatic security validations for your contracts, including storage compatibility checks between subsequent deployments.
- A new and simplified
Initializabletrait, that deprecates the formerMigratablebase contract.
You can read more about what's new in ZeppelinOS here.
Note that this version is incompatible with version 1.x. The CLI will automatically detect any projects or dependencies created with version 1 and prevent using them from the current release. We will be releasing a migration guide soon to walk you through the steps for migrating from older releases to this one.
💥 Added
⌨️ Commands
- [major] Command
pushnow automatically discovers, pushes, and links any Solidity libraries used by the project contracts (#208) - [major] Command
linkcan now link multiple dependencies (formerly namedstdlib) into a project (#17, #39, #50, #99, #82, #125). - [major] New
publishcommand, that creates a set ofApp,Package, andDirectorycontracts for managing the project on-chain, allowing it to be used as a dependency by another project, and transfers upgradeability ownership of all proxies to the createdApp(#257) - New
set-admincommand for changing the upgradeability admin of a proxy, allowing to implement upgradeability governance via more complex structures (#47) - New
unlinkcommand for removing a previously linked dependency (#49) - New
checkcommand for validating a contract for upgradeability errors (such as noselfdestruct, no default values for variables, and noconstructor) (#230) - New
--skip-compileoption inpushcommand to skip automatic recompilation of contracts (#214) - New
--publishflag ininit, that will cause the firstpushof a project to any network to automaticallypublishit as well (#257)
✅ Validations
- Validate storage layout changes between subsequent
pushoperations, to verify that changes in a contract will not corrupt storage when upgrading (#117) - Validate that there are no initial values set in fields declarations, since these are not set when initializing a contract instance (#241)
🔬Other
- Export
commandsandscriptsfunctions, allowing the CLI commands to be used from javascript code (#177) - New
AppProjectmodel for managing a project based on anAppcontract directly fromzos-lib, and simplifyAppcontract model wrapper (beb7afdb) - New
SimpleProjectmodel for managing a project without depending on anApp,Package, orDirectorycontract, tracking logic contracts entirely off-chain (#83, #93, #137, #171) - Support creating non-upgradeable contract instances from deployed logic contracts (zeppelinos/zos-lib#223)
👊Vouching & Token
- Initial contracts
ZEPTokenandVouchingfor token and vouching mechanics (#115) - Integrate TPL on ZEP token contract (#141)
- Index names in
Vouchingevents using name hash (#133) - Add TPL integration tests (#145)
- Flag vouching package as public in npm (#183)
- Full deployment of vouching app in ropsten and new required scripts (#186)
- Ensure that removed dependency names can no longer be reused (#217)
- Require that dependencies registered in
Vouchingare contracts and not external addresses (#225) - Tests for the vouching app deploy scripts (#212)
- Improve ZEP-TPL interaction documentation and tests (#236)
👨🎨Changed
💻 CLI
- [major] Do not create
App,Package, andDirectorycontracts by default, and use aSimpleProjectmodel instead to create proxies and track logic contracts off-chain (#146, #231) - Use canonical network names (
ropsten,mainnet, etc; ordev-NETWORK_IDfor development networks) for naming zos network files, instead of the custom identifier used for the truffle network connection name (#213) - Enforce version check of
zosversionto be equal to2in all json manifest files (#162) - Contracts are now validated for errors when
pushing them instead onadd, to ensure that any changes performed after initiallyadding them are also checked (#224) - Rename
TestApptoTestHelper(#82) - Rename all references to stdlib or lib to dependency or EVM package (#240)
📘 Contracts
- [major] New contracts architecture and models for supporting multiple dependencies (formerly named
stdlib) in a project.Appcontract holds references to multiplePackages (which are either dependencies or the project's main package), the reference to anstdlibis removed from theDirectory, and creating a new proxy requires specifying the name of the package and the contract (#17). - [major] Change
Initializablebase contract, simplifyingisInitializable(name,version)modifier toinitializer(), and removingMigratable(#12, #167, #215) - Handle
Proxyinitialization atomically in its constructor (#106) - Index event arguments in contracts to improve querying (#193)
- Adapt
Packagepublic methods to a common interface shared with AragonOS, and enforce semver usage for identifying versions (#140)
🎫 Transactions
- Retry gas estimations upon failure, to handle scenarios where the previous mined transactions had not yet propagated (#198)
- Prefer the matching
initializemethod from the most derived contract when performing initialization method lookup in ABI, and accept fully-qualified function names such asinitialize(uint256)(#197, #234) - Refuse to run transactions with truffle default gas price (100GWei) to prevent accidental excessive gas costs on deployments (#200)
🛠Fixed
- Store
App,Package, andDirectoryaddresses in failed deployments, and resume from last deployed contract, instead of redeploying all of them from scratch (#120) - Throw proper error message when trying to run a command with an undefined network (#209)
- Improve CLI output on errors, removing confusing successful messages when not appropriate (#229)
- When creating a proxy from a dependency contract, use the version of the dependency for identifying the proxy in the network json file, instead of the version of the project (#281)
- Remove swarm hash from bytecode before hashing it, to prevent a contract from being detected as changed when compiled from different workstations (#105)
- Do not index newly created Proxy addresses in
ProxyCreatedapp event (#221) - Use
delegatecallfor runningupgradeToAndCalloperation inProxymore efficiently (#219) - Fix import error when importing
zos-libwithout having a global web3 instance set (79f57336)
⛔️ Removed
- [major] Remove
--libflag when creating a new project viainit, as any project can now be used as a dependency from another project, as long as it has beenpublished (#253) - [major] Remove
Migratablecontract in favour of new simplifiedInitializablecontract (#220) - Remove
UnversionedAppcontract, mergingBaseAppwithVersionedAppintoApp(#110) - Remove
FreezableImplementationDirectorycontract, and add freezable feature toImplementationDirectoryby default (#110) - Remove
Releasecontract, in favour ofImplementationDirectory(#168)