1

I'm trying to deploy a contract to the rinkeby (hope that thats the network to use for beta testing). Deploying worked with the command truffle migrate --reset -f 2 --network rinkeby.

Unfortunately, I tried to access the contract through etherscan and I only can see the bytecode. How should I add the source code to etherscan so that it is possible to interact with the contract on etherscan? Is there a way to do it automatically?

Thanks a lot for any hint!

0

To have Etherscan show the code associated with a deployed contract, you'll need to go through the verification process:

https://etherscan.io/verifyContract2

However, to interact with your contract you'll probably want to use Remix (https://remix.ethereum.org), and load the contract from the deployed address:

How to load contract from address- remix?

  • Any Idea how to find the matched compiler. I just tried the first step and failed. In my code I have: pragma solidity ^0.4.22; So choosed v0.22. commit but there are many versions.. – MichaelRazum Oct 18 '18 at 20:40
  • It should be the one without nightly in the name, so v.0.4.22+commit.4cb486ee. – Richard Horrocks Oct 18 '18 at 20:46
  • Thanks yes it worked. Could deploy the contract with sources. Thanks a lot! – MichaelRazum Oct 18 '18 at 20:54
  • Glad it worked :-) – Richard Horrocks Oct 18 '18 at 20:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.