Releases: OpenZeppelin/openzeppelin-sdk
v2.0.2
This patch fixes an issue caused by a transitive dependency of zos
being made incompatible as part of a patch version bump. As such, all fresh installations of 2.0.1 will download an incompatible dependency, and crash on zos push
. This release fixes the issue by pinning the transitive dependency versions.
Added
truffle-provider
dependency to make sure we rely onweb3@^0.x
(38867fd)
Fixed
v2.0.1
Changes
- Improve validation messages for security verifications (such as storage layout checks, no-constructor checks, or fields with initial values in their declaration) (#362).
- Add default gas price of 5 gwei to
truffle.js
template file created onzos init
(#354). - Skip gas price checks if working on a local ganache instance (#359).
Fixed
- Fix
Web3ProviderEngine does not support synchronous requests
error when runningzos status --fix
with an async web3 provider (#388). - Throw a meaningful error when attempting to push a project with a link to an unpublished dependency (#356).
- Fetch correct address when initializing a proxy that spawns a new proxy as part of its initialization (#367).
- Properly handle scientific notation (such as
5e10
) in proxies initialization arguments onencodeCall
function (#355).
v2.0.0
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 formerMigratable
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 namedstdlib
) into a project (#17, #39, #50, #99, #82, #125). - [major] New
publish
command, that creates a set ofApp
,Package
, andDirectory
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 createdApp
(#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 noselfdestruct
, no default values for variables, and noconstructor
) (#230) - New
--skip-compile
option inpush
command to skip automatic recompilation of contracts (#214) - New
--publish
flag ininit
, that will cause the firstpush
of a project to any network to automaticallypublish
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
andscripts
functions, allowing the CLI commands to be used from javascript code (#177) - New
AppProject
model for managing a project based on anApp
contract directly fromzos-lib
, and simplifyApp
contract model wrapper (beb7afdb
) - New
SimpleProject
model for managing a project without depending on anApp
,Package
, orDirectory
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
andVouching
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
, andDirectory
contracts by default, and use aSimpleProject
model instead to create proxies and track logic contracts off-chain (#146, #231) - Use canonical network names (
ropsten
,mainnet
, etc; ordev-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 to2
in all json manifest files (#162) - Contracts are now validated for errors when
push
ing them instead onadd
, to ensure that any changes performed after initiallyadd
ing them are also checked (#224) - Rename
TestApp
toTestHelper
(#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 multiplePackage
s (which are either dependencies or the project's main package), the reference to anstdlib
is removed from theDirectory
, and creating a new proxy requires specifying the name of the package and the contract (#17). - [major] Change
Initializable
base contract, simplifyingisInitializable(name,version)
modifier toinitializer()
, and removingMigratable
(#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 asinitialize(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
, andDirectory
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...
v1.4.3
v1.4.2
v1.4.1
v1.4.0
Added
- Add check for selfdestruct calls in logic contracts that could lead to orphaned proxies (#347) (thanks @HardlyDifficult)
- New
verify
command to verify and publish a contract source code on etherchain (#339) - Support for multiple versions on docsite (#8)
Fixed
- Handle stdlib semver syntax in the
status
command (#290) - Better wording from status command when a contract is scheduled to be removed (#304)
- Fail with an explicit error when attempting to create a proxy for an stdlib that was linked but not pushed to the network (#322)
- Include default timeout in
--timeout
flag help (#302) - Fix naming issues of upgrade-command-related files (#327)
- Modes
--fetch
and--fix
from thestatus
command now work properly with lib projects (#314)
Changed
- Merged cli, lib, and docs repositories into a monorepo managed via lerna.
- Swapped
TestApp
initializer parameters, it now acceptstxParams
first and an optionalZosNetworkFile
object as a last argument. - Contract deployments and transactions are executed with an estimate of the gas needed, instead of using the network default (#211)
- Promisify all web3 function calls (#205)