Docs
Reference
L2
TaikoL2

TaikoL2

publicInputHash

bytes32 publicInputHash

latestSyncedHeader

bytes32 latestSyncedHeader

BlockInvalidated

event BlockInvalidated(bytes32 txListHash)

constructor

constructor(address _addressManager) public

anchor

function anchor(uint256 l1Height, bytes32 l1Hash) external

Persist the latest L1 block height and hash to L2 for cross-layer bridging. This function will also check certain block-level global variables because they are not part of the Trie structure.

   Note that this transaction shall be the first transaction in every
   L2 block.

Parameters

NameTypeDescription
l1Heightuint256The latest L1 block height when this block was proposed.
l1Hashbytes32The latest L1 block hash when this block was proposed.

invalidateBlock

function invalidateBlock(bytes txList, enum LibInvalidTxList.Reason hint, uint256 txIdx) external

Invalidate a L2 block by verifying its txList is not intrinsically valid.

Parameters

NameTypeDescription
txListbytesThe L2 block's txlist.
hintenum LibInvalidTxList.ReasonA hint for this method to invalidate the txList.
txIdxuint256If the hint is for a specific transaction in txList, txIdx specifies which transaction to check.

getConfig

function getConfig() public view virtual returns (struct TaikoData.Config config)

getSyncedHeader

function getSyncedHeader(uint256 number) public view returns (bytes32)

getLatestSyncedHeader

function getLatestSyncedHeader() public view returns (bytes32)

getBlockHash

function getBlockHash(uint256 number) public view returns (bytes32)