v2.4.0
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 balancequeries the balance of an account, either in ETH or in an ERC20zos transfersends funds from one of your accounts to anotherzos callexecutes a constant method in one of your contracts, and returns the valuezos send-txsends 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!
Changelog
Added
- New
zos compilecommand 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 thezos.jsonfile. The CLI will now default to this compiler when running commands that require compilation (likeaddorcreate), unless there are no compiler settings onzos.jsonand there is atruffle.jspresent in the project root, in which case it will rely ontruffle compileas usual. (#914, #940, #945, #953, #956, #959, #963) - New
networks.jsdefault 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. Atruffle.jsortruffle-config.jscan still be used. (#918, #949) - New
zos callandzos send-txinteractive 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 balanceandzos transfercommands for querying and transferring ETH directly from the command line. Thebalancecommand additionally supports an--erc20flag 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
--minimalflag when runningzos create. Instances created this way will not be upgradeable, but consume much less gas than their upgradeable counterpart. (#850)
Changed
- Reworked all log outputs in the application to be less verbose and more user-friendly. The
--verboseflag re-enables the previous logging level. (#915, #948, #969, #988, #1003) - [breaking] The
ConfigVariablesInitializerclass of the CLI programmatic interface has been renamed toConfigManager. (#918) - [breaking] The
initMethodandinitArgsparameter names of the CLI programmatic interface were changed tomethodNameandmethodArgsrespectively. (#841)
Fixed
- Do not list contracts already added in interactive prompt when running
zos add. (#904) - Fixed error
Cannot find method forEach of undefinedwhen 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
ProxyCreatedevent when runningsolidity-coverage. (#978) (thanks @tsudmi!)
Removed
- [breaking] Removed the
statuscommand, which was unmaintained and failing in certain scenarios.

