I have been learning to code smart contracts and I'm doing a test ICO witch I want to deploy to Rinkeby test net. And I have encountered a problem. Would some of you guys would mind to help me?

I have been following this tutorial and everything was fine until this point https://www.youtube.com/watch?v=VSdXmuSEveA 7:19

The first problem is that I don't know which address should I paste in here https://ibb.co/c8zD8y . Will MetaMask address do the job? https://ibb.co/gycTad or should i paste one of the Gnanche addresses https://ibb.co/bGXBvd ?

The second problem is when i paste this command https://ibb.co/e381vd to the terminal either it fails to unlock or the blockchain synchronization starts and does not end. (I suspect that the problem occurs because I pasted in the wrong address in the code/terminal or I don't have a private key or some file specified)

I would appreciate help. Thank you.

2 Answers 2

  • First question: Since you want to deploy the contract on a Testnet which is not a local blockchain running only on your localhost, you have to put on the address field your Rinkeby address of Metamask. Otherways, the testnet will not be able to verify the address correctness.

What seems strange to me is that you haven't put your mnemonic anywhere as far as I see, so you won't be able to deploy anything if you don't provide it or at least the private key related with the account from which you are trying to do the deploy.

Hope it helps.

  • Thank you for the answer. I have a few questions for you and it would be very nice if you would answer. How should I provide the mnemonic? What is the syntax of it? Can I provide the private key if I have it as a file? If yes how?
    – JustinZ
    May 19, 2018 at 17:13
  • ethereum.stackexchange.com/a/48769/39499 On this post, you have the compile.js and the deploy.js files where you'll get the answers. If you have your private key on file, just import it.
    – CPereez19
    May 19, 2018 at 18:07

First question: You have to pass the address who will be used during migrations. Defaults to the first available account provided by your Ethereum client.

Second question: You can't unlock a wallet if you don't have his private key, you have to own them and manage them through geth (doc)


Export a private key from metakask

Import account to geth

  • So if i'm using geth client I should be using geth address and not metamask address?
    – JustinZ
    May 19, 2018 at 7:50
  • You can use your metamask address if you want but first, you have to import it into geth and then you will be able to use it (Because geth needs the private key of this address to sign transaction)
    – oktapodia
    May 19, 2018 at 9:24
  • Thank you for the answer. How should I import Metamask address to geth?
    – JustinZ
    May 19, 2018 at 17:11
  • Added 2 links to help you with that in my answer
    – oktapodia
    May 20, 2018 at 18:03
  • I get the error: failed to unlock account “my address here” (no address or key provided) After I type the unlock command and type in the password
    – JustinZ
    May 21, 2018 at 5:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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