What is the difference between web3.eth.coinbase
and web3.eth.accounts[0]
? Which is the best method to get the current address? I am new to this community and I know this may be a silly question
1 Answer
web3.eth.accounts[0]
refers to very first address created on an Ethereum node. web3.eth.coinbase
returns you the coinbase. Coinbase or the Etherbase is the account in which your mining Ether i.e Block Reward will be credited. When there is one account, it is same as accounts[0] but you can also set it for other available address of same node.
Related: What is coinbase?
-
To check whether the Metamask is locked or not, which one is suitable?– MuhzinCommented Jan 4, 2019 at 6:26
-