Skip to content

Latest commit

 

History

History
45 lines (28 loc) · 1.58 KB

Block & Transaction Properties.md

File metadata and controls

45 lines (28 loc) · 1.58 KB

Block and Transaction Properties:

  1. blockhash(uint blockNumber) returns (bytes32): hash of the given block - only works for 256 most recent, excluding current, blocks

  2. block.chainid (uint): current chain id

  3. block.coinbase (address payable): current block miner’s address

  4. block.difficulty (uint): current block difficulty

  5. block.gaslimit (uint): current block gasLimit

  6. block.number (uint): current block number

  7. block.timestamp (uint): current block timestamp as seconds since unix epoch

  8. msg.data (bytes calldata): complete calldata

  9. msg.sender (address): sender of the message (current call)

  10. msg.sig (bytes4): first four bytes of the calldata (i.e. function identifier)

  11. msg.value (uint): number of wei sent with the message

  12. tx.gasprice (uint): gas price of the transaction

  13. gasleft() returns (uint256): remaining gas

  14. tx.origin (address): sender of the transaction (full call chain)


Slide Screenshot

073.jpg


Slide Deck

  • Block: Hash, ChainID, Number, Timestamp
  • Block: Coinbase, Difficulty, GasLimit
  • Msg: Value, Data, Sender, Sig
  • Tx: Gasprice, Gasleft, Origin

References