Skip to content

@spalladino spalladino released this May 27, 2019 · 52 commits to master since this release

This release marks a huge improvement in terms of developer experience, adding interactive prompts to most commands in the CLI. We have also overhauled the set-admin command, and added new unpack and create2 commands. And as usual, the smart contracts have been audited by a separate team.

Interactive commands

The ZeppelinOS CLI will now guide you through the process of creating a new upgradeable contract and updating it as needed. We have reworked most commands on the CLI to be interactive, and handle any necessary work for you. Now, instead of typing the following 3 commands...

$ zos add MyContract
$ zos push --network mainnet
$ zos create MyContract --network mainnet --init initialize --args 42
> Instance created at 0x123456

... you can just run zos create and let the CLI walk you through it.


All previous arguments and flags still work. However, if you are writing a script to run in an automated environment, you can also add a --no-interactive flag to any command to make sure it will never prompt, or set a global ZOS_NON_INTERACTIVE environment variable. The CLI will also honor the DEBIAN_FRONTEND=noninteractive variable.

Unpack command

A new command zos unpack was added for unpacking a zepkit instance. We are providing two packs initially:

  • zos unpack zepkit will initialize a new barebones react app, preconfigured with OpenZeppelin, ZeppelinOS, Truffle, and Infura, ready to start coding.
  • zos unpack tutorial will initialize the same pack, but with an additional guided tutorial for you to get acquainted with it.


Additionally, zos unpack can be directed to any github repository with a kit.json specification, so anyone in the community can propose their own packs to be used with ZeppelinOS.

Set-admin command

In previous versions, zos set-admin would allow you to change the upgradeability admin (ie the Ethereum account, contract or externally owned, that had the rights to upgrade an instance) of each individual proxy in your application. However, on version 2.2, we introduced the ProxyAdmin component, which is a small contract that acts as a the owner of all your instances for your project (which you own in turn).

We have updated the zos set-admin command to take advantage of this new contract. It now allows you to change ownership of your entire project to a different account in a single transaction, by just changing the owner of the root ProxyAdmin. The functionality from previous versions is maintained, meaning that you can still change ownership of any individual instances if needed.

CREATE2 command

CREATE2 is an EVM opcode that allows you to deploy a contract at a predictable address, by providing a salt that is used to compute the deployment address. It is used in generalized state channels implementations, as well as in improved user onboarding flows.

With this new release, you can leverage CREATE2 directly from the command line, deploying an upgradeable contract at a predictable address with a one-liner. The CLI will take care of setting up the necessary contracts for you, so you don't to implement everything from scratch.


We have also added early meta-transaction support for this command. Instead of having the deployment address determined by the salt and the sender of the transaction, now a user can sign a CREATE2 request for a specific contract with a salt, and have the transaction submitted by anyone.

$ zos create2 MyContract --query --salt 42 --signature 0xabcdef --init initialize
> Instance of MyContract initialized with 'initialize()' with salt 42 and signature 0xabcdef will be deployed at 0x654321
$ zos create2 MyContract --salt 42 --signature 0xabcdef --init initialize
> Instance of MyContract deployed at 0x654321



  • Add interactive prompts for most CLI commands (add, create, init, link, publish, push, remove, session, set-admin, unlink, update, verify), plus a --no-interactive flag to ensure that no prompts are shown when working in a non-interactive script (#792, #766, #750, #745, #730, #725, #839)
  • Support ZOS_NON_INTERACTIVE environment variable, as well as DEBIAN_FRONTEND=noninteractive, to disable interactive prompts in scripts (#887)
  • Add zos unpack command for initializing a new zepkit from any github repository with a kit.json specification, with the shortcuts tutorial and zepkit already set to official packs (#822, #869)
  • Add zos create2 command for deploying proxies to a predefined address determined via a salt and the sender address, or an off-chain signature of a sender (#805, #757), checking before deployment that the address had not been already deployed to (#788) (thanks @siromivel!)
  • Add test to truffle-migrate sample project on CI (#775) (thanks @paulinablaszk!)
  • Add new ProxyFactory contract and model for supporting the CREATE2 opcode (#805)
  • Add new create-instances-from-solidity example project (#724)
  • Add READMEs to lib-simple and create-instances-from-solidity example projects (#813, #780) (thanks @paulinablaszk!)
  • Add mixins support to the typescript codebase for removing code duplication (#815)


  • Add support to set-admin command for changing the owner of the ProxyAdmin component, so ownership of the entire application can be moved to a different entity in a single transaction (#804)
  • Commands can now be run from any subfolder in the project (#818)
  • Optimized initializer modifier from Initializable contract to use less gas (#613) (thanks @k06a!)
  • Deployment of Contract class from lib now accepts a variable number of arguments for the constructor instead of an array (#630)


  • Fix issue truffle-migrate example (#763) (thanks @hardlydifficult!)
  • Output a message notifying if no contracts were pushed in a zos push (#888)
  • Remove dependency web3-provider-engine, which was no longer needed, and caused all of babel to be installed along with the CLI (#909)
  • Show a reasonable error message if a zos.json or file is malformed (#881)
  • Store proxy admin and proxy factory addresses in upon a push if the upload of a contract failed (#860)
  • Web3.js instance is no longer reset inbetween calls (#836) (thanks @Perseverance!)
  • Changing the proxy admin now checks that sender is the current admin before sending the transaction (#840)
  • Properly flagged lodash.omit as non-development dependency (#864)
  • Use the block gas limit as gas allowance for all transactions to ganache, instead of estimating gas, to circumvent bugs with gas estimations in ganache 6.4.0 and above (#896)
Assets 2
You can’t perform that action at this time.