makerdao / dss-deploy-scripts

GNU Affero General Public License v3.0
49 stars 59 forks source link

Reenable verification #69

Closed brianmcmichael closed 4 years ago

brianmcmichael commented 4 years ago

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.

gbalabasquer commented 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.

brianmcmichael commented 4 years ago

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.

gbalabasquer commented 4 years ago

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.