This PR integrates Transpiler into SDK. It is a joined effort with @frangio.
Highlights:
Adds support for Transpiler to deploy, push and update commands allowing to run them on vanilla Solidity contracts 🚀
Updates integration tests to use vanilla contracts.
Update cli and lib tests to support new push command and stubs them around Transpiler.
Bumps integration tests Solidity version to 0.5 and Truffle version to version 5.
Adds Transpiler support Truffle artifacts
Transpiler will keep original import reference side by side with Upgradeable reference.
Transnpiler will properly handle strings as constructor parameters.
Removes creating-instances-from-solidity integration test because it is no longer valid. It will be replaced by a new test.
Removes validation checks for vanilla OpenZeppelin contracts. They should be checking instead for ethereum-packages from now on.
Rename upgradable to upgradeable everywhere.
Architecture Overview
@frangio came up with a brilliant idea to add upgradeable filed to Contract interface which contains an upgradeable instance of a contract. During the loading process of a contract method getFromPathWithUpgradeable will look for a matching upgradeable contract and load it into upgradeable field. All the existing code will be able to access the upgradeable version of a contract just by tapping into the upgradeable field. This approach allows for minimization of the impact of supporting transpiled contracts.
Transpilation of the contracts itself happens during push command. This requires two compilations, first to compile vanilla contracts for Transpiler and second to compile transpiled contracts to deploy them to blockchain.
Fixes https://github.com/OpenZeppelin/openzeppelin-sdk/issues/1300
This PR integrates Transpiler into SDK. It is a joined effort with @frangio.
Highlights:
deploy
,push
andupdate
commands allowing to run them on vanilla Solidity contracts 🚀Upgradeable
reference.strings
as constructor parameters.creating-instances-from-solidity
integration test because it is no longer valid. It will be replaced by a new test.upgradable
toupgradeable
everywhere.Architecture Overview @frangio came up with a brilliant idea to add
upgradeable
filed toContract
interface which contains an upgradeable instance of a contract. During the loading process of a contract methodgetFromPathWithUpgradeable
will look for a matching upgradeable contract and load it intoupgradeable
field. All the existing code will be able to access the upgradeable version of a contract just by tapping into the upgradeable field. This approach allows for minimization of the impact of supporting transpiled contracts. Transpilation of the contracts itself happens during push command. This requires two compilations, first to compile vanilla contracts for Transpiler and second to compile transpiled contracts to deploy them to blockchain.