Closed sihoang closed 5 years ago
For the forwarder, we only deploy 1 Factory and verify its code on etherscan. The Etherscan verification process is manual. https://etherscan.io/address/0x81cce0b68f2c2264a3a24a7fc3096611d9294f6f#code There's no need to upgrade ever since because the specs and requirements are dead simple i.e. forward ETH to a pre-defined address.
However, for Challenge contracts, changes might happen. How can we automated the code verification of a deployed contract?
We don't want to go the Factory route because:
Can we implement getVersion() method in our smart contract? Every time we publish the challenge contract, we need to change getVersion() accordingly.
We can easily use a NodeJS program to get version of our contracts.
Figure out a mechanism to verify the npm module @WeTrustPlatform/charity-challenge-contracts and source code of a deployed Challenge contract.
The current procedure for npm publish is:
npm run beforePublish
on the latest master branch to generate the new .exported.jsThings that could go wrong:
npm run beforePublish
generates different .exported.js on different machine.move-ethereum-forward
where we deploy new contracts, we could potentially: