Issue
I want to deploy an ethereum smart contract and verify(reveal) its source code. Can I do it programmatically?
Usually I deploy a smart contract and verify it on etherscan.io. After the verification the source code is revealed. The task is that I need to deploy a lot of smart contracts but I can not verify them manually. Is there a way or API to upload the solidity code to reveal smart contract code to the public?
Though I guess the answer is "no" but still want to hear any ideas.
Thanks in advance
Solution
Indeed, at the time of writing this, it seems like there's no public endpoint to do this. There's no mention of such contract verification endpoint in Etherscan documentation here https://etherscan.io/apis or here https://hexdocs.pm/etherscan/
Someone was asking the same thing on their subreddit just about a month ago, without much success
Etherscan is using Are you a robot?
checkbox CAPTCHA upon verification. That one would be pretty hard to trick, not really worth trying. What you could do instead however is a partial automation of contract verification using Selenium.
Lets say you want to verify 20 contracts with minimal effort. It should be possible to write a script which would open up 20 tabs in browser, in each it would go to Etherscan, enter appropriate contract details for one of the contracts, but then let a human to handle the page with Are you a robot?
captcha.
Answered By - Patrik Stas Answer Checked By - Candace Johnson (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.