0

I'm new to ethereum and blockchain technology. I'm trying to create my own crypto currency and using below JSON-RPC for creating new contract in our ethereum wallet on test network.

curl http://**.**.**.***:8545 -X POST --data '{"jsonrpc":"2.0","method":"eth_sendTransaction","params":[{"from": "0xcfd3db0f1a6cb6cbbaf2b46f773444c3f13e1fe3", "data": "0x606060405260728060106000396000f360606040526000357c0100000000000000000000000000000000000000000000000000000000900480636ffa1caa146037576035565b005b604b60048080359060200190919050506061565b6040518082815260200191505060405180910390f35b6000816002029050606d565b91905056"}],"id":1}'

after using this command I'm recieving following error

{"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"authentication needed: password or unlock"}}

I am confused what I am missing here, any help would be highly appreciated.

0

You need to unlock your accout with your password in order to be able to send a transaction. In the console you should type:

personal.unlockAccount(address, "password")

After successfully unlocking your account, you will be able to send transactions from the unlocked account! Good luck!

  • still getting the same response {"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"authentication needed: password or unlock"}} – Rahul Sati Oct 3 '17 at 8:03
  • Hmm...are you sure that you unlock the very same account from which you actually want to deploy the contract? – István András Seres Oct 3 '17 at 8:07
  • Done, for making successfull transaction I have addded the "gas" and "gasPrice" to the RPC call { curl http://**.**.**.***:8545 -X POST --data '{"jsonrpc":"2.0","method":"personal_sendTransaction","params":[{"from": "0xcfd3db0f1a6c********************", "data":"complied code", "gas" : "0x76c00", "gasPrice" : "0x9184e72a000"},"password"],"id":1}' } – Rahul Sati Oct 3 '17 at 10:15

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.