Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

v2.0.0

Compare
Choose a tag to compare
@facuspagnuolo facuspagnuolo released this 25 Oct 20:44
· 659 commits to master since this release

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 Initializable trait, that deprecates the former Migratable base 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 push now automatically discovers, pushes, and links any Solidity libraries used by the project contracts (#208)
  • [major] Command link can now link multiple dependencies (formerly named stdlib) into a project (#17, #39, #50, #99, #82, #125).
  • [major] New publish command, that creates a set of App, Package, and Directory contracts 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 created App (#257)
  • New set-admin command for changing the upgradeability admin of a proxy, allowing to implement upgradeability governance via more complex structures (#47)
  • New unlink command for removing a previously linked dependency (#49)
  • New check command for validating a contract for upgradeability errors (such as no selfdestruct, no default values for variables, and no constructor) (#230)
  • New --skip-compile option in push command to skip automatic recompilation of contracts (#214)
  • New --publish flag in init, that will cause the first push of a project to any network to automatically publish it as well (#257)

✅ Validations

  • Validate storage layout changes between subsequent push operations, 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 commands and scripts functions, allowing the CLI commands to be used from javascript code (#177)
  • New AppProject model for managing a project based on an App contract directly from zos-lib, and simplify App contract model wrapper (beb7afdb)
  • New SimpleProject model for managing a project without depending on an App, Package, or Directory contract, 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 ZEPToken and Vouching for token and vouching mechanics (#115)
  • Integrate TPL on ZEP token contract (#141)
  • Index names in Vouching events 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 Vouching are 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, and Directory contracts by default, and use a SimpleProject model instead to create proxies and track logic contracts off-chain (#146, #231)
  • Use canonical network names (ropsten, mainnet, etc; or dev-NETWORK_ID for development networks) for naming zos network files, instead of the custom identifier used for the truffle network connection name (#213)
  • Enforce version check of zosversion to be equal to 2 in all json manifest files (#162)
  • Contracts are now validated for errors when pushing them instead on add, to ensure that any changes performed after initially adding them are also checked (#224)
  • Rename TestApp to TestHelper (#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. App contract holds references to multiple Packages (which are either dependencies or the project's main package), the reference to an stdlib is removed from the Directory, and creating a new proxy requires specifying the name of the package and the contract (#17).
  • [major] Change Initializable base contract, simplifying isInitializable(name,version) modifier to initializer(), and removing Migratable (#12, #167, #215)
  • Handle Proxy initialization atomically in its constructor (#106)
  • Index event arguments in contracts to improve querying (#193)
  • Adapt Package public 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 initialize method from the most derived contract when performing initialization method lookup in ABI, and accept fully-qualified function names such as initialize(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, and Directory addresses 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 ProxyCreated app event (#221)
  • Use delegatecall for running upgradeToAndCall operation in Proxy more efficiently (#219)
  • Fix import error when importing zos-lib without having a global web3 instance set (79f57336)

⛔️ Removed

  • [major] Remove --lib flag when creating a new project via init, as any project can now be used as a dependency from another project, as long as it has been published (#253)
  • [major] Remove Migratable contract in favour of new simplified Initializable contract (#220)
  • Remove UnversionedApp contract, merging BaseApp with VersionedApp into App (#110)
  • Remove FreezableImplementationDirectory contract, and add freezable feature to ImplementationDirectory by default (#110)
  • Remove Release contract, in favour of ImplementationDirectory (#168)