block.coinbase does only return 0x
See original GitHub issueExpected Behavior
I expected to get accounts[0] as block.coinbase.
Current Behavior
I got 0x0000000000000000000000000000000000000000 as block.coinbase.
curl -X POST --data '{"jsonrpc":"2.0", "method":"eth_coinbase", "params":[],"id":9999}' 127.0.0.1:8545
Gives me accounts[0].
Possible Solution
Steps to Reproduce (for bugs)
- run ganache-cli
- deploy contract
pragma solidity ^0.4.24;
contract TestCoinbase {
function getCoinbase() public returns (address){
return block.coinbase;
}
}
- call getCoinbase
Context
Try to run tests for code that uses block.coinbase.
Your Environment
Ganache CLI v6.1.8 (ganache-core: 2.2.1) OSX 10.13.6
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
block.coinbase does only return 0x · Issue #201 - GitHub
The reason the block coinbase can't be accounts[0] by default is that each block would change the accounts balance, and would then break...
Read more >What does block.coinbase return when contract is being ...
When a miner includes the transaction in a block he's mining (and succeeds in solving the PoW puzzle) he broadcasts the block and...
Read more >Earn rewards with staking and inflation on Coinbase
Are rewards guaranteed? Coinbase does not guarantee that you'll receive staking rewards, any specific reward, or any staking return over time.
Read more >Advanced API Reference - Coinbase Cloud
The Advanced API provides access to token balances for accounts, transactions and transfers for accounts, smart contract event logs, and more. API constraints:....
Read more >0x (ZRX) Price, Charts, and News | Coinbase: zrx, zrx crypto, 0x
Trading under ZRX, 0x is an open protocol that allows a frictionless exchange of Ethereum-based assets. As numerous DApps are built on the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This is still an issue in 2020
@Goldenflamer Thanks for the bump on this issue. Unfortunately this is a little lower priority than some of our other issues. That said, I plan on fixing this ASAP but if this is a blocker for you we highly encourage PR’s!