remix-project icon indicating copy to clipboard operation
remix-project copied to clipboard

When deploying from Remix, automatically verify contract on Etherscan?

Open stefek99 opened this issue 7 years ago • 36 comments

Feature request

When deploying from Remix, automatically verify contract on Etherscan.

Rationale

  1. We have code
  2. We have compiler version
  3. We have optimisations yes / no

Some work from Etherscan guys will be needed.

Question - is there a valid use case not to have source of the contract visible?

There are some decompilers out there, EVM bytecode is visible to everyone...

stefek99 avatar Jul 13 '18 11:07 stefek99

checking the feasability with etherscan. would be a great candidate for a remix extension

yann300 avatar Jul 16 '18 08:07 yann300

here is the etherscan API doc https://etherscan.io/apis#contracts

yann300 avatar Oct 19 '18 08:10 yann300

I don't think we should automatically verify, but we can add an action which send the source code, compiler version, optimization settings, contract address to etherscan and perhaps another one for checking if a particular contract is verified. I believe etherscan provides as much entry point for this API as networks available (ropsten, rinkeby, kovan, mainnet), so all should be manageable within the extension.

yann300 avatar Oct 20 '18 08:10 yann300

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 200.0 DAI (200.0 USD @ $1.0/DAI) attached to it as part of the Ethereum Foundation fund.

gitcoinbot avatar Nov 13 '18 01:11 gitcoinbot

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 3 weeks, 6 days ago. Please review their action plans below:

1) mul1sh has been approved to start work.

For this issue, i'll basically use the etherscan API's and create an extension in remix that basically checks if a contract has been verified or not and show the appropriate response.

Learn more on the Gitcoin Issue Details page.

gitcoinbot avatar Nov 13 '18 01:11 gitcoinbot

the plugin should also propose to verify a contract using the API

yann300 avatar Nov 13 '18 09:11 yann300

if there's need to extend the API, please ping us at gitter.com/remix-dev @yann300 @GrandSchtroumpf

yann300 avatar Nov 13 '18 09:11 yann300

@yann300 ok will do, i've already started work on this, will do a WIP pr in a few

mul1sh avatar Nov 14 '18 07:11 mul1sh

Hey @mul1sh how are things going towards the PR?

spm32 avatar Nov 21 '18 02:11 spm32

@ceresstation i've gotten the POST request to the etherscan api (with the necessary data) working. So now implementing the checks to see whether a contract is verified and i'll be done.

mul1sh avatar Nov 21 '18 03:11 mul1sh

@mul1sh Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

gitcoinbot avatar Nov 24 '18 17:11 gitcoinbot

Thanks for the update!

spm32 avatar Nov 25 '18 01:11 spm32

@ceresstation 👍

mul1sh avatar Nov 25 '18 16:11 mul1sh

thanks @mul1sh @ceresstation please ping us at https://gitter.im/ethereum/remix-dev-plugin if you need anything

yann300 avatar Nov 26 '18 09:11 yann300

@yann300 thanks, joining now

mul1sh avatar Nov 29 '18 14:11 mul1sh

@yann300 @ceresstation since I can't PR to remix-ide directly , because the solution to this issue is a plugin, the link to the verification plugin is https://github.com/mul1sh/verify-contract

I'm doing one last commit to it in a few hours and then it will be ready 🙂

mul1sh avatar Dec 03 '18 14:12 mul1sh

awesome! ;) cc @GrandSchtroumpf

yann300 avatar Dec 03 '18 14:12 yann300

Thanks @mul1sh!

spm32 avatar Dec 04 '18 12:12 spm32

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 200.0 DAI (200.0 USD @ $1.0/DAI) has been submitted by:

  1. @mul1sh

@ceresstation please take a look at the submitted work:

  • PR by @mul1sh

gitcoinbot avatar Dec 05 '18 22:12 gitcoinbot

@yann300 @ceresstation this is more of an update to the above repo, the plugin is not fully ready but i didn't want @gitcoinbot to make noise to me 😄.

Nonetheless it'll be fully ready in a few hours from now.

mul1sh avatar Dec 05 '18 22:12 mul1sh

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 200.0 DAI (200.0 USD @ $1.0/DAI) has been submitted by:

  1. @mul1sh

@ceresstation please take a look at the submitted work:

  • PR by @mul1sh

gitcoinbot avatar Dec 06 '18 01:12 gitcoinbot

Hey @stefek99! Have you had the opportunity to check out the submitted work yet?

CPSTL avatar Dec 10 '18 02:12 CPSTL

Thanks for chasing me.

Here are the instructions: https://github.com/mul1sh/verify-contract#usage

Does not work for me: image


Maybe position the button next to the transaction receipt?

And pre-populate the contract address?

Also the mainnet / testnet, how does it know which network I'm on?

verify contract etherscan

stefek99 avatar Dec 11 '18 12:12 stefek99

Hey @mul1sh have you had the chance to modify the plugin and update @stefek99 yet?

CPSTL avatar Dec 17 '18 04:12 CPSTL

@CPSTL Sorry for the delay, modifying the plugin now 🙂

mul1sh avatar Jan 09 '19 15:01 mul1sh

Hey @mul1sh Any updates on this? :)

spm32 avatar Jan 21 '19 18:01 spm32

@ceresstation i'm done, just testing my changes and then push them in a few hours so that we close this today 🙂

mul1sh avatar Jan 22 '19 10:01 mul1sh

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 200.0 DAI (200.0 USD @ $1.0/DAI) attached to this issue has been approved & issued to @mul1sh.

gitcoinbot avatar Feb 02 '19 07:02 gitcoinbot

Did I miss something?

image

Last commit two months ago...

stefek99 avatar Feb 04 '19 17:02 stefek99

hi @mul1sh thanks, I get this plugin.js:11 Uncaught (in promise) ReferenceError: $ is not defined when trying to verify.

yann300 avatar Feb 11 '19 10:02 yann300