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

Wang
  • 2,416
  • 4
  • 19
  • 28

1 Answers1

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.

BokkyPooBah
  • 40,274
  • 14
  • 123
  • 193