v2.7.0
This release includes many new features and bugfixes, including Solidity 0.6 support, generation of typechain artifacts, and improvements around the oz compile command.
Solidity 0.6 support
This release has full support for the Solidity 0.6 version, which includes compiling, deploying, and interacting with contracts written with this version. Furthermore, the Initializable base contract has been tuned so it can be used with the 0.4, 0.5, and 0.6 compilers.
Typechain
The CLI can now generate typechain artifacts for your contracts, making it easier to use your projects in a typescript project. To enable it, just ensure you have a tsconfig.json at the root of your project, and both oz init and oz compile will ask you whether you want to enable typechain support.
Compiler
We made a few changes to how we handle imports in our compiler. The result is that we now have faster CLI response times, especially in large projects when we need to check whether there is anything to compile or not. We have also fixed issues that occurred when there were duplicate contract names, and removed support for ambiguous import paths. We are now also using our CLI to compile the contracts that are part of the SDK itself!
Changelog
Added
- Support for processing ABIs in contract artifacts compiled with Solidity 0.6. (#1362)
Initializablecontract can now be compiled in both Solidity 0.5 and 0.6. (#1413)- Generate typechain contract wrappers in a typescript project. (#1285)
- Add
pathproperty tonetwork.jsconfig file, to be used together withprotocol,host, andport. Addurlshorthand property as well. (#1386) - Support for tuple parameters when calling methods in interactive commands such as
send-tx,create, orupgrade. (#1333) - Solidity libraries in a project can now recursively link to other Solidity libraries. (#1252) (thanks @asselstine!)
- Add new
blockTimeoutcommand-line option that setsweb3#transactionBlockTimeout. (#1402) - Warn when importing
@openzeppelin/contractsinstead of@openzeppelin/contracts-ethereum-package. (#1335)
Fixed
- Check for parameterless constructors in ancestor contracts when validating an upgradeable contract. (#1385)
- Abort interactive
createorupgradeprocesses on contract validation errors, such as having a constructor. (#1382) - Load
gasandgasPricefrom network configuration file. (#1345) - Command-line option
timeoutnow properly setsweb3#transactionPollingTimeout. (#1402) - Sort commands in alphabetical order for
--help. (#1321) - Prevent corruption of compiled artifacts if there are multiple contracts with the same name. (#1296)
- Ensure relative paths are stored in project configuration file. (#1384)
- Improve error message if no networks are set in
network.jsconfiguration file. (#1394)
Changed
- Trimmed the API of the
ZWeb3object to remove methods duplicated fromweb3.js. (#1369) - [breaking] Remove support for ambiguous Solidity imports relative to the current file not starting with a dot, to prevent corrupted artifacts. Warn when duplicate contract names are found. (#1411)
- Use solidity fuzzy-import parser, to speed up nothing-to-compile checks by a 40%, and lazy-load truffle-flattener to decrease CLI startup time. (#1291)
- Disable interactivity if stdin is not a terminal. (#1299)