Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 704 Bytes

40.mdx

File metadata and controls

26 lines (17 loc) · 704 Bytes
fork group
Frontier
Block Information

Index 1 is top of the stack. See PUSH.

Stack input

  1. blockNumber: block number to get the hash from. Valid range is the last 256 blocks (not including the current one). Current block number can be queried with NUMBER.

Stack output

  1. hash: hash of the chosen block, or 0 if the block number is not in the valid range.

Examples

* Input Output
1 599423545 0x29045A592007D0C246EF02C2223570DA9522D0CF0F73282C79A1BC8F0BB2C238

Error cases

The state changes done by the current context are reverted in those cases:

  • Not enough gas.
  • Not enough values on the stack.