1

when I am trying to run this command on geth console.it give an error.how to run this command on geth console.

run geth with this commnad

 geth --port 5000 --networkid 58342  --datadir="" --rpc --rpcport 8545 --rpcaddr 127.0.0.1 --rpccorsdomain "*" --rpcapi "eth,net,web3" --testnet

web3.eth.accounts.create(); TypeError: 'create' is not a function at :1:1

  • 1
    There is no create function for eth , do you want to create a account? – BinGoBinBin Aug 30 '17 at 7:42
2

I think you need to load personal library --rpcapi "eth,net,web3,personal" and i don't thin using --datadir="" is a good idea.

 geth --port 5000 --networkid 58342   --rpc --rpcport 8545 --rpcaddr 127.0.0.1 --rpccorsdomain "*" --rpcapi "eth,net,web3,personal" --testnet
| improve this answer | |
1

Try to use personal.newAccount('passphrase')

and use rpcapi="eth,personal,miner,web3"

(1) First start your geth
geth --port 5000 --networkid 58342 --datadir="" --rpc --rpcport 8545 --rpcaddr 127.0.0.1 --rpccorsdomain "*" --rpcapi "eth,personal,net,web3" --testnet

(2) Now Open Ethereum's Javascript console
geth attach ipc

(3) Create new address
personal.newAccount('passphrase')

| improve this answer | |

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.