Docs
Reference
Contract documentation
L1
TaikoL1

TaikoL1

state

struct TaikoData.State state

receive

receive() external payable

init

function init(address _addressManager, bytes32 _genesisBlockHash, uint64 _initBlockFee) external

Initialize the rollup.

Parameters

NameTypeDescription
_addressManageraddressThe AddressManager address.
_genesisBlockHashbytes32The block hash of the genesis block.
_initBlockFeeuint64Initial (reasonable) block fee value.

proposeBlock

function proposeBlock(bytes input, bytes txList) external returns (struct TaikoData.BlockMetadata meta)

Propose a Taiko L2 block.

Parameters

NameTypeDescription
inputbytesAn abi-encoded BlockMetadataInput that the actual L2 block header must satisfy.
txListbytesA list of transactions in this block, encoded with RLP. Note, in the corresponding L2 block an anchor transaction will be the first transaction in the block -- if there are n transactions in txList, then there will be up to n + 1 transactions in the L2 block.

proveBlock

function proveBlock(uint256 blockId, bytes input) external

Prove a block with a zero-knowledge proof.

Parameters

NameTypeDescription
blockIduint256The index of the block to prove. This is also used to select the right implementation version.
inputbytesAn abi-encoded TaikoData.BlockEvidence object.

verifyBlocks

function verifyBlocks(uint256 maxBlocks) external

Verify up to N blocks.

Parameters

NameTypeDescription
maxBlocksuint256Max number of blocks to verify.

depositEtherToL2

function depositEtherToL2() public payable

getTaikoTokenBalance

function getTaikoTokenBalance(address addr) public view returns (uint256)

getBlockFee

function getBlockFee() public view returns (uint64)

getBlock

function getBlock(uint256 blockId) public view returns (bytes32 _metaHash, address _proposer, uint64 _proposedAt)

getForkChoice

function getForkChoice(uint256 blockId, bytes32 parentHash, uint32 parentGasUsed) public view returns (struct TaikoData.ForkChoice)

getCrossChainBlockHash

function getCrossChainBlockHash(uint256 blockId) public view returns (bytes32)

getCrossChainSignalRoot

function getCrossChainSignalRoot(uint256 blockId) public view returns (bytes32)

getStateVariables

function getStateVariables() public view returns (struct TaikoData.StateVariables)

getConfig

function getConfig() public pure virtual returns (struct TaikoData.Config)

getVerifierName

function getVerifierName(uint16 id) public pure returns (bytes32)

title: ProxiedTaikoL1

ProxiedTaikoL1