1

I tried to use the geth CLI(the eth.contract command line) to deploy a new contract to my private chain, but why is there no response even no transactions received by the chain according to the log and when I use that command line to deploy the contract there is no need for me to unlock the account or provide the passphrase enter image description here

3

1 Answer 1

0

The issue is most likely caused by a locked account. Try adding the --unlock 0 --password {passwordfile} parameter as shown below.



From geth --dev exposes live net accounts. Is it safe? :

Here is my Dev startup script:

#!/bin/sh

geth --datadir ~/EtherDev/data --dev --nodiscover    \
  --mine --minerthreads 1 --maxpeers 0 --verbosity 3 \
  --unlock 0 --password ~/EtherDev/etc/passwordfile  \
  --rpc console

And here is the Dev script I use to create my passwords:

#!/bin/sh

mkdir ~/EtherDev/data
geth --datadir ~/EtherDev/data           \
  --password ~/EtherDev/etc/passwordfile \
  account new

And I just use a simple password in ~/EtherDev/etc/passwordfile.

1
  • 1
    I unlock the account first and problem solved, thank you!
    – Wang
    Commented May 26, 2016 at 4:09

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.