Closed brianmcmichael closed 4 years ago
The thing is even with the dapp verify working we had some issues verifying some contracts (randomly didn't work, maybe some timeout in the etherscan api) + all the contracts created by factories are not being verified. I wouldn't enable this functionality as it is now, but instead I'd create a new independent script that runs after a deployment is done, which would check each address, get the solidity code and verify them. That will also keep the deployment script is not getting slower than already is.
Ok, I'll need to think about the best way to do that. Currently dapptools does not extract the source to an output location (only bin and abi), and it's currently only available from a temporary output path tracked within dapptools that gets removed after the deployment.
To do this via an external script we would probably need to request another update to dapptools that extracts the flattened source to a location where it can be accessed after the deployment. We'd also need to be able to match that code up to the address somehow. I'll poke around in this code to see if there's a better way.
Yeah let's think it more in detail. If we merge this we will end up having a slower deployment script with just a few contracts verified.
On the other hand, the deployment scripts run on nix, so it uses a defined dependency of dapptools, we should update a couple more places to use the latest version with dapp verify
fixed.
Closing this PR for now.
Fixes to dapptools verify have been merged at https://github.com/dapphub/dapptools/pull/287
This re-enables the etherscan verification flags for the kovan deployment and adds them to the script for the mainnet deployment.
Will require a dapptools update to work.