web3 & contracts usage
I'm trying to deploy new contract to ethermint using web3.js library.
And faced with this issues:
- last docker image of
tendermint/ethermintis working but does not allow me to unlock account.
Code:
web3.personal.unlockAccount(account, '1234', (err) => {})
Returns:
Could not unlock account: Error: The method personal_unlockAccount does not exist/is not available
Without unlock Im getting message:
Error: authentication needed: password or unlock
personal API is not enabled by default, start ethermint smth like
--rpc --rpcaddr "0.0.0.0" --rpccorsdomain "*" --rpcapi "db,eth,web3,personal,admin,txpool"
Shouldn't it be in default docker image ? Otherwise it's useless because you couldn't use almost anything from ethermint.
@konstantinzolotarev The goal is to be as similar as go-ethereum in its behaviour. I don't know whether it is enabled by default in their client though.
https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options
--rpcapi value API's offered over the HTTP-RPC interface (default: "eth,net,web3")
... and you can pass this as additional params to a docker image as well
An update has been pushed. The docker container defaults to starting with --rpcapi "eth,net,web3,personal,admin"