0

Is there a way to set coinbase/etherbase from javascript using web3 or anything else? And how it is set in the first place?

2

Is there a way to set coinbase/etherbase from javascript using web3 or anything else?

Web3 is not exposing miner object. So you can not directly do it from web3.js

But you can you cli to do the same. Fo geth users:

  • Attach to your geth instance by command : geth attach
  • Set Coinbase by using command: miner.setEtherbase("0xba00d05cc2729fc690db4a352de1ee2b5e60dc26")

And how it is set in the first place?

By default, the first account created on geth becomes the etherbase account.

| 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.