Skip to content

@jcarpanelli jcarpanelli released this Jun 24, 2019 · 58 commits to master since this release

This release adds some improvements on zos outputs, adds a new zos compile command to compile your contracts, incorporates a new networks.js file to manage your networks, and finally implements a couple of handy commands to interact with your contracts from the command line.

Nicer outputs

While in 2.3 we focused on improving the ZeppelinOS inputs, by implementing friendlier interacting commands, in 2.4 we focused on improving its outputs. We removed much of the verbosity that plagued the CLI, and show you only what actually matters. We also integrated the awesome spinnies library for presenting long-running operations.


If you miss having the CLI filling your terminal with lots of output, you can bring back the old mode (with even more info!) by using the --verbose flag in any command.

Standalone CLI

You can now run ZeppelinOS without depending on truffle. Version 2.4 ships with a new zos compile command that will install and run solcjs on your behalf, and compile your Solidity contracts when needed. As a bonus feature, zos will check if there is a solc on your PATH that matches the requested version, and use it instead of the javascript port - this yields a 6x speed improvement in compile times. It's worth mentioning that the artifacts generated by zos compile follow the same format as truffle's.

Also, zos init will now create a framework-independent networks.js file with the description of the network connections for your project. The format is similar to that of truffle-config.js, with an additional protocol key that allows you to specify whether you want to connect to your node via http(s), ws(s), ipc, etc.

Of course, ZeppelinOS remains fully compatible with truffle. If the CLI detects a truffle(-config).js on your project root, it will still rely on truffle for compiling your contracts, and will load the networks configuration from truffle as usual.

Interacting with your contracts from the command line

We have added new commands for interacting with your contract instances easily. You can now send a transaction or move funds directly from the terminal, without having to spawn a javascript console.


You can try out the following commands:

  • zos balance queries the balance of an account, either in ETH or in an ERC20
  • zos transfer sends funds from one of your accounts to another
  • zos call executes a constant method in one of your contracts, and returns the value
  • zos send-tx sends a transaction to one of your contracts, and returns the events

EIP1167 minimal proxies

We have added experimental support for EIP1167 minimal proxies. These proxies rely on the same delegatecall pattern as the usual ZeppelinOS proxies, but have two main differences:

  • They cannot be upgraded to a different version of the code
  • They are incredibly cheap to deploy: about 1/10th of the standard proxy!

These features make minimal proxies an ideal choice when you want to spawn many copies of the same contract, without worrying about maintaining them in the future. They also play nicely with EVM packages: since the package developer pays the deployment cost of the logic contracts, you only need to pay for the minimal proxies.

You can try deploying one of these proxies by adding the --minimal flag when running zos create. Remember that these proxies will not be upgradeable to a different version of the code: the reduced deployment gas fee comes at a cost!



  • New zos compile command that uses solc directly to compile your contracts, generating artifacts with a format compatible to truffle's. The compiler version and optimizer settings can be controlled via command flags that are persisted on the zos.json file. The CLI will now default to this compiler when running commands that require compilation (like add or create), unless there are no compiler settings on zos.json and there is a truffle.js present in the project root, in which case it will rely on truffle compile as usual. (#914, #940, #945, #953, #956, #959, #963)
  • New networks.js default configuration file for specifying networks connections. This file replaces the truffle config file in specifying the available networks for the CLI, and shares most of its format. A truffle.js or truffle-config.js can still be used. (#918, #949)
  • New zos call and zos send-tx interactive commands for interacting with a contract directly from the command line, by calling a constant method or sending a transaction to a function. (#848, #853)
  • New zos balance and zos transfer commands for querying and transferring ETH directly from the command line. The balance command additionally supports an --erc20 flag to query the balance of an ERC20 token instead of ETH. (#823, #834)
  • Added validations to method arguments in the interactive prompt. (#1018)
  • [experimental] Add minimal proxy support (EIP 1167) via a --minimal flag when running zos create. Instances created this way will not be upgradeable, but consume much less gas than their upgradeable counterpart. (#850)


  • Reworked all log outputs in the application to be less verbose and more user-friendly. The --verbose flag re-enables the previous logging level. (#915, #948, #969, #988, #1003)
  • [breaking] The ConfigVariablesInitializer class of the CLI programmatic interface has been renamed to ConfigManager. (#918)
  • [breaking] The initMethod and initArgs parameter names of the CLI programmatic interface were changed to methodName and methodArgs respectively. (#841)


  • Do not list contracts already added in interactive prompt when running zos add. (#904)
  • Fixed error Cannot find method forEach of undefined when two contracts with the same name are present in the project. (#880)
  • Support invoking a method in a contract when there is another method with the same name and number of arguments. (#1019)
  • Fixed parsing of array, boolean, and integer arguments when calling a method via the interactive prompt. (#976, #987)
  • Handle new metadata format introduced in Solidity 0.5.2 embedded in the contract's bytecode. (#934)
  • Fix extracting proxy address from ProxyCreated event when running solidity-coverage. (#978) (thanks @tsudmi!)


  • [breaking] Removed the status command, which was unmaintained and failing in certain scenarios.


  • Removed TSlint in favor of prettier and ESLint. (#920)
  • Add integration tests for starter boxes, to ensure that the latest version of the CLI is always compatible with zepkit. (#913, #957)
Assets 2
You can’t perform that action at this time.