When I use ETH with JSON-RPC I have error "message": "authentication needed: password or unlock» and If I manually unlock I have other error "message": "insufficient funds for gas * price + value" Any ideas???? POST request
3 Answers
You need to pass --rpc and also pass required apis through --rpcapi on the command line to enable it, as per https://github.com/ethereum/wiki/wiki/JSON-RPC#go.
-
1Just make sure youre aware of the security consequences Commented Sep 28, 2018 at 9:26
First of all it would be better to avoid unlocking account, second - "insufficient funds for gas * price + value" means that your account doesn't have enough balance to perform the transaction.
The message says that your account's balance is lower than (gas limit
* gas price
), which is often more than a transaction actually takes, because the maximum gas allowance (gas limit
) is what matters here.
"message": "authentication needed: password or unlock have other error "message":
means you try to make a sendTransaction request with the wallet in your node, to keep wallet save in node, the wallet is usually locked (bad guys might call api to steal your eth), you have to call personal_unlockAccount first.
Remember to lock account after you make transaction!
"insufficient funds for gas * price + value"
means you don't have enough eth to make the transaction.