The following is a list of global variables along with their data types and a description provided as a ready reference:
Variable name |
Description |
block.coinbase (address) |
Same as etherbase. Refers to the miner's address. |
block.difficulty (uint) |
Difficulty level of current block. |
block.gaslimit (uint) |
Gas limit for current block. |
block.number (uint) |
Block number in sequence. |
block.timestamp (uint) |
Time when block was created. |
msg.data (bytes) |
Information about the function and its parameters that created the transaction. |
msg.gas (uint) |
Gas unused after execution of transaction. |
msg.sender (address) |
Address of caller who invoked the function. |