The block variable gives all of the information related to a block. It provides the details of the current block in which your current transaction is being executed. It has some members available that you can use to get specific information:
- block.coinbase: This provides the miner's EOA address of the current block.
- block.difficulty: This provides the current difficulty level of the network as a uint256 value, which is used by the miners to solve the Proof of Work (PoW) puzzle.
- block.gaslimit: This provides the total gas limit of the current block as a uint256 value. At the time of writing this book, 8 million gas is allocated to each block on Ethereum mainnet.
- block.number: This provides ...