Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Etherscan API for contract code verification #52

Merged
merged 7 commits into from
May 14, 2019
Merged

Conversation

vinceau
Copy link
Contributor

@vinceau vinceau commented May 13, 2019

Description

This PR introduces the yarn run verify command for verifying deployed contracts.

Motivation

This allows for automated contract verification without having to interact with the Etherscan frontend for verifying contracts.

Design

The yarn run verify command requires the name of the contract to be passed in as a parameter. This makes it hard to additionally pass in the network parameter too. Previous we had two deploy commands, one for Kovan and one for Mainnet. In replacement of that we introduce the NETWORK environmental variable, that should be passed in with the command.

For example:

NETWORK=kovan yarn run deploy

or

NETWORK=mainnet yarn run verify DarknodePayment

Unresolved Issues

Ideally, the contract verification should not be a separate step but should be a part of the deployment stage. After each contract deploy, that contract should automatically be verified, rather than having to specify which contracts to verify. This can be done by extending the truffle-deployer and adding a post deploy hook of some kind, in combination with sol-merger or truffle-flattener and the Etherscan API interface in this PR.

@vinceau vinceau requested a review from 0x31 May 13, 2019 23:22
@0x31 0x31 merged commit d8f1187 into master May 14, 2019
@vinceau vinceau deleted the etherscan-api branch May 14, 2019 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants