Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

BlockhashTest

Inherits: Test

State Variables

startingBlock

uint256 internal startingBlock;

SYSTEM_ADDRESS

address internal constant SYSTEM_ADDRESS = 0xffffFFFfFFffffffffffffffFfFFFfffFFFfFFfE;

HISTORY_STORAGE_BYTECODE

bytes private constant HISTORY_STORAGE_BYTECODE =
    hex"3373fffffffffffffffffffffffffffffffffffffffe14604657602036036042575f35600143038111604257611fff81430311604257611fff9006545f5260205ff35b5f5ffd5b5f35611fff60014303065500";

Functions

setUp

function setUp() public;

testFuzzRecentBlocks

function testFuzzRecentBlocks(uint8 offset, uint64 currentBlock, bytes32 expectedHash) public;

testFuzzHistoryBlocks

function testFuzzHistoryBlocks(uint16 offset, uint256 currentBlock, bytes32 expectedHash) public;

testFuzzVeryOldBlocks

function testFuzzVeryOldBlocks(uint256 offset, uint256 currentBlock) public;

testFuzzFutureBlocks

function testFuzzFutureBlocks(uint256 offset, uint256 currentBlock) public;

testUnsupportedChainsReturnZeroWhenOutOfRange

function testUnsupportedChainsReturnZeroWhenOutOfRange() public;

_setHistoryBlockhash

function _setHistoryBlockhash(bytes32 blockHash) internal;

_setHistoryBlockhash

function _setHistoryBlockhash(uint256 blockNumber, bytes32 blockHash) internal;