From 8d1262ca60178a6f9d930693898fc499cac8e4f4 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Fri, 16 Jun 2023 15:11:15 -0700 Subject: [PATCH 01/37] PoS wip --- .github/workflows/test.yml | 2 +- bindings/.githead | 2 +- bindings/encoding/struct.go | 1 - bindings/gen_taiko_l1.go | 1736 ++++++++++++++--- bindings/gen_taiko_prover_pool_l1.go | 1572 +++++++++++++++ cmd/flags/prover.go | 19 +- driver/state/state.go | 2 +- integration_test/entrypoint.sh | 2 + integration_test/nodes/init.sh | 3 - pkg/rpc/client.go | 52 +- pkg/rpc/client_test.go | 15 +- pkg/rpc/utils.go | 70 +- proposer/proposer.go | 2 +- prover/config.go | 25 +- prover/config_test.go | 127 +- .../proof_producer/special_proof_producer.go | 15 +- prover/proof_submitter/util.go | 36 +- .../proof_submitter/valid_proof_submitter.go | 16 +- .../valid_proof_submitter_test.go | 1 - prover/prover.go | 71 +- prover/prover_test.go | 3 +- scripts/gen_bindings.sh | 4 + testutils/suite.go | 3 +- 23 files changed, 3132 insertions(+), 647 deletions(-) create mode 100644 bindings/gen_taiko_prover_pool_l1.go diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 126201c78..41dfb2e2b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,7 +45,7 @@ jobs: with: repository: taikoxyz/taiko-mono path: ${{ env.TAIKO_MONO_DIR }} - ref: alpha-3 + ref: PoS_initial_impl - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 diff --git a/bindings/.githead b/bindings/.githead index f5bbbd34a..30b880fde 100644 --- a/bindings/.githead +++ b/bindings/.githead @@ -1 +1 @@ -6a8029519c6170a9240972f82d11271bafd0e2d3 +446d6d282ca2d4d3eb32b01e0539ccf89b0475c8 diff --git a/bindings/encoding/struct.go b/bindings/encoding/struct.go index fc561d5f6..577df6555 100644 --- a/bindings/encoding/struct.go +++ b/bindings/encoding/struct.go @@ -10,7 +10,6 @@ import ( var ( OracleProverAddress = common.HexToAddress("0x0000000000000000000000000000000000000000") - SystemProverAddress = common.HexToAddress("0x0000000000000000000000000000000000000001") ) type BlockHeader struct { diff --git a/bindings/gen_taiko_l1.go b/bindings/gen_taiko_l1.go index 5888f0c26..cb4d9a845 100644 --- a/bindings/gen_taiko_l1.go +++ b/bindings/gen_taiko_l1.go @@ -29,6 +29,21 @@ var ( _ = abi.ConvertType ) +// TaikoDataAuction is an auto generated low-level Go binding around an user-defined struct. +type TaikoDataAuction struct { + Bid TaikoDataBid + BatchId uint64 + StartedAt uint64 +} + +// TaikoDataBid is an auto generated low-level Go binding around an user-defined struct. +type TaikoDataBid struct { + Prover common.Address + Deposit uint64 + FeePerGas *big.Int + ProofWindow uint16 +} + // TaikoDataBlockMetadata is an auto generated low-level Go binding around an user-defined struct. type TaikoDataBlockMetadata struct { Id uint64 @@ -47,24 +62,32 @@ type TaikoDataBlockMetadata struct { // TaikoDataConfig is an auto generated low-level Go binding around an user-defined struct. type TaikoDataConfig struct { - ChainId *big.Int - MaxNumProposedBlocks *big.Int - RingBufferSize *big.Int - MaxVerificationsPerTx *big.Int - BlockMaxGasLimit uint64 - MaxTransactionsPerBlock uint64 - MaxBytesPerTxList uint64 - TxListCacheExpiry *big.Int - ProofCooldownPeriod *big.Int - SystemProofCooldownPeriod *big.Int - RealProofSkipSize *big.Int - EthDepositGas *big.Int - EthDepositMaxFee *big.Int - MinEthDepositsPerBlock uint64 - MaxEthDepositsPerBlock uint64 - MaxEthDepositAmount *big.Int - MinEthDepositAmount *big.Int - RelaySignalRoot bool + ChainId *big.Int + MaxNumProposedBlocks *big.Int + BlockRingBufferSize *big.Int + AuctionRingBufferSize *big.Int + MaxVerificationsPerTx *big.Int + BlockMaxGasLimit uint64 + BlockFeeBaseGas uint64 + MaxTransactionsPerBlock uint64 + MaxBytesPerTxList uint64 + TxListCacheExpiry *big.Int + ProofCooldownPeriod *big.Int + SystemProofCooldownPeriod *big.Int + EthDepositGas *big.Int + EthDepositMaxFee *big.Int + MinEthDepositsPerBlock uint64 + MaxEthDepositsPerBlock uint64 + MaxEthDepositAmount *big.Int + MinEthDepositAmount *big.Int + AuctionWindow uint16 + AuctionProofWindowMultiplier uint64 + AuctionDepositMultipler uint64 + AuctionMaxFeePerGasMultipler uint64 + AuctionBatchSize uint16 + AuctionMaxAheadOfProposals uint16 + AuctionMaxProofWindow uint16 + RelaySignalRoot bool } // TaikoDataEthDeposit is an auto generated low-level Go binding around an user-defined struct. @@ -86,22 +109,19 @@ type TaikoDataForkChoice struct { // TaikoDataStateVariables is an auto generated low-level Go binding around an user-defined struct. type TaikoDataStateVariables struct { - BlockFee uint64 - AccBlockFees uint64 + FeePerGas *big.Int GenesisHeight uint64 GenesisTimestamp uint64 NumBlocks uint64 - ProofTimeIssued uint64 - ProofTimeTarget uint64 LastVerifiedBlockId uint64 - AccProposedAt uint64 + NumAuctions uint64 NextEthDepositToProcess uint64 NumEthDeposits uint64 } // TaikoL1ClientMetaData contains all meta data concerning the TaikoL1Client contract. var TaikoL1ClientMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF_OVERWRITE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF_OVERWRITE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_SPECIAL_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_SPECIAL_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ORACLE_PROVER_DISABLED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ORACLE_PROVER_DISABLED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SYSTEM_PROVER_DISABLED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SYSTEM_PROVER_DISABLED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SYSTEM_PROVER_PROHIBITED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SYSTEM_PROVER_PROHIBITED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Overflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockFee\",\"type\":\"uint64\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"reward\",\"type\":\"uint64\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"proofTimeTarget\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"proofTimeIssued\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockFee\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"adjustmentQuotient\",\"type\":\"uint16\"}],\"name\":\"ProofParamsChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositEtherToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"depositTaikoToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getBlock\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"_metaHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_proposer\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_proposedAt\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockFee\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxNumProposedBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ringBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxVerificationsPerTx\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxTransactionsPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxBytesPerTxList\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"txListCacheExpiry\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofCooldownPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"systemProofCooldownPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"realProofSkipSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositMaxFee\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"minEthDepositsPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxEthDepositsPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"maxEthDepositAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"minEthDepositAmount\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"relaySignalRoot\",\"type\":\"bool\"}],\"internalType\":\"structTaikoData.Config\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getCrossChainBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getCrossChainSignalRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"getForkChoice\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"provenAt\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasUsed\",\"type\":\"uint32\"}],\"internalType\":\"structTaikoData.ForkChoice\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"proofTime\",\"type\":\"uint64\"}],\"name\":\"getProofReward\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStateVariables\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"blockFee\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"accBlockFees\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"proofTimeIssued\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"proofTimeTarget\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"accProposedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.StateVariables\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getTaikoTokenBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"id\",\"type\":\"uint16\"}],\"name\":\"getVerifierName\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_genesisBlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"_initBlockFee\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"_initProofTimeTarget\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"_initProofTimeIssued\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"_adjustmentQuotient\",\"type\":\"uint16\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"txList\",\"type\":\"bytes\"}],\"name\":\"proposeBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"proveBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newProofTimeTarget\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"newProofTimeIssued\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"newBlockFee\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"newAdjustmentQuotient\",\"type\":\"uint16\"}],\"name\":\"setProofParams\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"state\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"adjustmentQuotient\",\"type\":\"uint16\"},{\"internalType\":\"uint48\",\"name\":\"__reserved71\",\"type\":\"uint48\"},{\"internalType\":\"uint64\",\"name\":\"__reserved72\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"accProposedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"accBlockFees\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockFee\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"proofTimeIssued\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"proofTimeTarget\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxBlocks\",\"type\":\"uint256\"}],\"name\":\"verifyBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTaikoToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + ABI: "[{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BATCH_NOT_AUCTIONABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BATCH_NOT_AUCTIONABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF_OVERWRITE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF_OVERWRITE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_BETTER_BID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_BETTER_BID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_PROVEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_PROVEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_SPECIAL_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"batchId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"startedAt\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"deposit\",\"type\":\"uint64\"},{\"internalType\":\"uint48\",\"name\":\"feePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint16\",\"name\":\"proofWindow\",\"type\":\"uint16\"}],\"indexed\":false,\"internalType\":\"structTaikoData.Bid\",\"name\":\"bid\",\"type\":\"tuple\"}],\"name\":\"BatchBid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"batchId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"startedAt\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"deposit\",\"type\":\"uint64\"},{\"internalType\":\"uint48\",\"name\":\"feePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint16\",\"name\":\"proofWindow\",\"type\":\"uint16\"}],\"indexed\":false,\"internalType\":\"structTaikoData.Bid\",\"name\":\"bid\",\"type\":\"tuple\"}],\"name\":\"BatchBid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockFee\",\"type\":\"uint64\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockFee\",\"type\":\"uint64\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"reward\",\"type\":\"uint64\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"reward\",\"type\":\"uint64\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"proofTimeTarget\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"proofTimeIssued\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockFee\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"adjustmentQuotient\",\"type\":\"uint16\"}],\"name\":\"ProofParamsChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"batchForBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"batchId\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"deposit\",\"type\":\"uint64\"},{\"internalType\":\"uint48\",\"name\":\"feePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint16\",\"name\":\"proofWindow\",\"type\":\"uint16\"}],\"internalType\":\"structTaikoData.Bid\",\"name\":\"bid\",\"type\":\"tuple\"}],\"name\":\"bidForBatch\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositEtherToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"name\":\"depositTaikoToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startBatchId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"name\":\"getAuctions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"currentTime\",\"type\":\"uint256\"},{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"deposit\",\"type\":\"uint64\"},{\"internalType\":\"uint48\",\"name\":\"feePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint16\",\"name\":\"proofWindow\",\"type\":\"uint16\"}],\"internalType\":\"structTaikoData.Bid\",\"name\":\"bid\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"batchId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"startedAt\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.Auction[]\",\"name\":\"auctions\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getBlock\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"_metaHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_proposer\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_proposedAt\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"getBlockFee\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxNumProposedBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"auctionRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxVerificationsPerTx\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockFeeBaseGas\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxTransactionsPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxBytesPerTxList\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"txListCacheExpiry\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofCooldownPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"systemProofCooldownPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositMaxFee\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"minEthDepositsPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxEthDepositsPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"maxEthDepositAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"minEthDepositAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint16\",\"name\":\"auctionWindow\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"auctionProofWindowMultiplier\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"auctionDepositMultipler\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"auctionMaxFeePerGasMultipler\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"auctionBatchSize\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"auctionMaxAheadOfProposals\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"auctionMaxProofWindow\",\"type\":\"uint16\"},{\"internalType\":\"bool\",\"name\":\"relaySignalRoot\",\"type\":\"bool\"}],\"internalType\":\"structTaikoData.Config\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getCrossChainBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getCrossChainSignalRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"getForkChoice\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"provenAt\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasUsed\",\"type\":\"uint32\"}],\"internalType\":\"structTaikoData.ForkChoice\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStateVariables\",\"outputs\":[{\"components\":[{\"internalType\":\"uint48\",\"name\":\"feePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numAuctions\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.StateVariables\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getTaikoTokenBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"id\",\"type\":\"uint16\"}],\"name\":\"getVerifierName\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_genesisBlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint48\",\"name\":\"_initFeePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint16\",\"name\":\"_initAvgProofWindow\",\"type\":\"uint16\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"}],\"name\":\"isBatchAuctionable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"deposit\",\"type\":\"uint64\"},{\"internalType\":\"uint48\",\"name\":\"feePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint16\",\"name\":\"proofWindow\",\"type\":\"uint16\"}],\"internalType\":\"structTaikoData.Bid\",\"name\":\"newBid\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"deposit\",\"type\":\"uint64\"},{\"internalType\":\"uint48\",\"name\":\"feePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint16\",\"name\":\"proofWindow\",\"type\":\"uint16\"}],\"internalType\":\"structTaikoData.Bid\",\"name\":\"oldBid\",\"type\":\"tuple\"}],\"name\":\"isBidBetter\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"name\":\"isBlockProvableBy\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"provable\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"proofWindowElapsed\",\"type\":\"bool\"},{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"deposit\",\"type\":\"uint64\"},{\"internalType\":\"uint48\",\"name\":\"feePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint16\",\"name\":\"proofWindow\",\"type\":\"uint16\"}],\"internalType\":\"structTaikoData.Bid\",\"name\":\"bid\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"batchId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"startedAt\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.Auction\",\"name\":\"auction\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"txList\",\"type\":\"bytes\"}],\"name\":\"proposeBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"proveBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"state\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved70\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved71\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numAuctions\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved81\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint48\",\"name\":\"feePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint16\",\"name\":\"avgProofWindow\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"__reserved90\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxBlocks\",\"type\":\"uint256\"}],\"name\":\"verifyBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"name\":\"withdrawTaikoToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", } // TaikoL1ClientABI is the input ABI used to generate the binding from. @@ -281,6 +301,82 @@ func (_TaikoL1Client *TaikoL1ClientCallerSession) AddressManager() (common.Addre return _TaikoL1Client.Contract.AddressManager(&_TaikoL1Client.CallOpts) } +// BatchForBlock is a free data retrieval call binding the contract method 0xba9bd83c. +// +// Solidity: function batchForBlock(uint256 blockId) pure returns(uint256) +func (_TaikoL1Client *TaikoL1ClientCaller) BatchForBlock(opts *bind.CallOpts, blockId *big.Int) (*big.Int, error) { + var out []interface{} + err := _TaikoL1Client.contract.Call(opts, &out, "batchForBlock", blockId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BatchForBlock is a free data retrieval call binding the contract method 0xba9bd83c. +// +// Solidity: function batchForBlock(uint256 blockId) pure returns(uint256) +func (_TaikoL1Client *TaikoL1ClientSession) BatchForBlock(blockId *big.Int) (*big.Int, error) { + return _TaikoL1Client.Contract.BatchForBlock(&_TaikoL1Client.CallOpts, blockId) +} + +// BatchForBlock is a free data retrieval call binding the contract method 0xba9bd83c. +// +// Solidity: function batchForBlock(uint256 blockId) pure returns(uint256) +func (_TaikoL1Client *TaikoL1ClientCallerSession) BatchForBlock(blockId *big.Int) (*big.Int, error) { + return _TaikoL1Client.Contract.BatchForBlock(&_TaikoL1Client.CallOpts, blockId) +} + +// GetAuctions is a free data retrieval call binding the contract method 0xceb6a22f. +// +// Solidity: function getAuctions(uint256 startBatchId, uint256 count) view returns(uint256 currentTime, ((address,uint64,uint48,uint16),uint64,uint64)[] auctions) +func (_TaikoL1Client *TaikoL1ClientCaller) GetAuctions(opts *bind.CallOpts, startBatchId *big.Int, count *big.Int) (struct { + CurrentTime *big.Int + Auctions []TaikoDataAuction +}, error) { + var out []interface{} + err := _TaikoL1Client.contract.Call(opts, &out, "getAuctions", startBatchId, count) + + outstruct := new(struct { + CurrentTime *big.Int + Auctions []TaikoDataAuction + }) + if err != nil { + return *outstruct, err + } + + outstruct.CurrentTime = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.Auctions = *abi.ConvertType(out[1], new([]TaikoDataAuction)).(*[]TaikoDataAuction) + + return *outstruct, err + +} + +// GetAuctions is a free data retrieval call binding the contract method 0xceb6a22f. +// +// Solidity: function getAuctions(uint256 startBatchId, uint256 count) view returns(uint256 currentTime, ((address,uint64,uint48,uint16),uint64,uint64)[] auctions) +func (_TaikoL1Client *TaikoL1ClientSession) GetAuctions(startBatchId *big.Int, count *big.Int) (struct { + CurrentTime *big.Int + Auctions []TaikoDataAuction +}, error) { + return _TaikoL1Client.Contract.GetAuctions(&_TaikoL1Client.CallOpts, startBatchId, count) +} + +// GetAuctions is a free data retrieval call binding the contract method 0xceb6a22f. +// +// Solidity: function getAuctions(uint256 startBatchId, uint256 count) view returns(uint256 currentTime, ((address,uint64,uint48,uint16),uint64,uint64)[] auctions) +func (_TaikoL1Client *TaikoL1ClientCallerSession) GetAuctions(startBatchId *big.Int, count *big.Int) (struct { + CurrentTime *big.Int + Auctions []TaikoDataAuction +}, error) { + return _TaikoL1Client.Contract.GetAuctions(&_TaikoL1Client.CallOpts, startBatchId, count) +} + // GetBlock is a free data retrieval call binding the contract method 0x04c07569. // // Solidity: function getBlock(uint256 blockId) view returns(bytes32 _metaHash, address _proposer, uint64 _proposedAt) @@ -331,12 +427,12 @@ func (_TaikoL1Client *TaikoL1ClientCallerSession) GetBlock(blockId *big.Int) (st return _TaikoL1Client.Contract.GetBlock(&_TaikoL1Client.CallOpts, blockId) } -// GetBlockFee is a free data retrieval call binding the contract method 0x7baf0bc7. +// GetBlockFee is a free data retrieval call binding the contract method 0xffb2784f. // -// Solidity: function getBlockFee() view returns(uint64) -func (_TaikoL1Client *TaikoL1ClientCaller) GetBlockFee(opts *bind.CallOpts) (uint64, error) { +// Solidity: function getBlockFee(uint32 gasLimit) view returns(uint64) +func (_TaikoL1Client *TaikoL1ClientCaller) GetBlockFee(opts *bind.CallOpts, gasLimit uint32) (uint64, error) { var out []interface{} - err := _TaikoL1Client.contract.Call(opts, &out, "getBlockFee") + err := _TaikoL1Client.contract.Call(opts, &out, "getBlockFee", gasLimit) if err != nil { return *new(uint64), err @@ -348,23 +444,23 @@ func (_TaikoL1Client *TaikoL1ClientCaller) GetBlockFee(opts *bind.CallOpts) (uin } -// GetBlockFee is a free data retrieval call binding the contract method 0x7baf0bc7. +// GetBlockFee is a free data retrieval call binding the contract method 0xffb2784f. // -// Solidity: function getBlockFee() view returns(uint64) -func (_TaikoL1Client *TaikoL1ClientSession) GetBlockFee() (uint64, error) { - return _TaikoL1Client.Contract.GetBlockFee(&_TaikoL1Client.CallOpts) +// Solidity: function getBlockFee(uint32 gasLimit) view returns(uint64) +func (_TaikoL1Client *TaikoL1ClientSession) GetBlockFee(gasLimit uint32) (uint64, error) { + return _TaikoL1Client.Contract.GetBlockFee(&_TaikoL1Client.CallOpts, gasLimit) } -// GetBlockFee is a free data retrieval call binding the contract method 0x7baf0bc7. +// GetBlockFee is a free data retrieval call binding the contract method 0xffb2784f. // -// Solidity: function getBlockFee() view returns(uint64) -func (_TaikoL1Client *TaikoL1ClientCallerSession) GetBlockFee() (uint64, error) { - return _TaikoL1Client.Contract.GetBlockFee(&_TaikoL1Client.CallOpts) +// Solidity: function getBlockFee(uint32 gasLimit) view returns(uint64) +func (_TaikoL1Client *TaikoL1ClientCallerSession) GetBlockFee(gasLimit uint32) (uint64, error) { + return _TaikoL1Client.Contract.GetBlockFee(&_TaikoL1Client.CallOpts, gasLimit) } // GetConfig is a free data retrieval call binding the contract method 0xc3f909d4. // -// Solidity: function getConfig() pure returns((uint256,uint256,uint256,uint256,uint64,uint64,uint64,uint256,uint256,uint256,uint256,uint256,uint256,uint64,uint64,uint96,uint96,bool)) +// Solidity: function getConfig() pure returns((uint256,uint256,uint256,uint256,uint256,uint64,uint64,uint64,uint64,uint256,uint256,uint256,uint256,uint256,uint64,uint64,uint96,uint96,uint16,uint64,uint64,uint64,uint16,uint16,uint16,bool)) func (_TaikoL1Client *TaikoL1ClientCaller) GetConfig(opts *bind.CallOpts) (TaikoDataConfig, error) { var out []interface{} err := _TaikoL1Client.contract.Call(opts, &out, "getConfig") @@ -381,14 +477,14 @@ func (_TaikoL1Client *TaikoL1ClientCaller) GetConfig(opts *bind.CallOpts) (Taiko // GetConfig is a free data retrieval call binding the contract method 0xc3f909d4. // -// Solidity: function getConfig() pure returns((uint256,uint256,uint256,uint256,uint64,uint64,uint64,uint256,uint256,uint256,uint256,uint256,uint256,uint64,uint64,uint96,uint96,bool)) +// Solidity: function getConfig() pure returns((uint256,uint256,uint256,uint256,uint256,uint64,uint64,uint64,uint64,uint256,uint256,uint256,uint256,uint256,uint64,uint64,uint96,uint96,uint16,uint64,uint64,uint64,uint16,uint16,uint16,bool)) func (_TaikoL1Client *TaikoL1ClientSession) GetConfig() (TaikoDataConfig, error) { return _TaikoL1Client.Contract.GetConfig(&_TaikoL1Client.CallOpts) } // GetConfig is a free data retrieval call binding the contract method 0xc3f909d4. // -// Solidity: function getConfig() pure returns((uint256,uint256,uint256,uint256,uint64,uint64,uint64,uint256,uint256,uint256,uint256,uint256,uint256,uint64,uint64,uint96,uint96,bool)) +// Solidity: function getConfig() pure returns((uint256,uint256,uint256,uint256,uint256,uint64,uint64,uint64,uint64,uint256,uint256,uint256,uint256,uint256,uint64,uint64,uint96,uint96,uint16,uint64,uint64,uint64,uint16,uint16,uint16,bool)) func (_TaikoL1Client *TaikoL1ClientCallerSession) GetConfig() (TaikoDataConfig, error) { return _TaikoL1Client.Contract.GetConfig(&_TaikoL1Client.CallOpts) } @@ -486,40 +582,9 @@ func (_TaikoL1Client *TaikoL1ClientCallerSession) GetForkChoice(blockId *big.Int return _TaikoL1Client.Contract.GetForkChoice(&_TaikoL1Client.CallOpts, blockId, parentHash, parentGasUsed) } -// GetProofReward is a free data retrieval call binding the contract method 0x55f7259e. -// -// Solidity: function getProofReward(uint64 proofTime) view returns(uint64) -func (_TaikoL1Client *TaikoL1ClientCaller) GetProofReward(opts *bind.CallOpts, proofTime uint64) (uint64, error) { - var out []interface{} - err := _TaikoL1Client.contract.Call(opts, &out, "getProofReward", proofTime) - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// GetProofReward is a free data retrieval call binding the contract method 0x55f7259e. -// -// Solidity: function getProofReward(uint64 proofTime) view returns(uint64) -func (_TaikoL1Client *TaikoL1ClientSession) GetProofReward(proofTime uint64) (uint64, error) { - return _TaikoL1Client.Contract.GetProofReward(&_TaikoL1Client.CallOpts, proofTime) -} - -// GetProofReward is a free data retrieval call binding the contract method 0x55f7259e. -// -// Solidity: function getProofReward(uint64 proofTime) view returns(uint64) -func (_TaikoL1Client *TaikoL1ClientCallerSession) GetProofReward(proofTime uint64) (uint64, error) { - return _TaikoL1Client.Contract.GetProofReward(&_TaikoL1Client.CallOpts, proofTime) -} - // GetStateVariables is a free data retrieval call binding the contract method 0xdde89cf5. // -// Solidity: function getStateVariables() view returns((uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)) +// Solidity: function getStateVariables() view returns((uint48,uint64,uint64,uint64,uint64,uint64,uint64,uint64)) func (_TaikoL1Client *TaikoL1ClientCaller) GetStateVariables(opts *bind.CallOpts) (TaikoDataStateVariables, error) { var out []interface{} err := _TaikoL1Client.contract.Call(opts, &out, "getStateVariables") @@ -536,14 +601,14 @@ func (_TaikoL1Client *TaikoL1ClientCaller) GetStateVariables(opts *bind.CallOpts // GetStateVariables is a free data retrieval call binding the contract method 0xdde89cf5. // -// Solidity: function getStateVariables() view returns((uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)) +// Solidity: function getStateVariables() view returns((uint48,uint64,uint64,uint64,uint64,uint64,uint64,uint64)) func (_TaikoL1Client *TaikoL1ClientSession) GetStateVariables() (TaikoDataStateVariables, error) { return _TaikoL1Client.Contract.GetStateVariables(&_TaikoL1Client.CallOpts) } // GetStateVariables is a free data retrieval call binding the contract method 0xdde89cf5. // -// Solidity: function getStateVariables() view returns((uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)) +// Solidity: function getStateVariables() view returns((uint48,uint64,uint64,uint64,uint64,uint64,uint64,uint64)) func (_TaikoL1Client *TaikoL1ClientCallerSession) GetStateVariables() (TaikoDataStateVariables, error) { return _TaikoL1Client.Contract.GetStateVariables(&_TaikoL1Client.CallOpts) } @@ -610,6 +675,118 @@ func (_TaikoL1Client *TaikoL1ClientCallerSession) GetVerifierName(id uint16) ([3 return _TaikoL1Client.Contract.GetVerifierName(&_TaikoL1Client.CallOpts, id) } +// IsBatchAuctionable is a free data retrieval call binding the contract method 0xd1a8f4ba. +// +// Solidity: function isBatchAuctionable(uint256 batchId) view returns(bool) +func (_TaikoL1Client *TaikoL1ClientCaller) IsBatchAuctionable(opts *bind.CallOpts, batchId *big.Int) (bool, error) { + var out []interface{} + err := _TaikoL1Client.contract.Call(opts, &out, "isBatchAuctionable", batchId) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsBatchAuctionable is a free data retrieval call binding the contract method 0xd1a8f4ba. +// +// Solidity: function isBatchAuctionable(uint256 batchId) view returns(bool) +func (_TaikoL1Client *TaikoL1ClientSession) IsBatchAuctionable(batchId *big.Int) (bool, error) { + return _TaikoL1Client.Contract.IsBatchAuctionable(&_TaikoL1Client.CallOpts, batchId) +} + +// IsBatchAuctionable is a free data retrieval call binding the contract method 0xd1a8f4ba. +// +// Solidity: function isBatchAuctionable(uint256 batchId) view returns(bool) +func (_TaikoL1Client *TaikoL1ClientCallerSession) IsBatchAuctionable(batchId *big.Int) (bool, error) { + return _TaikoL1Client.Contract.IsBatchAuctionable(&_TaikoL1Client.CallOpts, batchId) +} + +// IsBidBetter is a free data retrieval call binding the contract method 0xdf632e5e. +// +// Solidity: function isBidBetter((address,uint64,uint48,uint16) newBid, (address,uint64,uint48,uint16) oldBid) pure returns(bool) +func (_TaikoL1Client *TaikoL1ClientCaller) IsBidBetter(opts *bind.CallOpts, newBid TaikoDataBid, oldBid TaikoDataBid) (bool, error) { + var out []interface{} + err := _TaikoL1Client.contract.Call(opts, &out, "isBidBetter", newBid, oldBid) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsBidBetter is a free data retrieval call binding the contract method 0xdf632e5e. +// +// Solidity: function isBidBetter((address,uint64,uint48,uint16) newBid, (address,uint64,uint48,uint16) oldBid) pure returns(bool) +func (_TaikoL1Client *TaikoL1ClientSession) IsBidBetter(newBid TaikoDataBid, oldBid TaikoDataBid) (bool, error) { + return _TaikoL1Client.Contract.IsBidBetter(&_TaikoL1Client.CallOpts, newBid, oldBid) +} + +// IsBidBetter is a free data retrieval call binding the contract method 0xdf632e5e. +// +// Solidity: function isBidBetter((address,uint64,uint48,uint16) newBid, (address,uint64,uint48,uint16) oldBid) pure returns(bool) +func (_TaikoL1Client *TaikoL1ClientCallerSession) IsBidBetter(newBid TaikoDataBid, oldBid TaikoDataBid) (bool, error) { + return _TaikoL1Client.Contract.IsBidBetter(&_TaikoL1Client.CallOpts, newBid, oldBid) +} + +// IsBlockProvableBy is a free data retrieval call binding the contract method 0x5e060b62. +// +// Solidity: function isBlockProvableBy(uint256 blockId, address prover) view returns(bool provable, bool proofWindowElapsed, ((address,uint64,uint48,uint16),uint64,uint64) auction) +func (_TaikoL1Client *TaikoL1ClientCaller) IsBlockProvableBy(opts *bind.CallOpts, blockId *big.Int, prover common.Address) (struct { + Provable bool + ProofWindowElapsed bool + Auction TaikoDataAuction +}, error) { + var out []interface{} + err := _TaikoL1Client.contract.Call(opts, &out, "isBlockProvableBy", blockId, prover) + + outstruct := new(struct { + Provable bool + ProofWindowElapsed bool + Auction TaikoDataAuction + }) + if err != nil { + return *outstruct, err + } + + outstruct.Provable = *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.ProofWindowElapsed = *abi.ConvertType(out[1], new(bool)).(*bool) + outstruct.Auction = *abi.ConvertType(out[2], new(TaikoDataAuction)).(*TaikoDataAuction) + + return *outstruct, err + +} + +// IsBlockProvableBy is a free data retrieval call binding the contract method 0x5e060b62. +// +// Solidity: function isBlockProvableBy(uint256 blockId, address prover) view returns(bool provable, bool proofWindowElapsed, ((address,uint64,uint48,uint16),uint64,uint64) auction) +func (_TaikoL1Client *TaikoL1ClientSession) IsBlockProvableBy(blockId *big.Int, prover common.Address) (struct { + Provable bool + ProofWindowElapsed bool + Auction TaikoDataAuction +}, error) { + return _TaikoL1Client.Contract.IsBlockProvableBy(&_TaikoL1Client.CallOpts, blockId, prover) +} + +// IsBlockProvableBy is a free data retrieval call binding the contract method 0x5e060b62. +// +// Solidity: function isBlockProvableBy(uint256 blockId, address prover) view returns(bool provable, bool proofWindowElapsed, ((address,uint64,uint48,uint16),uint64,uint64) auction) +func (_TaikoL1Client *TaikoL1ClientCallerSession) IsBlockProvableBy(blockId *big.Int, prover common.Address) (struct { + Provable bool + ProofWindowElapsed bool + Auction TaikoDataAuction +}, error) { + return _TaikoL1Client.Contract.IsBlockProvableBy(&_TaikoL1Client.CallOpts, blockId, prover) +} + // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // // Solidity: function owner() view returns(address) @@ -705,21 +882,21 @@ func (_TaikoL1Client *TaikoL1ClientCallerSession) Resolve0(name [32]byte, allowZ // State is a free data retrieval call binding the contract method 0xc19d93fb. // -// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint16 adjustmentQuotient, uint48 __reserved71, uint64 __reserved72, uint64 accProposedAt, uint64 accBlockFees, uint64 numBlocks, uint64 nextEthDepositToProcess, uint64 blockFee, uint64 proofTimeIssued, uint64 lastVerifiedBlockId, uint64 proofTimeTarget) +// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint64 __reserved70, uint64 __reserved71, uint64 numAuctions, uint64 __reserved81, uint64 numBlocks, uint64 nextEthDepositToProcess, uint64 lastVerifiedAt, uint64 lastVerifiedBlockId, uint48 feePerGas, uint16 avgProofWindow, uint64 __reserved90) func (_TaikoL1Client *TaikoL1ClientCaller) State(opts *bind.CallOpts) (struct { GenesisHeight uint64 GenesisTimestamp uint64 - AdjustmentQuotient uint16 - Reserved71 *big.Int - Reserved72 uint64 - AccProposedAt uint64 - AccBlockFees uint64 + Reserved70 uint64 + Reserved71 uint64 + NumAuctions uint64 + Reserved81 uint64 NumBlocks uint64 NextEthDepositToProcess uint64 - BlockFee uint64 - ProofTimeIssued uint64 + LastVerifiedAt uint64 LastVerifiedBlockId uint64 - ProofTimeTarget uint64 + FeePerGas *big.Int + AvgProofWindow uint16 + Reserved90 uint64 }, error) { var out []interface{} err := _TaikoL1Client.contract.Call(opts, &out, "state") @@ -727,17 +904,17 @@ func (_TaikoL1Client *TaikoL1ClientCaller) State(opts *bind.CallOpts) (struct { outstruct := new(struct { GenesisHeight uint64 GenesisTimestamp uint64 - AdjustmentQuotient uint16 - Reserved71 *big.Int - Reserved72 uint64 - AccProposedAt uint64 - AccBlockFees uint64 + Reserved70 uint64 + Reserved71 uint64 + NumAuctions uint64 + Reserved81 uint64 NumBlocks uint64 NextEthDepositToProcess uint64 - BlockFee uint64 - ProofTimeIssued uint64 + LastVerifiedAt uint64 LastVerifiedBlockId uint64 - ProofTimeTarget uint64 + FeePerGas *big.Int + AvgProofWindow uint16 + Reserved90 uint64 }) if err != nil { return *outstruct, err @@ -745,17 +922,17 @@ func (_TaikoL1Client *TaikoL1ClientCaller) State(opts *bind.CallOpts) (struct { outstruct.GenesisHeight = *abi.ConvertType(out[0], new(uint64)).(*uint64) outstruct.GenesisTimestamp = *abi.ConvertType(out[1], new(uint64)).(*uint64) - outstruct.AdjustmentQuotient = *abi.ConvertType(out[2], new(uint16)).(*uint16) - outstruct.Reserved71 = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) - outstruct.Reserved72 = *abi.ConvertType(out[4], new(uint64)).(*uint64) - outstruct.AccProposedAt = *abi.ConvertType(out[5], new(uint64)).(*uint64) - outstruct.AccBlockFees = *abi.ConvertType(out[6], new(uint64)).(*uint64) - outstruct.NumBlocks = *abi.ConvertType(out[7], new(uint64)).(*uint64) - outstruct.NextEthDepositToProcess = *abi.ConvertType(out[8], new(uint64)).(*uint64) - outstruct.BlockFee = *abi.ConvertType(out[9], new(uint64)).(*uint64) - outstruct.ProofTimeIssued = *abi.ConvertType(out[10], new(uint64)).(*uint64) - outstruct.LastVerifiedBlockId = *abi.ConvertType(out[11], new(uint64)).(*uint64) - outstruct.ProofTimeTarget = *abi.ConvertType(out[12], new(uint64)).(*uint64) + outstruct.Reserved70 = *abi.ConvertType(out[2], new(uint64)).(*uint64) + outstruct.Reserved71 = *abi.ConvertType(out[3], new(uint64)).(*uint64) + outstruct.NumAuctions = *abi.ConvertType(out[4], new(uint64)).(*uint64) + outstruct.Reserved81 = *abi.ConvertType(out[5], new(uint64)).(*uint64) + outstruct.NumBlocks = *abi.ConvertType(out[6], new(uint64)).(*uint64) + outstruct.NextEthDepositToProcess = *abi.ConvertType(out[7], new(uint64)).(*uint64) + outstruct.LastVerifiedAt = *abi.ConvertType(out[8], new(uint64)).(*uint64) + outstruct.LastVerifiedBlockId = *abi.ConvertType(out[9], new(uint64)).(*uint64) + outstruct.FeePerGas = *abi.ConvertType(out[10], new(*big.Int)).(**big.Int) + outstruct.AvgProofWindow = *abi.ConvertType(out[11], new(uint16)).(*uint16) + outstruct.Reserved90 = *abi.ConvertType(out[12], new(uint64)).(*uint64) return *outstruct, err @@ -763,46 +940,67 @@ func (_TaikoL1Client *TaikoL1ClientCaller) State(opts *bind.CallOpts) (struct { // State is a free data retrieval call binding the contract method 0xc19d93fb. // -// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint16 adjustmentQuotient, uint48 __reserved71, uint64 __reserved72, uint64 accProposedAt, uint64 accBlockFees, uint64 numBlocks, uint64 nextEthDepositToProcess, uint64 blockFee, uint64 proofTimeIssued, uint64 lastVerifiedBlockId, uint64 proofTimeTarget) +// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint64 __reserved70, uint64 __reserved71, uint64 numAuctions, uint64 __reserved81, uint64 numBlocks, uint64 nextEthDepositToProcess, uint64 lastVerifiedAt, uint64 lastVerifiedBlockId, uint48 feePerGas, uint16 avgProofWindow, uint64 __reserved90) func (_TaikoL1Client *TaikoL1ClientSession) State() (struct { GenesisHeight uint64 GenesisTimestamp uint64 - AdjustmentQuotient uint16 - Reserved71 *big.Int - Reserved72 uint64 - AccProposedAt uint64 - AccBlockFees uint64 + Reserved70 uint64 + Reserved71 uint64 + NumAuctions uint64 + Reserved81 uint64 NumBlocks uint64 NextEthDepositToProcess uint64 - BlockFee uint64 - ProofTimeIssued uint64 + LastVerifiedAt uint64 LastVerifiedBlockId uint64 - ProofTimeTarget uint64 + FeePerGas *big.Int + AvgProofWindow uint16 + Reserved90 uint64 }, error) { return _TaikoL1Client.Contract.State(&_TaikoL1Client.CallOpts) } // State is a free data retrieval call binding the contract method 0xc19d93fb. // -// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint16 adjustmentQuotient, uint48 __reserved71, uint64 __reserved72, uint64 accProposedAt, uint64 accBlockFees, uint64 numBlocks, uint64 nextEthDepositToProcess, uint64 blockFee, uint64 proofTimeIssued, uint64 lastVerifiedBlockId, uint64 proofTimeTarget) +// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint64 __reserved70, uint64 __reserved71, uint64 numAuctions, uint64 __reserved81, uint64 numBlocks, uint64 nextEthDepositToProcess, uint64 lastVerifiedAt, uint64 lastVerifiedBlockId, uint48 feePerGas, uint16 avgProofWindow, uint64 __reserved90) func (_TaikoL1Client *TaikoL1ClientCallerSession) State() (struct { GenesisHeight uint64 GenesisTimestamp uint64 - AdjustmentQuotient uint16 - Reserved71 *big.Int - Reserved72 uint64 - AccProposedAt uint64 - AccBlockFees uint64 + Reserved70 uint64 + Reserved71 uint64 + NumAuctions uint64 + Reserved81 uint64 NumBlocks uint64 NextEthDepositToProcess uint64 - BlockFee uint64 - ProofTimeIssued uint64 + LastVerifiedAt uint64 LastVerifiedBlockId uint64 - ProofTimeTarget uint64 + FeePerGas *big.Int + AvgProofWindow uint16 + Reserved90 uint64 }, error) { return _TaikoL1Client.Contract.State(&_TaikoL1Client.CallOpts) } +// BidForBatch is a paid mutator transaction binding the contract method 0x940c02ce. +// +// Solidity: function bidForBatch(uint64 batchId, (address,uint64,uint48,uint16) bid) payable returns() +func (_TaikoL1Client *TaikoL1ClientTransactor) BidForBatch(opts *bind.TransactOpts, batchId uint64, bid TaikoDataBid) (*types.Transaction, error) { + return _TaikoL1Client.contract.Transact(opts, "bidForBatch", batchId, bid) +} + +// BidForBatch is a paid mutator transaction binding the contract method 0x940c02ce. +// +// Solidity: function bidForBatch(uint64 batchId, (address,uint64,uint48,uint16) bid) payable returns() +func (_TaikoL1Client *TaikoL1ClientSession) BidForBatch(batchId uint64, bid TaikoDataBid) (*types.Transaction, error) { + return _TaikoL1Client.Contract.BidForBatch(&_TaikoL1Client.TransactOpts, batchId, bid) +} + +// BidForBatch is a paid mutator transaction binding the contract method 0x940c02ce. +// +// Solidity: function bidForBatch(uint64 batchId, (address,uint64,uint48,uint16) bid) payable returns() +func (_TaikoL1Client *TaikoL1ClientTransactorSession) BidForBatch(batchId uint64, bid TaikoDataBid) (*types.Transaction, error) { + return _TaikoL1Client.Contract.BidForBatch(&_TaikoL1Client.TransactOpts, batchId, bid) +} + // DepositEtherToL2 is a paid mutator transaction binding the contract method 0xa22f7670. // // Solidity: function depositEtherToL2() payable returns() @@ -824,46 +1022,46 @@ func (_TaikoL1Client *TaikoL1ClientTransactorSession) DepositEtherToL2() (*types return _TaikoL1Client.Contract.DepositEtherToL2(&_TaikoL1Client.TransactOpts) } -// DepositTaikoToken is a paid mutator transaction binding the contract method 0x98f39aba. +// DepositTaikoToken is a paid mutator transaction binding the contract method 0x17924388. // -// Solidity: function depositTaikoToken(uint256 amount) returns() -func (_TaikoL1Client *TaikoL1ClientTransactor) DepositTaikoToken(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { +// Solidity: function depositTaikoToken(uint64 amount) returns() +func (_TaikoL1Client *TaikoL1ClientTransactor) DepositTaikoToken(opts *bind.TransactOpts, amount uint64) (*types.Transaction, error) { return _TaikoL1Client.contract.Transact(opts, "depositTaikoToken", amount) } -// DepositTaikoToken is a paid mutator transaction binding the contract method 0x98f39aba. +// DepositTaikoToken is a paid mutator transaction binding the contract method 0x17924388. // -// Solidity: function depositTaikoToken(uint256 amount) returns() -func (_TaikoL1Client *TaikoL1ClientSession) DepositTaikoToken(amount *big.Int) (*types.Transaction, error) { +// Solidity: function depositTaikoToken(uint64 amount) returns() +func (_TaikoL1Client *TaikoL1ClientSession) DepositTaikoToken(amount uint64) (*types.Transaction, error) { return _TaikoL1Client.Contract.DepositTaikoToken(&_TaikoL1Client.TransactOpts, amount) } -// DepositTaikoToken is a paid mutator transaction binding the contract method 0x98f39aba. +// DepositTaikoToken is a paid mutator transaction binding the contract method 0x17924388. // -// Solidity: function depositTaikoToken(uint256 amount) returns() -func (_TaikoL1Client *TaikoL1ClientTransactorSession) DepositTaikoToken(amount *big.Int) (*types.Transaction, error) { +// Solidity: function depositTaikoToken(uint64 amount) returns() +func (_TaikoL1Client *TaikoL1ClientTransactorSession) DepositTaikoToken(amount uint64) (*types.Transaction, error) { return _TaikoL1Client.Contract.DepositTaikoToken(&_TaikoL1Client.TransactOpts, amount) } -// Init is a paid mutator transaction binding the contract method 0xc7a64b19. +// Init is a paid mutator transaction binding the contract method 0xa2fdc693. // -// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint64 _initBlockFee, uint64 _initProofTimeTarget, uint64 _initProofTimeIssued, uint16 _adjustmentQuotient) returns() -func (_TaikoL1Client *TaikoL1ClientTransactor) Init(opts *bind.TransactOpts, _addressManager common.Address, _genesisBlockHash [32]byte, _initBlockFee uint64, _initProofTimeTarget uint64, _initProofTimeIssued uint64, _adjustmentQuotient uint16) (*types.Transaction, error) { - return _TaikoL1Client.contract.Transact(opts, "init", _addressManager, _genesisBlockHash, _initBlockFee, _initProofTimeTarget, _initProofTimeIssued, _adjustmentQuotient) +// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint48 _initFeePerGas, uint16 _initAvgProofWindow) returns() +func (_TaikoL1Client *TaikoL1ClientTransactor) Init(opts *bind.TransactOpts, _addressManager common.Address, _genesisBlockHash [32]byte, _initFeePerGas *big.Int, _initAvgProofWindow uint16) (*types.Transaction, error) { + return _TaikoL1Client.contract.Transact(opts, "init", _addressManager, _genesisBlockHash, _initFeePerGas, _initAvgProofWindow) } -// Init is a paid mutator transaction binding the contract method 0xc7a64b19. +// Init is a paid mutator transaction binding the contract method 0xa2fdc693. // -// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint64 _initBlockFee, uint64 _initProofTimeTarget, uint64 _initProofTimeIssued, uint16 _adjustmentQuotient) returns() -func (_TaikoL1Client *TaikoL1ClientSession) Init(_addressManager common.Address, _genesisBlockHash [32]byte, _initBlockFee uint64, _initProofTimeTarget uint64, _initProofTimeIssued uint64, _adjustmentQuotient uint16) (*types.Transaction, error) { - return _TaikoL1Client.Contract.Init(&_TaikoL1Client.TransactOpts, _addressManager, _genesisBlockHash, _initBlockFee, _initProofTimeTarget, _initProofTimeIssued, _adjustmentQuotient) +// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint48 _initFeePerGas, uint16 _initAvgProofWindow) returns() +func (_TaikoL1Client *TaikoL1ClientSession) Init(_addressManager common.Address, _genesisBlockHash [32]byte, _initFeePerGas *big.Int, _initAvgProofWindow uint16) (*types.Transaction, error) { + return _TaikoL1Client.Contract.Init(&_TaikoL1Client.TransactOpts, _addressManager, _genesisBlockHash, _initFeePerGas, _initAvgProofWindow) } -// Init is a paid mutator transaction binding the contract method 0xc7a64b19. +// Init is a paid mutator transaction binding the contract method 0xa2fdc693. // -// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint64 _initBlockFee, uint64 _initProofTimeTarget, uint64 _initProofTimeIssued, uint16 _adjustmentQuotient) returns() -func (_TaikoL1Client *TaikoL1ClientTransactorSession) Init(_addressManager common.Address, _genesisBlockHash [32]byte, _initBlockFee uint64, _initProofTimeTarget uint64, _initProofTimeIssued uint64, _adjustmentQuotient uint16) (*types.Transaction, error) { - return _TaikoL1Client.Contract.Init(&_TaikoL1Client.TransactOpts, _addressManager, _genesisBlockHash, _initBlockFee, _initProofTimeTarget, _initProofTimeIssued, _adjustmentQuotient) +// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint48 _initFeePerGas, uint16 _initAvgProofWindow) returns() +func (_TaikoL1Client *TaikoL1ClientTransactorSession) Init(_addressManager common.Address, _genesisBlockHash [32]byte, _initFeePerGas *big.Int, _initAvgProofWindow uint16) (*types.Transaction, error) { + return _TaikoL1Client.Contract.Init(&_TaikoL1Client.TransactOpts, _addressManager, _genesisBlockHash, _initFeePerGas, _initAvgProofWindow) } // ProposeBlock is a paid mutator transaction binding the contract method 0xef16e845. @@ -950,27 +1148,6 @@ func (_TaikoL1Client *TaikoL1ClientTransactorSession) SetAddressManager(newAddre return _TaikoL1Client.Contract.SetAddressManager(&_TaikoL1Client.TransactOpts, newAddressManager) } -// SetProofParams is a paid mutator transaction binding the contract method 0xae46a347. -// -// Solidity: function setProofParams(uint64 newProofTimeTarget, uint64 newProofTimeIssued, uint64 newBlockFee, uint16 newAdjustmentQuotient) returns() -func (_TaikoL1Client *TaikoL1ClientTransactor) SetProofParams(opts *bind.TransactOpts, newProofTimeTarget uint64, newProofTimeIssued uint64, newBlockFee uint64, newAdjustmentQuotient uint16) (*types.Transaction, error) { - return _TaikoL1Client.contract.Transact(opts, "setProofParams", newProofTimeTarget, newProofTimeIssued, newBlockFee, newAdjustmentQuotient) -} - -// SetProofParams is a paid mutator transaction binding the contract method 0xae46a347. -// -// Solidity: function setProofParams(uint64 newProofTimeTarget, uint64 newProofTimeIssued, uint64 newBlockFee, uint16 newAdjustmentQuotient) returns() -func (_TaikoL1Client *TaikoL1ClientSession) SetProofParams(newProofTimeTarget uint64, newProofTimeIssued uint64, newBlockFee uint64, newAdjustmentQuotient uint16) (*types.Transaction, error) { - return _TaikoL1Client.Contract.SetProofParams(&_TaikoL1Client.TransactOpts, newProofTimeTarget, newProofTimeIssued, newBlockFee, newAdjustmentQuotient) -} - -// SetProofParams is a paid mutator transaction binding the contract method 0xae46a347. -// -// Solidity: function setProofParams(uint64 newProofTimeTarget, uint64 newProofTimeIssued, uint64 newBlockFee, uint16 newAdjustmentQuotient) returns() -func (_TaikoL1Client *TaikoL1ClientTransactorSession) SetProofParams(newProofTimeTarget uint64, newProofTimeIssued uint64, newBlockFee uint64, newAdjustmentQuotient uint16) (*types.Transaction, error) { - return _TaikoL1Client.Contract.SetProofParams(&_TaikoL1Client.TransactOpts, newProofTimeTarget, newProofTimeIssued, newBlockFee, newAdjustmentQuotient) -} - // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. // // Solidity: function transferOwnership(address newOwner) returns() @@ -1013,24 +1190,24 @@ func (_TaikoL1Client *TaikoL1ClientTransactorSession) VerifyBlocks(maxBlocks *bi return _TaikoL1Client.Contract.VerifyBlocks(&_TaikoL1Client.TransactOpts, maxBlocks) } -// WithdrawTaikoToken is a paid mutator transaction binding the contract method 0x5043f059. +// WithdrawTaikoToken is a paid mutator transaction binding the contract method 0x980a4cf8. // -// Solidity: function withdrawTaikoToken(uint256 amount) returns() -func (_TaikoL1Client *TaikoL1ClientTransactor) WithdrawTaikoToken(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { +// Solidity: function withdrawTaikoToken(uint64 amount) returns() +func (_TaikoL1Client *TaikoL1ClientTransactor) WithdrawTaikoToken(opts *bind.TransactOpts, amount uint64) (*types.Transaction, error) { return _TaikoL1Client.contract.Transact(opts, "withdrawTaikoToken", amount) } -// WithdrawTaikoToken is a paid mutator transaction binding the contract method 0x5043f059. +// WithdrawTaikoToken is a paid mutator transaction binding the contract method 0x980a4cf8. // -// Solidity: function withdrawTaikoToken(uint256 amount) returns() -func (_TaikoL1Client *TaikoL1ClientSession) WithdrawTaikoToken(amount *big.Int) (*types.Transaction, error) { +// Solidity: function withdrawTaikoToken(uint64 amount) returns() +func (_TaikoL1Client *TaikoL1ClientSession) WithdrawTaikoToken(amount uint64) (*types.Transaction, error) { return _TaikoL1Client.Contract.WithdrawTaikoToken(&_TaikoL1Client.TransactOpts, amount) } -// WithdrawTaikoToken is a paid mutator transaction binding the contract method 0x5043f059. +// WithdrawTaikoToken is a paid mutator transaction binding the contract method 0x980a4cf8. // -// Solidity: function withdrawTaikoToken(uint256 amount) returns() -func (_TaikoL1Client *TaikoL1ClientTransactorSession) WithdrawTaikoToken(amount *big.Int) (*types.Transaction, error) { +// Solidity: function withdrawTaikoToken(uint64 amount) returns() +func (_TaikoL1Client *TaikoL1ClientTransactorSession) WithdrawTaikoToken(amount uint64) (*types.Transaction, error) { return _TaikoL1Client.Contract.WithdrawTaikoToken(&_TaikoL1Client.TransactOpts, amount) } @@ -1189,9 +1366,9 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) ParseAddressManagerChanged(log type return event, nil } -// TaikoL1ClientBlockProposedIterator is returned from FilterBlockProposed and is used to iterate over the raw logs and unpacked data for BlockProposed events raised by the TaikoL1Client contract. -type TaikoL1ClientBlockProposedIterator struct { - Event *TaikoL1ClientBlockProposed // Event containing the contract specifics and raw log +// TaikoL1ClientBatchBidIterator is returned from FilterBatchBid and is used to iterate over the raw logs and unpacked data for BatchBid events raised by the TaikoL1Client contract. +type TaikoL1ClientBatchBidIterator struct { + Event *TaikoL1ClientBatchBid // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1205,7 +1382,7 @@ type TaikoL1ClientBlockProposedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *TaikoL1ClientBlockProposedIterator) Next() bool { +func (it *TaikoL1ClientBatchBidIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1214,7 +1391,7 @@ func (it *TaikoL1ClientBlockProposedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(TaikoL1ClientBlockProposed) + it.Event = new(TaikoL1ClientBatchBid) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1229,7 +1406,7 @@ func (it *TaikoL1ClientBlockProposedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(TaikoL1ClientBlockProposed) + it.Event = new(TaikoL1ClientBatchBid) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1245,53 +1422,53 @@ func (it *TaikoL1ClientBlockProposedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoL1ClientBlockProposedIterator) Error() error { +func (it *TaikoL1ClientBatchBidIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *TaikoL1ClientBlockProposedIterator) Close() error { +func (it *TaikoL1ClientBatchBidIterator) Close() error { it.sub.Unsubscribe() return nil } -// TaikoL1ClientBlockProposed represents a BlockProposed event raised by the TaikoL1Client contract. -type TaikoL1ClientBlockProposed struct { - Id *big.Int - Meta TaikoDataBlockMetadata - BlockFee uint64 - Raw types.Log // Blockchain specific contextual infos +// TaikoL1ClientBatchBid represents a BatchBid event raised by the TaikoL1Client contract. +type TaikoL1ClientBatchBid struct { + BatchId uint64 + StartedAt uint64 + Bid TaikoDataBid + Raw types.Log // Blockchain specific contextual infos } -// FilterBlockProposed is a free log retrieval operation binding the contract event 0x555304f14500c230922dd951cfdbb74012005afbcd7350b4b9fd27dc12d710fe. +// FilterBatchBid is a free log retrieval operation binding the contract event 0x174b2b70a5c1374c8acf193c85bbb9070f5e62f34ebd6a34424a935cf5552a93. // -// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta, uint64 blockFee) -func (_TaikoL1Client *TaikoL1ClientFilterer) FilterBlockProposed(opts *bind.FilterOpts, id []*big.Int) (*TaikoL1ClientBlockProposedIterator, error) { +// Solidity: event BatchBid(uint64 indexed batchId, uint64 startedAt, (address,uint64,uint48,uint16) bid) +func (_TaikoL1Client *TaikoL1ClientFilterer) FilterBatchBid(opts *bind.FilterOpts, batchId []uint64) (*TaikoL1ClientBatchBidIterator, error) { - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) + var batchIdRule []interface{} + for _, batchIdItem := range batchId { + batchIdRule = append(batchIdRule, batchIdItem) } - logs, sub, err := _TaikoL1Client.contract.FilterLogs(opts, "BlockProposed", idRule) + logs, sub, err := _TaikoL1Client.contract.FilterLogs(opts, "BatchBid", batchIdRule) if err != nil { return nil, err } - return &TaikoL1ClientBlockProposedIterator{contract: _TaikoL1Client.contract, event: "BlockProposed", logs: logs, sub: sub}, nil + return &TaikoL1ClientBatchBidIterator{contract: _TaikoL1Client.contract, event: "BatchBid", logs: logs, sub: sub}, nil } -// WatchBlockProposed is a free log subscription operation binding the contract event 0x555304f14500c230922dd951cfdbb74012005afbcd7350b4b9fd27dc12d710fe. +// WatchBatchBid is a free log subscription operation binding the contract event 0x174b2b70a5c1374c8acf193c85bbb9070f5e62f34ebd6a34424a935cf5552a93. // -// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta, uint64 blockFee) -func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockProposed(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientBlockProposed, id []*big.Int) (event.Subscription, error) { +// Solidity: event BatchBid(uint64 indexed batchId, uint64 startedAt, (address,uint64,uint48,uint16) bid) +func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBatchBid(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientBatchBid, batchId []uint64) (event.Subscription, error) { - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) + var batchIdRule []interface{} + for _, batchIdItem := range batchId { + batchIdRule = append(batchIdRule, batchIdItem) } - logs, sub, err := _TaikoL1Client.contract.WatchLogs(opts, "BlockProposed", idRule) + logs, sub, err := _TaikoL1Client.contract.WatchLogs(opts, "BatchBid", batchIdRule) if err != nil { return nil, err } @@ -1301,8 +1478,8 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockProposed(opts *bind.Watch select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(TaikoL1ClientBlockProposed) - if err := _TaikoL1Client.contract.UnpackLog(event, "BlockProposed", log); err != nil { + event := new(TaikoL1ClientBatchBid) + if err := _TaikoL1Client.contract.UnpackLog(event, "BatchBid", log); err != nil { return err } event.Raw = log @@ -1323,21 +1500,21 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockProposed(opts *bind.Watch }), nil } -// ParseBlockProposed is a log parse operation binding the contract event 0x555304f14500c230922dd951cfdbb74012005afbcd7350b4b9fd27dc12d710fe. +// ParseBatchBid is a log parse operation binding the contract event 0x174b2b70a5c1374c8acf193c85bbb9070f5e62f34ebd6a34424a935cf5552a93. // -// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta, uint64 blockFee) -func (_TaikoL1Client *TaikoL1ClientFilterer) ParseBlockProposed(log types.Log) (*TaikoL1ClientBlockProposed, error) { - event := new(TaikoL1ClientBlockProposed) - if err := _TaikoL1Client.contract.UnpackLog(event, "BlockProposed", log); err != nil { +// Solidity: event BatchBid(uint64 indexed batchId, uint64 startedAt, (address,uint64,uint48,uint16) bid) +func (_TaikoL1Client *TaikoL1ClientFilterer) ParseBatchBid(log types.Log) (*TaikoL1ClientBatchBid, error) { + event := new(TaikoL1ClientBatchBid) + if err := _TaikoL1Client.contract.UnpackLog(event, "BatchBid", log); err != nil { return nil, err } event.Raw = log return event, nil } -// TaikoL1ClientBlockProvenIterator is returned from FilterBlockProven and is used to iterate over the raw logs and unpacked data for BlockProven events raised by the TaikoL1Client contract. -type TaikoL1ClientBlockProvenIterator struct { - Event *TaikoL1ClientBlockProven // Event containing the contract specifics and raw log +// TaikoL1ClientBatchBid0Iterator is returned from FilterBatchBid0 and is used to iterate over the raw logs and unpacked data for BatchBid0 events raised by the TaikoL1Client contract. +type TaikoL1ClientBatchBid0Iterator struct { + Event *TaikoL1ClientBatchBid0 // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1351,7 +1528,7 @@ type TaikoL1ClientBlockProvenIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *TaikoL1ClientBlockProvenIterator) Next() bool { +func (it *TaikoL1ClientBatchBid0Iterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1360,7 +1537,7 @@ func (it *TaikoL1ClientBlockProvenIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(TaikoL1ClientBlockProven) + it.Event = new(TaikoL1ClientBatchBid0) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1375,7 +1552,7 @@ func (it *TaikoL1ClientBlockProvenIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(TaikoL1ClientBlockProven) + it.Event = new(TaikoL1ClientBatchBid0) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1391,56 +1568,53 @@ func (it *TaikoL1ClientBlockProvenIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoL1ClientBlockProvenIterator) Error() error { +func (it *TaikoL1ClientBatchBid0Iterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *TaikoL1ClientBlockProvenIterator) Close() error { +func (it *TaikoL1ClientBatchBid0Iterator) Close() error { it.sub.Unsubscribe() return nil } -// TaikoL1ClientBlockProven represents a BlockProven event raised by the TaikoL1Client contract. -type TaikoL1ClientBlockProven struct { - Id *big.Int - ParentHash [32]byte - BlockHash [32]byte - SignalRoot [32]byte - Prover common.Address - ParentGasUsed uint32 - Raw types.Log // Blockchain specific contextual infos +// TaikoL1ClientBatchBid0 represents a BatchBid0 event raised by the TaikoL1Client contract. +type TaikoL1ClientBatchBid0 struct { + BatchId uint64 + StartedAt uint64 + Bid TaikoDataBid + Raw types.Log // Blockchain specific contextual infos } -// FilterBlockProven is a free log retrieval operation binding the contract event 0x2295930c498c7b1f60143439a63dd1d24bbb730f08ff6ed383b490ba2c1cafa4. +// FilterBatchBid0 is a free log retrieval operation binding the contract event 0x174b2b70a5c1374c8acf193c85bbb9070f5e62f34ebd6a34424a935cf5552a93. // -// Solidity: event BlockProven(uint256 indexed id, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover, uint32 parentGasUsed) -func (_TaikoL1Client *TaikoL1ClientFilterer) FilterBlockProven(opts *bind.FilterOpts, id []*big.Int) (*TaikoL1ClientBlockProvenIterator, error) { +// Solidity: event BatchBid(uint64 indexed batchId, uint64 startedAt, (address,uint64,uint48,uint16) bid) +func (_TaikoL1Client *TaikoL1ClientFilterer) FilterBatchBid0(opts *bind.FilterOpts, batchId []uint64) (*TaikoL1ClientBatchBid0Iterator, error) { - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) + var batchIdRule []interface{} + for _, batchIdItem := range batchId { + batchIdRule = append(batchIdRule, batchIdItem) } - logs, sub, err := _TaikoL1Client.contract.FilterLogs(opts, "BlockProven", idRule) + logs, sub, err := _TaikoL1Client.contract.FilterLogs(opts, "BatchBid0", batchIdRule) if err != nil { return nil, err } - return &TaikoL1ClientBlockProvenIterator{contract: _TaikoL1Client.contract, event: "BlockProven", logs: logs, sub: sub}, nil + return &TaikoL1ClientBatchBid0Iterator{contract: _TaikoL1Client.contract, event: "BatchBid0", logs: logs, sub: sub}, nil } -// WatchBlockProven is a free log subscription operation binding the contract event 0x2295930c498c7b1f60143439a63dd1d24bbb730f08ff6ed383b490ba2c1cafa4. +// WatchBatchBid0 is a free log subscription operation binding the contract event 0x174b2b70a5c1374c8acf193c85bbb9070f5e62f34ebd6a34424a935cf5552a93. // -// Solidity: event BlockProven(uint256 indexed id, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover, uint32 parentGasUsed) -func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockProven(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientBlockProven, id []*big.Int) (event.Subscription, error) { +// Solidity: event BatchBid(uint64 indexed batchId, uint64 startedAt, (address,uint64,uint48,uint16) bid) +func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBatchBid0(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientBatchBid0, batchId []uint64) (event.Subscription, error) { - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) + var batchIdRule []interface{} + for _, batchIdItem := range batchId { + batchIdRule = append(batchIdRule, batchIdItem) } - logs, sub, err := _TaikoL1Client.contract.WatchLogs(opts, "BlockProven", idRule) + logs, sub, err := _TaikoL1Client.contract.WatchLogs(opts, "BatchBid0", batchIdRule) if err != nil { return nil, err } @@ -1450,8 +1624,8 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockProven(opts *bind.WatchOp select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(TaikoL1ClientBlockProven) - if err := _TaikoL1Client.contract.UnpackLog(event, "BlockProven", log); err != nil { + event := new(TaikoL1ClientBatchBid0) + if err := _TaikoL1Client.contract.UnpackLog(event, "BatchBid0", log); err != nil { return err } event.Raw = log @@ -1472,21 +1646,21 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockProven(opts *bind.WatchOp }), nil } -// ParseBlockProven is a log parse operation binding the contract event 0x2295930c498c7b1f60143439a63dd1d24bbb730f08ff6ed383b490ba2c1cafa4. +// ParseBatchBid0 is a log parse operation binding the contract event 0x174b2b70a5c1374c8acf193c85bbb9070f5e62f34ebd6a34424a935cf5552a93. // -// Solidity: event BlockProven(uint256 indexed id, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover, uint32 parentGasUsed) -func (_TaikoL1Client *TaikoL1ClientFilterer) ParseBlockProven(log types.Log) (*TaikoL1ClientBlockProven, error) { - event := new(TaikoL1ClientBlockProven) - if err := _TaikoL1Client.contract.UnpackLog(event, "BlockProven", log); err != nil { +// Solidity: event BatchBid(uint64 indexed batchId, uint64 startedAt, (address,uint64,uint48,uint16) bid) +func (_TaikoL1Client *TaikoL1ClientFilterer) ParseBatchBid0(log types.Log) (*TaikoL1ClientBatchBid0, error) { + event := new(TaikoL1ClientBatchBid0) + if err := _TaikoL1Client.contract.UnpackLog(event, "BatchBid0", log); err != nil { return nil, err } event.Raw = log return event, nil } -// TaikoL1ClientBlockVerifiedIterator is returned from FilterBlockVerified and is used to iterate over the raw logs and unpacked data for BlockVerified events raised by the TaikoL1Client contract. -type TaikoL1ClientBlockVerifiedIterator struct { - Event *TaikoL1ClientBlockVerified // Event containing the contract specifics and raw log +// TaikoL1ClientBlockProposedIterator is returned from FilterBlockProposed and is used to iterate over the raw logs and unpacked data for BlockProposed events raised by the TaikoL1Client contract. +type TaikoL1ClientBlockProposedIterator struct { + Event *TaikoL1ClientBlockProposed // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1500,7 +1674,7 @@ type TaikoL1ClientBlockVerifiedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *TaikoL1ClientBlockVerifiedIterator) Next() bool { +func (it *TaikoL1ClientBlockProposedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1509,7 +1683,7 @@ func (it *TaikoL1ClientBlockVerifiedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(TaikoL1ClientBlockVerified) + it.Event = new(TaikoL1ClientBlockProposed) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1524,7 +1698,7 @@ func (it *TaikoL1ClientBlockVerifiedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(TaikoL1ClientBlockVerified) + it.Event = new(TaikoL1ClientBlockProposed) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1540,53 +1714,789 @@ func (it *TaikoL1ClientBlockVerifiedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoL1ClientBlockVerifiedIterator) Error() error { +func (it *TaikoL1ClientBlockProposedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *TaikoL1ClientBlockVerifiedIterator) Close() error { +func (it *TaikoL1ClientBlockProposedIterator) Close() error { it.sub.Unsubscribe() return nil } -// TaikoL1ClientBlockVerified represents a BlockVerified event raised by the TaikoL1Client contract. -type TaikoL1ClientBlockVerified struct { - Id *big.Int - BlockHash [32]byte - Reward uint64 - Raw types.Log // Blockchain specific contextual infos +// TaikoL1ClientBlockProposed represents a BlockProposed event raised by the TaikoL1Client contract. +type TaikoL1ClientBlockProposed struct { + Id *big.Int + Meta TaikoDataBlockMetadata + BlockFee uint64 + Raw types.Log // Blockchain specific contextual infos } -// FilterBlockVerified is a free log retrieval operation binding the contract event 0x71eb3f26e4ff6e88e66a79521590634475f8ddb0c9e30e0400de0c7f2b28fb83. +// FilterBlockProposed is a free log retrieval operation binding the contract event 0x555304f14500c230922dd951cfdbb74012005afbcd7350b4b9fd27dc12d710fe. // -// Solidity: event BlockVerified(uint256 indexed id, bytes32 blockHash, uint64 reward) -func (_TaikoL1Client *TaikoL1ClientFilterer) FilterBlockVerified(opts *bind.FilterOpts, id []*big.Int) (*TaikoL1ClientBlockVerifiedIterator, error) { +// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta, uint64 blockFee) +func (_TaikoL1Client *TaikoL1ClientFilterer) FilterBlockProposed(opts *bind.FilterOpts, id []*big.Int) (*TaikoL1ClientBlockProposedIterator, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _TaikoL1Client.contract.FilterLogs(opts, "BlockVerified", idRule) + logs, sub, err := _TaikoL1Client.contract.FilterLogs(opts, "BlockProposed", idRule) if err != nil { return nil, err } - return &TaikoL1ClientBlockVerifiedIterator{contract: _TaikoL1Client.contract, event: "BlockVerified", logs: logs, sub: sub}, nil + return &TaikoL1ClientBlockProposedIterator{contract: _TaikoL1Client.contract, event: "BlockProposed", logs: logs, sub: sub}, nil } -// WatchBlockVerified is a free log subscription operation binding the contract event 0x71eb3f26e4ff6e88e66a79521590634475f8ddb0c9e30e0400de0c7f2b28fb83. +// WatchBlockProposed is a free log subscription operation binding the contract event 0x555304f14500c230922dd951cfdbb74012005afbcd7350b4b9fd27dc12d710fe. +// +// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta, uint64 blockFee) +func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockProposed(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientBlockProposed, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _TaikoL1Client.contract.WatchLogs(opts, "BlockProposed", idRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoL1ClientBlockProposed) + if err := _TaikoL1Client.contract.UnpackLog(event, "BlockProposed", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseBlockProposed is a log parse operation binding the contract event 0x555304f14500c230922dd951cfdbb74012005afbcd7350b4b9fd27dc12d710fe. +// +// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta, uint64 blockFee) +func (_TaikoL1Client *TaikoL1ClientFilterer) ParseBlockProposed(log types.Log) (*TaikoL1ClientBlockProposed, error) { + event := new(TaikoL1ClientBlockProposed) + if err := _TaikoL1Client.contract.UnpackLog(event, "BlockProposed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoL1ClientBlockProposed0Iterator is returned from FilterBlockProposed0 and is used to iterate over the raw logs and unpacked data for BlockProposed0 events raised by the TaikoL1Client contract. +type TaikoL1ClientBlockProposed0Iterator struct { + Event *TaikoL1ClientBlockProposed0 // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoL1ClientBlockProposed0Iterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoL1ClientBlockProposed0) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoL1ClientBlockProposed0) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoL1ClientBlockProposed0Iterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoL1ClientBlockProposed0Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoL1ClientBlockProposed0 represents a BlockProposed0 event raised by the TaikoL1Client contract. +type TaikoL1ClientBlockProposed0 struct { + Id *big.Int + Meta TaikoDataBlockMetadata + BlockFee uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBlockProposed0 is a free log retrieval operation binding the contract event 0x555304f14500c230922dd951cfdbb74012005afbcd7350b4b9fd27dc12d710fe. +// +// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta, uint64 blockFee) +func (_TaikoL1Client *TaikoL1ClientFilterer) FilterBlockProposed0(opts *bind.FilterOpts, id []*big.Int) (*TaikoL1ClientBlockProposed0Iterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _TaikoL1Client.contract.FilterLogs(opts, "BlockProposed0", idRule) + if err != nil { + return nil, err + } + return &TaikoL1ClientBlockProposed0Iterator{contract: _TaikoL1Client.contract, event: "BlockProposed0", logs: logs, sub: sub}, nil +} + +// WatchBlockProposed0 is a free log subscription operation binding the contract event 0x555304f14500c230922dd951cfdbb74012005afbcd7350b4b9fd27dc12d710fe. +// +// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta, uint64 blockFee) +func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockProposed0(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientBlockProposed0, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _TaikoL1Client.contract.WatchLogs(opts, "BlockProposed0", idRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoL1ClientBlockProposed0) + if err := _TaikoL1Client.contract.UnpackLog(event, "BlockProposed0", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseBlockProposed0 is a log parse operation binding the contract event 0x555304f14500c230922dd951cfdbb74012005afbcd7350b4b9fd27dc12d710fe. +// +// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta, uint64 blockFee) +func (_TaikoL1Client *TaikoL1ClientFilterer) ParseBlockProposed0(log types.Log) (*TaikoL1ClientBlockProposed0, error) { + event := new(TaikoL1ClientBlockProposed0) + if err := _TaikoL1Client.contract.UnpackLog(event, "BlockProposed0", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoL1ClientBlockProvenIterator is returned from FilterBlockProven and is used to iterate over the raw logs and unpacked data for BlockProven events raised by the TaikoL1Client contract. +type TaikoL1ClientBlockProvenIterator struct { + Event *TaikoL1ClientBlockProven // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoL1ClientBlockProvenIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoL1ClientBlockProven) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoL1ClientBlockProven) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoL1ClientBlockProvenIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoL1ClientBlockProvenIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoL1ClientBlockProven represents a BlockProven event raised by the TaikoL1Client contract. +type TaikoL1ClientBlockProven struct { + Id *big.Int + ParentHash [32]byte + BlockHash [32]byte + SignalRoot [32]byte + Prover common.Address + ParentGasUsed uint32 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBlockProven is a free log retrieval operation binding the contract event 0x2295930c498c7b1f60143439a63dd1d24bbb730f08ff6ed383b490ba2c1cafa4. +// +// Solidity: event BlockProven(uint256 indexed id, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover, uint32 parentGasUsed) +func (_TaikoL1Client *TaikoL1ClientFilterer) FilterBlockProven(opts *bind.FilterOpts, id []*big.Int) (*TaikoL1ClientBlockProvenIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _TaikoL1Client.contract.FilterLogs(opts, "BlockProven", idRule) + if err != nil { + return nil, err + } + return &TaikoL1ClientBlockProvenIterator{contract: _TaikoL1Client.contract, event: "BlockProven", logs: logs, sub: sub}, nil +} + +// WatchBlockProven is a free log subscription operation binding the contract event 0x2295930c498c7b1f60143439a63dd1d24bbb730f08ff6ed383b490ba2c1cafa4. +// +// Solidity: event BlockProven(uint256 indexed id, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover, uint32 parentGasUsed) +func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockProven(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientBlockProven, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _TaikoL1Client.contract.WatchLogs(opts, "BlockProven", idRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoL1ClientBlockProven) + if err := _TaikoL1Client.contract.UnpackLog(event, "BlockProven", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseBlockProven is a log parse operation binding the contract event 0x2295930c498c7b1f60143439a63dd1d24bbb730f08ff6ed383b490ba2c1cafa4. +// +// Solidity: event BlockProven(uint256 indexed id, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover, uint32 parentGasUsed) +func (_TaikoL1Client *TaikoL1ClientFilterer) ParseBlockProven(log types.Log) (*TaikoL1ClientBlockProven, error) { + event := new(TaikoL1ClientBlockProven) + if err := _TaikoL1Client.contract.UnpackLog(event, "BlockProven", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoL1ClientBlockProven0Iterator is returned from FilterBlockProven0 and is used to iterate over the raw logs and unpacked data for BlockProven0 events raised by the TaikoL1Client contract. +type TaikoL1ClientBlockProven0Iterator struct { + Event *TaikoL1ClientBlockProven0 // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoL1ClientBlockProven0Iterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoL1ClientBlockProven0) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoL1ClientBlockProven0) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoL1ClientBlockProven0Iterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoL1ClientBlockProven0Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoL1ClientBlockProven0 represents a BlockProven0 event raised by the TaikoL1Client contract. +type TaikoL1ClientBlockProven0 struct { + Id *big.Int + ParentHash [32]byte + BlockHash [32]byte + SignalRoot [32]byte + Prover common.Address + ParentGasUsed uint32 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBlockProven0 is a free log retrieval operation binding the contract event 0x2295930c498c7b1f60143439a63dd1d24bbb730f08ff6ed383b490ba2c1cafa4. +// +// Solidity: event BlockProven(uint256 indexed id, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover, uint32 parentGasUsed) +func (_TaikoL1Client *TaikoL1ClientFilterer) FilterBlockProven0(opts *bind.FilterOpts, id []*big.Int) (*TaikoL1ClientBlockProven0Iterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _TaikoL1Client.contract.FilterLogs(opts, "BlockProven0", idRule) + if err != nil { + return nil, err + } + return &TaikoL1ClientBlockProven0Iterator{contract: _TaikoL1Client.contract, event: "BlockProven0", logs: logs, sub: sub}, nil +} + +// WatchBlockProven0 is a free log subscription operation binding the contract event 0x2295930c498c7b1f60143439a63dd1d24bbb730f08ff6ed383b490ba2c1cafa4. +// +// Solidity: event BlockProven(uint256 indexed id, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover, uint32 parentGasUsed) +func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockProven0(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientBlockProven0, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _TaikoL1Client.contract.WatchLogs(opts, "BlockProven0", idRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoL1ClientBlockProven0) + if err := _TaikoL1Client.contract.UnpackLog(event, "BlockProven0", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseBlockProven0 is a log parse operation binding the contract event 0x2295930c498c7b1f60143439a63dd1d24bbb730f08ff6ed383b490ba2c1cafa4. +// +// Solidity: event BlockProven(uint256 indexed id, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover, uint32 parentGasUsed) +func (_TaikoL1Client *TaikoL1ClientFilterer) ParseBlockProven0(log types.Log) (*TaikoL1ClientBlockProven0, error) { + event := new(TaikoL1ClientBlockProven0) + if err := _TaikoL1Client.contract.UnpackLog(event, "BlockProven0", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoL1ClientBlockVerifiedIterator is returned from FilterBlockVerified and is used to iterate over the raw logs and unpacked data for BlockVerified events raised by the TaikoL1Client contract. +type TaikoL1ClientBlockVerifiedIterator struct { + Event *TaikoL1ClientBlockVerified // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoL1ClientBlockVerifiedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoL1ClientBlockVerified) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoL1ClientBlockVerified) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoL1ClientBlockVerifiedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoL1ClientBlockVerifiedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoL1ClientBlockVerified represents a BlockVerified event raised by the TaikoL1Client contract. +type TaikoL1ClientBlockVerified struct { + Id *big.Int + BlockHash [32]byte + Reward uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBlockVerified is a free log retrieval operation binding the contract event 0x71eb3f26e4ff6e88e66a79521590634475f8ddb0c9e30e0400de0c7f2b28fb83. +// +// Solidity: event BlockVerified(uint256 indexed id, bytes32 blockHash, uint64 reward) +func (_TaikoL1Client *TaikoL1ClientFilterer) FilterBlockVerified(opts *bind.FilterOpts, id []*big.Int) (*TaikoL1ClientBlockVerifiedIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _TaikoL1Client.contract.FilterLogs(opts, "BlockVerified", idRule) + if err != nil { + return nil, err + } + return &TaikoL1ClientBlockVerifiedIterator{contract: _TaikoL1Client.contract, event: "BlockVerified", logs: logs, sub: sub}, nil +} + +// WatchBlockVerified is a free log subscription operation binding the contract event 0x71eb3f26e4ff6e88e66a79521590634475f8ddb0c9e30e0400de0c7f2b28fb83. +// +// Solidity: event BlockVerified(uint256 indexed id, bytes32 blockHash, uint64 reward) +func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockVerified(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientBlockVerified, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _TaikoL1Client.contract.WatchLogs(opts, "BlockVerified", idRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoL1ClientBlockVerified) + if err := _TaikoL1Client.contract.UnpackLog(event, "BlockVerified", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseBlockVerified is a log parse operation binding the contract event 0x71eb3f26e4ff6e88e66a79521590634475f8ddb0c9e30e0400de0c7f2b28fb83. +// +// Solidity: event BlockVerified(uint256 indexed id, bytes32 blockHash, uint64 reward) +func (_TaikoL1Client *TaikoL1ClientFilterer) ParseBlockVerified(log types.Log) (*TaikoL1ClientBlockVerified, error) { + event := new(TaikoL1ClientBlockVerified) + if err := _TaikoL1Client.contract.UnpackLog(event, "BlockVerified", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoL1ClientBlockVerified0Iterator is returned from FilterBlockVerified0 and is used to iterate over the raw logs and unpacked data for BlockVerified0 events raised by the TaikoL1Client contract. +type TaikoL1ClientBlockVerified0Iterator struct { + Event *TaikoL1ClientBlockVerified0 // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoL1ClientBlockVerified0Iterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoL1ClientBlockVerified0) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoL1ClientBlockVerified0) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoL1ClientBlockVerified0Iterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoL1ClientBlockVerified0Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoL1ClientBlockVerified0 represents a BlockVerified0 event raised by the TaikoL1Client contract. +type TaikoL1ClientBlockVerified0 struct { + Id *big.Int + BlockHash [32]byte + Reward uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBlockVerified0 is a free log retrieval operation binding the contract event 0x71eb3f26e4ff6e88e66a79521590634475f8ddb0c9e30e0400de0c7f2b28fb83. // // Solidity: event BlockVerified(uint256 indexed id, bytes32 blockHash, uint64 reward) -func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockVerified(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientBlockVerified, id []*big.Int) (event.Subscription, error) { +func (_TaikoL1Client *TaikoL1ClientFilterer) FilterBlockVerified0(opts *bind.FilterOpts, id []*big.Int) (*TaikoL1ClientBlockVerified0Iterator, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _TaikoL1Client.contract.WatchLogs(opts, "BlockVerified", idRule) + logs, sub, err := _TaikoL1Client.contract.FilterLogs(opts, "BlockVerified0", idRule) + if err != nil { + return nil, err + } + return &TaikoL1ClientBlockVerified0Iterator{contract: _TaikoL1Client.contract, event: "BlockVerified0", logs: logs, sub: sub}, nil +} + +// WatchBlockVerified0 is a free log subscription operation binding the contract event 0x71eb3f26e4ff6e88e66a79521590634475f8ddb0c9e30e0400de0c7f2b28fb83. +// +// Solidity: event BlockVerified(uint256 indexed id, bytes32 blockHash, uint64 reward) +func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockVerified0(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientBlockVerified0, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _TaikoL1Client.contract.WatchLogs(opts, "BlockVerified0", idRule) if err != nil { return nil, err } @@ -1596,8 +2506,8 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockVerified(opts *bind.Watch select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(TaikoL1ClientBlockVerified) - if err := _TaikoL1Client.contract.UnpackLog(event, "BlockVerified", log); err != nil { + event := new(TaikoL1ClientBlockVerified0) + if err := _TaikoL1Client.contract.UnpackLog(event, "BlockVerified0", log); err != nil { return err } event.Raw = log @@ -1618,12 +2528,12 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockVerified(opts *bind.Watch }), nil } -// ParseBlockVerified is a log parse operation binding the contract event 0x71eb3f26e4ff6e88e66a79521590634475f8ddb0c9e30e0400de0c7f2b28fb83. +// ParseBlockVerified0 is a log parse operation binding the contract event 0x71eb3f26e4ff6e88e66a79521590634475f8ddb0c9e30e0400de0c7f2b28fb83. // // Solidity: event BlockVerified(uint256 indexed id, bytes32 blockHash, uint64 reward) -func (_TaikoL1Client *TaikoL1ClientFilterer) ParseBlockVerified(log types.Log) (*TaikoL1ClientBlockVerified, error) { - event := new(TaikoL1ClientBlockVerified) - if err := _TaikoL1Client.contract.UnpackLog(event, "BlockVerified", log); err != nil { +func (_TaikoL1Client *TaikoL1ClientFilterer) ParseBlockVerified0(log types.Log) (*TaikoL1ClientBlockVerified0, error) { + event := new(TaikoL1ClientBlockVerified0) + if err := _TaikoL1Client.contract.UnpackLog(event, "BlockVerified0", log); err != nil { return nil, err } event.Raw = log @@ -1776,6 +2686,152 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) ParseCrossChainSynced(log types.Log return event, nil } +// TaikoL1ClientCrossChainSynced0Iterator is returned from FilterCrossChainSynced0 and is used to iterate over the raw logs and unpacked data for CrossChainSynced0 events raised by the TaikoL1Client contract. +type TaikoL1ClientCrossChainSynced0Iterator struct { + Event *TaikoL1ClientCrossChainSynced0 // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoL1ClientCrossChainSynced0Iterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoL1ClientCrossChainSynced0) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoL1ClientCrossChainSynced0) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoL1ClientCrossChainSynced0Iterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoL1ClientCrossChainSynced0Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoL1ClientCrossChainSynced0 represents a CrossChainSynced0 event raised by the TaikoL1Client contract. +type TaikoL1ClientCrossChainSynced0 struct { + SrcHeight *big.Int + BlockHash [32]byte + SignalRoot [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCrossChainSynced0 is a free log retrieval operation binding the contract event 0x7528bbd1cef0e5d13408706892a51ee8ef82bbf33d4ec0c37216f8beba71205b. +// +// Solidity: event CrossChainSynced(uint256 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot) +func (_TaikoL1Client *TaikoL1ClientFilterer) FilterCrossChainSynced0(opts *bind.FilterOpts, srcHeight []*big.Int) (*TaikoL1ClientCrossChainSynced0Iterator, error) { + + var srcHeightRule []interface{} + for _, srcHeightItem := range srcHeight { + srcHeightRule = append(srcHeightRule, srcHeightItem) + } + + logs, sub, err := _TaikoL1Client.contract.FilterLogs(opts, "CrossChainSynced0", srcHeightRule) + if err != nil { + return nil, err + } + return &TaikoL1ClientCrossChainSynced0Iterator{contract: _TaikoL1Client.contract, event: "CrossChainSynced0", logs: logs, sub: sub}, nil +} + +// WatchCrossChainSynced0 is a free log subscription operation binding the contract event 0x7528bbd1cef0e5d13408706892a51ee8ef82bbf33d4ec0c37216f8beba71205b. +// +// Solidity: event CrossChainSynced(uint256 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot) +func (_TaikoL1Client *TaikoL1ClientFilterer) WatchCrossChainSynced0(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientCrossChainSynced0, srcHeight []*big.Int) (event.Subscription, error) { + + var srcHeightRule []interface{} + for _, srcHeightItem := range srcHeight { + srcHeightRule = append(srcHeightRule, srcHeightItem) + } + + logs, sub, err := _TaikoL1Client.contract.WatchLogs(opts, "CrossChainSynced0", srcHeightRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoL1ClientCrossChainSynced0) + if err := _TaikoL1Client.contract.UnpackLog(event, "CrossChainSynced0", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseCrossChainSynced0 is a log parse operation binding the contract event 0x7528bbd1cef0e5d13408706892a51ee8ef82bbf33d4ec0c37216f8beba71205b. +// +// Solidity: event CrossChainSynced(uint256 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot) +func (_TaikoL1Client *TaikoL1ClientFilterer) ParseCrossChainSynced0(log types.Log) (*TaikoL1ClientCrossChainSynced0, error) { + event := new(TaikoL1ClientCrossChainSynced0) + if err := _TaikoL1Client.contract.UnpackLog(event, "CrossChainSynced0", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // TaikoL1ClientEthDepositedIterator is returned from FilterEthDeposited and is used to iterate over the raw logs and unpacked data for EthDeposited events raised by the TaikoL1Client contract. type TaikoL1ClientEthDepositedIterator struct { Event *TaikoL1ClientEthDeposited // Event containing the contract specifics and raw log @@ -1910,6 +2966,140 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) ParseEthDeposited(log types.Log) (* return event, nil } +// TaikoL1ClientEthDeposited0Iterator is returned from FilterEthDeposited0 and is used to iterate over the raw logs and unpacked data for EthDeposited0 events raised by the TaikoL1Client contract. +type TaikoL1ClientEthDeposited0Iterator struct { + Event *TaikoL1ClientEthDeposited0 // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoL1ClientEthDeposited0Iterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoL1ClientEthDeposited0) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoL1ClientEthDeposited0) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoL1ClientEthDeposited0Iterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoL1ClientEthDeposited0Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoL1ClientEthDeposited0 represents a EthDeposited0 event raised by the TaikoL1Client contract. +type TaikoL1ClientEthDeposited0 struct { + Deposit TaikoDataEthDeposit + Raw types.Log // Blockchain specific contextual infos +} + +// FilterEthDeposited0 is a free log retrieval operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9. +// +// Solidity: event EthDeposited((address,uint96,uint64) deposit) +func (_TaikoL1Client *TaikoL1ClientFilterer) FilterEthDeposited0(opts *bind.FilterOpts) (*TaikoL1ClientEthDeposited0Iterator, error) { + + logs, sub, err := _TaikoL1Client.contract.FilterLogs(opts, "EthDeposited0") + if err != nil { + return nil, err + } + return &TaikoL1ClientEthDeposited0Iterator{contract: _TaikoL1Client.contract, event: "EthDeposited0", logs: logs, sub: sub}, nil +} + +// WatchEthDeposited0 is a free log subscription operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9. +// +// Solidity: event EthDeposited((address,uint96,uint64) deposit) +func (_TaikoL1Client *TaikoL1ClientFilterer) WatchEthDeposited0(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientEthDeposited0) (event.Subscription, error) { + + logs, sub, err := _TaikoL1Client.contract.WatchLogs(opts, "EthDeposited0") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoL1ClientEthDeposited0) + if err := _TaikoL1Client.contract.UnpackLog(event, "EthDeposited0", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseEthDeposited0 is a log parse operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9. +// +// Solidity: event EthDeposited((address,uint96,uint64) deposit) +func (_TaikoL1Client *TaikoL1ClientFilterer) ParseEthDeposited0(log types.Log) (*TaikoL1ClientEthDeposited0, error) { + event := new(TaikoL1ClientEthDeposited0) + if err := _TaikoL1Client.contract.UnpackLog(event, "EthDeposited0", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // TaikoL1ClientInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the TaikoL1Client contract. type TaikoL1ClientInitializedIterator struct { Event *TaikoL1ClientInitialized // Event containing the contract specifics and raw log diff --git a/bindings/gen_taiko_prover_pool_l1.go b/bindings/gen_taiko_prover_pool_l1.go new file mode 100644 index 000000000..9168b4259 --- /dev/null +++ b/bindings/gen_taiko_prover_pool_l1.go @@ -0,0 +1,1572 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// TaikoL1ProverPoolMetaData contains all meta data concerning the TaikoL1ProverPool contract. +var TaikoL1ProverPoolMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"feeMultiplier\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"capacity\",\"type\":\"uint64\"}],\"name\":\"ProverEntered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"name\":\"ProverExited\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MAX_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_TKO_AMOUNT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newCapacity\",\"type\":\"uint32\"}],\"name\":\"adjustCapacity\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"newFeeMultiplier\",\"type\":\"uint8\"}],\"name\":\"adjustFeeMultiplier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"blockIdToProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"capacity\",\"type\":\"uint32\"}],\"name\":\"enterProverPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"exit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_maxPoolSize\",\"type\":\"uint16\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxPoolSize\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"randomNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"pickRandomProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"provers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"proverAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"stakedTokens\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"healthScore\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastBlockTsToBeProven\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"capacity\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numAssignedBlocks\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"feeMultiplier\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proversInPool\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"name\":\"slash\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stakeMoreTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"topProvers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"name\":\"withdrawRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// TaikoL1ProverPoolABI is the input ABI used to generate the binding from. +// Deprecated: Use TaikoL1ProverPoolMetaData.ABI instead. +var TaikoL1ProverPoolABI = TaikoL1ProverPoolMetaData.ABI + +// TaikoL1ProverPool is an auto generated Go binding around an Ethereum contract. +type TaikoL1ProverPool struct { + TaikoL1ProverPoolCaller // Read-only binding to the contract + TaikoL1ProverPoolTransactor // Write-only binding to the contract + TaikoL1ProverPoolFilterer // Log filterer for contract events +} + +// TaikoL1ProverPoolCaller is an auto generated read-only Go binding around an Ethereum contract. +type TaikoL1ProverPoolCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TaikoL1ProverPoolTransactor is an auto generated write-only Go binding around an Ethereum contract. +type TaikoL1ProverPoolTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TaikoL1ProverPoolFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type TaikoL1ProverPoolFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TaikoL1ProverPoolSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type TaikoL1ProverPoolSession struct { + Contract *TaikoL1ProverPool // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// TaikoL1ProverPoolCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type TaikoL1ProverPoolCallerSession struct { + Contract *TaikoL1ProverPoolCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// TaikoL1ProverPoolTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type TaikoL1ProverPoolTransactorSession struct { + Contract *TaikoL1ProverPoolTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// TaikoL1ProverPoolRaw is an auto generated low-level Go binding around an Ethereum contract. +type TaikoL1ProverPoolRaw struct { + Contract *TaikoL1ProverPool // Generic contract binding to access the raw methods on +} + +// TaikoL1ProverPoolCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type TaikoL1ProverPoolCallerRaw struct { + Contract *TaikoL1ProverPoolCaller // Generic read-only contract binding to access the raw methods on +} + +// TaikoL1ProverPoolTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type TaikoL1ProverPoolTransactorRaw struct { + Contract *TaikoL1ProverPoolTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewTaikoL1ProverPool creates a new instance of TaikoL1ProverPool, bound to a specific deployed contract. +func NewTaikoL1ProverPool(address common.Address, backend bind.ContractBackend) (*TaikoL1ProverPool, error) { + contract, err := bindTaikoL1ProverPool(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &TaikoL1ProverPool{TaikoL1ProverPoolCaller: TaikoL1ProverPoolCaller{contract: contract}, TaikoL1ProverPoolTransactor: TaikoL1ProverPoolTransactor{contract: contract}, TaikoL1ProverPoolFilterer: TaikoL1ProverPoolFilterer{contract: contract}}, nil +} + +// NewTaikoL1ProverPoolCaller creates a new read-only instance of TaikoL1ProverPool, bound to a specific deployed contract. +func NewTaikoL1ProverPoolCaller(address common.Address, caller bind.ContractCaller) (*TaikoL1ProverPoolCaller, error) { + contract, err := bindTaikoL1ProverPool(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &TaikoL1ProverPoolCaller{contract: contract}, nil +} + +// NewTaikoL1ProverPoolTransactor creates a new write-only instance of TaikoL1ProverPool, bound to a specific deployed contract. +func NewTaikoL1ProverPoolTransactor(address common.Address, transactor bind.ContractTransactor) (*TaikoL1ProverPoolTransactor, error) { + contract, err := bindTaikoL1ProverPool(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &TaikoL1ProverPoolTransactor{contract: contract}, nil +} + +// NewTaikoL1ProverPoolFilterer creates a new log filterer instance of TaikoL1ProverPool, bound to a specific deployed contract. +func NewTaikoL1ProverPoolFilterer(address common.Address, filterer bind.ContractFilterer) (*TaikoL1ProverPoolFilterer, error) { + contract, err := bindTaikoL1ProverPool(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &TaikoL1ProverPoolFilterer{contract: contract}, nil +} + +// bindTaikoL1ProverPool binds a generic wrapper to an already deployed contract. +func bindTaikoL1ProverPool(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := TaikoL1ProverPoolMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_TaikoL1ProverPool *TaikoL1ProverPoolRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TaikoL1ProverPool.Contract.TaikoL1ProverPoolCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_TaikoL1ProverPool *TaikoL1ProverPoolRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.TaikoL1ProverPoolTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_TaikoL1ProverPool *TaikoL1ProverPoolRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.TaikoL1ProverPoolTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TaikoL1ProverPool.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.contract.Transact(opts, method, params...) +} + +// MAXMULTIPLIER is a free data retrieval call binding the contract method 0x5d6a618d. +// +// Solidity: function MAX_MULTIPLIER() view returns(uint8) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) MAXMULTIPLIER(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _TaikoL1ProverPool.contract.Call(opts, &out, "MAX_MULTIPLIER") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// MAXMULTIPLIER is a free data retrieval call binding the contract method 0x5d6a618d. +// +// Solidity: function MAX_MULTIPLIER() view returns(uint8) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) MAXMULTIPLIER() (uint8, error) { + return _TaikoL1ProverPool.Contract.MAXMULTIPLIER(&_TaikoL1ProverPool.CallOpts) +} + +// MAXMULTIPLIER is a free data retrieval call binding the contract method 0x5d6a618d. +// +// Solidity: function MAX_MULTIPLIER() view returns(uint8) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) MAXMULTIPLIER() (uint8, error) { + return _TaikoL1ProverPool.Contract.MAXMULTIPLIER(&_TaikoL1ProverPool.CallOpts) +} + +// MINMULTIPLIER is a free data retrieval call binding the contract method 0xed03e78c. +// +// Solidity: function MIN_MULTIPLIER() view returns(uint8) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) MINMULTIPLIER(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _TaikoL1ProverPool.contract.Call(opts, &out, "MIN_MULTIPLIER") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// MINMULTIPLIER is a free data retrieval call binding the contract method 0xed03e78c. +// +// Solidity: function MIN_MULTIPLIER() view returns(uint8) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) MINMULTIPLIER() (uint8, error) { + return _TaikoL1ProverPool.Contract.MINMULTIPLIER(&_TaikoL1ProverPool.CallOpts) +} + +// MINMULTIPLIER is a free data retrieval call binding the contract method 0xed03e78c. +// +// Solidity: function MIN_MULTIPLIER() view returns(uint8) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) MINMULTIPLIER() (uint8, error) { + return _TaikoL1ProverPool.Contract.MINMULTIPLIER(&_TaikoL1ProverPool.CallOpts) +} + +// MINTKOAMOUNT is a free data retrieval call binding the contract method 0x005eb8f8. +// +// Solidity: function MIN_TKO_AMOUNT() view returns(uint256) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) MINTKOAMOUNT(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _TaikoL1ProverPool.contract.Call(opts, &out, "MIN_TKO_AMOUNT") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MINTKOAMOUNT is a free data retrieval call binding the contract method 0x005eb8f8. +// +// Solidity: function MIN_TKO_AMOUNT() view returns(uint256) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) MINTKOAMOUNT() (*big.Int, error) { + return _TaikoL1ProverPool.Contract.MINTKOAMOUNT(&_TaikoL1ProverPool.CallOpts) +} + +// MINTKOAMOUNT is a free data retrieval call binding the contract method 0x005eb8f8. +// +// Solidity: function MIN_TKO_AMOUNT() view returns(uint256) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) MINTKOAMOUNT() (*big.Int, error) { + return _TaikoL1ProverPool.Contract.MINTKOAMOUNT(&_TaikoL1ProverPool.CallOpts) +} + +// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f. +// +// Solidity: function addressManager() view returns(address) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) AddressManager(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TaikoL1ProverPool.contract.Call(opts, &out, "addressManager") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f. +// +// Solidity: function addressManager() view returns(address) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) AddressManager() (common.Address, error) { + return _TaikoL1ProverPool.Contract.AddressManager(&_TaikoL1ProverPool.CallOpts) +} + +// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f. +// +// Solidity: function addressManager() view returns(address) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) AddressManager() (common.Address, error) { + return _TaikoL1ProverPool.Contract.AddressManager(&_TaikoL1ProverPool.CallOpts) +} + +// BlockIdToProver is a free data retrieval call binding the contract method 0xf33ed81e. +// +// Solidity: function blockIdToProver(uint256 blockId) view returns(address prover) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) BlockIdToProver(opts *bind.CallOpts, blockId *big.Int) (common.Address, error) { + var out []interface{} + err := _TaikoL1ProverPool.contract.Call(opts, &out, "blockIdToProver", blockId) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// BlockIdToProver is a free data retrieval call binding the contract method 0xf33ed81e. +// +// Solidity: function blockIdToProver(uint256 blockId) view returns(address prover) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) BlockIdToProver(blockId *big.Int) (common.Address, error) { + return _TaikoL1ProverPool.Contract.BlockIdToProver(&_TaikoL1ProverPool.CallOpts, blockId) +} + +// BlockIdToProver is a free data retrieval call binding the contract method 0xf33ed81e. +// +// Solidity: function blockIdToProver(uint256 blockId) view returns(address prover) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) BlockIdToProver(blockId *big.Int) (common.Address, error) { + return _TaikoL1ProverPool.Contract.BlockIdToProver(&_TaikoL1ProverPool.CallOpts, blockId) +} + +// GetProver is a free data retrieval call binding the contract method 0xe02f1931. +// +// Solidity: function getProver(uint256 blockId) view returns(address) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) GetProver(opts *bind.CallOpts, blockId *big.Int) (common.Address, error) { + var out []interface{} + err := _TaikoL1ProverPool.contract.Call(opts, &out, "getProver", blockId) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetProver is a free data retrieval call binding the contract method 0xe02f1931. +// +// Solidity: function getProver(uint256 blockId) view returns(address) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) GetProver(blockId *big.Int) (common.Address, error) { + return _TaikoL1ProverPool.Contract.GetProver(&_TaikoL1ProverPool.CallOpts, blockId) +} + +// GetProver is a free data retrieval call binding the contract method 0xe02f1931. +// +// Solidity: function getProver(uint256 blockId) view returns(address) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) GetProver(blockId *big.Int) (common.Address, error) { + return _TaikoL1ProverPool.Contract.GetProver(&_TaikoL1ProverPool.CallOpts, blockId) +} + +// MaxPoolSize is a free data retrieval call binding the contract method 0xc5579dc0. +// +// Solidity: function maxPoolSize() view returns(uint16) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) MaxPoolSize(opts *bind.CallOpts) (uint16, error) { + var out []interface{} + err := _TaikoL1ProverPool.contract.Call(opts, &out, "maxPoolSize") + + if err != nil { + return *new(uint16), err + } + + out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16) + + return out0, err + +} + +// MaxPoolSize is a free data retrieval call binding the contract method 0xc5579dc0. +// +// Solidity: function maxPoolSize() view returns(uint16) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) MaxPoolSize() (uint16, error) { + return _TaikoL1ProverPool.Contract.MaxPoolSize(&_TaikoL1ProverPool.CallOpts) +} + +// MaxPoolSize is a free data retrieval call binding the contract method 0xc5579dc0. +// +// Solidity: function maxPoolSize() view returns(uint16) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) MaxPoolSize() (uint16, error) { + return _TaikoL1ProverPool.Contract.MaxPoolSize(&_TaikoL1ProverPool.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TaikoL1ProverPool.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) Owner() (common.Address, error) { + return _TaikoL1ProverPool.Contract.Owner(&_TaikoL1ProverPool.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) Owner() (common.Address, error) { + return _TaikoL1ProverPool.Contract.Owner(&_TaikoL1ProverPool.CallOpts) +} + +// Provers is a free data retrieval call binding the contract method 0x1dec844b. +// +// Solidity: function provers(address ) view returns(address proverAddress, uint256 stakedTokens, uint256 rewards, uint256 healthScore, uint256 lastBlockTsToBeProven, uint32 capacity, uint32 numAssignedBlocks, uint8 feeMultiplier) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) Provers(opts *bind.CallOpts, arg0 common.Address) (struct { + ProverAddress common.Address + StakedTokens *big.Int + Rewards *big.Int + HealthScore *big.Int + LastBlockTsToBeProven *big.Int + Capacity uint32 + NumAssignedBlocks uint32 + FeeMultiplier uint8 +}, error) { + var out []interface{} + err := _TaikoL1ProverPool.contract.Call(opts, &out, "provers", arg0) + + outstruct := new(struct { + ProverAddress common.Address + StakedTokens *big.Int + Rewards *big.Int + HealthScore *big.Int + LastBlockTsToBeProven *big.Int + Capacity uint32 + NumAssignedBlocks uint32 + FeeMultiplier uint8 + }) + if err != nil { + return *outstruct, err + } + + outstruct.ProverAddress = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + outstruct.StakedTokens = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.Rewards = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.HealthScore = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + outstruct.LastBlockTsToBeProven = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) + outstruct.Capacity = *abi.ConvertType(out[5], new(uint32)).(*uint32) + outstruct.NumAssignedBlocks = *abi.ConvertType(out[6], new(uint32)).(*uint32) + outstruct.FeeMultiplier = *abi.ConvertType(out[7], new(uint8)).(*uint8) + + return *outstruct, err + +} + +// Provers is a free data retrieval call binding the contract method 0x1dec844b. +// +// Solidity: function provers(address ) view returns(address proverAddress, uint256 stakedTokens, uint256 rewards, uint256 healthScore, uint256 lastBlockTsToBeProven, uint32 capacity, uint32 numAssignedBlocks, uint8 feeMultiplier) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) Provers(arg0 common.Address) (struct { + ProverAddress common.Address + StakedTokens *big.Int + Rewards *big.Int + HealthScore *big.Int + LastBlockTsToBeProven *big.Int + Capacity uint32 + NumAssignedBlocks uint32 + FeeMultiplier uint8 +}, error) { + return _TaikoL1ProverPool.Contract.Provers(&_TaikoL1ProverPool.CallOpts, arg0) +} + +// Provers is a free data retrieval call binding the contract method 0x1dec844b. +// +// Solidity: function provers(address ) view returns(address proverAddress, uint256 stakedTokens, uint256 rewards, uint256 healthScore, uint256 lastBlockTsToBeProven, uint32 capacity, uint32 numAssignedBlocks, uint8 feeMultiplier) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) Provers(arg0 common.Address) (struct { + ProverAddress common.Address + StakedTokens *big.Int + Rewards *big.Int + HealthScore *big.Int + LastBlockTsToBeProven *big.Int + Capacity uint32 + NumAssignedBlocks uint32 + FeeMultiplier uint8 +}, error) { + return _TaikoL1ProverPool.Contract.Provers(&_TaikoL1ProverPool.CallOpts, arg0) +} + +// ProversInPool is a free data retrieval call binding the contract method 0xb0aa5fcc. +// +// Solidity: function proversInPool() view returns(uint16) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) ProversInPool(opts *bind.CallOpts) (uint16, error) { + var out []interface{} + err := _TaikoL1ProverPool.contract.Call(opts, &out, "proversInPool") + + if err != nil { + return *new(uint16), err + } + + out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16) + + return out0, err + +} + +// ProversInPool is a free data retrieval call binding the contract method 0xb0aa5fcc. +// +// Solidity: function proversInPool() view returns(uint16) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) ProversInPool() (uint16, error) { + return _TaikoL1ProverPool.Contract.ProversInPool(&_TaikoL1ProverPool.CallOpts) +} + +// ProversInPool is a free data retrieval call binding the contract method 0xb0aa5fcc. +// +// Solidity: function proversInPool() view returns(uint16) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) ProversInPool() (uint16, error) { + return _TaikoL1ProverPool.Contract.ProversInPool(&_TaikoL1ProverPool.CallOpts) +} + +// Resolve is a free data retrieval call binding the contract method 0x6c6563f6. +// +// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) Resolve(opts *bind.CallOpts, chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) { + var out []interface{} + err := _TaikoL1ProverPool.contract.Call(opts, &out, "resolve", chainId, name, allowZeroAddress) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Resolve is a free data retrieval call binding the contract method 0x6c6563f6. +// +// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) { + return _TaikoL1ProverPool.Contract.Resolve(&_TaikoL1ProverPool.CallOpts, chainId, name, allowZeroAddress) +} + +// Resolve is a free data retrieval call binding the contract method 0x6c6563f6. +// +// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) { + return _TaikoL1ProverPool.Contract.Resolve(&_TaikoL1ProverPool.CallOpts, chainId, name, allowZeroAddress) +} + +// Resolve0 is a free data retrieval call binding the contract method 0xa86f9d9e. +// +// Solidity: function resolve(bytes32 name, bool allowZeroAddress) view returns(address) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) Resolve0(opts *bind.CallOpts, name [32]byte, allowZeroAddress bool) (common.Address, error) { + var out []interface{} + err := _TaikoL1ProverPool.contract.Call(opts, &out, "resolve0", name, allowZeroAddress) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Resolve0 is a free data retrieval call binding the contract method 0xa86f9d9e. +// +// Solidity: function resolve(bytes32 name, bool allowZeroAddress) view returns(address) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) Resolve0(name [32]byte, allowZeroAddress bool) (common.Address, error) { + return _TaikoL1ProverPool.Contract.Resolve0(&_TaikoL1ProverPool.CallOpts, name, allowZeroAddress) +} + +// Resolve0 is a free data retrieval call binding the contract method 0xa86f9d9e. +// +// Solidity: function resolve(bytes32 name, bool allowZeroAddress) view returns(address) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) Resolve0(name [32]byte, allowZeroAddress bool) (common.Address, error) { + return _TaikoL1ProverPool.Contract.Resolve0(&_TaikoL1ProverPool.CallOpts, name, allowZeroAddress) +} + +// TopProvers is a free data retrieval call binding the contract method 0xd70e4ea6. +// +// Solidity: function topProvers(uint256 ) view returns(address) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) TopProvers(opts *bind.CallOpts, arg0 *big.Int) (common.Address, error) { + var out []interface{} + err := _TaikoL1ProverPool.contract.Call(opts, &out, "topProvers", arg0) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// TopProvers is a free data retrieval call binding the contract method 0xd70e4ea6. +// +// Solidity: function topProvers(uint256 ) view returns(address) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) TopProvers(arg0 *big.Int) (common.Address, error) { + return _TaikoL1ProverPool.Contract.TopProvers(&_TaikoL1ProverPool.CallOpts, arg0) +} + +// TopProvers is a free data retrieval call binding the contract method 0xd70e4ea6. +// +// Solidity: function topProvers(uint256 ) view returns(address) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) TopProvers(arg0 *big.Int) (common.Address, error) { + return _TaikoL1ProverPool.Contract.TopProvers(&_TaikoL1ProverPool.CallOpts, arg0) +} + +// AdjustCapacity is a paid mutator transaction binding the contract method 0x426759e3. +// +// Solidity: function adjustCapacity(uint32 newCapacity) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) AdjustCapacity(opts *bind.TransactOpts, newCapacity uint32) (*types.Transaction, error) { + return _TaikoL1ProverPool.contract.Transact(opts, "adjustCapacity", newCapacity) +} + +// AdjustCapacity is a paid mutator transaction binding the contract method 0x426759e3. +// +// Solidity: function adjustCapacity(uint32 newCapacity) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) AdjustCapacity(newCapacity uint32) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.AdjustCapacity(&_TaikoL1ProverPool.TransactOpts, newCapacity) +} + +// AdjustCapacity is a paid mutator transaction binding the contract method 0x426759e3. +// +// Solidity: function adjustCapacity(uint32 newCapacity) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) AdjustCapacity(newCapacity uint32) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.AdjustCapacity(&_TaikoL1ProverPool.TransactOpts, newCapacity) +} + +// AdjustFeeMultiplier is a paid mutator transaction binding the contract method 0x4e07a0ce. +// +// Solidity: function adjustFeeMultiplier(uint8 newFeeMultiplier) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) AdjustFeeMultiplier(opts *bind.TransactOpts, newFeeMultiplier uint8) (*types.Transaction, error) { + return _TaikoL1ProverPool.contract.Transact(opts, "adjustFeeMultiplier", newFeeMultiplier) +} + +// AdjustFeeMultiplier is a paid mutator transaction binding the contract method 0x4e07a0ce. +// +// Solidity: function adjustFeeMultiplier(uint8 newFeeMultiplier) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) AdjustFeeMultiplier(newFeeMultiplier uint8) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.AdjustFeeMultiplier(&_TaikoL1ProverPool.TransactOpts, newFeeMultiplier) +} + +// AdjustFeeMultiplier is a paid mutator transaction binding the contract method 0x4e07a0ce. +// +// Solidity: function adjustFeeMultiplier(uint8 newFeeMultiplier) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) AdjustFeeMultiplier(newFeeMultiplier uint8) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.AdjustFeeMultiplier(&_TaikoL1ProverPool.TransactOpts, newFeeMultiplier) +} + +// EnterProverPool is a paid mutator transaction binding the contract method 0xd12037ff. +// +// Solidity: function enterProverPool(uint256 amount, uint256 feeMultiplier, uint32 capacity) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) EnterProverPool(opts *bind.TransactOpts, amount *big.Int, feeMultiplier *big.Int, capacity uint32) (*types.Transaction, error) { + return _TaikoL1ProverPool.contract.Transact(opts, "enterProverPool", amount, feeMultiplier, capacity) +} + +// EnterProverPool is a paid mutator transaction binding the contract method 0xd12037ff. +// +// Solidity: function enterProverPool(uint256 amount, uint256 feeMultiplier, uint32 capacity) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) EnterProverPool(amount *big.Int, feeMultiplier *big.Int, capacity uint32) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.EnterProverPool(&_TaikoL1ProverPool.TransactOpts, amount, feeMultiplier, capacity) +} + +// EnterProverPool is a paid mutator transaction binding the contract method 0xd12037ff. +// +// Solidity: function enterProverPool(uint256 amount, uint256 feeMultiplier, uint32 capacity) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) EnterProverPool(amount *big.Int, feeMultiplier *big.Int, capacity uint32) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.EnterProverPool(&_TaikoL1ProverPool.TransactOpts, amount, feeMultiplier, capacity) +} + +// Exit is a paid mutator transaction binding the contract method 0xe9fad8ee. +// +// Solidity: function exit() returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) Exit(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TaikoL1ProverPool.contract.Transact(opts, "exit") +} + +// Exit is a paid mutator transaction binding the contract method 0xe9fad8ee. +// +// Solidity: function exit() returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) Exit() (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.Exit(&_TaikoL1ProverPool.TransactOpts) +} + +// Exit is a paid mutator transaction binding the contract method 0xe9fad8ee. +// +// Solidity: function exit() returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) Exit() (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.Exit(&_TaikoL1ProverPool.TransactOpts) +} + +// Init is a paid mutator transaction binding the contract method 0xd2fd155e. +// +// Solidity: function init(address _addressManager, uint16 _maxPoolSize) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) Init(opts *bind.TransactOpts, _addressManager common.Address, _maxPoolSize uint16) (*types.Transaction, error) { + return _TaikoL1ProverPool.contract.Transact(opts, "init", _addressManager, _maxPoolSize) +} + +// Init is a paid mutator transaction binding the contract method 0xd2fd155e. +// +// Solidity: function init(address _addressManager, uint16 _maxPoolSize) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) Init(_addressManager common.Address, _maxPoolSize uint16) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.Init(&_TaikoL1ProverPool.TransactOpts, _addressManager, _maxPoolSize) +} + +// Init is a paid mutator transaction binding the contract method 0xd2fd155e. +// +// Solidity: function init(address _addressManager, uint16 _maxPoolSize) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) Init(_addressManager common.Address, _maxPoolSize uint16) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.Init(&_TaikoL1ProverPool.TransactOpts, _addressManager, _maxPoolSize) +} + +// PickRandomProver is a paid mutator transaction binding the contract method 0xc9117290. +// +// Solidity: function pickRandomProver(uint256 randomNumber, uint256 blockId) returns(address) +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) PickRandomProver(opts *bind.TransactOpts, randomNumber *big.Int, blockId *big.Int) (*types.Transaction, error) { + return _TaikoL1ProverPool.contract.Transact(opts, "pickRandomProver", randomNumber, blockId) +} + +// PickRandomProver is a paid mutator transaction binding the contract method 0xc9117290. +// +// Solidity: function pickRandomProver(uint256 randomNumber, uint256 blockId) returns(address) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) PickRandomProver(randomNumber *big.Int, blockId *big.Int) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.PickRandomProver(&_TaikoL1ProverPool.TransactOpts, randomNumber, blockId) +} + +// PickRandomProver is a paid mutator transaction binding the contract method 0xc9117290. +// +// Solidity: function pickRandomProver(uint256 randomNumber, uint256 blockId) returns(address) +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) PickRandomProver(randomNumber *big.Int, blockId *big.Int) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.PickRandomProver(&_TaikoL1ProverPool.TransactOpts, randomNumber, blockId) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TaikoL1ProverPool.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) RenounceOwnership() (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.RenounceOwnership(&_TaikoL1ProverPool.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.RenounceOwnership(&_TaikoL1ProverPool.TransactOpts) +} + +// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a. +// +// Solidity: function setAddressManager(address newAddressManager) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) SetAddressManager(opts *bind.TransactOpts, newAddressManager common.Address) (*types.Transaction, error) { + return _TaikoL1ProverPool.contract.Transact(opts, "setAddressManager", newAddressManager) +} + +// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a. +// +// Solidity: function setAddressManager(address newAddressManager) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) SetAddressManager(newAddressManager common.Address) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.SetAddressManager(&_TaikoL1ProverPool.TransactOpts, newAddressManager) +} + +// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a. +// +// Solidity: function setAddressManager(address newAddressManager) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) SetAddressManager(newAddressManager common.Address) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.SetAddressManager(&_TaikoL1ProverPool.TransactOpts, newAddressManager) +} + +// Slash is a paid mutator transaction binding the contract method 0xc96be4cb. +// +// Solidity: function slash(address prover) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) Slash(opts *bind.TransactOpts, prover common.Address) (*types.Transaction, error) { + return _TaikoL1ProverPool.contract.Transact(opts, "slash", prover) +} + +// Slash is a paid mutator transaction binding the contract method 0xc96be4cb. +// +// Solidity: function slash(address prover) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) Slash(prover common.Address) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.Slash(&_TaikoL1ProverPool.TransactOpts, prover) +} + +// Slash is a paid mutator transaction binding the contract method 0xc96be4cb. +// +// Solidity: function slash(address prover) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) Slash(prover common.Address) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.Slash(&_TaikoL1ProverPool.TransactOpts, prover) +} + +// StakeMoreTokens is a paid mutator transaction binding the contract method 0x9e8008d1. +// +// Solidity: function stakeMoreTokens(uint256 amount) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) StakeMoreTokens(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { + return _TaikoL1ProverPool.contract.Transact(opts, "stakeMoreTokens", amount) +} + +// StakeMoreTokens is a paid mutator transaction binding the contract method 0x9e8008d1. +// +// Solidity: function stakeMoreTokens(uint256 amount) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) StakeMoreTokens(amount *big.Int) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.StakeMoreTokens(&_TaikoL1ProverPool.TransactOpts, amount) +} + +// StakeMoreTokens is a paid mutator transaction binding the contract method 0x9e8008d1. +// +// Solidity: function stakeMoreTokens(uint256 amount) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) StakeMoreTokens(amount *big.Int) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.StakeMoreTokens(&_TaikoL1ProverPool.TransactOpts, amount) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _TaikoL1ProverPool.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.TransferOwnership(&_TaikoL1ProverPool.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.TransferOwnership(&_TaikoL1ProverPool.TransactOpts, newOwner) +} + +// WithdrawRewards is a paid mutator transaction binding the contract method 0x45c69831. +// +// Solidity: function withdrawRewards(uint64 amount) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) WithdrawRewards(opts *bind.TransactOpts, amount uint64) (*types.Transaction, error) { + return _TaikoL1ProverPool.contract.Transact(opts, "withdrawRewards", amount) +} + +// WithdrawRewards is a paid mutator transaction binding the contract method 0x45c69831. +// +// Solidity: function withdrawRewards(uint64 amount) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) WithdrawRewards(amount uint64) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.WithdrawRewards(&_TaikoL1ProverPool.TransactOpts, amount) +} + +// WithdrawRewards is a paid mutator transaction binding the contract method 0x45c69831. +// +// Solidity: function withdrawRewards(uint64 amount) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) WithdrawRewards(amount uint64) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.WithdrawRewards(&_TaikoL1ProverPool.TransactOpts, amount) +} + +// TaikoL1ProverPoolAddressManagerChangedIterator is returned from FilterAddressManagerChanged and is used to iterate over the raw logs and unpacked data for AddressManagerChanged events raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolAddressManagerChangedIterator struct { + Event *TaikoL1ProverPoolAddressManagerChanged // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoL1ProverPoolAddressManagerChangedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoL1ProverPoolAddressManagerChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoL1ProverPoolAddressManagerChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoL1ProverPoolAddressManagerChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoL1ProverPoolAddressManagerChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoL1ProverPoolAddressManagerChanged represents a AddressManagerChanged event raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolAddressManagerChanged struct { + AddressManager common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAddressManagerChanged is a free log retrieval operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b. +// +// Solidity: event AddressManagerChanged(address addressManager) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterAddressManagerChanged(opts *bind.FilterOpts) (*TaikoL1ProverPoolAddressManagerChangedIterator, error) { + + logs, sub, err := _TaikoL1ProverPool.contract.FilterLogs(opts, "AddressManagerChanged") + if err != nil { + return nil, err + } + return &TaikoL1ProverPoolAddressManagerChangedIterator{contract: _TaikoL1ProverPool.contract, event: "AddressManagerChanged", logs: logs, sub: sub}, nil +} + +// WatchAddressManagerChanged is a free log subscription operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b. +// +// Solidity: event AddressManagerChanged(address addressManager) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchAddressManagerChanged(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolAddressManagerChanged) (event.Subscription, error) { + + logs, sub, err := _TaikoL1ProverPool.contract.WatchLogs(opts, "AddressManagerChanged") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoL1ProverPoolAddressManagerChanged) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "AddressManagerChanged", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseAddressManagerChanged is a log parse operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b. +// +// Solidity: event AddressManagerChanged(address addressManager) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseAddressManagerChanged(log types.Log) (*TaikoL1ProverPoolAddressManagerChanged, error) { + event := new(TaikoL1ProverPoolAddressManagerChanged) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "AddressManagerChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoL1ProverPoolInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolInitializedIterator struct { + Event *TaikoL1ProverPoolInitialized // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoL1ProverPoolInitializedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoL1ProverPoolInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoL1ProverPoolInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoL1ProverPoolInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoL1ProverPoolInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoL1ProverPoolInitialized represents a Initialized event raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterInitialized(opts *bind.FilterOpts) (*TaikoL1ProverPoolInitializedIterator, error) { + + logs, sub, err := _TaikoL1ProverPool.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &TaikoL1ProverPoolInitializedIterator{contract: _TaikoL1ProverPool.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolInitialized) (event.Subscription, error) { + + logs, sub, err := _TaikoL1ProverPool.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoL1ProverPoolInitialized) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseInitialized(log types.Log) (*TaikoL1ProverPoolInitialized, error) { + event := new(TaikoL1ProverPoolInitialized) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoL1ProverPoolOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolOwnershipTransferredIterator struct { + Event *TaikoL1ProverPoolOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoL1ProverPoolOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoL1ProverPoolOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoL1ProverPoolOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoL1ProverPoolOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoL1ProverPoolOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoL1ProverPoolOwnershipTransferred represents a OwnershipTransferred event raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*TaikoL1ProverPoolOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _TaikoL1ProverPool.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &TaikoL1ProverPoolOwnershipTransferredIterator{contract: _TaikoL1ProverPool.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _TaikoL1ProverPool.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoL1ProverPoolOwnershipTransferred) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseOwnershipTransferred(log types.Log) (*TaikoL1ProverPoolOwnershipTransferred, error) { + event := new(TaikoL1ProverPoolOwnershipTransferred) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoL1ProverPoolProverEnteredIterator is returned from FilterProverEntered and is used to iterate over the raw logs and unpacked data for ProverEntered events raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolProverEnteredIterator struct { + Event *TaikoL1ProverPoolProverEntered // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoL1ProverPoolProverEnteredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoL1ProverPoolProverEntered) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoL1ProverPoolProverEntered) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoL1ProverPoolProverEnteredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoL1ProverPoolProverEnteredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoL1ProverPoolProverEntered represents a ProverEntered event raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolProverEntered struct { + Prover common.Address + Amount *big.Int + FeeMultiplier *big.Int + Capacity uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterProverEntered is a free log retrieval operation binding the contract event 0x1b14a9db786d0b879f833a7bd117d424ee00758960ef3c2e812b2abf0a51f892. +// +// Solidity: event ProverEntered(address prover, uint256 amount, uint256 feeMultiplier, uint64 capacity) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterProverEntered(opts *bind.FilterOpts) (*TaikoL1ProverPoolProverEnteredIterator, error) { + + logs, sub, err := _TaikoL1ProverPool.contract.FilterLogs(opts, "ProverEntered") + if err != nil { + return nil, err + } + return &TaikoL1ProverPoolProverEnteredIterator{contract: _TaikoL1ProverPool.contract, event: "ProverEntered", logs: logs, sub: sub}, nil +} + +// WatchProverEntered is a free log subscription operation binding the contract event 0x1b14a9db786d0b879f833a7bd117d424ee00758960ef3c2e812b2abf0a51f892. +// +// Solidity: event ProverEntered(address prover, uint256 amount, uint256 feeMultiplier, uint64 capacity) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchProverEntered(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolProverEntered) (event.Subscription, error) { + + logs, sub, err := _TaikoL1ProverPool.contract.WatchLogs(opts, "ProverEntered") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoL1ProverPoolProverEntered) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverEntered", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseProverEntered is a log parse operation binding the contract event 0x1b14a9db786d0b879f833a7bd117d424ee00758960ef3c2e812b2abf0a51f892. +// +// Solidity: event ProverEntered(address prover, uint256 amount, uint256 feeMultiplier, uint64 capacity) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseProverEntered(log types.Log) (*TaikoL1ProverPoolProverEntered, error) { + event := new(TaikoL1ProverPoolProverEntered) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverEntered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoL1ProverPoolProverExitedIterator is returned from FilterProverExited and is used to iterate over the raw logs and unpacked data for ProverExited events raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolProverExitedIterator struct { + Event *TaikoL1ProverPoolProverExited // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoL1ProverPoolProverExitedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoL1ProverPoolProverExited) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoL1ProverPoolProverExited) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoL1ProverPoolProverExitedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoL1ProverPoolProverExitedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoL1ProverPoolProverExited represents a ProverExited event raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolProverExited struct { + Prover common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterProverExited is a free log retrieval operation binding the contract event 0x2815fc337451500d2c4aa22628a7584582edde5bf78b2ba9caa6efbd6cce4a8e. +// +// Solidity: event ProverExited(address prover) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterProverExited(opts *bind.FilterOpts) (*TaikoL1ProverPoolProverExitedIterator, error) { + + logs, sub, err := _TaikoL1ProverPool.contract.FilterLogs(opts, "ProverExited") + if err != nil { + return nil, err + } + return &TaikoL1ProverPoolProverExitedIterator{contract: _TaikoL1ProverPool.contract, event: "ProverExited", logs: logs, sub: sub}, nil +} + +// WatchProverExited is a free log subscription operation binding the contract event 0x2815fc337451500d2c4aa22628a7584582edde5bf78b2ba9caa6efbd6cce4a8e. +// +// Solidity: event ProverExited(address prover) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchProverExited(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolProverExited) (event.Subscription, error) { + + logs, sub, err := _TaikoL1ProverPool.contract.WatchLogs(opts, "ProverExited") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoL1ProverPoolProverExited) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverExited", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseProverExited is a log parse operation binding the contract event 0x2815fc337451500d2c4aa22628a7584582edde5bf78b2ba9caa6efbd6cce4a8e. +// +// Solidity: event ProverExited(address prover) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseProverExited(log types.Log) (*TaikoL1ProverPoolProverExited, error) { + event := new(TaikoL1ProverPoolProverExited) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverExited", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/cmd/flags/prover.go b/cmd/flags/prover.go index 832f8c794..50ae3a731 100644 --- a/cmd/flags/prover.go +++ b/cmd/flags/prover.go @@ -58,21 +58,11 @@ var ( Usage: "Set whether prover should use oracle prover or not", Category: proverCategory, } - SystemProver = &cli.BoolFlag{ - Name: "systemProver", - Usage: "Set whether prover should use system prover or not", - Category: proverCategory, - } OracleProverPrivateKey = &cli.StringFlag{ Name: "oracleProverPrivateKey", Usage: "Private key of oracle prover", Category: proverCategory, } - SystemProverPrivateKey = &cli.StringFlag{ - Name: "systemProverPrivateKey", - Usage: "Private key of system prover", - Category: proverCategory, - } Graffiti = &cli.StringFlag{ Name: "graffiti", Usage: "When string is passed, adds additional graffiti info to proof evidence", @@ -85,6 +75,12 @@ var ( Category: proverCategory, Value: 100_000_000, } + TaikoProverPoolL1Address = &cli.StringFlag{ + Name: "taikoProverPoolL1", + Usage: "TaikoProverPoolL1 contract address", + Required: true, + Category: commonCategory, + } ) // All prover flags. @@ -100,9 +96,8 @@ var ProverFlags = MergeFlags(CommonFlags, []cli.Flag{ Dummy, RandomDummyProofDelay, OracleProver, - SystemProver, OracleProverPrivateKey, - SystemProverPrivateKey, Graffiti, ExpectedReward, + TaikoProverPoolL1Address, }) diff --git a/driver/state/state.go b/driver/state/state.go index 81fd67f75..9c8980d6d 100644 --- a/driver/state/state.go +++ b/driver/state/state.go @@ -168,7 +168,7 @@ func (s *State) startSubscriptions(ctx context.Context) { case e := <-s.blockProposedCh: s.setHeadBlockID(e.Id) case e := <-s.blockProvenCh: - if e.Prover != encoding.SystemProverAddress && e.Prover != encoding.OracleProverAddress { + if e.Prover != encoding.OracleProverAddress { log.Info("✅ Block proven", "blockID", e.Id, "hash", common.Hash(e.BlockHash), "prover", e.Prover) } case e := <-s.blockVerifiedCh: diff --git a/integration_test/entrypoint.sh b/integration_test/entrypoint.sh index 87b842c4e..6a7279886 100755 --- a/integration_test/entrypoint.sh +++ b/integration_test/entrypoint.sh @@ -27,6 +27,7 @@ $DIR/nodes/init.sh DEPLOYMENT_JSON=$(cat $TAIKO_MONO_DIR/packages/protocol/deployments/deploy_l1.json) TAIKO_L1_CONTRACT_ADDRESS=$(echo $DEPLOYMENT_JSON | jq '.taiko' | sed 's/\"//g') +TAIKO_PROVER_POOL_L1_CONTRACT_ADDRESS=$(echo $DEPLOYMENT_JSON | jq '.taiko_prover_pool' | sed 's/\"//g') L1_SIGNAL_SERVICE_CONTRACT_ADDRESS=$(echo $DEPLOYMENT_JSON | jq '.signal_service' | sed 's/\"//g') trap "docker compose -f $TESTNET_CONFIG down -v" EXIT INT KILL ERR @@ -44,6 +45,7 @@ if [ "$RUN_TESTS" == "true" ]; then L2_EXECUTION_ENGINE_WS_ENDPOINT=ws://localhost:28546 \ L2_EXECUTION_ENGINE_AUTH_ENDPOINT=http://localhost:28551 \ TAIKO_L1_ADDRESS=$TAIKO_L1_CONTRACT_ADDRESS \ + TAIKO_PROVER_POOL_L1_ADDRESS=$TAIKO_PROVER_POOL_L1_CONTRACT_ADDRESS \ TAIKO_L2_ADDRESS=0x1000777700000000000000000000000000000001 \ L1_SIGNAL_SERVICE_CONTRACT_ADDRESS=$L1_SIGNAL_SERVICE_CONTRACT_ADDRESS \ L1_CONTRACT_OWNER_PRIVATE_KEY=ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 \ diff --git a/integration_test/nodes/init.sh b/integration_test/nodes/init.sh index 61a577c35..116fbed49 100755 --- a/integration_test/nodes/init.sh +++ b/integration_test/nodes/init.sh @@ -36,12 +36,10 @@ L2_GENESIS_HASH=$( # Deploy Taiko protocol. cd $TAIKO_MONO_DIR/packages/protocol && PRIVATE_KEY=ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 \ - SYSTEM_PROVER=0x70997970C51812dc3A010C7d01b50e0d17dc79C8 \ ORACLE_PROVER=0x70997970C51812dc3A010C7d01b50e0d17dc79C8 \ SOLO_PROPOSER=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 \ OWNER=0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC \ TREASURY=0xdf09A0afD09a63fb04ab3573922437e1e637dE8b \ - INITIAL_PROOF_TIME_TARGET=101 \ TAIKO_L2_ADDRESS=0x1000777700000000000000000000000000000001 \ L2_SIGNAL_SERVICE=0x1000777700000000000000000000000000000007 \ SHARED_SIGNAL_SERVICE=0x0000000000000000000000000000000000000000 \ @@ -49,7 +47,6 @@ cd $TAIKO_MONO_DIR/packages/protocol && TAIKO_TOKEN_PREMINT_AMOUNT=18446744073709551614 \ L2_GENESIS_HASH=$L2_GENESIS_HASH \ L2_CHAIN_ID=167001 \ - ADJUSTMENT_QUOTIENT=32000 \ forge script script/DeployOnL1.s.sol:DeployOnL1 \ --fork-url http://localhost:18545 \ --broadcast \ diff --git a/pkg/rpc/client.go b/pkg/rpc/client.go index 09930f2cc..0d481cd64 100644 --- a/pkg/rpc/client.go +++ b/pkg/rpc/client.go @@ -27,8 +27,9 @@ type Client struct { // Geth Engine API clients L2Engine *EngineClient // Protocol contracts clients - TaikoL1 *bindings.TaikoL1Client - TaikoL2 *bindings.TaikoL2Client + TaikoL1 *bindings.TaikoL1Client + TaikoL2 *bindings.TaikoL2Client + TaikoProverPoolL1 *bindings.TaikoL1ProverPool // Chain IDs L1ChainID *big.Int L2ChainID *big.Int @@ -38,14 +39,15 @@ type Client struct { // RPC client. If not providing L2EngineEndpoint or JwtSecret, then the L2Engine client // won't be initialized. type ClientConfig struct { - L1Endpoint string - L2Endpoint string - L2CheckPoint string - TaikoL1Address common.Address - TaikoL2Address common.Address - L2EngineEndpoint string - JwtSecret string - RetryInterval time.Duration + L1Endpoint string + L2Endpoint string + L2CheckPoint string + TaikoL1Address common.Address + TaikoProverPoolL1Address common.Address + TaikoL2Address common.Address + L2EngineEndpoint string + JwtSecret string + RetryInterval time.Duration } // NewClient initializes all RPC clients used by Taiko client softwares. @@ -60,6 +62,11 @@ func NewClient(ctx context.Context, cfg *ClientConfig) (*Client, error) { return nil, err } + taikoProverPoolL1, err := bindings.NewTaikoL1ProverPool(cfg.TaikoProverPoolL1Address, l1RPC) + if err != nil { + return nil, err + } + l2RPC, err := DialClientWithBackoff(ctx, cfg.L2Endpoint, cfg.RetryInterval) if err != nil { return nil, err @@ -112,18 +119,19 @@ func NewClient(ctx context.Context, cfg *ClientConfig) (*Client, error) { } client := &Client{ - L1: l1RPC, - L2: l2RPC, - L2CheckPoint: l2CheckPoint, - L1RawRPC: l1RawRPC, - L2RawRPC: l2RawRPC, - L1GethClient: gethclient.New(l1RawRPC), - L2GethClient: gethclient.New(l2RawRPC), - L2Engine: l2AuthRPC, - TaikoL1: taikoL1, - TaikoL2: taikoL2, - L1ChainID: l1ChainID, - L2ChainID: l2ChainID, + L1: l1RPC, + L2: l2RPC, + L2CheckPoint: l2CheckPoint, + L1RawRPC: l1RawRPC, + L2RawRPC: l2RawRPC, + L1GethClient: gethclient.New(l1RawRPC), + L2GethClient: gethclient.New(l2RawRPC), + L2Engine: l2AuthRPC, + TaikoL1: taikoL1, + TaikoL2: taikoL2, + TaikoProverPoolL1: taikoProverPoolL1, + L1ChainID: l1ChainID, + L2ChainID: l2ChainID, } if err := client.ensureGenesisMatched(ctx); err != nil { diff --git a/pkg/rpc/client_test.go b/pkg/rpc/client_test.go index 97dc3977e..7fc0b9971 100644 --- a/pkg/rpc/client_test.go +++ b/pkg/rpc/client_test.go @@ -12,13 +12,14 @@ import ( func newTestClient(t *testing.T) *Client { client, err := NewClient(context.Background(), &ClientConfig{ - L1Endpoint: os.Getenv("L1_NODE_WS_ENDPOINT"), - L2Endpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"), - TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")), - TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")), - L2EngineEndpoint: os.Getenv("L2_EXECUTION_ENGINE_AUTH_ENDPOINT"), - JwtSecret: os.Getenv("JWT_SECRET"), - RetryInterval: backoff.DefaultMaxInterval, + L1Endpoint: os.Getenv("L1_NODE_WS_ENDPOINT"), + L2Endpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"), + TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")), + TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")), + TaikoProverPoolL1Address: common.HexToAddress(os.Getenv("TAIKO_PROVER_POOL_L1_ADDRESS")), + L2EngineEndpoint: os.Getenv("L2_EXECUTION_ENGINE_AUTH_ENDPOINT"), + JwtSecret: os.Getenv("JWT_SECRET"), + RetryInterval: backoff.DefaultMaxInterval, }) require.Nil(t, err) diff --git a/pkg/rpc/utils.go b/pkg/rpc/utils.go index cc08738bf..1fce23d22 100644 --- a/pkg/rpc/utils.go +++ b/pkg/rpc/utils.go @@ -69,81 +69,13 @@ func WaitReceipt(ctx context.Context, client *ethclient.Client, tx *types.Transa } } -// NeedNewSystemProof checks whether the L2 block still needs a new system proof. -func NeedNewSystemProof(ctx context.Context, cli *Client, id *big.Int, realProofSkipSize *big.Int) (bool, error) { - if realProofSkipSize == nil || realProofSkipSize.Uint64() <= 1 { - return false, nil - } - if id.Uint64()%realProofSkipSize.Uint64() == 0 { - log.Info( - "Skipping system block proof", - "blockID", id.Uint64(), - "skipSize", realProofSkipSize.Uint64(), - ) - - return false, nil - } - - var parent *types.Header - if id.Cmp(common.Big1) == 0 { - header, err := cli.L2.HeaderByNumber(ctx, common.Big0) - if err != nil { - return false, err - } - - parent = header - } else { - parentL1Origin, err := cli.WaitL1Origin(ctx, new(big.Int).Sub(id, common.Big1)) - if err != nil { - return false, err - } - - if parent, err = cli.L2.HeaderByHash(ctx, parentL1Origin.L2BlockHash); err != nil { - return false, err - } - } - - fc, err := cli.TaikoL1.GetForkChoice(nil, id, parent.Hash(), uint32(parent.GasUsed)) - if err != nil { - if !strings.Contains(encoding.TryParsingCustomError(err).Error(), "L1_FORK_CHOICE_NOT_FOUND") { - return false, encoding.TryParsingCustomError(err) - } - - return true, nil - } - - if fc.Prover == encoding.SystemProverAddress { - log.Info( - "📬 Block's system proof has already been submitted by another system prover", - "blockID", id, - "prover", fc.Prover, - "provenAt", fc.ProvenAt, - ) - - return false, nil - } - - return true, nil -} - // NeedNewProof checks whether the L2 block still needs a new proof. func NeedNewProof( ctx context.Context, cli *Client, id *big.Int, proverAddress common.Address, - realProofSkipSize *big.Int, ) (bool, error) { - if realProofSkipSize != nil && id.Uint64()%realProofSkipSize.Uint64() != 0 { - log.Info( - "Skipping valid block proof", - "blockID", id.Uint64(), - "skipSize", realProofSkipSize.Uint64(), - ) - - return false, nil - } - var parent *types.Header if id.Cmp(common.Big1) == 0 { header, err := cli.L2.HeaderByNumber(ctx, common.Big0) @@ -172,7 +104,7 @@ func NeedNewProof( return true, nil } - if fc.Prover == encoding.OracleProverAddress || fc.Prover == encoding.SystemProverAddress { + if fc.Prover == encoding.OracleProverAddress { return true, nil } diff --git a/proposer/proposer.go b/proposer/proposer.go index ab6d4b8cd..b847526d6 100644 --- a/proposer/proposer.go +++ b/proposer/proposer.go @@ -396,7 +396,7 @@ func getTxOpts( } func (p *Proposer) checkTaikoTokenBalance() error { - fee, err := p.rpc.TaikoL1.GetBlockFee(nil) + fee, err := p.rpc.TaikoL1.GetBlockFee(nil, uint32(p.protocolConfigs.BlockMaxGasLimit)) if err != nil { return fmt.Errorf("failed to get block fee: %w", err) } diff --git a/prover/config.go b/prover/config.go index 39961150c..c0f33a098 100644 --- a/prover/config.go +++ b/prover/config.go @@ -20,6 +20,7 @@ type Config struct { L2WsEndpoint string L2HttpEndpoint string TaikoL1Address common.Address + TaikoProverPoolL1Address common.Address TaikoL2Address common.Address L1ProverPrivKey *ecdsa.PrivateKey ZKEvmRpcdEndpoint string @@ -28,9 +29,7 @@ type Config struct { MaxConcurrentProvingJobs uint Dummy bool OracleProver bool - SystemProver bool OracleProverPrivateKey *ecdsa.PrivateKey - SystemProverPrivateKey *ecdsa.PrivateKey Graffiti string RandomDummyProofDelayLowerBound *time.Duration RandomDummyProofDelayUpperBound *time.Duration @@ -49,11 +48,6 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) { } oracleProverSet := c.IsSet(flags.OracleProver.Name) - systemProverSet := c.IsSet(flags.SystemProver.Name) - - if oracleProverSet && systemProverSet { - return nil, fmt.Errorf("cannot set both oracleProver and systemProver") - } var oracleProverPrivKey *ecdsa.PrivateKey if oracleProverSet { @@ -69,20 +63,6 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) { } } - var systemProverPrivKey *ecdsa.PrivateKey - if systemProverSet { - if !c.IsSet(flags.SystemProverPrivateKey.Name) { - return nil, fmt.Errorf("systemProver flag set without systemProverPrivateKey set") - } - - systemProverPrivKeyStr := c.String(flags.SystemProverPrivateKey.Name) - - systemProverPrivKey, err = crypto.ToECDSA(common.Hex2Bytes(systemProverPrivKeyStr)) - if err != nil { - return nil, fmt.Errorf("invalid system private key: %w", err) - } - } - var ( randomDummyProofDelayLowerBound *time.Duration randomDummyProofDelayUpperBound *time.Duration @@ -124,6 +104,7 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) { L2HttpEndpoint: c.String(flags.L2HTTPEndpoint.Name), TaikoL1Address: common.HexToAddress(c.String(flags.TaikoL1Address.Name)), TaikoL2Address: common.HexToAddress(c.String(flags.TaikoL2Address.Name)), + TaikoProverPoolL1Address: common.HexToAddress(c.String(flags.TaikoProverPoolL1Address.Name)), L1ProverPrivKey: l1ProverPrivKey, ZKEvmRpcdEndpoint: c.String(flags.ZkEvmRpcdEndpoint.Name), ZkEvmRpcdParamsPath: c.String(flags.ZkEvmRpcdParamsPath.Name), @@ -132,8 +113,6 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) { Dummy: c.Bool(flags.Dummy.Name), OracleProver: c.Bool(flags.OracleProver.Name), OracleProverPrivateKey: oracleProverPrivKey, - SystemProver: c.Bool(flags.SystemProver.Name), - SystemProverPrivateKey: systemProverPrivKey, Graffiti: c.String(flags.Graffiti.Name), RandomDummyProofDelayLowerBound: randomDummyProofDelayLowerBound, RandomDummyProofDelayUpperBound: randomDummyProofDelayUpperBound, diff --git a/prover/config_test.go b/prover/config_test.go index 760ab2d47..0d42729e7 100644 --- a/prover/config_test.go +++ b/prover/config_test.go @@ -22,9 +22,8 @@ var testFlags = []cli.Flag{ &cli.StringFlag{Name: flags.RandomDummyProofDelay.Name}, &cli.BoolFlag{Name: flags.OracleProver.Name}, &cli.StringFlag{Name: flags.OracleProverPrivateKey.Name}, - &cli.BoolFlag{Name: flags.SystemProver.Name}, - &cli.StringFlag{Name: flags.SystemProverPrivateKey.Name}, &cli.StringFlag{Name: flags.Graffiti.Name}, + &cli.StringFlag{Name: flags.TaikoProverPoolL1Address.Name}, } func (s *ProverTestSuite) TestNewConfigFromCliContext_OracleProver() { @@ -34,6 +33,7 @@ func (s *ProverTestSuite) TestNewConfigFromCliContext_OracleProver() { l2HttpEndpoint := os.Getenv("L2_EXECUTION_ENGINE_HTTP_ENDPOINT") taikoL1 := os.Getenv("TAIKO_L1_ADDRESS") taikoL2 := os.Getenv("TAIKO_L2_ADDRESS") + taikoProverPoolL1 := os.Getenv("TAIKO_PROVER_POOL_L1_ADDRESS") app := cli.NewApp() app.Flags = testFlags @@ -46,6 +46,7 @@ func (s *ProverTestSuite) TestNewConfigFromCliContext_OracleProver() { s.Equal(l2HttpEndpoint, c.L2HttpEndpoint) s.Equal(taikoL1, c.TaikoL1Address.String()) s.Equal(taikoL2, c.TaikoL2Address.String()) + s.Equal(taikoProverPoolL1, c.TaikoProverPoolL1Address.String()) s.Equal( crypto.PubkeyToAddress(s.p.cfg.L1ProverPrivKey.PublicKey), crypto.PubkeyToAddress(c.L1ProverPrivKey.PublicKey), @@ -72,6 +73,7 @@ func (s *ProverTestSuite) TestNewConfigFromCliContext_OracleProver() { "-" + flags.L2HTTPEndpoint.Name, l2HttpEndpoint, "-" + flags.TaikoL1Address.Name, taikoL1, "-" + flags.TaikoL2Address.Name, taikoL2, + "-" + flags.TaikoProverPoolL1Address.Name, taikoProverPoolL1, "-" + flags.L1ProverPrivKey.Name, os.Getenv("L1_PROVER_PRIVATE_KEY"), "-" + flags.Dummy.Name, "-" + flags.RandomDummyProofDelay.Name, "30m-1h", @@ -81,60 +83,6 @@ func (s *ProverTestSuite) TestNewConfigFromCliContext_OracleProver() { })) } -func (s *ProverTestSuite) TestNewConfigFromCliContext_SystemProver() { - l1WsEndpoint := os.Getenv("L1_NODE_WS_ENDPOINT") - l1HttpEndpoint := os.Getenv("L1_NODE_HTTP_ENDPOINT") - l2WsEndpoint := os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT") - l2HttpEndpoint := os.Getenv("L2_EXECUTION_ENGINE_HTTP_ENDPOINT") - taikoL1 := os.Getenv("TAIKO_L1_ADDRESS") - taikoL2 := os.Getenv("TAIKO_L2_ADDRESS") - - app := cli.NewApp() - app.Flags = testFlags - app.Action = func(ctx *cli.Context) error { - c, err := NewConfigFromCliContext(ctx) - s.Nil(err) - s.Equal(l1WsEndpoint, c.L1WsEndpoint) - s.Equal(l1HttpEndpoint, c.L1HttpEndpoint) - s.Equal(l2WsEndpoint, c.L2WsEndpoint) - s.Equal(l2HttpEndpoint, c.L2HttpEndpoint) - s.Equal(taikoL1, c.TaikoL1Address.String()) - s.Equal(taikoL2, c.TaikoL2Address.String()) - s.Equal( - crypto.PubkeyToAddress(s.p.cfg.L1ProverPrivKey.PublicKey), - crypto.PubkeyToAddress(c.L1ProverPrivKey.PublicKey), - ) - s.Equal(30*time.Minute, *c.RandomDummyProofDelayLowerBound) - s.Equal(time.Hour, *c.RandomDummyProofDelayUpperBound) - s.True(c.Dummy) - s.True(c.SystemProver) - s.Equal( - crypto.PubkeyToAddress(s.p.cfg.SystemProverPrivateKey.PublicKey), - crypto.PubkeyToAddress(c.SystemProverPrivateKey.PublicKey), - ) - s.Equal("", c.Graffiti) - s.Nil(new(Prover).InitFromCli(context.Background(), ctx)) - - return err - } - - s.Nil(app.Run([]string{ - "TestNewConfigFromCliContext", - "-" + flags.L1WSEndpoint.Name, l1WsEndpoint, - "-" + flags.L1HTTPEndpoint.Name, l1HttpEndpoint, - "-" + flags.L2WSEndpoint.Name, l2WsEndpoint, - "-" + flags.L2HTTPEndpoint.Name, l2HttpEndpoint, - "-" + flags.TaikoL1Address.Name, taikoL1, - "-" + flags.TaikoL2Address.Name, taikoL2, - "-" + flags.L1ProverPrivKey.Name, os.Getenv("L1_PROVER_PRIVATE_KEY"), - "-" + flags.Dummy.Name, - "-" + flags.RandomDummyProofDelay.Name, "30m-1h", - "-" + flags.SystemProver.Name, - "-" + flags.SystemProverPrivateKey.Name, os.Getenv("L1_PROVER_PRIVATE_KEY"), - "-" + flags.Graffiti.Name, "", - })) -} - func (s *ProverTestSuite) TestNewConfigFromCliContext_OracleProverError() { l1WsEndpoint := os.Getenv("L1_NODE_WS_ENDPOINT") l1HttpEndpoint := os.Getenv("L1_NODE_HTTP_ENDPOINT") @@ -142,6 +90,7 @@ func (s *ProverTestSuite) TestNewConfigFromCliContext_OracleProverError() { l2HttpEndpoint := os.Getenv("L2_EXECUTION_ENGINE_HTTP_ENDPOINT") taikoL1 := os.Getenv("TAIKO_L1_ADDRESS") taikoL2 := os.Getenv("TAIKO_L2_ADDRESS") + taikoProverPoolL1 := os.Getenv("TAIKO_PROVER_POOL_L1_ADDRESS") app := cli.NewApp() app.Flags = testFlags @@ -159,6 +108,7 @@ func (s *ProverTestSuite) TestNewConfigFromCliContext_OracleProverError() { "-" + flags.L2HTTPEndpoint.Name, l2HttpEndpoint, "-" + flags.TaikoL1Address.Name, taikoL1, "-" + flags.TaikoL2Address.Name, taikoL2, + "-" + flags.TaikoProverPoolL1Address.Name, taikoProverPoolL1, "-" + flags.L1ProverPrivKey.Name, os.Getenv("L1_PROVER_PRIVATE_KEY"), "-" + flags.Dummy.Name, "-" + flags.RandomDummyProofDelay.Name, "30m-1h", @@ -166,68 +116,3 @@ func (s *ProverTestSuite) TestNewConfigFromCliContext_OracleProverError() { "-" + flags.Graffiti.Name, "", }), "oracleProver flag set without oracleProverPrivateKey set") } - -func (s *ProverTestSuite) TestNewConfigFromCliContext_SystemProverError() { - l1WsEndpoint := os.Getenv("L1_NODE_WS_ENDPOINT") - l1HttpEndpoint := os.Getenv("L1_NODE_HTTP_ENDPOINT") - l2WsEndpoint := os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT") - l2HttpEndpoint := os.Getenv("L2_EXECUTION_ENGINE_HTTP_ENDPOINT") - taikoL1 := os.Getenv("TAIKO_L1_ADDRESS") - taikoL2 := os.Getenv("TAIKO_L2_ADDRESS") - - app := cli.NewApp() - app.Flags = testFlags - app.Action = func(ctx *cli.Context) error { - _, err := NewConfigFromCliContext(ctx) - s.NotNil(err) - return err - } - - s.ErrorContains(app.Run([]string{ - "TestNewConfigFromCliContext", - "-" + flags.L1WSEndpoint.Name, l1WsEndpoint, - "-" + flags.L1HTTPEndpoint.Name, l1HttpEndpoint, - "-" + flags.L2WSEndpoint.Name, l2WsEndpoint, - "-" + flags.L2HTTPEndpoint.Name, l2HttpEndpoint, - "-" + flags.TaikoL1Address.Name, taikoL1, - "-" + flags.TaikoL2Address.Name, taikoL2, - "-" + flags.L1ProverPrivKey.Name, os.Getenv("L1_PROVER_PRIVATE_KEY"), - "-" + flags.Dummy.Name, - "-" + flags.RandomDummyProofDelay.Name, "30m-1h", - "-" + flags.SystemProver.Name, - "-" + flags.Graffiti.Name, "", - }), "systemProver flag set without systemProverPrivateKey set") -} - -func (s *ProverTestSuite) TestNewConfigFromCliContext_SystemProverAndOracleProverBothSetError() { - l1WsEndpoint := os.Getenv("L1_NODE_WS_ENDPOINT") - l1HttpEndpoint := os.Getenv("L1_NODE_HTTP_ENDPOINT") - l2WsEndpoint := os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT") - l2HttpEndpoint := os.Getenv("L2_EXECUTION_ENGINE_HTTP_ENDPOINT") - taikoL1 := os.Getenv("TAIKO_L1_ADDRESS") - taikoL2 := os.Getenv("TAIKO_L2_ADDRESS") - - app := cli.NewApp() - app.Flags = testFlags - app.Action = func(ctx *cli.Context) error { - _, err := NewConfigFromCliContext(ctx) - s.NotNil(err) - return err - } - - s.ErrorContains(app.Run([]string{ - "TestNewConfigFromCliContext", - "-" + flags.L1WSEndpoint.Name, l1WsEndpoint, - "-" + flags.L1HTTPEndpoint.Name, l1HttpEndpoint, - "-" + flags.L2WSEndpoint.Name, l2WsEndpoint, - "-" + flags.L2HTTPEndpoint.Name, l2HttpEndpoint, - "-" + flags.TaikoL1Address.Name, taikoL1, - "-" + flags.TaikoL2Address.Name, taikoL2, - "-" + flags.L1ProverPrivKey.Name, os.Getenv("L1_PROVER_PRIVATE_KEY"), - "-" + flags.Dummy.Name, - "-" + flags.RandomDummyProofDelay.Name, "30m-1h", - "-" + flags.OracleProver.Name, - "-" + flags.SystemProver.Name, - "-" + flags.Graffiti.Name, "", - }), "cannot set both oracleProver and systemProver") -} diff --git a/prover/proof_producer/special_proof_producer.go b/prover/proof_producer/special_proof_producer.go index 4603d43cb..a55d5f189 100644 --- a/prover/proof_producer/special_proof_producer.go +++ b/prover/proof_producer/special_proof_producer.go @@ -28,7 +28,6 @@ type SpecialProofProducer struct { proverPrivKey *ecdsa.PrivateKey anchorTxValidator *anchorTxValidator.AnchorTxValidator graffiti [32]byte - isSystemProver bool } // NewSpecialProofProducer creates a new NewSpecialProofProducer instance, which can be either @@ -39,7 +38,6 @@ func NewSpecialProofProducer( taikoL2Address common.Address, protocolSpecialProverAddress common.Address, graffiti string, - isSystemProver bool, ) (*SpecialProofProducer, error) { proverAddress := crypto.PubkeyToAddress(proverPrivKey.PublicKey) if proverAddress != protocolSpecialProverAddress { @@ -56,7 +54,6 @@ func NewSpecialProofProducer( proverPrivKey, anchorValidator, rpc.StringToBytes32(graffiti), - isSystemProver, }, nil } @@ -106,16 +103,6 @@ func (p *SpecialProofProducer) RequestProof( return err } - // the only difference from a client perspective when generating a special proof, - // either an oracle proof or a system proof, is the prover address which should be set to 1 - // if system prover, and 0 if oracle prover, and the protocol will use that to decide - // whether a proof can be overwritten or not. - var prover common.Address - if p.isSystemProver { - prover = encoding.SystemProverAddress - } else { - prover = encoding.OracleProverAddress - } // signature should be done with proof set to nil, verifierID set to 0, // and prover set to 0 address. evidence := &encoding.TaikoL1Evidence{ @@ -124,7 +111,7 @@ func (p *SpecialProofProducer) RequestProof( BlockHash: block.Hash(), SignalRoot: signalRoot, Graffiti: p.graffiti, - Prover: prover, + Prover: encoding.OracleProverAddress, ParentGasUsed: uint32(parent.GasUsed()), GasUsed: uint32(block.GasUsed()), VerifierId: 0, diff --git a/prover/proof_submitter/util.go b/prover/proof_submitter/util.go index e7d2f89a9..f006365a3 100644 --- a/prover/proof_submitter/util.go +++ b/prover/proof_submitter/util.go @@ -75,7 +75,6 @@ func sendTxWithBackoff( ) error { var ( isUnretryableError bool - proposedTime = time.Unix(int64(proposedAt), 0) ) if err := backoff.Retry(func() error { @@ -109,7 +108,7 @@ func sendTxWithBackoff( // Check the expected reward. if expectedReward != 0 { // Check if this proof is still needed at first. - needNewProof, err := rpc.NeedNewProof(ctx, cli, blockID, common.Address{}, nil) + needNewProof, err := rpc.NeedNewProof(ctx, cli, blockID, common.Address{}) if err != nil { log.Warn( "Failed to check if the generated proof is needed", @@ -119,38 +118,7 @@ func sendTxWithBackoff( return err } - if needNewProof { - stateVar, err := cli.TaikoL1.GetStateVariables(nil) - if err != nil { - log.Warn("Failed to get protocol state variables", "blockID", blockID, "error", err) - return err - } - - targetDelay := stateVar.ProofTimeTarget * 4 - if stateVar.BlockFee != 0 { - targetDelay = uint64(float64(expectedReward) / float64(stateVar.BlockFee) * float64(stateVar.ProofTimeTarget)) - if targetDelay < stateVar.ProofTimeTarget/4 { - targetDelay = stateVar.ProofTimeTarget / 4 - } else if targetDelay > stateVar.ProofTimeTarget*4 { - targetDelay = stateVar.ProofTimeTarget * 4 - } - } - - log.Info( - "Target delay", - "blockID", blockID, - "delay", targetDelay, - "expectedReward", expectedReward, - "blockFee", stateVar.BlockFee, - "proofTimeTarget", stateVar.ProofTimeTarget, - "proposedTime", proposedTime, - "timeToWait", time.Until(proposedTime.Add(time.Duration(targetDelay)*time.Second)), - ) - - if time.Now().Before(proposedTime.Add(time.Duration(targetDelay) * time.Second)) { - return errNeedWaiting - } - } else { + if !needNewProof { log.Info("Proof was submitted another prover, skip the current proof submission", "blockID", blockID) return nil } diff --git a/prover/proof_submitter/valid_proof_submitter.go b/prover/proof_submitter/valid_proof_submitter.go index 70f612550..736f47c05 100644 --- a/prover/proof_submitter/valid_proof_submitter.go +++ b/prover/proof_submitter/valid_proof_submitter.go @@ -37,7 +37,6 @@ type ValidProofSubmitter struct { l2SignalService common.Address mutex *sync.Mutex isOracleProver bool - isSystemProver bool graffiti [32]byte expectedReward uint64 retryInterval time.Duration @@ -52,7 +51,6 @@ func NewValidProofSubmitter( proverPrivKey *ecdsa.PrivateKey, mutex *sync.Mutex, isOracleProver bool, - isSystemProver bool, graffiti string, expectedReward uint64, retryInterval time.Duration, @@ -72,8 +70,8 @@ func NewValidProofSubmitter( return nil, err } - // OracleProver and SystemProver do not care about the expected proof reward. - if isOracleProver || isSystemProver { + // OracleProver does not care about the expected proof reward. + if isOracleProver { expectedReward = 0 } @@ -89,7 +87,6 @@ func NewValidProofSubmitter( taikoL2Address: taikoL2Address, mutex: mutex, isOracleProver: isOracleProver, - isSystemProver: isSystemProver, graffiti: rpc.StringToBytes32(graffiti), expectedReward: expectedReward, retryInterval: retryInterval, @@ -221,12 +218,9 @@ func (s *ValidProofSubmitter) SubmitProof( var circuitsIdx uint16 var prover common.Address - if s.isOracleProver || s.isSystemProver { - if s.isSystemProver { - prover = encoding.SystemProverAddress - } else { - prover = encoding.OracleProverAddress - } + if s.isOracleProver { + prover = encoding.OracleProverAddress + circuitsIdx = uint16(int(zkProof[64])) evidence.Proof = zkProof[0:64] } else { diff --git a/prover/proof_submitter/valid_proof_submitter_test.go b/prover/proof_submitter/valid_proof_submitter_test.go index 06f5f83b9..4e9944063 100644 --- a/prover/proof_submitter/valid_proof_submitter_test.go +++ b/prover/proof_submitter/valid_proof_submitter_test.go @@ -46,7 +46,6 @@ func (s *ProofSubmitterTestSuite) SetupTest() { l1ProverPrivKey, &sync.Mutex{}, false, - false, "test", 0, 12*time.Second, diff --git a/prover/prover.go b/prover/prover.go index 67d743ad9..e6f5f0246 100644 --- a/prover/prover.go +++ b/prover/prover.go @@ -34,7 +34,6 @@ type Prover struct { cfg *Config proverAddress common.Address oracleProverAddress common.Address - systemProverAddress common.Address // Clients rpc *rpc.Client @@ -95,11 +94,12 @@ func InitFromConfig(ctx context.Context, p *Prover, cfg *Config) (err error) { // Clients if p.rpc, err = rpc.NewClient(p.ctx, &rpc.ClientConfig{ - L1Endpoint: cfg.L1WsEndpoint, - L2Endpoint: cfg.L2WsEndpoint, - TaikoL1Address: cfg.TaikoL1Address, - TaikoL2Address: cfg.TaikoL2Address, - RetryInterval: cfg.BackOffRetryInterval, + L1Endpoint: cfg.L1WsEndpoint, + L2Endpoint: cfg.L2WsEndpoint, + TaikoL1Address: cfg.TaikoL1Address, + TaikoL2Address: cfg.TaikoL2Address, + TaikoProverPoolL1Address: cfg.TaikoProverPoolL1Address, + RetryInterval: cfg.BackOffRetryInterval, }); err != nil { return err } @@ -143,28 +143,16 @@ func InitFromConfig(ctx context.Context, p *Prover, cfg *Config) (err error) { p.oracleProverAddress = oracleProverAddress - systemProverAddress, err := p.rpc.TaikoL1.Resolve(nil, p.rpc.L1ChainID, rpc.StringToBytes32("system_prover"), true) - if err != nil { - return err - } - - p.systemProverAddress = systemProverAddress - var producer proofProducer.ProofProducer - isSystemProver := cfg.SystemProver isOracleProver := cfg.OracleProver - if isSystemProver || isOracleProver { + if isOracleProver { var specialProverAddress common.Address var privateKey *ecdsa.PrivateKey - if isSystemProver { - specialProverAddress = systemProverAddress - privateKey = p.cfg.SystemProverPrivateKey - } else { - specialProverAddress = oracleProverAddress - privateKey = p.cfg.OracleProverPrivateKey - } + + specialProverAddress = oracleProverAddress + privateKey = p.cfg.OracleProverPrivateKey if producer, err = proofProducer.NewSpecialProofProducer( p.rpc, @@ -172,7 +160,6 @@ func InitFromConfig(ctx context.Context, p *Prover, cfg *Config) (err error) { p.cfg.TaikoL2Address, specialProverAddress, p.cfg.Graffiti, - isSystemProver, ); err != nil { return err } @@ -203,7 +190,6 @@ func InitFromConfig(ctx context.Context, p *Prover, cfg *Config) (err error) { p.cfg.L1ProverPrivKey, p.submitProofTxMutex, p.cfg.OracleProver, - p.cfg.SystemProver, p.cfg.Graffiti, p.cfg.ExpectedReward, p.cfg.BackOffRetryInterval, @@ -410,13 +396,12 @@ func (p *Prover) onBlockProposed( } // Check whether the block's proof is still needed. - if !p.cfg.OracleProver && !p.cfg.SystemProver { + if !p.cfg.OracleProver { needNewProof, err := rpc.NeedNewProof( p.ctx, p.rpc, event.Id, p.proverAddress, - p.protocolConfigs.RealProofSkipSize, ) if err != nil { return fmt.Errorf("failed to check whether the L2 block needs a new proof: %w", err) @@ -427,23 +412,23 @@ func (p *Prover) onBlockProposed( } } - if p.cfg.SystemProver { - needNewSystemProof, err := rpc.NeedNewSystemProof(ctx, p.rpc, event.Id, p.protocolConfigs.RealProofSkipSize) - if err != nil { - return fmt.Errorf("failed to check whether the L2 block needs a new system proof: %w", err) - } - - if !needNewSystemProof { - return nil - } - } - // Check if the current prover has seen this block ID before, there was probably // a L1 reorg, we need to cancel that reorged block's proof generation task at first. if p.currentBlocksBeingProven[event.Meta.Id] != nil { p.cancelProof(ctx, event.Meta.Id) } + // check whether this prover has been chosen through PoS mechanism to prove the block + chosenProver, err := p.rpc.TaikoProverPoolL1.GetProver(nil, event.Id) + if err != nil { + return err + } + + if chosenProver != p.proverAddress { + log.Info("proposed block not proveable", "blockID", event.Id, "prover", chosenProver.Hex()) + return nil + } + ctx, cancelCtx := context.WithCancel(ctx) p.currentBlocksBeingProvenMutex.Lock() p.currentBlocksBeingProven[event.Id.Uint64()] = cancelFunc(func() { @@ -502,18 +487,10 @@ func (p *Prover) submitProofOp(ctx context.Context, proofWithHeader *proofProduc func (p *Prover) onBlockVerified(ctx context.Context, event *bindings.TaikoL1ClientBlockVerified) error { metrics.ProverLatestVerifiedIDGauge.Update(event.Id.Int64()) - isNormalProof := p.protocolConfigs.RealProofSkipSize == nil || - (p.protocolConfigs.RealProofSkipSize != nil && event.Id.Uint64()%p.protocolConfigs.RealProofSkipSize.Uint64() == 0) if event.Reward > math.MaxInt64 { metrics.ProverAllProofRewardGauge.Update(math.MaxInt64) - if isNormalProof { - metrics.ProverNormalProofRewardGauge.Update(math.MaxInt64) - } } else { metrics.ProverAllProofRewardGauge.Update(int64(event.Reward)) - if isNormalProof { - metrics.ProverNormalProofRewardGauge.Update(int64(event.Reward)) - } } p.latestVerifiedL1Height = event.Raw.BlockNumber @@ -537,8 +514,6 @@ func (p *Prover) onBlockProven(ctx context.Context, event *bindings.TaikoL1Clien metrics.ProverReceivedProvenBlockGauge.Update(event.Id.Int64()) // if this proof is submitted by an oracle prover or a system prover, don't cancel proof. if event.Prover == p.oracleProverAddress || - event.Prover == p.systemProverAddress || - event.Prover == encoding.SystemProverAddress || event.Prover == encoding.OracleProverAddress { return nil } @@ -623,7 +598,7 @@ func (p *Prover) closeSubscription() { // checkChainVerification checks if there is no new block verification in protocol, if so, // it will let current sepecial prover to go back to try proving the block whose id is `lastVerifiedBlockId + 1`. func (p *Prover) checkChainVerification(lastLatestVerifiedL1Height uint64) error { - if (!p.cfg.SystemProver && !p.cfg.OracleProver) || lastLatestVerifiedL1Height != p.latestVerifiedL1Height { + if (!p.cfg.OracleProver) || lastLatestVerifiedL1Height != p.latestVerifiedL1Height { return nil } diff --git a/prover/prover_test.go b/prover/prover_test.go index ffc50dee8..57b58fd90 100644 --- a/prover/prover_test.go +++ b/prover/prover_test.go @@ -42,9 +42,9 @@ func (s *ProverTestSuite) SetupTest() { L2HttpEndpoint: os.Getenv("L2_EXECUTION_ENGINE_HTTP_ENDPOINT"), TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")), TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")), + TaikoProverPoolL1Address: common.HexToAddress(os.Getenv("TAIKO_PROVER_POOL_L1_ADDRESS")), L1ProverPrivKey: l1ProverPrivKey, OracleProverPrivateKey: l1ProverPrivKey, - SystemProverPrivateKey: l1ProverPrivKey, Dummy: true, MaxConcurrentProvingJobs: 1, }))) @@ -148,7 +148,6 @@ func (s *ProverTestSuite) TestStartSubscription() { func (s *ProverTestSuite) TestCheckChainVerification() { s.Nil(s.p.checkChainVerification(0)) s.p.latestVerifiedL1Height = 1024 - s.p.cfg.SystemProver = true s.Nil(s.p.checkChainVerification(1024)) } diff --git a/scripts/gen_bindings.sh b/scripts/gen_bindings.sh index ffc424798..01e43f8bb 100755 --- a/scripts/gen_bindings.sh +++ b/scripts/gen_bindings.sh @@ -35,6 +35,10 @@ cat ${TAIKO_MONO_DIR}/packages/protocol/out/TaikoL2.sol/TaikoL2.json | jq .abi | ${ABIGEN_BIN} --abi - --type TaikoL2Client --pkg bindings --out $DIR/../bindings/gen_taiko_l2.go +cat ${TAIKO_MONO_DIR}/packages/protocol/out/TaikoProverPool.sol/TaikoProverPool.json | + jq .abi | + ${ABIGEN_BIN} --abi - --type TaikoL1ProverPool --pkg bindings --out $DIR/../bindings/gen_taiko_prover_pool_l1.go + git -C ${TAIKO_MONO_DIR} log --format="%H" -n 1 >./bindings/.githead echo "🍻 Go contract bindings generated!" diff --git a/testutils/suite.go b/testutils/suite.go index f4b86f99c..c142f93ab 100644 --- a/testutils/suite.go +++ b/testutils/suite.go @@ -4,7 +4,6 @@ import ( "context" "crypto/ecdsa" "math" - "math/big" "os" "github.com/cenkalti/backoff/v4" @@ -77,7 +76,7 @@ func (s *ClientTestSuite) SetupTest() { s.Nil(err) if balance.Cmp(common.Big0) == 0 { - tx, err := rpcCli.TaikoL1.DepositTaikoToken(opts, new(big.Int).SetUint64(uint64(math.Pow(2, 32)))) + tx, err := rpcCli.TaikoL1.DepositTaikoToken(opts, uint64(math.Pow(2, 32))) s.Nil(err) receipt, err := rpc.WaitReceipt(context.Background(), rpcCli.L1, tx) From b8345d35b8c7a4843a42e8bdf992ce23a53047a2 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Fri, 16 Jun 2023 15:13:23 -0700 Subject: [PATCH 02/37] comment out testlines that cant pass until protocol is impl --- prover/prover_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/prover/prover_test.go b/prover/prover_test.go index 57b58fd90..9bf322990 100644 --- a/prover/prover_test.go +++ b/prover/prover_test.go @@ -101,7 +101,8 @@ func (s *ProverTestSuite) TestOnBlockProposed() { // Valid block e := testutils.ProposeAndInsertValidBlock(&s.ClientTestSuite, s.proposer, s.d.ChainSyncer().CalldataSyncer()) s.Nil(s.p.onBlockProposed(context.Background(), e, func() {})) - s.Nil(s.p.validProofSubmitter.SubmitProof(context.Background(), <-s.p.proofGenerationCh)) + // TODO: uncomment once the protocol code has the ability to actually select a prover + //s.Nil(s.p.validProofSubmitter.SubmitProof(context.Background(), <-s.p.proofGenerationCh)) // Empty blocks for _, e = range testutils.ProposeAndInsertEmptyBlocks( @@ -110,7 +111,9 @@ func (s *ProverTestSuite) TestOnBlockProposed() { s.d.ChainSyncer().CalldataSyncer(), ) { s.Nil(s.p.onBlockProposed(context.Background(), e, func() {})) - s.Nil(s.p.validProofSubmitter.SubmitProof(context.Background(), <-s.p.proofGenerationCh)) + + // TODO: uncomment once the protocol code has the ability to actually select a prover + //s.Nil(s.p.validProofSubmitter.SubmitProof(context.Background(), <-s.p.proofGenerationCh)) } } From a3539e683d8af717f3e91d796fc8c4d91f62a807 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Fri, 16 Jun 2023 15:27:20 -0700 Subject: [PATCH 03/37] rm errNeedsWaiting --- prover/proof_submitter/util.go | 1 - 1 file changed, 1 deletion(-) diff --git a/prover/proof_submitter/util.go b/prover/proof_submitter/util.go index f006365a3..77eaf5c5d 100644 --- a/prover/proof_submitter/util.go +++ b/prover/proof_submitter/util.go @@ -22,7 +22,6 @@ import ( var ( errUnretryable = errors.New("unretryable") - errNeedWaiting = errors.New("need waiting before the proof submission") ) // isSubmitProofTxErrorRetryable checks whether the error returned by a proof submission transaction From 89ba90a643865b80053239261f4fe3a35e6c5666 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Fri, 16 Jun 2023 15:41:14 -0700 Subject: [PATCH 04/37] update bindings --- bindings/.githead | 2 +- bindings/gen_taiko_prover_pool_l1.go | 680 ++++++++++++++++++++++++++- 2 files changed, 680 insertions(+), 2 deletions(-) diff --git a/bindings/.githead b/bindings/.githead index 30b880fde..b86bfb3c7 100644 --- a/bindings/.githead +++ b/bindings/.githead @@ -1 +1 @@ -446d6d282ca2d4d3eb32b01e0539ccf89b0475c8 +45cd8198085232149e89b5e08dd452683a3ff877 diff --git a/bindings/gen_taiko_prover_pool_l1.go b/bindings/gen_taiko_prover_pool_l1.go index 9168b4259..7af1a4339 100644 --- a/bindings/gen_taiko_prover_pool_l1.go +++ b/bindings/gen_taiko_prover_pool_l1.go @@ -31,7 +31,7 @@ var ( // TaikoL1ProverPoolMetaData contains all meta data concerning the TaikoL1ProverPool contract. var TaikoL1ProverPoolMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"feeMultiplier\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"capacity\",\"type\":\"uint64\"}],\"name\":\"ProverEntered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"name\":\"ProverExited\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MAX_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_TKO_AMOUNT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newCapacity\",\"type\":\"uint32\"}],\"name\":\"adjustCapacity\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"newFeeMultiplier\",\"type\":\"uint8\"}],\"name\":\"adjustFeeMultiplier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"blockIdToProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"capacity\",\"type\":\"uint32\"}],\"name\":\"enterProverPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"exit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_maxPoolSize\",\"type\":\"uint16\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxPoolSize\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"randomNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"pickRandomProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"provers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"proverAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"stakedTokens\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"healthScore\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastBlockTsToBeProven\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"capacity\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numAssignedBlocks\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"feeMultiplier\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proversInPool\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"name\":\"slash\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stakeMoreTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"topProvers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"name\":\"withdrawRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + ABI: "[{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"oldCapacity\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newCapacity\",\"type\":\"uint32\"}],\"name\":\"ProverAdjustedCapacity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldFeeMultiplier\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newFeeMultiplier\",\"type\":\"uint256\"}],\"name\":\"ProverAdjustedFeeMultiplier\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"feeMultiplier\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"capacity\",\"type\":\"uint64\"}],\"name\":\"ProverEntered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"name\":\"ProverExited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ProverSlashed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalStaked\",\"type\":\"uint256\"}],\"name\":\"ProverStakedMoreTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ProverWithdrawAwards\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MAX_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_TKO_AMOUNT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newCapacity\",\"type\":\"uint32\"}],\"name\":\"adjustCapacity\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"newFeeMultiplier\",\"type\":\"uint8\"}],\"name\":\"adjustFeeMultiplier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"blockIdToProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"capacity\",\"type\":\"uint32\"}],\"name\":\"enterProverPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"exit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_maxPoolSize\",\"type\":\"uint16\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxPoolSize\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"randomNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"pickRandomProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"provers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"proverAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"stakedTokens\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"healthScore\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastBlockTsToBeProven\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"capacity\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numAssignedBlocks\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"feeMultiplier\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proversInPool\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"name\":\"slash\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stakeMoreTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"topProvers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"name\":\"withdrawRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } // TaikoL1ProverPoolABI is the input ABI used to generate the binding from. @@ -1300,6 +1300,278 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseOwnershipTransferred(l return event, nil } +// TaikoL1ProverPoolProverAdjustedCapacityIterator is returned from FilterProverAdjustedCapacity and is used to iterate over the raw logs and unpacked data for ProverAdjustedCapacity events raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolProverAdjustedCapacityIterator struct { + Event *TaikoL1ProverPoolProverAdjustedCapacity // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoL1ProverPoolProverAdjustedCapacityIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoL1ProverPoolProverAdjustedCapacity) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoL1ProverPoolProverAdjustedCapacity) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoL1ProverPoolProverAdjustedCapacityIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoL1ProverPoolProverAdjustedCapacityIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoL1ProverPoolProverAdjustedCapacity represents a ProverAdjustedCapacity event raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolProverAdjustedCapacity struct { + Prover common.Address + OldCapacity uint32 + NewCapacity uint32 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterProverAdjustedCapacity is a free log retrieval operation binding the contract event 0xa426d28c428ee95eedf18d1c934f2069b32d38457a5f7f87127aeb8ea0729fb2. +// +// Solidity: event ProverAdjustedCapacity(address prover, uint32 oldCapacity, uint32 newCapacity) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterProverAdjustedCapacity(opts *bind.FilterOpts) (*TaikoL1ProverPoolProverAdjustedCapacityIterator, error) { + + logs, sub, err := _TaikoL1ProverPool.contract.FilterLogs(opts, "ProverAdjustedCapacity") + if err != nil { + return nil, err + } + return &TaikoL1ProverPoolProverAdjustedCapacityIterator{contract: _TaikoL1ProverPool.contract, event: "ProverAdjustedCapacity", logs: logs, sub: sub}, nil +} + +// WatchProverAdjustedCapacity is a free log subscription operation binding the contract event 0xa426d28c428ee95eedf18d1c934f2069b32d38457a5f7f87127aeb8ea0729fb2. +// +// Solidity: event ProverAdjustedCapacity(address prover, uint32 oldCapacity, uint32 newCapacity) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchProverAdjustedCapacity(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolProverAdjustedCapacity) (event.Subscription, error) { + + logs, sub, err := _TaikoL1ProverPool.contract.WatchLogs(opts, "ProverAdjustedCapacity") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoL1ProverPoolProverAdjustedCapacity) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverAdjustedCapacity", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseProverAdjustedCapacity is a log parse operation binding the contract event 0xa426d28c428ee95eedf18d1c934f2069b32d38457a5f7f87127aeb8ea0729fb2. +// +// Solidity: event ProverAdjustedCapacity(address prover, uint32 oldCapacity, uint32 newCapacity) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseProverAdjustedCapacity(log types.Log) (*TaikoL1ProverPoolProverAdjustedCapacity, error) { + event := new(TaikoL1ProverPoolProverAdjustedCapacity) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverAdjustedCapacity", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoL1ProverPoolProverAdjustedFeeMultiplierIterator is returned from FilterProverAdjustedFeeMultiplier and is used to iterate over the raw logs and unpacked data for ProverAdjustedFeeMultiplier events raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolProverAdjustedFeeMultiplierIterator struct { + Event *TaikoL1ProverPoolProverAdjustedFeeMultiplier // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoL1ProverPoolProverAdjustedFeeMultiplierIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoL1ProverPoolProverAdjustedFeeMultiplier) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoL1ProverPoolProverAdjustedFeeMultiplier) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoL1ProverPoolProverAdjustedFeeMultiplierIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoL1ProverPoolProverAdjustedFeeMultiplierIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoL1ProverPoolProverAdjustedFeeMultiplier represents a ProverAdjustedFeeMultiplier event raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolProverAdjustedFeeMultiplier struct { + Prover common.Address + OldFeeMultiplier *big.Int + NewFeeMultiplier *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterProverAdjustedFeeMultiplier is a free log retrieval operation binding the contract event 0xe2ab56ce94312a84cb6aa7b090126fd821c5fad200bf22a7c55f675ec668db9e. +// +// Solidity: event ProverAdjustedFeeMultiplier(address prover, uint256 oldFeeMultiplier, uint256 newFeeMultiplier) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterProverAdjustedFeeMultiplier(opts *bind.FilterOpts) (*TaikoL1ProverPoolProverAdjustedFeeMultiplierIterator, error) { + + logs, sub, err := _TaikoL1ProverPool.contract.FilterLogs(opts, "ProverAdjustedFeeMultiplier") + if err != nil { + return nil, err + } + return &TaikoL1ProverPoolProverAdjustedFeeMultiplierIterator{contract: _TaikoL1ProverPool.contract, event: "ProverAdjustedFeeMultiplier", logs: logs, sub: sub}, nil +} + +// WatchProverAdjustedFeeMultiplier is a free log subscription operation binding the contract event 0xe2ab56ce94312a84cb6aa7b090126fd821c5fad200bf22a7c55f675ec668db9e. +// +// Solidity: event ProverAdjustedFeeMultiplier(address prover, uint256 oldFeeMultiplier, uint256 newFeeMultiplier) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchProverAdjustedFeeMultiplier(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolProverAdjustedFeeMultiplier) (event.Subscription, error) { + + logs, sub, err := _TaikoL1ProverPool.contract.WatchLogs(opts, "ProverAdjustedFeeMultiplier") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoL1ProverPoolProverAdjustedFeeMultiplier) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverAdjustedFeeMultiplier", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseProverAdjustedFeeMultiplier is a log parse operation binding the contract event 0xe2ab56ce94312a84cb6aa7b090126fd821c5fad200bf22a7c55f675ec668db9e. +// +// Solidity: event ProverAdjustedFeeMultiplier(address prover, uint256 oldFeeMultiplier, uint256 newFeeMultiplier) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseProverAdjustedFeeMultiplier(log types.Log) (*TaikoL1ProverPoolProverAdjustedFeeMultiplier, error) { + event := new(TaikoL1ProverPoolProverAdjustedFeeMultiplier) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverAdjustedFeeMultiplier", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // TaikoL1ProverPoolProverEnteredIterator is returned from FilterProverEntered and is used to iterate over the raw logs and unpacked data for ProverEntered events raised by the TaikoL1ProverPool contract. type TaikoL1ProverPoolProverEnteredIterator struct { Event *TaikoL1ProverPoolProverEntered // Event containing the contract specifics and raw log @@ -1570,3 +1842,409 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseProverExited(log types event.Raw = log return event, nil } + +// TaikoL1ProverPoolProverSlashedIterator is returned from FilterProverSlashed and is used to iterate over the raw logs and unpacked data for ProverSlashed events raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolProverSlashedIterator struct { + Event *TaikoL1ProverPoolProverSlashed // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoL1ProverPoolProverSlashedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoL1ProverPoolProverSlashed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoL1ProverPoolProverSlashed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoL1ProverPoolProverSlashedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoL1ProverPoolProverSlashedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoL1ProverPoolProverSlashed represents a ProverSlashed event raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolProverSlashed struct { + Prover common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterProverSlashed is a free log retrieval operation binding the contract event 0x664b84a0f5b173c1d62371e87f48268f943748c0fe5805d64ebfab28af48e17b. +// +// Solidity: event ProverSlashed(address prover, uint256 amount) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterProverSlashed(opts *bind.FilterOpts) (*TaikoL1ProverPoolProverSlashedIterator, error) { + + logs, sub, err := _TaikoL1ProverPool.contract.FilterLogs(opts, "ProverSlashed") + if err != nil { + return nil, err + } + return &TaikoL1ProverPoolProverSlashedIterator{contract: _TaikoL1ProverPool.contract, event: "ProverSlashed", logs: logs, sub: sub}, nil +} + +// WatchProverSlashed is a free log subscription operation binding the contract event 0x664b84a0f5b173c1d62371e87f48268f943748c0fe5805d64ebfab28af48e17b. +// +// Solidity: event ProverSlashed(address prover, uint256 amount) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchProverSlashed(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolProverSlashed) (event.Subscription, error) { + + logs, sub, err := _TaikoL1ProverPool.contract.WatchLogs(opts, "ProverSlashed") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoL1ProverPoolProverSlashed) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverSlashed", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseProverSlashed is a log parse operation binding the contract event 0x664b84a0f5b173c1d62371e87f48268f943748c0fe5805d64ebfab28af48e17b. +// +// Solidity: event ProverSlashed(address prover, uint256 amount) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseProverSlashed(log types.Log) (*TaikoL1ProverPoolProverSlashed, error) { + event := new(TaikoL1ProverPoolProverSlashed) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverSlashed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoL1ProverPoolProverStakedMoreTokensIterator is returned from FilterProverStakedMoreTokens and is used to iterate over the raw logs and unpacked data for ProverStakedMoreTokens events raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolProverStakedMoreTokensIterator struct { + Event *TaikoL1ProverPoolProverStakedMoreTokens // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoL1ProverPoolProverStakedMoreTokensIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoL1ProverPoolProverStakedMoreTokens) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoL1ProverPoolProverStakedMoreTokens) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoL1ProverPoolProverStakedMoreTokensIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoL1ProverPoolProverStakedMoreTokensIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoL1ProverPoolProverStakedMoreTokens represents a ProverStakedMoreTokens event raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolProverStakedMoreTokens struct { + Prover common.Address + Amount *big.Int + TotalStaked *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterProverStakedMoreTokens is a free log retrieval operation binding the contract event 0xede799219aee9e2d2e6ce762bb15b4cdfb387b1618280f67b3404dc12463c382. +// +// Solidity: event ProverStakedMoreTokens(address prover, uint256 amount, uint256 totalStaked) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterProverStakedMoreTokens(opts *bind.FilterOpts) (*TaikoL1ProverPoolProverStakedMoreTokensIterator, error) { + + logs, sub, err := _TaikoL1ProverPool.contract.FilterLogs(opts, "ProverStakedMoreTokens") + if err != nil { + return nil, err + } + return &TaikoL1ProverPoolProverStakedMoreTokensIterator{contract: _TaikoL1ProverPool.contract, event: "ProverStakedMoreTokens", logs: logs, sub: sub}, nil +} + +// WatchProverStakedMoreTokens is a free log subscription operation binding the contract event 0xede799219aee9e2d2e6ce762bb15b4cdfb387b1618280f67b3404dc12463c382. +// +// Solidity: event ProverStakedMoreTokens(address prover, uint256 amount, uint256 totalStaked) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchProverStakedMoreTokens(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolProverStakedMoreTokens) (event.Subscription, error) { + + logs, sub, err := _TaikoL1ProverPool.contract.WatchLogs(opts, "ProverStakedMoreTokens") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoL1ProverPoolProverStakedMoreTokens) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverStakedMoreTokens", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseProverStakedMoreTokens is a log parse operation binding the contract event 0xede799219aee9e2d2e6ce762bb15b4cdfb387b1618280f67b3404dc12463c382. +// +// Solidity: event ProverStakedMoreTokens(address prover, uint256 amount, uint256 totalStaked) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseProverStakedMoreTokens(log types.Log) (*TaikoL1ProverPoolProverStakedMoreTokens, error) { + event := new(TaikoL1ProverPoolProverStakedMoreTokens) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverStakedMoreTokens", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoL1ProverPoolProverWithdrawAwardsIterator is returned from FilterProverWithdrawAwards and is used to iterate over the raw logs and unpacked data for ProverWithdrawAwards events raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolProverWithdrawAwardsIterator struct { + Event *TaikoL1ProverPoolProverWithdrawAwards // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoL1ProverPoolProverWithdrawAwardsIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoL1ProverPoolProverWithdrawAwards) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoL1ProverPoolProverWithdrawAwards) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoL1ProverPoolProverWithdrawAwardsIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoL1ProverPoolProverWithdrawAwardsIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoL1ProverPoolProverWithdrawAwards represents a ProverWithdrawAwards event raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolProverWithdrawAwards struct { + Prover common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterProverWithdrawAwards is a free log retrieval operation binding the contract event 0x78e57d846371816e02bd37310e6cc83bb7a979a78e86a5f47214fa6f90518be4. +// +// Solidity: event ProverWithdrawAwards(address prover, uint256 amount) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterProverWithdrawAwards(opts *bind.FilterOpts) (*TaikoL1ProverPoolProverWithdrawAwardsIterator, error) { + + logs, sub, err := _TaikoL1ProverPool.contract.FilterLogs(opts, "ProverWithdrawAwards") + if err != nil { + return nil, err + } + return &TaikoL1ProverPoolProverWithdrawAwardsIterator{contract: _TaikoL1ProverPool.contract, event: "ProverWithdrawAwards", logs: logs, sub: sub}, nil +} + +// WatchProverWithdrawAwards is a free log subscription operation binding the contract event 0x78e57d846371816e02bd37310e6cc83bb7a979a78e86a5f47214fa6f90518be4. +// +// Solidity: event ProverWithdrawAwards(address prover, uint256 amount) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchProverWithdrawAwards(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolProverWithdrawAwards) (event.Subscription, error) { + + logs, sub, err := _TaikoL1ProverPool.contract.WatchLogs(opts, "ProverWithdrawAwards") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoL1ProverPoolProverWithdrawAwards) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverWithdrawAwards", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseProverWithdrawAwards is a log parse operation binding the contract event 0x78e57d846371816e02bd37310e6cc83bb7a979a78e86a5f47214fa6f90518be4. +// +// Solidity: event ProverWithdrawAwards(address prover, uint256 amount) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseProverWithdrawAwards(log types.Log) (*TaikoL1ProverPoolProverWithdrawAwards, error) { + event := new(TaikoL1ProverPoolProverWithdrawAwards) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverWithdrawAwards", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} From 9b4b2a3eb6a8a8f5a0452cf25350032878ded475 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Sun, 18 Jun 2023 23:51:38 -0700 Subject: [PATCH 05/37] test changs, add taiko prover pool / taiko token addresses, taiko token bindings, and set up proposer with allowance for tests in suite, and make sure prover registers as a pool entrant and stakes. --- .github/workflows/test.yml | 2 +- bindings/.githead | 2 +- bindings/gen_taiko_l1.go | 724 +---- bindings/gen_taiko_prover_pool_l1.go | 26 +- bindings/gen_taiko_token_l1.go | 2946 +++++++++++++++++++ cmd/flags/proposer.go | 6 + driver/chain_syncer/calldata/syncer_test.go | 1 + driver/driver_test.go | 1 + integration_test/entrypoint.sh | 4 +- pkg/rpc/client.go | 20 +- pkg/rpc/client_test.go | 1 + proposer/config.go | 2 + proposer/config_test.go | 4 + proposer/proposer.go | 32 +- proposer/proposer_test.go | 1 + prover/prover_test.go | 1 + scripts/gen_bindings.sh | 6 +- testutils/helper.go | 8 +- testutils/suite.go | 58 +- 19 files changed, 3155 insertions(+), 690 deletions(-) create mode 100644 bindings/gen_taiko_token_l1.go diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 41dfb2e2b..cb6d6ba4c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,7 +45,7 @@ jobs: with: repository: taikoxyz/taiko-mono path: ${{ env.TAIKO_MONO_DIR }} - ref: PoS_initial_impl + ref: staking_tokenomicis_1 - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 diff --git a/bindings/.githead b/bindings/.githead index b86bfb3c7..161cd6d7c 100644 --- a/bindings/.githead +++ b/bindings/.githead @@ -1 +1 @@ -45cd8198085232149e89b5e08dd452683a3ff877 +b2d980fac7a1fd87a3b0a294c6cb911e4b89c4cb diff --git a/bindings/gen_taiko_l1.go b/bindings/gen_taiko_l1.go index cb4d9a845..d5289601e 100644 --- a/bindings/gen_taiko_l1.go +++ b/bindings/gen_taiko_l1.go @@ -29,21 +29,6 @@ var ( _ = abi.ConvertType ) -// TaikoDataAuction is an auto generated low-level Go binding around an user-defined struct. -type TaikoDataAuction struct { - Bid TaikoDataBid - BatchId uint64 - StartedAt uint64 -} - -// TaikoDataBid is an auto generated low-level Go binding around an user-defined struct. -type TaikoDataBid struct { - Prover common.Address - Deposit uint64 - FeePerGas *big.Int - ProofWindow uint16 -} - // TaikoDataBlockMetadata is an auto generated low-level Go binding around an user-defined struct. type TaikoDataBlockMetadata struct { Id uint64 @@ -62,32 +47,25 @@ type TaikoDataBlockMetadata struct { // TaikoDataConfig is an auto generated low-level Go binding around an user-defined struct. type TaikoDataConfig struct { - ChainId *big.Int - MaxNumProposedBlocks *big.Int - BlockRingBufferSize *big.Int - AuctionRingBufferSize *big.Int - MaxVerificationsPerTx *big.Int - BlockMaxGasLimit uint64 - BlockFeeBaseGas uint64 - MaxTransactionsPerBlock uint64 - MaxBytesPerTxList uint64 - TxListCacheExpiry *big.Int - ProofCooldownPeriod *big.Int - SystemProofCooldownPeriod *big.Int - EthDepositGas *big.Int - EthDepositMaxFee *big.Int - MinEthDepositsPerBlock uint64 - MaxEthDepositsPerBlock uint64 - MaxEthDepositAmount *big.Int - MinEthDepositAmount *big.Int - AuctionWindow uint16 - AuctionProofWindowMultiplier uint64 - AuctionDepositMultipler uint64 - AuctionMaxFeePerGasMultipler uint64 - AuctionBatchSize uint16 - AuctionMaxAheadOfProposals uint16 - AuctionMaxProofWindow uint16 - RelaySignalRoot bool + ChainId *big.Int + MaxNumProposedBlocks *big.Int + BlockRingBufferSize *big.Int + MaxVerificationsPerTx *big.Int + BlockMaxGasLimit uint64 + BlockFeeBaseGas uint64 + MaxTransactionsPerBlock uint64 + MaxBytesPerTxList uint64 + TxListCacheExpiry *big.Int + ProofCooldownPeriod *big.Int + SystemProofCooldownPeriod *big.Int + EthDepositRingBufferSize *big.Int + EthDepositMinCountPerBlock uint64 + EthDepositMaxCountPerBlock uint64 + EthDepositMaxAmount *big.Int + EthDepositMinAmount *big.Int + EthDepositGas *big.Int + EthDepositMaxFee *big.Int + RelaySignalRoot bool } // TaikoDataEthDeposit is an auto generated low-level Go binding around an user-defined struct. @@ -114,14 +92,13 @@ type TaikoDataStateVariables struct { GenesisTimestamp uint64 NumBlocks uint64 LastVerifiedBlockId uint64 - NumAuctions uint64 NextEthDepositToProcess uint64 NumEthDeposits uint64 } // TaikoL1ClientMetaData contains all meta data concerning the TaikoL1Client contract. var TaikoL1ClientMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BATCH_NOT_AUCTIONABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BATCH_NOT_AUCTIONABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF_OVERWRITE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF_OVERWRITE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_BETTER_BID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_BETTER_BID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_PROVEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_PROVEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_SPECIAL_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"batchId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"startedAt\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"deposit\",\"type\":\"uint64\"},{\"internalType\":\"uint48\",\"name\":\"feePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint16\",\"name\":\"proofWindow\",\"type\":\"uint16\"}],\"indexed\":false,\"internalType\":\"structTaikoData.Bid\",\"name\":\"bid\",\"type\":\"tuple\"}],\"name\":\"BatchBid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"batchId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"startedAt\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"deposit\",\"type\":\"uint64\"},{\"internalType\":\"uint48\",\"name\":\"feePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint16\",\"name\":\"proofWindow\",\"type\":\"uint16\"}],\"indexed\":false,\"internalType\":\"structTaikoData.Bid\",\"name\":\"bid\",\"type\":\"tuple\"}],\"name\":\"BatchBid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockFee\",\"type\":\"uint64\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockFee\",\"type\":\"uint64\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"reward\",\"type\":\"uint64\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"reward\",\"type\":\"uint64\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"proofTimeTarget\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"proofTimeIssued\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockFee\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"adjustmentQuotient\",\"type\":\"uint16\"}],\"name\":\"ProofParamsChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"batchForBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"batchId\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"deposit\",\"type\":\"uint64\"},{\"internalType\":\"uint48\",\"name\":\"feePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint16\",\"name\":\"proofWindow\",\"type\":\"uint16\"}],\"internalType\":\"structTaikoData.Bid\",\"name\":\"bid\",\"type\":\"tuple\"}],\"name\":\"bidForBatch\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositEtherToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"name\":\"depositTaikoToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startBatchId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"name\":\"getAuctions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"currentTime\",\"type\":\"uint256\"},{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"deposit\",\"type\":\"uint64\"},{\"internalType\":\"uint48\",\"name\":\"feePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint16\",\"name\":\"proofWindow\",\"type\":\"uint16\"}],\"internalType\":\"structTaikoData.Bid\",\"name\":\"bid\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"batchId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"startedAt\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.Auction[]\",\"name\":\"auctions\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getBlock\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"_metaHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_proposer\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_proposedAt\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"getBlockFee\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxNumProposedBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"auctionRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxVerificationsPerTx\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockFeeBaseGas\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxTransactionsPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxBytesPerTxList\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"txListCacheExpiry\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofCooldownPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"systemProofCooldownPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositMaxFee\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"minEthDepositsPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxEthDepositsPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"maxEthDepositAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"minEthDepositAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint16\",\"name\":\"auctionWindow\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"auctionProofWindowMultiplier\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"auctionDepositMultipler\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"auctionMaxFeePerGasMultipler\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"auctionBatchSize\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"auctionMaxAheadOfProposals\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"auctionMaxProofWindow\",\"type\":\"uint16\"},{\"internalType\":\"bool\",\"name\":\"relaySignalRoot\",\"type\":\"bool\"}],\"internalType\":\"structTaikoData.Config\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getCrossChainBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getCrossChainSignalRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"getForkChoice\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"provenAt\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasUsed\",\"type\":\"uint32\"}],\"internalType\":\"structTaikoData.ForkChoice\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStateVariables\",\"outputs\":[{\"components\":[{\"internalType\":\"uint48\",\"name\":\"feePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numAuctions\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.StateVariables\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getTaikoTokenBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"id\",\"type\":\"uint16\"}],\"name\":\"getVerifierName\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_genesisBlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint48\",\"name\":\"_initFeePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint16\",\"name\":\"_initAvgProofWindow\",\"type\":\"uint16\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"}],\"name\":\"isBatchAuctionable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"deposit\",\"type\":\"uint64\"},{\"internalType\":\"uint48\",\"name\":\"feePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint16\",\"name\":\"proofWindow\",\"type\":\"uint16\"}],\"internalType\":\"structTaikoData.Bid\",\"name\":\"newBid\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"deposit\",\"type\":\"uint64\"},{\"internalType\":\"uint48\",\"name\":\"feePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint16\",\"name\":\"proofWindow\",\"type\":\"uint16\"}],\"internalType\":\"structTaikoData.Bid\",\"name\":\"oldBid\",\"type\":\"tuple\"}],\"name\":\"isBidBetter\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"name\":\"isBlockProvableBy\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"provable\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"proofWindowElapsed\",\"type\":\"bool\"},{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"deposit\",\"type\":\"uint64\"},{\"internalType\":\"uint48\",\"name\":\"feePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint16\",\"name\":\"proofWindow\",\"type\":\"uint16\"}],\"internalType\":\"structTaikoData.Bid\",\"name\":\"bid\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"batchId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"startedAt\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.Auction\",\"name\":\"auction\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"txList\",\"type\":\"bytes\"}],\"name\":\"proposeBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"proveBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"state\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved70\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved71\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numAuctions\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved81\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint48\",\"name\":\"feePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint16\",\"name\":\"avgProofWindow\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"__reserved90\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxBlocks\",\"type\":\"uint256\"}],\"name\":\"verifyBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"name\":\"withdrawTaikoToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + ABI: "[{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BATCH_NOT_AUCTIONABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF_OVERWRITE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF_OVERWRITE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_BETTER_BID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_PROVEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_PROVEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_SPECIAL_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockFee\",\"type\":\"uint64\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockFee\",\"type\":\"uint64\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"reward\",\"type\":\"uint64\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"reward\",\"type\":\"uint64\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"proofTimeTarget\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"proofTimeIssued\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockFee\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"adjustmentQuotient\",\"type\":\"uint16\"}],\"name\":\"ProofParamsChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"canDepositEthToL2\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"depositEtherToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getBlock\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"_metaHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_proposer\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_proposedAt\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"getBlockFee\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxNumProposedBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxVerificationsPerTx\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockFeeBaseGas\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxTransactionsPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxBytesPerTxList\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"txListCacheExpiry\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofCooldownPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"systemProofCooldownPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMinCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMaxCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMaxAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMinAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositMaxFee\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"relaySignalRoot\",\"type\":\"bool\"}],\"internalType\":\"structTaikoData.Config\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getCrossChainBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getCrossChainSignalRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"getForkChoice\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"provenAt\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasUsed\",\"type\":\"uint32\"}],\"internalType\":\"structTaikoData.ForkChoice\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStateVariables\",\"outputs\":[{\"components\":[{\"internalType\":\"uint48\",\"name\":\"feePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.StateVariables\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"id\",\"type\":\"uint16\"}],\"name\":\"getVerifierName\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_genesisBlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint48\",\"name\":\"_initFeePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint16\",\"name\":\"_initAvgProofDelay\",\"type\":\"uint16\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"txList\",\"type\":\"bytes\"}],\"name\":\"proposeBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"proveBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"state\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved70\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved71\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved80\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint48\",\"name\":\"feePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint16\",\"name\":\"avgProofDelay\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"__reserved90\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxBlocks\",\"type\":\"uint256\"}],\"name\":\"verifyBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", } // TaikoL1ClientABI is the input ABI used to generate the binding from. @@ -301,80 +278,35 @@ func (_TaikoL1Client *TaikoL1ClientCallerSession) AddressManager() (common.Addre return _TaikoL1Client.Contract.AddressManager(&_TaikoL1Client.CallOpts) } -// BatchForBlock is a free data retrieval call binding the contract method 0xba9bd83c. +// CanDepositEthToL2 is a free data retrieval call binding the contract method 0xcf151d9a. // -// Solidity: function batchForBlock(uint256 blockId) pure returns(uint256) -func (_TaikoL1Client *TaikoL1ClientCaller) BatchForBlock(opts *bind.CallOpts, blockId *big.Int) (*big.Int, error) { +// Solidity: function canDepositEthToL2(uint256 amount) view returns(bool) +func (_TaikoL1Client *TaikoL1ClientCaller) CanDepositEthToL2(opts *bind.CallOpts, amount *big.Int) (bool, error) { var out []interface{} - err := _TaikoL1Client.contract.Call(opts, &out, "batchForBlock", blockId) + err := _TaikoL1Client.contract.Call(opts, &out, "canDepositEthToL2", amount) if err != nil { - return *new(*big.Int), err + return *new(bool), err } - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) return out0, err } -// BatchForBlock is a free data retrieval call binding the contract method 0xba9bd83c. +// CanDepositEthToL2 is a free data retrieval call binding the contract method 0xcf151d9a. // -// Solidity: function batchForBlock(uint256 blockId) pure returns(uint256) -func (_TaikoL1Client *TaikoL1ClientSession) BatchForBlock(blockId *big.Int) (*big.Int, error) { - return _TaikoL1Client.Contract.BatchForBlock(&_TaikoL1Client.CallOpts, blockId) +// Solidity: function canDepositEthToL2(uint256 amount) view returns(bool) +func (_TaikoL1Client *TaikoL1ClientSession) CanDepositEthToL2(amount *big.Int) (bool, error) { + return _TaikoL1Client.Contract.CanDepositEthToL2(&_TaikoL1Client.CallOpts, amount) } -// BatchForBlock is a free data retrieval call binding the contract method 0xba9bd83c. +// CanDepositEthToL2 is a free data retrieval call binding the contract method 0xcf151d9a. // -// Solidity: function batchForBlock(uint256 blockId) pure returns(uint256) -func (_TaikoL1Client *TaikoL1ClientCallerSession) BatchForBlock(blockId *big.Int) (*big.Int, error) { - return _TaikoL1Client.Contract.BatchForBlock(&_TaikoL1Client.CallOpts, blockId) -} - -// GetAuctions is a free data retrieval call binding the contract method 0xceb6a22f. -// -// Solidity: function getAuctions(uint256 startBatchId, uint256 count) view returns(uint256 currentTime, ((address,uint64,uint48,uint16),uint64,uint64)[] auctions) -func (_TaikoL1Client *TaikoL1ClientCaller) GetAuctions(opts *bind.CallOpts, startBatchId *big.Int, count *big.Int) (struct { - CurrentTime *big.Int - Auctions []TaikoDataAuction -}, error) { - var out []interface{} - err := _TaikoL1Client.contract.Call(opts, &out, "getAuctions", startBatchId, count) - - outstruct := new(struct { - CurrentTime *big.Int - Auctions []TaikoDataAuction - }) - if err != nil { - return *outstruct, err - } - - outstruct.CurrentTime = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - outstruct.Auctions = *abi.ConvertType(out[1], new([]TaikoDataAuction)).(*[]TaikoDataAuction) - - return *outstruct, err - -} - -// GetAuctions is a free data retrieval call binding the contract method 0xceb6a22f. -// -// Solidity: function getAuctions(uint256 startBatchId, uint256 count) view returns(uint256 currentTime, ((address,uint64,uint48,uint16),uint64,uint64)[] auctions) -func (_TaikoL1Client *TaikoL1ClientSession) GetAuctions(startBatchId *big.Int, count *big.Int) (struct { - CurrentTime *big.Int - Auctions []TaikoDataAuction -}, error) { - return _TaikoL1Client.Contract.GetAuctions(&_TaikoL1Client.CallOpts, startBatchId, count) -} - -// GetAuctions is a free data retrieval call binding the contract method 0xceb6a22f. -// -// Solidity: function getAuctions(uint256 startBatchId, uint256 count) view returns(uint256 currentTime, ((address,uint64,uint48,uint16),uint64,uint64)[] auctions) -func (_TaikoL1Client *TaikoL1ClientCallerSession) GetAuctions(startBatchId *big.Int, count *big.Int) (struct { - CurrentTime *big.Int - Auctions []TaikoDataAuction -}, error) { - return _TaikoL1Client.Contract.GetAuctions(&_TaikoL1Client.CallOpts, startBatchId, count) +// Solidity: function canDepositEthToL2(uint256 amount) view returns(bool) +func (_TaikoL1Client *TaikoL1ClientCallerSession) CanDepositEthToL2(amount *big.Int) (bool, error) { + return _TaikoL1Client.Contract.CanDepositEthToL2(&_TaikoL1Client.CallOpts, amount) } // GetBlock is a free data retrieval call binding the contract method 0x04c07569. @@ -460,7 +392,7 @@ func (_TaikoL1Client *TaikoL1ClientCallerSession) GetBlockFee(gasLimit uint32) ( // GetConfig is a free data retrieval call binding the contract method 0xc3f909d4. // -// Solidity: function getConfig() pure returns((uint256,uint256,uint256,uint256,uint256,uint64,uint64,uint64,uint64,uint256,uint256,uint256,uint256,uint256,uint64,uint64,uint96,uint96,uint16,uint64,uint64,uint64,uint16,uint16,uint16,bool)) +// Solidity: function getConfig() pure returns((uint256,uint256,uint256,uint256,uint64,uint64,uint64,uint64,uint256,uint256,uint256,uint256,uint64,uint64,uint96,uint96,uint256,uint256,bool)) func (_TaikoL1Client *TaikoL1ClientCaller) GetConfig(opts *bind.CallOpts) (TaikoDataConfig, error) { var out []interface{} err := _TaikoL1Client.contract.Call(opts, &out, "getConfig") @@ -477,14 +409,14 @@ func (_TaikoL1Client *TaikoL1ClientCaller) GetConfig(opts *bind.CallOpts) (Taiko // GetConfig is a free data retrieval call binding the contract method 0xc3f909d4. // -// Solidity: function getConfig() pure returns((uint256,uint256,uint256,uint256,uint256,uint64,uint64,uint64,uint64,uint256,uint256,uint256,uint256,uint256,uint64,uint64,uint96,uint96,uint16,uint64,uint64,uint64,uint16,uint16,uint16,bool)) +// Solidity: function getConfig() pure returns((uint256,uint256,uint256,uint256,uint64,uint64,uint64,uint64,uint256,uint256,uint256,uint256,uint64,uint64,uint96,uint96,uint256,uint256,bool)) func (_TaikoL1Client *TaikoL1ClientSession) GetConfig() (TaikoDataConfig, error) { return _TaikoL1Client.Contract.GetConfig(&_TaikoL1Client.CallOpts) } // GetConfig is a free data retrieval call binding the contract method 0xc3f909d4. // -// Solidity: function getConfig() pure returns((uint256,uint256,uint256,uint256,uint256,uint64,uint64,uint64,uint64,uint256,uint256,uint256,uint256,uint256,uint64,uint64,uint96,uint96,uint16,uint64,uint64,uint64,uint16,uint16,uint16,bool)) +// Solidity: function getConfig() pure returns((uint256,uint256,uint256,uint256,uint64,uint64,uint64,uint64,uint256,uint256,uint256,uint256,uint64,uint64,uint96,uint96,uint256,uint256,bool)) func (_TaikoL1Client *TaikoL1ClientCallerSession) GetConfig() (TaikoDataConfig, error) { return _TaikoL1Client.Contract.GetConfig(&_TaikoL1Client.CallOpts) } @@ -584,7 +516,7 @@ func (_TaikoL1Client *TaikoL1ClientCallerSession) GetForkChoice(blockId *big.Int // GetStateVariables is a free data retrieval call binding the contract method 0xdde89cf5. // -// Solidity: function getStateVariables() view returns((uint48,uint64,uint64,uint64,uint64,uint64,uint64,uint64)) +// Solidity: function getStateVariables() view returns((uint48,uint64,uint64,uint64,uint64,uint64,uint64)) func (_TaikoL1Client *TaikoL1ClientCaller) GetStateVariables(opts *bind.CallOpts) (TaikoDataStateVariables, error) { var out []interface{} err := _TaikoL1Client.contract.Call(opts, &out, "getStateVariables") @@ -601,49 +533,18 @@ func (_TaikoL1Client *TaikoL1ClientCaller) GetStateVariables(opts *bind.CallOpts // GetStateVariables is a free data retrieval call binding the contract method 0xdde89cf5. // -// Solidity: function getStateVariables() view returns((uint48,uint64,uint64,uint64,uint64,uint64,uint64,uint64)) +// Solidity: function getStateVariables() view returns((uint48,uint64,uint64,uint64,uint64,uint64,uint64)) func (_TaikoL1Client *TaikoL1ClientSession) GetStateVariables() (TaikoDataStateVariables, error) { return _TaikoL1Client.Contract.GetStateVariables(&_TaikoL1Client.CallOpts) } // GetStateVariables is a free data retrieval call binding the contract method 0xdde89cf5. // -// Solidity: function getStateVariables() view returns((uint48,uint64,uint64,uint64,uint64,uint64,uint64,uint64)) +// Solidity: function getStateVariables() view returns((uint48,uint64,uint64,uint64,uint64,uint64,uint64)) func (_TaikoL1Client *TaikoL1ClientCallerSession) GetStateVariables() (TaikoDataStateVariables, error) { return _TaikoL1Client.Contract.GetStateVariables(&_TaikoL1Client.CallOpts) } -// GetTaikoTokenBalance is a free data retrieval call binding the contract method 0x8dff9cea. -// -// Solidity: function getTaikoTokenBalance(address addr) view returns(uint256) -func (_TaikoL1Client *TaikoL1ClientCaller) GetTaikoTokenBalance(opts *bind.CallOpts, addr common.Address) (*big.Int, error) { - var out []interface{} - err := _TaikoL1Client.contract.Call(opts, &out, "getTaikoTokenBalance", addr) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetTaikoTokenBalance is a free data retrieval call binding the contract method 0x8dff9cea. -// -// Solidity: function getTaikoTokenBalance(address addr) view returns(uint256) -func (_TaikoL1Client *TaikoL1ClientSession) GetTaikoTokenBalance(addr common.Address) (*big.Int, error) { - return _TaikoL1Client.Contract.GetTaikoTokenBalance(&_TaikoL1Client.CallOpts, addr) -} - -// GetTaikoTokenBalance is a free data retrieval call binding the contract method 0x8dff9cea. -// -// Solidity: function getTaikoTokenBalance(address addr) view returns(uint256) -func (_TaikoL1Client *TaikoL1ClientCallerSession) GetTaikoTokenBalance(addr common.Address) (*big.Int, error) { - return _TaikoL1Client.Contract.GetTaikoTokenBalance(&_TaikoL1Client.CallOpts, addr) -} - // GetVerifierName is a free data retrieval call binding the contract method 0x0372303d. // // Solidity: function getVerifierName(uint16 id) pure returns(bytes32) @@ -675,118 +576,6 @@ func (_TaikoL1Client *TaikoL1ClientCallerSession) GetVerifierName(id uint16) ([3 return _TaikoL1Client.Contract.GetVerifierName(&_TaikoL1Client.CallOpts, id) } -// IsBatchAuctionable is a free data retrieval call binding the contract method 0xd1a8f4ba. -// -// Solidity: function isBatchAuctionable(uint256 batchId) view returns(bool) -func (_TaikoL1Client *TaikoL1ClientCaller) IsBatchAuctionable(opts *bind.CallOpts, batchId *big.Int) (bool, error) { - var out []interface{} - err := _TaikoL1Client.contract.Call(opts, &out, "isBatchAuctionable", batchId) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsBatchAuctionable is a free data retrieval call binding the contract method 0xd1a8f4ba. -// -// Solidity: function isBatchAuctionable(uint256 batchId) view returns(bool) -func (_TaikoL1Client *TaikoL1ClientSession) IsBatchAuctionable(batchId *big.Int) (bool, error) { - return _TaikoL1Client.Contract.IsBatchAuctionable(&_TaikoL1Client.CallOpts, batchId) -} - -// IsBatchAuctionable is a free data retrieval call binding the contract method 0xd1a8f4ba. -// -// Solidity: function isBatchAuctionable(uint256 batchId) view returns(bool) -func (_TaikoL1Client *TaikoL1ClientCallerSession) IsBatchAuctionable(batchId *big.Int) (bool, error) { - return _TaikoL1Client.Contract.IsBatchAuctionable(&_TaikoL1Client.CallOpts, batchId) -} - -// IsBidBetter is a free data retrieval call binding the contract method 0xdf632e5e. -// -// Solidity: function isBidBetter((address,uint64,uint48,uint16) newBid, (address,uint64,uint48,uint16) oldBid) pure returns(bool) -func (_TaikoL1Client *TaikoL1ClientCaller) IsBidBetter(opts *bind.CallOpts, newBid TaikoDataBid, oldBid TaikoDataBid) (bool, error) { - var out []interface{} - err := _TaikoL1Client.contract.Call(opts, &out, "isBidBetter", newBid, oldBid) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsBidBetter is a free data retrieval call binding the contract method 0xdf632e5e. -// -// Solidity: function isBidBetter((address,uint64,uint48,uint16) newBid, (address,uint64,uint48,uint16) oldBid) pure returns(bool) -func (_TaikoL1Client *TaikoL1ClientSession) IsBidBetter(newBid TaikoDataBid, oldBid TaikoDataBid) (bool, error) { - return _TaikoL1Client.Contract.IsBidBetter(&_TaikoL1Client.CallOpts, newBid, oldBid) -} - -// IsBidBetter is a free data retrieval call binding the contract method 0xdf632e5e. -// -// Solidity: function isBidBetter((address,uint64,uint48,uint16) newBid, (address,uint64,uint48,uint16) oldBid) pure returns(bool) -func (_TaikoL1Client *TaikoL1ClientCallerSession) IsBidBetter(newBid TaikoDataBid, oldBid TaikoDataBid) (bool, error) { - return _TaikoL1Client.Contract.IsBidBetter(&_TaikoL1Client.CallOpts, newBid, oldBid) -} - -// IsBlockProvableBy is a free data retrieval call binding the contract method 0x5e060b62. -// -// Solidity: function isBlockProvableBy(uint256 blockId, address prover) view returns(bool provable, bool proofWindowElapsed, ((address,uint64,uint48,uint16),uint64,uint64) auction) -func (_TaikoL1Client *TaikoL1ClientCaller) IsBlockProvableBy(opts *bind.CallOpts, blockId *big.Int, prover common.Address) (struct { - Provable bool - ProofWindowElapsed bool - Auction TaikoDataAuction -}, error) { - var out []interface{} - err := _TaikoL1Client.contract.Call(opts, &out, "isBlockProvableBy", blockId, prover) - - outstruct := new(struct { - Provable bool - ProofWindowElapsed bool - Auction TaikoDataAuction - }) - if err != nil { - return *outstruct, err - } - - outstruct.Provable = *abi.ConvertType(out[0], new(bool)).(*bool) - outstruct.ProofWindowElapsed = *abi.ConvertType(out[1], new(bool)).(*bool) - outstruct.Auction = *abi.ConvertType(out[2], new(TaikoDataAuction)).(*TaikoDataAuction) - - return *outstruct, err - -} - -// IsBlockProvableBy is a free data retrieval call binding the contract method 0x5e060b62. -// -// Solidity: function isBlockProvableBy(uint256 blockId, address prover) view returns(bool provable, bool proofWindowElapsed, ((address,uint64,uint48,uint16),uint64,uint64) auction) -func (_TaikoL1Client *TaikoL1ClientSession) IsBlockProvableBy(blockId *big.Int, prover common.Address) (struct { - Provable bool - ProofWindowElapsed bool - Auction TaikoDataAuction -}, error) { - return _TaikoL1Client.Contract.IsBlockProvableBy(&_TaikoL1Client.CallOpts, blockId, prover) -} - -// IsBlockProvableBy is a free data retrieval call binding the contract method 0x5e060b62. -// -// Solidity: function isBlockProvableBy(uint256 blockId, address prover) view returns(bool provable, bool proofWindowElapsed, ((address,uint64,uint48,uint16),uint64,uint64) auction) -func (_TaikoL1Client *TaikoL1ClientCallerSession) IsBlockProvableBy(blockId *big.Int, prover common.Address) (struct { - Provable bool - ProofWindowElapsed bool - Auction TaikoDataAuction -}, error) { - return _TaikoL1Client.Contract.IsBlockProvableBy(&_TaikoL1Client.CallOpts, blockId, prover) -} - // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // // Solidity: function owner() view returns(address) @@ -882,20 +671,20 @@ func (_TaikoL1Client *TaikoL1ClientCallerSession) Resolve0(name [32]byte, allowZ // State is a free data retrieval call binding the contract method 0xc19d93fb. // -// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint64 __reserved70, uint64 __reserved71, uint64 numAuctions, uint64 __reserved81, uint64 numBlocks, uint64 nextEthDepositToProcess, uint64 lastVerifiedAt, uint64 lastVerifiedBlockId, uint48 feePerGas, uint16 avgProofWindow, uint64 __reserved90) +// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint64 __reserved70, uint64 __reserved71, uint64 __reserved80, uint64 numEthDeposits, uint64 numBlocks, uint64 nextEthDepositToProcess, uint64 lastVerifiedAt, uint64 lastVerifiedBlockId, uint48 feePerGas, uint16 avgProofDelay, uint64 __reserved90) func (_TaikoL1Client *TaikoL1ClientCaller) State(opts *bind.CallOpts) (struct { GenesisHeight uint64 GenesisTimestamp uint64 Reserved70 uint64 Reserved71 uint64 - NumAuctions uint64 - Reserved81 uint64 + Reserved80 uint64 + NumEthDeposits uint64 NumBlocks uint64 NextEthDepositToProcess uint64 LastVerifiedAt uint64 LastVerifiedBlockId uint64 FeePerGas *big.Int - AvgProofWindow uint16 + AvgProofDelay uint16 Reserved90 uint64 }, error) { var out []interface{} @@ -906,14 +695,14 @@ func (_TaikoL1Client *TaikoL1ClientCaller) State(opts *bind.CallOpts) (struct { GenesisTimestamp uint64 Reserved70 uint64 Reserved71 uint64 - NumAuctions uint64 - Reserved81 uint64 + Reserved80 uint64 + NumEthDeposits uint64 NumBlocks uint64 NextEthDepositToProcess uint64 LastVerifiedAt uint64 LastVerifiedBlockId uint64 FeePerGas *big.Int - AvgProofWindow uint16 + AvgProofDelay uint16 Reserved90 uint64 }) if err != nil { @@ -924,14 +713,14 @@ func (_TaikoL1Client *TaikoL1ClientCaller) State(opts *bind.CallOpts) (struct { outstruct.GenesisTimestamp = *abi.ConvertType(out[1], new(uint64)).(*uint64) outstruct.Reserved70 = *abi.ConvertType(out[2], new(uint64)).(*uint64) outstruct.Reserved71 = *abi.ConvertType(out[3], new(uint64)).(*uint64) - outstruct.NumAuctions = *abi.ConvertType(out[4], new(uint64)).(*uint64) - outstruct.Reserved81 = *abi.ConvertType(out[5], new(uint64)).(*uint64) + outstruct.Reserved80 = *abi.ConvertType(out[4], new(uint64)).(*uint64) + outstruct.NumEthDeposits = *abi.ConvertType(out[5], new(uint64)).(*uint64) outstruct.NumBlocks = *abi.ConvertType(out[6], new(uint64)).(*uint64) outstruct.NextEthDepositToProcess = *abi.ConvertType(out[7], new(uint64)).(*uint64) outstruct.LastVerifiedAt = *abi.ConvertType(out[8], new(uint64)).(*uint64) outstruct.LastVerifiedBlockId = *abi.ConvertType(out[9], new(uint64)).(*uint64) outstruct.FeePerGas = *abi.ConvertType(out[10], new(*big.Int)).(**big.Int) - outstruct.AvgProofWindow = *abi.ConvertType(out[11], new(uint16)).(*uint16) + outstruct.AvgProofDelay = *abi.ConvertType(out[11], new(uint16)).(*uint16) outstruct.Reserved90 = *abi.ConvertType(out[12], new(uint64)).(*uint64) return *outstruct, err @@ -940,20 +729,20 @@ func (_TaikoL1Client *TaikoL1ClientCaller) State(opts *bind.CallOpts) (struct { // State is a free data retrieval call binding the contract method 0xc19d93fb. // -// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint64 __reserved70, uint64 __reserved71, uint64 numAuctions, uint64 __reserved81, uint64 numBlocks, uint64 nextEthDepositToProcess, uint64 lastVerifiedAt, uint64 lastVerifiedBlockId, uint48 feePerGas, uint16 avgProofWindow, uint64 __reserved90) +// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint64 __reserved70, uint64 __reserved71, uint64 __reserved80, uint64 numEthDeposits, uint64 numBlocks, uint64 nextEthDepositToProcess, uint64 lastVerifiedAt, uint64 lastVerifiedBlockId, uint48 feePerGas, uint16 avgProofDelay, uint64 __reserved90) func (_TaikoL1Client *TaikoL1ClientSession) State() (struct { GenesisHeight uint64 GenesisTimestamp uint64 Reserved70 uint64 Reserved71 uint64 - NumAuctions uint64 - Reserved81 uint64 + Reserved80 uint64 + NumEthDeposits uint64 NumBlocks uint64 NextEthDepositToProcess uint64 LastVerifiedAt uint64 LastVerifiedBlockId uint64 FeePerGas *big.Int - AvgProofWindow uint16 + AvgProofDelay uint16 Reserved90 uint64 }, error) { return _TaikoL1Client.Contract.State(&_TaikoL1Client.CallOpts) @@ -961,107 +750,65 @@ func (_TaikoL1Client *TaikoL1ClientSession) State() (struct { // State is a free data retrieval call binding the contract method 0xc19d93fb. // -// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint64 __reserved70, uint64 __reserved71, uint64 numAuctions, uint64 __reserved81, uint64 numBlocks, uint64 nextEthDepositToProcess, uint64 lastVerifiedAt, uint64 lastVerifiedBlockId, uint48 feePerGas, uint16 avgProofWindow, uint64 __reserved90) +// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint64 __reserved70, uint64 __reserved71, uint64 __reserved80, uint64 numEthDeposits, uint64 numBlocks, uint64 nextEthDepositToProcess, uint64 lastVerifiedAt, uint64 lastVerifiedBlockId, uint48 feePerGas, uint16 avgProofDelay, uint64 __reserved90) func (_TaikoL1Client *TaikoL1ClientCallerSession) State() (struct { GenesisHeight uint64 GenesisTimestamp uint64 Reserved70 uint64 Reserved71 uint64 - NumAuctions uint64 - Reserved81 uint64 + Reserved80 uint64 + NumEthDeposits uint64 NumBlocks uint64 NextEthDepositToProcess uint64 LastVerifiedAt uint64 LastVerifiedBlockId uint64 FeePerGas *big.Int - AvgProofWindow uint16 + AvgProofDelay uint16 Reserved90 uint64 }, error) { return _TaikoL1Client.Contract.State(&_TaikoL1Client.CallOpts) } -// BidForBatch is a paid mutator transaction binding the contract method 0x940c02ce. -// -// Solidity: function bidForBatch(uint64 batchId, (address,uint64,uint48,uint16) bid) payable returns() -func (_TaikoL1Client *TaikoL1ClientTransactor) BidForBatch(opts *bind.TransactOpts, batchId uint64, bid TaikoDataBid) (*types.Transaction, error) { - return _TaikoL1Client.contract.Transact(opts, "bidForBatch", batchId, bid) -} - -// BidForBatch is a paid mutator transaction binding the contract method 0x940c02ce. +// DepositEtherToL2 is a paid mutator transaction binding the contract method 0x047a289d. // -// Solidity: function bidForBatch(uint64 batchId, (address,uint64,uint48,uint16) bid) payable returns() -func (_TaikoL1Client *TaikoL1ClientSession) BidForBatch(batchId uint64, bid TaikoDataBid) (*types.Transaction, error) { - return _TaikoL1Client.Contract.BidForBatch(&_TaikoL1Client.TransactOpts, batchId, bid) +// Solidity: function depositEtherToL2(address recipient) payable returns() +func (_TaikoL1Client *TaikoL1ClientTransactor) DepositEtherToL2(opts *bind.TransactOpts, recipient common.Address) (*types.Transaction, error) { + return _TaikoL1Client.contract.Transact(opts, "depositEtherToL2", recipient) } -// BidForBatch is a paid mutator transaction binding the contract method 0x940c02ce. +// DepositEtherToL2 is a paid mutator transaction binding the contract method 0x047a289d. // -// Solidity: function bidForBatch(uint64 batchId, (address,uint64,uint48,uint16) bid) payable returns() -func (_TaikoL1Client *TaikoL1ClientTransactorSession) BidForBatch(batchId uint64, bid TaikoDataBid) (*types.Transaction, error) { - return _TaikoL1Client.Contract.BidForBatch(&_TaikoL1Client.TransactOpts, batchId, bid) +// Solidity: function depositEtherToL2(address recipient) payable returns() +func (_TaikoL1Client *TaikoL1ClientSession) DepositEtherToL2(recipient common.Address) (*types.Transaction, error) { + return _TaikoL1Client.Contract.DepositEtherToL2(&_TaikoL1Client.TransactOpts, recipient) } -// DepositEtherToL2 is a paid mutator transaction binding the contract method 0xa22f7670. +// DepositEtherToL2 is a paid mutator transaction binding the contract method 0x047a289d. // -// Solidity: function depositEtherToL2() payable returns() -func (_TaikoL1Client *TaikoL1ClientTransactor) DepositEtherToL2(opts *bind.TransactOpts) (*types.Transaction, error) { - return _TaikoL1Client.contract.Transact(opts, "depositEtherToL2") -} - -// DepositEtherToL2 is a paid mutator transaction binding the contract method 0xa22f7670. -// -// Solidity: function depositEtherToL2() payable returns() -func (_TaikoL1Client *TaikoL1ClientSession) DepositEtherToL2() (*types.Transaction, error) { - return _TaikoL1Client.Contract.DepositEtherToL2(&_TaikoL1Client.TransactOpts) -} - -// DepositEtherToL2 is a paid mutator transaction binding the contract method 0xa22f7670. -// -// Solidity: function depositEtherToL2() payable returns() -func (_TaikoL1Client *TaikoL1ClientTransactorSession) DepositEtherToL2() (*types.Transaction, error) { - return _TaikoL1Client.Contract.DepositEtherToL2(&_TaikoL1Client.TransactOpts) -} - -// DepositTaikoToken is a paid mutator transaction binding the contract method 0x17924388. -// -// Solidity: function depositTaikoToken(uint64 amount) returns() -func (_TaikoL1Client *TaikoL1ClientTransactor) DepositTaikoToken(opts *bind.TransactOpts, amount uint64) (*types.Transaction, error) { - return _TaikoL1Client.contract.Transact(opts, "depositTaikoToken", amount) -} - -// DepositTaikoToken is a paid mutator transaction binding the contract method 0x17924388. -// -// Solidity: function depositTaikoToken(uint64 amount) returns() -func (_TaikoL1Client *TaikoL1ClientSession) DepositTaikoToken(amount uint64) (*types.Transaction, error) { - return _TaikoL1Client.Contract.DepositTaikoToken(&_TaikoL1Client.TransactOpts, amount) -} - -// DepositTaikoToken is a paid mutator transaction binding the contract method 0x17924388. -// -// Solidity: function depositTaikoToken(uint64 amount) returns() -func (_TaikoL1Client *TaikoL1ClientTransactorSession) DepositTaikoToken(amount uint64) (*types.Transaction, error) { - return _TaikoL1Client.Contract.DepositTaikoToken(&_TaikoL1Client.TransactOpts, amount) +// Solidity: function depositEtherToL2(address recipient) payable returns() +func (_TaikoL1Client *TaikoL1ClientTransactorSession) DepositEtherToL2(recipient common.Address) (*types.Transaction, error) { + return _TaikoL1Client.Contract.DepositEtherToL2(&_TaikoL1Client.TransactOpts, recipient) } // Init is a paid mutator transaction binding the contract method 0xa2fdc693. // -// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint48 _initFeePerGas, uint16 _initAvgProofWindow) returns() -func (_TaikoL1Client *TaikoL1ClientTransactor) Init(opts *bind.TransactOpts, _addressManager common.Address, _genesisBlockHash [32]byte, _initFeePerGas *big.Int, _initAvgProofWindow uint16) (*types.Transaction, error) { - return _TaikoL1Client.contract.Transact(opts, "init", _addressManager, _genesisBlockHash, _initFeePerGas, _initAvgProofWindow) +// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint48 _initFeePerGas, uint16 _initAvgProofDelay) returns() +func (_TaikoL1Client *TaikoL1ClientTransactor) Init(opts *bind.TransactOpts, _addressManager common.Address, _genesisBlockHash [32]byte, _initFeePerGas *big.Int, _initAvgProofDelay uint16) (*types.Transaction, error) { + return _TaikoL1Client.contract.Transact(opts, "init", _addressManager, _genesisBlockHash, _initFeePerGas, _initAvgProofDelay) } // Init is a paid mutator transaction binding the contract method 0xa2fdc693. // -// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint48 _initFeePerGas, uint16 _initAvgProofWindow) returns() -func (_TaikoL1Client *TaikoL1ClientSession) Init(_addressManager common.Address, _genesisBlockHash [32]byte, _initFeePerGas *big.Int, _initAvgProofWindow uint16) (*types.Transaction, error) { - return _TaikoL1Client.Contract.Init(&_TaikoL1Client.TransactOpts, _addressManager, _genesisBlockHash, _initFeePerGas, _initAvgProofWindow) +// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint48 _initFeePerGas, uint16 _initAvgProofDelay) returns() +func (_TaikoL1Client *TaikoL1ClientSession) Init(_addressManager common.Address, _genesisBlockHash [32]byte, _initFeePerGas *big.Int, _initAvgProofDelay uint16) (*types.Transaction, error) { + return _TaikoL1Client.Contract.Init(&_TaikoL1Client.TransactOpts, _addressManager, _genesisBlockHash, _initFeePerGas, _initAvgProofDelay) } // Init is a paid mutator transaction binding the contract method 0xa2fdc693. // -// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint48 _initFeePerGas, uint16 _initAvgProofWindow) returns() -func (_TaikoL1Client *TaikoL1ClientTransactorSession) Init(_addressManager common.Address, _genesisBlockHash [32]byte, _initFeePerGas *big.Int, _initAvgProofWindow uint16) (*types.Transaction, error) { - return _TaikoL1Client.Contract.Init(&_TaikoL1Client.TransactOpts, _addressManager, _genesisBlockHash, _initFeePerGas, _initAvgProofWindow) +// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint48 _initFeePerGas, uint16 _initAvgProofDelay) returns() +func (_TaikoL1Client *TaikoL1ClientTransactorSession) Init(_addressManager common.Address, _genesisBlockHash [32]byte, _initFeePerGas *big.Int, _initAvgProofDelay uint16) (*types.Transaction, error) { + return _TaikoL1Client.Contract.Init(&_TaikoL1Client.TransactOpts, _addressManager, _genesisBlockHash, _initFeePerGas, _initAvgProofDelay) } // ProposeBlock is a paid mutator transaction binding the contract method 0xef16e845. @@ -1190,27 +937,6 @@ func (_TaikoL1Client *TaikoL1ClientTransactorSession) VerifyBlocks(maxBlocks *bi return _TaikoL1Client.Contract.VerifyBlocks(&_TaikoL1Client.TransactOpts, maxBlocks) } -// WithdrawTaikoToken is a paid mutator transaction binding the contract method 0x980a4cf8. -// -// Solidity: function withdrawTaikoToken(uint64 amount) returns() -func (_TaikoL1Client *TaikoL1ClientTransactor) WithdrawTaikoToken(opts *bind.TransactOpts, amount uint64) (*types.Transaction, error) { - return _TaikoL1Client.contract.Transact(opts, "withdrawTaikoToken", amount) -} - -// WithdrawTaikoToken is a paid mutator transaction binding the contract method 0x980a4cf8. -// -// Solidity: function withdrawTaikoToken(uint64 amount) returns() -func (_TaikoL1Client *TaikoL1ClientSession) WithdrawTaikoToken(amount uint64) (*types.Transaction, error) { - return _TaikoL1Client.Contract.WithdrawTaikoToken(&_TaikoL1Client.TransactOpts, amount) -} - -// WithdrawTaikoToken is a paid mutator transaction binding the contract method 0x980a4cf8. -// -// Solidity: function withdrawTaikoToken(uint64 amount) returns() -func (_TaikoL1Client *TaikoL1ClientTransactorSession) WithdrawTaikoToken(amount uint64) (*types.Transaction, error) { - return _TaikoL1Client.Contract.WithdrawTaikoToken(&_TaikoL1Client.TransactOpts, amount) -} - // Receive is a paid mutator transaction binding the contract receive function. // // Solidity: receive() payable returns() @@ -1366,298 +1092,6 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) ParseAddressManagerChanged(log type return event, nil } -// TaikoL1ClientBatchBidIterator is returned from FilterBatchBid and is used to iterate over the raw logs and unpacked data for BatchBid events raised by the TaikoL1Client contract. -type TaikoL1ClientBatchBidIterator struct { - Event *TaikoL1ClientBatchBid // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *TaikoL1ClientBatchBidIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(TaikoL1ClientBatchBid) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(TaikoL1ClientBatchBid) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoL1ClientBatchBidIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *TaikoL1ClientBatchBidIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// TaikoL1ClientBatchBid represents a BatchBid event raised by the TaikoL1Client contract. -type TaikoL1ClientBatchBid struct { - BatchId uint64 - StartedAt uint64 - Bid TaikoDataBid - Raw types.Log // Blockchain specific contextual infos -} - -// FilterBatchBid is a free log retrieval operation binding the contract event 0x174b2b70a5c1374c8acf193c85bbb9070f5e62f34ebd6a34424a935cf5552a93. -// -// Solidity: event BatchBid(uint64 indexed batchId, uint64 startedAt, (address,uint64,uint48,uint16) bid) -func (_TaikoL1Client *TaikoL1ClientFilterer) FilterBatchBid(opts *bind.FilterOpts, batchId []uint64) (*TaikoL1ClientBatchBidIterator, error) { - - var batchIdRule []interface{} - for _, batchIdItem := range batchId { - batchIdRule = append(batchIdRule, batchIdItem) - } - - logs, sub, err := _TaikoL1Client.contract.FilterLogs(opts, "BatchBid", batchIdRule) - if err != nil { - return nil, err - } - return &TaikoL1ClientBatchBidIterator{contract: _TaikoL1Client.contract, event: "BatchBid", logs: logs, sub: sub}, nil -} - -// WatchBatchBid is a free log subscription operation binding the contract event 0x174b2b70a5c1374c8acf193c85bbb9070f5e62f34ebd6a34424a935cf5552a93. -// -// Solidity: event BatchBid(uint64 indexed batchId, uint64 startedAt, (address,uint64,uint48,uint16) bid) -func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBatchBid(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientBatchBid, batchId []uint64) (event.Subscription, error) { - - var batchIdRule []interface{} - for _, batchIdItem := range batchId { - batchIdRule = append(batchIdRule, batchIdItem) - } - - logs, sub, err := _TaikoL1Client.contract.WatchLogs(opts, "BatchBid", batchIdRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(TaikoL1ClientBatchBid) - if err := _TaikoL1Client.contract.UnpackLog(event, "BatchBid", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseBatchBid is a log parse operation binding the contract event 0x174b2b70a5c1374c8acf193c85bbb9070f5e62f34ebd6a34424a935cf5552a93. -// -// Solidity: event BatchBid(uint64 indexed batchId, uint64 startedAt, (address,uint64,uint48,uint16) bid) -func (_TaikoL1Client *TaikoL1ClientFilterer) ParseBatchBid(log types.Log) (*TaikoL1ClientBatchBid, error) { - event := new(TaikoL1ClientBatchBid) - if err := _TaikoL1Client.contract.UnpackLog(event, "BatchBid", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// TaikoL1ClientBatchBid0Iterator is returned from FilterBatchBid0 and is used to iterate over the raw logs and unpacked data for BatchBid0 events raised by the TaikoL1Client contract. -type TaikoL1ClientBatchBid0Iterator struct { - Event *TaikoL1ClientBatchBid0 // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *TaikoL1ClientBatchBid0Iterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(TaikoL1ClientBatchBid0) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(TaikoL1ClientBatchBid0) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoL1ClientBatchBid0Iterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *TaikoL1ClientBatchBid0Iterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// TaikoL1ClientBatchBid0 represents a BatchBid0 event raised by the TaikoL1Client contract. -type TaikoL1ClientBatchBid0 struct { - BatchId uint64 - StartedAt uint64 - Bid TaikoDataBid - Raw types.Log // Blockchain specific contextual infos -} - -// FilterBatchBid0 is a free log retrieval operation binding the contract event 0x174b2b70a5c1374c8acf193c85bbb9070f5e62f34ebd6a34424a935cf5552a93. -// -// Solidity: event BatchBid(uint64 indexed batchId, uint64 startedAt, (address,uint64,uint48,uint16) bid) -func (_TaikoL1Client *TaikoL1ClientFilterer) FilterBatchBid0(opts *bind.FilterOpts, batchId []uint64) (*TaikoL1ClientBatchBid0Iterator, error) { - - var batchIdRule []interface{} - for _, batchIdItem := range batchId { - batchIdRule = append(batchIdRule, batchIdItem) - } - - logs, sub, err := _TaikoL1Client.contract.FilterLogs(opts, "BatchBid0", batchIdRule) - if err != nil { - return nil, err - } - return &TaikoL1ClientBatchBid0Iterator{contract: _TaikoL1Client.contract, event: "BatchBid0", logs: logs, sub: sub}, nil -} - -// WatchBatchBid0 is a free log subscription operation binding the contract event 0x174b2b70a5c1374c8acf193c85bbb9070f5e62f34ebd6a34424a935cf5552a93. -// -// Solidity: event BatchBid(uint64 indexed batchId, uint64 startedAt, (address,uint64,uint48,uint16) bid) -func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBatchBid0(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientBatchBid0, batchId []uint64) (event.Subscription, error) { - - var batchIdRule []interface{} - for _, batchIdItem := range batchId { - batchIdRule = append(batchIdRule, batchIdItem) - } - - logs, sub, err := _TaikoL1Client.contract.WatchLogs(opts, "BatchBid0", batchIdRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(TaikoL1ClientBatchBid0) - if err := _TaikoL1Client.contract.UnpackLog(event, "BatchBid0", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseBatchBid0 is a log parse operation binding the contract event 0x174b2b70a5c1374c8acf193c85bbb9070f5e62f34ebd6a34424a935cf5552a93. -// -// Solidity: event BatchBid(uint64 indexed batchId, uint64 startedAt, (address,uint64,uint48,uint16) bid) -func (_TaikoL1Client *TaikoL1ClientFilterer) ParseBatchBid0(log types.Log) (*TaikoL1ClientBatchBid0, error) { - event := new(TaikoL1ClientBatchBid0) - if err := _TaikoL1Client.contract.UnpackLog(event, "BatchBid0", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - // TaikoL1ClientBlockProposedIterator is returned from FilterBlockProposed and is used to iterate over the raw logs and unpacked data for BlockProposed events raised by the TaikoL1Client contract. type TaikoL1ClientBlockProposedIterator struct { Event *TaikoL1ClientBlockProposed // Event containing the contract specifics and raw log diff --git a/bindings/gen_taiko_prover_pool_l1.go b/bindings/gen_taiko_prover_pool_l1.go index 7af1a4339..d8bea5160 100644 --- a/bindings/gen_taiko_prover_pool_l1.go +++ b/bindings/gen_taiko_prover_pool_l1.go @@ -31,7 +31,7 @@ var ( // TaikoL1ProverPoolMetaData contains all meta data concerning the TaikoL1ProverPool contract. var TaikoL1ProverPoolMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"oldCapacity\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newCapacity\",\"type\":\"uint32\"}],\"name\":\"ProverAdjustedCapacity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldFeeMultiplier\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newFeeMultiplier\",\"type\":\"uint256\"}],\"name\":\"ProverAdjustedFeeMultiplier\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"feeMultiplier\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"capacity\",\"type\":\"uint64\"}],\"name\":\"ProverEntered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"name\":\"ProverExited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ProverSlashed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalStaked\",\"type\":\"uint256\"}],\"name\":\"ProverStakedMoreTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ProverWithdrawAwards\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MAX_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_TKO_AMOUNT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newCapacity\",\"type\":\"uint32\"}],\"name\":\"adjustCapacity\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"newFeeMultiplier\",\"type\":\"uint8\"}],\"name\":\"adjustFeeMultiplier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"blockIdToProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"capacity\",\"type\":\"uint32\"}],\"name\":\"enterProverPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"exit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_maxPoolSize\",\"type\":\"uint16\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxPoolSize\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"randomNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"pickRandomProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"provers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"proverAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"stakedTokens\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"healthScore\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastBlockTsToBeProven\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"capacity\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numAssignedBlocks\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"feeMultiplier\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proversInPool\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"name\":\"slash\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stakeMoreTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"topProvers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"name\":\"withdrawRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + ABI: "[{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"oldCapacity\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newCapacity\",\"type\":\"uint32\"}],\"name\":\"ProverAdjustedCapacity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldFeeMultiplier\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newFeeMultiplier\",\"type\":\"uint256\"}],\"name\":\"ProverAdjustedFeeMultiplier\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"feeMultiplier\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"capacity\",\"type\":\"uint64\"}],\"name\":\"ProverEntered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"name\":\"ProverExited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ProverSlashed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalStaked\",\"type\":\"uint256\"}],\"name\":\"ProverStakedMoreTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ProverWithdrawAwards\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MAX_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_TKO_AMOUNT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newCapacity\",\"type\":\"uint32\"}],\"name\":\"adjustCapacity\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"newFeeMultiplier\",\"type\":\"uint8\"}],\"name\":\"adjustFeeMultiplier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"blockIdToProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"capacity\",\"type\":\"uint32\"}],\"name\":\"enterProverPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"exit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_maxPoolSize\",\"type\":\"uint16\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxPoolSize\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"randomNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"pickRandomProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"provers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"proverAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"stakedTokens\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"healthScore\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastBlockTsToBeProven\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"capacity\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numAssignedBlocks\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"feeMultiplier\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proversInPool\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"name\":\"slashProver\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stakeMoreTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"topProvers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"name\":\"withdrawRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } // TaikoL1ProverPoolABI is the input ABI used to generate the binding from. @@ -795,25 +795,25 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) SetAddressManager( return _TaikoL1ProverPool.Contract.SetAddressManager(&_TaikoL1ProverPool.TransactOpts, newAddressManager) } -// Slash is a paid mutator transaction binding the contract method 0xc96be4cb. +// SlashProver is a paid mutator transaction binding the contract method 0xcd362a5b. // -// Solidity: function slash(address prover) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) Slash(opts *bind.TransactOpts, prover common.Address) (*types.Transaction, error) { - return _TaikoL1ProverPool.contract.Transact(opts, "slash", prover) +// Solidity: function slashProver(address prover) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) SlashProver(opts *bind.TransactOpts, prover common.Address) (*types.Transaction, error) { + return _TaikoL1ProverPool.contract.Transact(opts, "slashProver", prover) } -// Slash is a paid mutator transaction binding the contract method 0xc96be4cb. +// SlashProver is a paid mutator transaction binding the contract method 0xcd362a5b. // -// Solidity: function slash(address prover) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) Slash(prover common.Address) (*types.Transaction, error) { - return _TaikoL1ProverPool.Contract.Slash(&_TaikoL1ProverPool.TransactOpts, prover) +// Solidity: function slashProver(address prover) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) SlashProver(prover common.Address) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.SlashProver(&_TaikoL1ProverPool.TransactOpts, prover) } -// Slash is a paid mutator transaction binding the contract method 0xc96be4cb. +// SlashProver is a paid mutator transaction binding the contract method 0xcd362a5b. // -// Solidity: function slash(address prover) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) Slash(prover common.Address) (*types.Transaction, error) { - return _TaikoL1ProverPool.Contract.Slash(&_TaikoL1ProverPool.TransactOpts, prover) +// Solidity: function slashProver(address prover) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) SlashProver(prover common.Address) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.SlashProver(&_TaikoL1ProverPool.TransactOpts, prover) } // StakeMoreTokens is a paid mutator transaction binding the contract method 0x9e8008d1. diff --git a/bindings/gen_taiko_token_l1.go b/bindings/gen_taiko_token_l1.go new file mode 100644 index 000000000..995b2d9a1 --- /dev/null +++ b/bindings/gen_taiko_token_l1.go @@ -0,0 +1,2946 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// ERC20VotesUpgradeableCheckpoint is an auto generated low-level Go binding around an user-defined struct. +type ERC20VotesUpgradeableCheckpoint struct { + FromBlock uint32 + Votes *big.Int +} + +// TaikoTokenMetaData contains all meta data concerning the TaikoToken contract. +var TaikoTokenMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TKO_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TKO_INVALID_PREMINT_PARAMS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TKO_MINT_DISALLOWED\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromDelegate\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toDelegate\",\"type\":\"address\"}],\"name\":\"DelegateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"DelegateVotesChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"Snapshot\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"snapshotId\",\"type\":\"uint256\"}],\"name\":\"balanceOfAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"pos\",\"type\":\"uint32\"}],\"name\":\"checkpoints\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fromBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint224\",\"name\":\"votes\",\"type\":\"uint224\"}],\"internalType\":\"structERC20VotesUpgradeable.Checkpoint\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"delegateBySig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPastTotalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPastVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"address[]\",\"name\":\"_premintRecipients\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_premintAmounts\",\"type\":\"uint256[]\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"numCheckpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"snapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"snapshotId\",\"type\":\"uint256\"}],\"name\":\"totalSupplyAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// TaikoTokenABI is the input ABI used to generate the binding from. +// Deprecated: Use TaikoTokenMetaData.ABI instead. +var TaikoTokenABI = TaikoTokenMetaData.ABI + +// TaikoToken is an auto generated Go binding around an Ethereum contract. +type TaikoToken struct { + TaikoTokenCaller // Read-only binding to the contract + TaikoTokenTransactor // Write-only binding to the contract + TaikoTokenFilterer // Log filterer for contract events +} + +// TaikoTokenCaller is an auto generated read-only Go binding around an Ethereum contract. +type TaikoTokenCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TaikoTokenTransactor is an auto generated write-only Go binding around an Ethereum contract. +type TaikoTokenTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TaikoTokenFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type TaikoTokenFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TaikoTokenSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type TaikoTokenSession struct { + Contract *TaikoToken // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// TaikoTokenCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type TaikoTokenCallerSession struct { + Contract *TaikoTokenCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// TaikoTokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type TaikoTokenTransactorSession struct { + Contract *TaikoTokenTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// TaikoTokenRaw is an auto generated low-level Go binding around an Ethereum contract. +type TaikoTokenRaw struct { + Contract *TaikoToken // Generic contract binding to access the raw methods on +} + +// TaikoTokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type TaikoTokenCallerRaw struct { + Contract *TaikoTokenCaller // Generic read-only contract binding to access the raw methods on +} + +// TaikoTokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type TaikoTokenTransactorRaw struct { + Contract *TaikoTokenTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewTaikoToken creates a new instance of TaikoToken, bound to a specific deployed contract. +func NewTaikoToken(address common.Address, backend bind.ContractBackend) (*TaikoToken, error) { + contract, err := bindTaikoToken(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &TaikoToken{TaikoTokenCaller: TaikoTokenCaller{contract: contract}, TaikoTokenTransactor: TaikoTokenTransactor{contract: contract}, TaikoTokenFilterer: TaikoTokenFilterer{contract: contract}}, nil +} + +// NewTaikoTokenCaller creates a new read-only instance of TaikoToken, bound to a specific deployed contract. +func NewTaikoTokenCaller(address common.Address, caller bind.ContractCaller) (*TaikoTokenCaller, error) { + contract, err := bindTaikoToken(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &TaikoTokenCaller{contract: contract}, nil +} + +// NewTaikoTokenTransactor creates a new write-only instance of TaikoToken, bound to a specific deployed contract. +func NewTaikoTokenTransactor(address common.Address, transactor bind.ContractTransactor) (*TaikoTokenTransactor, error) { + contract, err := bindTaikoToken(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &TaikoTokenTransactor{contract: contract}, nil +} + +// NewTaikoTokenFilterer creates a new log filterer instance of TaikoToken, bound to a specific deployed contract. +func NewTaikoTokenFilterer(address common.Address, filterer bind.ContractFilterer) (*TaikoTokenFilterer, error) { + contract, err := bindTaikoToken(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &TaikoTokenFilterer{contract: contract}, nil +} + +// bindTaikoToken binds a generic wrapper to an already deployed contract. +func bindTaikoToken(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := TaikoTokenMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_TaikoToken *TaikoTokenRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TaikoToken.Contract.TaikoTokenCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_TaikoToken *TaikoTokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TaikoToken.Contract.TaikoTokenTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_TaikoToken *TaikoTokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TaikoToken.Contract.TaikoTokenTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_TaikoToken *TaikoTokenCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TaikoToken.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_TaikoToken *TaikoTokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TaikoToken.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_TaikoToken *TaikoTokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TaikoToken.Contract.contract.Transact(opts, method, params...) +} + +// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. +// +// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) +func (_TaikoToken *TaikoTokenCaller) DOMAINSEPARATOR(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _TaikoToken.contract.Call(opts, &out, "DOMAIN_SEPARATOR") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. +// +// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) +func (_TaikoToken *TaikoTokenSession) DOMAINSEPARATOR() ([32]byte, error) { + return _TaikoToken.Contract.DOMAINSEPARATOR(&_TaikoToken.CallOpts) +} + +// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. +// +// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) +func (_TaikoToken *TaikoTokenCallerSession) DOMAINSEPARATOR() ([32]byte, error) { + return _TaikoToken.Contract.DOMAINSEPARATOR(&_TaikoToken.CallOpts) +} + +// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f. +// +// Solidity: function addressManager() view returns(address) +func (_TaikoToken *TaikoTokenCaller) AddressManager(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TaikoToken.contract.Call(opts, &out, "addressManager") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f. +// +// Solidity: function addressManager() view returns(address) +func (_TaikoToken *TaikoTokenSession) AddressManager() (common.Address, error) { + return _TaikoToken.Contract.AddressManager(&_TaikoToken.CallOpts) +} + +// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f. +// +// Solidity: function addressManager() view returns(address) +func (_TaikoToken *TaikoTokenCallerSession) AddressManager() (common.Address, error) { + return _TaikoToken.Contract.AddressManager(&_TaikoToken.CallOpts) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_TaikoToken *TaikoTokenCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { + var out []interface{} + err := _TaikoToken.contract.Call(opts, &out, "allowance", owner, spender) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_TaikoToken *TaikoTokenSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _TaikoToken.Contract.Allowance(&_TaikoToken.CallOpts, owner, spender) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_TaikoToken *TaikoTokenCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _TaikoToken.Contract.Allowance(&_TaikoToken.CallOpts, owner, spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_TaikoToken *TaikoTokenCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { + var out []interface{} + err := _TaikoToken.contract.Call(opts, &out, "balanceOf", account) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_TaikoToken *TaikoTokenSession) BalanceOf(account common.Address) (*big.Int, error) { + return _TaikoToken.Contract.BalanceOf(&_TaikoToken.CallOpts, account) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_TaikoToken *TaikoTokenCallerSession) BalanceOf(account common.Address) (*big.Int, error) { + return _TaikoToken.Contract.BalanceOf(&_TaikoToken.CallOpts, account) +} + +// BalanceOfAt is a free data retrieval call binding the contract method 0x4ee2cd7e. +// +// Solidity: function balanceOfAt(address account, uint256 snapshotId) view returns(uint256) +func (_TaikoToken *TaikoTokenCaller) BalanceOfAt(opts *bind.CallOpts, account common.Address, snapshotId *big.Int) (*big.Int, error) { + var out []interface{} + err := _TaikoToken.contract.Call(opts, &out, "balanceOfAt", account, snapshotId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BalanceOfAt is a free data retrieval call binding the contract method 0x4ee2cd7e. +// +// Solidity: function balanceOfAt(address account, uint256 snapshotId) view returns(uint256) +func (_TaikoToken *TaikoTokenSession) BalanceOfAt(account common.Address, snapshotId *big.Int) (*big.Int, error) { + return _TaikoToken.Contract.BalanceOfAt(&_TaikoToken.CallOpts, account, snapshotId) +} + +// BalanceOfAt is a free data retrieval call binding the contract method 0x4ee2cd7e. +// +// Solidity: function balanceOfAt(address account, uint256 snapshotId) view returns(uint256) +func (_TaikoToken *TaikoTokenCallerSession) BalanceOfAt(account common.Address, snapshotId *big.Int) (*big.Int, error) { + return _TaikoToken.Contract.BalanceOfAt(&_TaikoToken.CallOpts, account, snapshotId) +} + +// Checkpoints is a free data retrieval call binding the contract method 0xf1127ed8. +// +// Solidity: function checkpoints(address account, uint32 pos) view returns((uint32,uint224)) +func (_TaikoToken *TaikoTokenCaller) Checkpoints(opts *bind.CallOpts, account common.Address, pos uint32) (ERC20VotesUpgradeableCheckpoint, error) { + var out []interface{} + err := _TaikoToken.contract.Call(opts, &out, "checkpoints", account, pos) + + if err != nil { + return *new(ERC20VotesUpgradeableCheckpoint), err + } + + out0 := *abi.ConvertType(out[0], new(ERC20VotesUpgradeableCheckpoint)).(*ERC20VotesUpgradeableCheckpoint) + + return out0, err + +} + +// Checkpoints is a free data retrieval call binding the contract method 0xf1127ed8. +// +// Solidity: function checkpoints(address account, uint32 pos) view returns((uint32,uint224)) +func (_TaikoToken *TaikoTokenSession) Checkpoints(account common.Address, pos uint32) (ERC20VotesUpgradeableCheckpoint, error) { + return _TaikoToken.Contract.Checkpoints(&_TaikoToken.CallOpts, account, pos) +} + +// Checkpoints is a free data retrieval call binding the contract method 0xf1127ed8. +// +// Solidity: function checkpoints(address account, uint32 pos) view returns((uint32,uint224)) +func (_TaikoToken *TaikoTokenCallerSession) Checkpoints(account common.Address, pos uint32) (ERC20VotesUpgradeableCheckpoint, error) { + return _TaikoToken.Contract.Checkpoints(&_TaikoToken.CallOpts, account, pos) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() pure returns(uint8) +func (_TaikoToken *TaikoTokenCaller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _TaikoToken.contract.Call(opts, &out, "decimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() pure returns(uint8) +func (_TaikoToken *TaikoTokenSession) Decimals() (uint8, error) { + return _TaikoToken.Contract.Decimals(&_TaikoToken.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() pure returns(uint8) +func (_TaikoToken *TaikoTokenCallerSession) Decimals() (uint8, error) { + return _TaikoToken.Contract.Decimals(&_TaikoToken.CallOpts) +} + +// Delegates is a free data retrieval call binding the contract method 0x587cde1e. +// +// Solidity: function delegates(address account) view returns(address) +func (_TaikoToken *TaikoTokenCaller) Delegates(opts *bind.CallOpts, account common.Address) (common.Address, error) { + var out []interface{} + err := _TaikoToken.contract.Call(opts, &out, "delegates", account) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Delegates is a free data retrieval call binding the contract method 0x587cde1e. +// +// Solidity: function delegates(address account) view returns(address) +func (_TaikoToken *TaikoTokenSession) Delegates(account common.Address) (common.Address, error) { + return _TaikoToken.Contract.Delegates(&_TaikoToken.CallOpts, account) +} + +// Delegates is a free data retrieval call binding the contract method 0x587cde1e. +// +// Solidity: function delegates(address account) view returns(address) +func (_TaikoToken *TaikoTokenCallerSession) Delegates(account common.Address) (common.Address, error) { + return _TaikoToken.Contract.Delegates(&_TaikoToken.CallOpts, account) +} + +// GetPastTotalSupply is a free data retrieval call binding the contract method 0x8e539e8c. +// +// Solidity: function getPastTotalSupply(uint256 blockNumber) view returns(uint256) +func (_TaikoToken *TaikoTokenCaller) GetPastTotalSupply(opts *bind.CallOpts, blockNumber *big.Int) (*big.Int, error) { + var out []interface{} + err := _TaikoToken.contract.Call(opts, &out, "getPastTotalSupply", blockNumber) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetPastTotalSupply is a free data retrieval call binding the contract method 0x8e539e8c. +// +// Solidity: function getPastTotalSupply(uint256 blockNumber) view returns(uint256) +func (_TaikoToken *TaikoTokenSession) GetPastTotalSupply(blockNumber *big.Int) (*big.Int, error) { + return _TaikoToken.Contract.GetPastTotalSupply(&_TaikoToken.CallOpts, blockNumber) +} + +// GetPastTotalSupply is a free data retrieval call binding the contract method 0x8e539e8c. +// +// Solidity: function getPastTotalSupply(uint256 blockNumber) view returns(uint256) +func (_TaikoToken *TaikoTokenCallerSession) GetPastTotalSupply(blockNumber *big.Int) (*big.Int, error) { + return _TaikoToken.Contract.GetPastTotalSupply(&_TaikoToken.CallOpts, blockNumber) +} + +// GetPastVotes is a free data retrieval call binding the contract method 0x3a46b1a8. +// +// Solidity: function getPastVotes(address account, uint256 blockNumber) view returns(uint256) +func (_TaikoToken *TaikoTokenCaller) GetPastVotes(opts *bind.CallOpts, account common.Address, blockNumber *big.Int) (*big.Int, error) { + var out []interface{} + err := _TaikoToken.contract.Call(opts, &out, "getPastVotes", account, blockNumber) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetPastVotes is a free data retrieval call binding the contract method 0x3a46b1a8. +// +// Solidity: function getPastVotes(address account, uint256 blockNumber) view returns(uint256) +func (_TaikoToken *TaikoTokenSession) GetPastVotes(account common.Address, blockNumber *big.Int) (*big.Int, error) { + return _TaikoToken.Contract.GetPastVotes(&_TaikoToken.CallOpts, account, blockNumber) +} + +// GetPastVotes is a free data retrieval call binding the contract method 0x3a46b1a8. +// +// Solidity: function getPastVotes(address account, uint256 blockNumber) view returns(uint256) +func (_TaikoToken *TaikoTokenCallerSession) GetPastVotes(account common.Address, blockNumber *big.Int) (*big.Int, error) { + return _TaikoToken.Contract.GetPastVotes(&_TaikoToken.CallOpts, account, blockNumber) +} + +// GetVotes is a free data retrieval call binding the contract method 0x9ab24eb0. +// +// Solidity: function getVotes(address account) view returns(uint256) +func (_TaikoToken *TaikoTokenCaller) GetVotes(opts *bind.CallOpts, account common.Address) (*big.Int, error) { + var out []interface{} + err := _TaikoToken.contract.Call(opts, &out, "getVotes", account) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetVotes is a free data retrieval call binding the contract method 0x9ab24eb0. +// +// Solidity: function getVotes(address account) view returns(uint256) +func (_TaikoToken *TaikoTokenSession) GetVotes(account common.Address) (*big.Int, error) { + return _TaikoToken.Contract.GetVotes(&_TaikoToken.CallOpts, account) +} + +// GetVotes is a free data retrieval call binding the contract method 0x9ab24eb0. +// +// Solidity: function getVotes(address account) view returns(uint256) +func (_TaikoToken *TaikoTokenCallerSession) GetVotes(account common.Address) (*big.Int, error) { + return _TaikoToken.Contract.GetVotes(&_TaikoToken.CallOpts, account) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_TaikoToken *TaikoTokenCaller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _TaikoToken.contract.Call(opts, &out, "name") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_TaikoToken *TaikoTokenSession) Name() (string, error) { + return _TaikoToken.Contract.Name(&_TaikoToken.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_TaikoToken *TaikoTokenCallerSession) Name() (string, error) { + return _TaikoToken.Contract.Name(&_TaikoToken.CallOpts) +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address owner) view returns(uint256) +func (_TaikoToken *TaikoTokenCaller) Nonces(opts *bind.CallOpts, owner common.Address) (*big.Int, error) { + var out []interface{} + err := _TaikoToken.contract.Call(opts, &out, "nonces", owner) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address owner) view returns(uint256) +func (_TaikoToken *TaikoTokenSession) Nonces(owner common.Address) (*big.Int, error) { + return _TaikoToken.Contract.Nonces(&_TaikoToken.CallOpts, owner) +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address owner) view returns(uint256) +func (_TaikoToken *TaikoTokenCallerSession) Nonces(owner common.Address) (*big.Int, error) { + return _TaikoToken.Contract.Nonces(&_TaikoToken.CallOpts, owner) +} + +// NumCheckpoints is a free data retrieval call binding the contract method 0x6fcfff45. +// +// Solidity: function numCheckpoints(address account) view returns(uint32) +func (_TaikoToken *TaikoTokenCaller) NumCheckpoints(opts *bind.CallOpts, account common.Address) (uint32, error) { + var out []interface{} + err := _TaikoToken.contract.Call(opts, &out, "numCheckpoints", account) + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// NumCheckpoints is a free data retrieval call binding the contract method 0x6fcfff45. +// +// Solidity: function numCheckpoints(address account) view returns(uint32) +func (_TaikoToken *TaikoTokenSession) NumCheckpoints(account common.Address) (uint32, error) { + return _TaikoToken.Contract.NumCheckpoints(&_TaikoToken.CallOpts, account) +} + +// NumCheckpoints is a free data retrieval call binding the contract method 0x6fcfff45. +// +// Solidity: function numCheckpoints(address account) view returns(uint32) +func (_TaikoToken *TaikoTokenCallerSession) NumCheckpoints(account common.Address) (uint32, error) { + return _TaikoToken.Contract.NumCheckpoints(&_TaikoToken.CallOpts, account) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_TaikoToken *TaikoTokenCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TaikoToken.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_TaikoToken *TaikoTokenSession) Owner() (common.Address, error) { + return _TaikoToken.Contract.Owner(&_TaikoToken.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_TaikoToken *TaikoTokenCallerSession) Owner() (common.Address, error) { + return _TaikoToken.Contract.Owner(&_TaikoToken.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_TaikoToken *TaikoTokenCaller) Paused(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _TaikoToken.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_TaikoToken *TaikoTokenSession) Paused() (bool, error) { + return _TaikoToken.Contract.Paused(&_TaikoToken.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_TaikoToken *TaikoTokenCallerSession) Paused() (bool, error) { + return _TaikoToken.Contract.Paused(&_TaikoToken.CallOpts) +} + +// Resolve is a free data retrieval call binding the contract method 0x6c6563f6. +// +// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address) +func (_TaikoToken *TaikoTokenCaller) Resolve(opts *bind.CallOpts, chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) { + var out []interface{} + err := _TaikoToken.contract.Call(opts, &out, "resolve", chainId, name, allowZeroAddress) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Resolve is a free data retrieval call binding the contract method 0x6c6563f6. +// +// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address) +func (_TaikoToken *TaikoTokenSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) { + return _TaikoToken.Contract.Resolve(&_TaikoToken.CallOpts, chainId, name, allowZeroAddress) +} + +// Resolve is a free data retrieval call binding the contract method 0x6c6563f6. +// +// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address) +func (_TaikoToken *TaikoTokenCallerSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) { + return _TaikoToken.Contract.Resolve(&_TaikoToken.CallOpts, chainId, name, allowZeroAddress) +} + +// Resolve0 is a free data retrieval call binding the contract method 0xa86f9d9e. +// +// Solidity: function resolve(bytes32 name, bool allowZeroAddress) view returns(address) +func (_TaikoToken *TaikoTokenCaller) Resolve0(opts *bind.CallOpts, name [32]byte, allowZeroAddress bool) (common.Address, error) { + var out []interface{} + err := _TaikoToken.contract.Call(opts, &out, "resolve0", name, allowZeroAddress) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Resolve0 is a free data retrieval call binding the contract method 0xa86f9d9e. +// +// Solidity: function resolve(bytes32 name, bool allowZeroAddress) view returns(address) +func (_TaikoToken *TaikoTokenSession) Resolve0(name [32]byte, allowZeroAddress bool) (common.Address, error) { + return _TaikoToken.Contract.Resolve0(&_TaikoToken.CallOpts, name, allowZeroAddress) +} + +// Resolve0 is a free data retrieval call binding the contract method 0xa86f9d9e. +// +// Solidity: function resolve(bytes32 name, bool allowZeroAddress) view returns(address) +func (_TaikoToken *TaikoTokenCallerSession) Resolve0(name [32]byte, allowZeroAddress bool) (common.Address, error) { + return _TaikoToken.Contract.Resolve0(&_TaikoToken.CallOpts, name, allowZeroAddress) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_TaikoToken *TaikoTokenCaller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _TaikoToken.contract.Call(opts, &out, "symbol") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_TaikoToken *TaikoTokenSession) Symbol() (string, error) { + return _TaikoToken.Contract.Symbol(&_TaikoToken.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_TaikoToken *TaikoTokenCallerSession) Symbol() (string, error) { + return _TaikoToken.Contract.Symbol(&_TaikoToken.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_TaikoToken *TaikoTokenCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _TaikoToken.contract.Call(opts, &out, "totalSupply") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_TaikoToken *TaikoTokenSession) TotalSupply() (*big.Int, error) { + return _TaikoToken.Contract.TotalSupply(&_TaikoToken.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_TaikoToken *TaikoTokenCallerSession) TotalSupply() (*big.Int, error) { + return _TaikoToken.Contract.TotalSupply(&_TaikoToken.CallOpts) +} + +// TotalSupplyAt is a free data retrieval call binding the contract method 0x981b24d0. +// +// Solidity: function totalSupplyAt(uint256 snapshotId) view returns(uint256) +func (_TaikoToken *TaikoTokenCaller) TotalSupplyAt(opts *bind.CallOpts, snapshotId *big.Int) (*big.Int, error) { + var out []interface{} + err := _TaikoToken.contract.Call(opts, &out, "totalSupplyAt", snapshotId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TotalSupplyAt is a free data retrieval call binding the contract method 0x981b24d0. +// +// Solidity: function totalSupplyAt(uint256 snapshotId) view returns(uint256) +func (_TaikoToken *TaikoTokenSession) TotalSupplyAt(snapshotId *big.Int) (*big.Int, error) { + return _TaikoToken.Contract.TotalSupplyAt(&_TaikoToken.CallOpts, snapshotId) +} + +// TotalSupplyAt is a free data retrieval call binding the contract method 0x981b24d0. +// +// Solidity: function totalSupplyAt(uint256 snapshotId) view returns(uint256) +func (_TaikoToken *TaikoTokenCallerSession) TotalSupplyAt(snapshotId *big.Int) (*big.Int, error) { + return _TaikoToken.Contract.TotalSupplyAt(&_TaikoToken.CallOpts, snapshotId) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 amount) returns(bool) +func (_TaikoToken *TaikoTokenTransactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { + return _TaikoToken.contract.Transact(opts, "approve", spender, amount) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 amount) returns(bool) +func (_TaikoToken *TaikoTokenSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { + return _TaikoToken.Contract.Approve(&_TaikoToken.TransactOpts, spender, amount) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 amount) returns(bool) +func (_TaikoToken *TaikoTokenTransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { + return _TaikoToken.Contract.Approve(&_TaikoToken.TransactOpts, spender, amount) +} + +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 amount) returns() +func (_TaikoToken *TaikoTokenTransactor) Burn(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { + return _TaikoToken.contract.Transact(opts, "burn", amount) +} + +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 amount) returns() +func (_TaikoToken *TaikoTokenSession) Burn(amount *big.Int) (*types.Transaction, error) { + return _TaikoToken.Contract.Burn(&_TaikoToken.TransactOpts, amount) +} + +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 amount) returns() +func (_TaikoToken *TaikoTokenTransactorSession) Burn(amount *big.Int) (*types.Transaction, error) { + return _TaikoToken.Contract.Burn(&_TaikoToken.TransactOpts, amount) +} + +// Burn0 is a paid mutator transaction binding the contract method 0x9dc29fac. +// +// Solidity: function burn(address from, uint256 amount) returns() +func (_TaikoToken *TaikoTokenTransactor) Burn0(opts *bind.TransactOpts, from common.Address, amount *big.Int) (*types.Transaction, error) { + return _TaikoToken.contract.Transact(opts, "burn0", from, amount) +} + +// Burn0 is a paid mutator transaction binding the contract method 0x9dc29fac. +// +// Solidity: function burn(address from, uint256 amount) returns() +func (_TaikoToken *TaikoTokenSession) Burn0(from common.Address, amount *big.Int) (*types.Transaction, error) { + return _TaikoToken.Contract.Burn0(&_TaikoToken.TransactOpts, from, amount) +} + +// Burn0 is a paid mutator transaction binding the contract method 0x9dc29fac. +// +// Solidity: function burn(address from, uint256 amount) returns() +func (_TaikoToken *TaikoTokenTransactorSession) Burn0(from common.Address, amount *big.Int) (*types.Transaction, error) { + return _TaikoToken.Contract.Burn0(&_TaikoToken.TransactOpts, from, amount) +} + +// BurnFrom is a paid mutator transaction binding the contract method 0x79cc6790. +// +// Solidity: function burnFrom(address account, uint256 amount) returns() +func (_TaikoToken *TaikoTokenTransactor) BurnFrom(opts *bind.TransactOpts, account common.Address, amount *big.Int) (*types.Transaction, error) { + return _TaikoToken.contract.Transact(opts, "burnFrom", account, amount) +} + +// BurnFrom is a paid mutator transaction binding the contract method 0x79cc6790. +// +// Solidity: function burnFrom(address account, uint256 amount) returns() +func (_TaikoToken *TaikoTokenSession) BurnFrom(account common.Address, amount *big.Int) (*types.Transaction, error) { + return _TaikoToken.Contract.BurnFrom(&_TaikoToken.TransactOpts, account, amount) +} + +// BurnFrom is a paid mutator transaction binding the contract method 0x79cc6790. +// +// Solidity: function burnFrom(address account, uint256 amount) returns() +func (_TaikoToken *TaikoTokenTransactorSession) BurnFrom(account common.Address, amount *big.Int) (*types.Transaction, error) { + return _TaikoToken.Contract.BurnFrom(&_TaikoToken.TransactOpts, account, amount) +} + +// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. +// +// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) +func (_TaikoToken *TaikoTokenTransactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { + return _TaikoToken.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) +} + +// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. +// +// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) +func (_TaikoToken *TaikoTokenSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { + return _TaikoToken.Contract.DecreaseAllowance(&_TaikoToken.TransactOpts, spender, subtractedValue) +} + +// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. +// +// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) +func (_TaikoToken *TaikoTokenTransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { + return _TaikoToken.Contract.DecreaseAllowance(&_TaikoToken.TransactOpts, spender, subtractedValue) +} + +// Delegate is a paid mutator transaction binding the contract method 0x5c19a95c. +// +// Solidity: function delegate(address delegatee) returns() +func (_TaikoToken *TaikoTokenTransactor) Delegate(opts *bind.TransactOpts, delegatee common.Address) (*types.Transaction, error) { + return _TaikoToken.contract.Transact(opts, "delegate", delegatee) +} + +// Delegate is a paid mutator transaction binding the contract method 0x5c19a95c. +// +// Solidity: function delegate(address delegatee) returns() +func (_TaikoToken *TaikoTokenSession) Delegate(delegatee common.Address) (*types.Transaction, error) { + return _TaikoToken.Contract.Delegate(&_TaikoToken.TransactOpts, delegatee) +} + +// Delegate is a paid mutator transaction binding the contract method 0x5c19a95c. +// +// Solidity: function delegate(address delegatee) returns() +func (_TaikoToken *TaikoTokenTransactorSession) Delegate(delegatee common.Address) (*types.Transaction, error) { + return _TaikoToken.Contract.Delegate(&_TaikoToken.TransactOpts, delegatee) +} + +// DelegateBySig is a paid mutator transaction binding the contract method 0xc3cda520. +// +// Solidity: function delegateBySig(address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) returns() +func (_TaikoToken *TaikoTokenTransactor) DelegateBySig(opts *bind.TransactOpts, delegatee common.Address, nonce *big.Int, expiry *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _TaikoToken.contract.Transact(opts, "delegateBySig", delegatee, nonce, expiry, v, r, s) +} + +// DelegateBySig is a paid mutator transaction binding the contract method 0xc3cda520. +// +// Solidity: function delegateBySig(address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) returns() +func (_TaikoToken *TaikoTokenSession) DelegateBySig(delegatee common.Address, nonce *big.Int, expiry *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _TaikoToken.Contract.DelegateBySig(&_TaikoToken.TransactOpts, delegatee, nonce, expiry, v, r, s) +} + +// DelegateBySig is a paid mutator transaction binding the contract method 0xc3cda520. +// +// Solidity: function delegateBySig(address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) returns() +func (_TaikoToken *TaikoTokenTransactorSession) DelegateBySig(delegatee common.Address, nonce *big.Int, expiry *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _TaikoToken.Contract.DelegateBySig(&_TaikoToken.TransactOpts, delegatee, nonce, expiry, v, r, s) +} + +// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. +// +// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) +func (_TaikoToken *TaikoTokenTransactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { + return _TaikoToken.contract.Transact(opts, "increaseAllowance", spender, addedValue) +} + +// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. +// +// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) +func (_TaikoToken *TaikoTokenSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { + return _TaikoToken.Contract.IncreaseAllowance(&_TaikoToken.TransactOpts, spender, addedValue) +} + +// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. +// +// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) +func (_TaikoToken *TaikoTokenTransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { + return _TaikoToken.Contract.IncreaseAllowance(&_TaikoToken.TransactOpts, spender, addedValue) +} + +// Init is a paid mutator transaction binding the contract method 0xc3a57123. +// +// Solidity: function init(address _addressManager, string _name, string _symbol, address[] _premintRecipients, uint256[] _premintAmounts) returns() +func (_TaikoToken *TaikoTokenTransactor) Init(opts *bind.TransactOpts, _addressManager common.Address, _name string, _symbol string, _premintRecipients []common.Address, _premintAmounts []*big.Int) (*types.Transaction, error) { + return _TaikoToken.contract.Transact(opts, "init", _addressManager, _name, _symbol, _premintRecipients, _premintAmounts) +} + +// Init is a paid mutator transaction binding the contract method 0xc3a57123. +// +// Solidity: function init(address _addressManager, string _name, string _symbol, address[] _premintRecipients, uint256[] _premintAmounts) returns() +func (_TaikoToken *TaikoTokenSession) Init(_addressManager common.Address, _name string, _symbol string, _premintRecipients []common.Address, _premintAmounts []*big.Int) (*types.Transaction, error) { + return _TaikoToken.Contract.Init(&_TaikoToken.TransactOpts, _addressManager, _name, _symbol, _premintRecipients, _premintAmounts) +} + +// Init is a paid mutator transaction binding the contract method 0xc3a57123. +// +// Solidity: function init(address _addressManager, string _name, string _symbol, address[] _premintRecipients, uint256[] _premintAmounts) returns() +func (_TaikoToken *TaikoTokenTransactorSession) Init(_addressManager common.Address, _name string, _symbol string, _premintRecipients []common.Address, _premintAmounts []*big.Int) (*types.Transaction, error) { + return _TaikoToken.Contract.Init(&_TaikoToken.TransactOpts, _addressManager, _name, _symbol, _premintRecipients, _premintAmounts) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address to, uint256 amount) returns() +func (_TaikoToken *TaikoTokenTransactor) Mint(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _TaikoToken.contract.Transact(opts, "mint", to, amount) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address to, uint256 amount) returns() +func (_TaikoToken *TaikoTokenSession) Mint(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _TaikoToken.Contract.Mint(&_TaikoToken.TransactOpts, to, amount) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address to, uint256 amount) returns() +func (_TaikoToken *TaikoTokenTransactorSession) Mint(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _TaikoToken.Contract.Mint(&_TaikoToken.TransactOpts, to, amount) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_TaikoToken *TaikoTokenTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TaikoToken.contract.Transact(opts, "pause") +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_TaikoToken *TaikoTokenSession) Pause() (*types.Transaction, error) { + return _TaikoToken.Contract.Pause(&_TaikoToken.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_TaikoToken *TaikoTokenTransactorSession) Pause() (*types.Transaction, error) { + return _TaikoToken.Contract.Pause(&_TaikoToken.TransactOpts) +} + +// Permit is a paid mutator transaction binding the contract method 0xd505accf. +// +// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() +func (_TaikoToken *TaikoTokenTransactor) Permit(opts *bind.TransactOpts, owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _TaikoToken.contract.Transact(opts, "permit", owner, spender, value, deadline, v, r, s) +} + +// Permit is a paid mutator transaction binding the contract method 0xd505accf. +// +// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() +func (_TaikoToken *TaikoTokenSession) Permit(owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _TaikoToken.Contract.Permit(&_TaikoToken.TransactOpts, owner, spender, value, deadline, v, r, s) +} + +// Permit is a paid mutator transaction binding the contract method 0xd505accf. +// +// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() +func (_TaikoToken *TaikoTokenTransactorSession) Permit(owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _TaikoToken.Contract.Permit(&_TaikoToken.TransactOpts, owner, spender, value, deadline, v, r, s) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_TaikoToken *TaikoTokenTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TaikoToken.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_TaikoToken *TaikoTokenSession) RenounceOwnership() (*types.Transaction, error) { + return _TaikoToken.Contract.RenounceOwnership(&_TaikoToken.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_TaikoToken *TaikoTokenTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _TaikoToken.Contract.RenounceOwnership(&_TaikoToken.TransactOpts) +} + +// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a. +// +// Solidity: function setAddressManager(address newAddressManager) returns() +func (_TaikoToken *TaikoTokenTransactor) SetAddressManager(opts *bind.TransactOpts, newAddressManager common.Address) (*types.Transaction, error) { + return _TaikoToken.contract.Transact(opts, "setAddressManager", newAddressManager) +} + +// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a. +// +// Solidity: function setAddressManager(address newAddressManager) returns() +func (_TaikoToken *TaikoTokenSession) SetAddressManager(newAddressManager common.Address) (*types.Transaction, error) { + return _TaikoToken.Contract.SetAddressManager(&_TaikoToken.TransactOpts, newAddressManager) +} + +// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a. +// +// Solidity: function setAddressManager(address newAddressManager) returns() +func (_TaikoToken *TaikoTokenTransactorSession) SetAddressManager(newAddressManager common.Address) (*types.Transaction, error) { + return _TaikoToken.Contract.SetAddressManager(&_TaikoToken.TransactOpts, newAddressManager) +} + +// Snapshot is a paid mutator transaction binding the contract method 0x9711715a. +// +// Solidity: function snapshot() returns() +func (_TaikoToken *TaikoTokenTransactor) Snapshot(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TaikoToken.contract.Transact(opts, "snapshot") +} + +// Snapshot is a paid mutator transaction binding the contract method 0x9711715a. +// +// Solidity: function snapshot() returns() +func (_TaikoToken *TaikoTokenSession) Snapshot() (*types.Transaction, error) { + return _TaikoToken.Contract.Snapshot(&_TaikoToken.TransactOpts) +} + +// Snapshot is a paid mutator transaction binding the contract method 0x9711715a. +// +// Solidity: function snapshot() returns() +func (_TaikoToken *TaikoTokenTransactorSession) Snapshot() (*types.Transaction, error) { + return _TaikoToken.Contract.Snapshot(&_TaikoToken.TransactOpts) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 amount) returns(bool) +func (_TaikoToken *TaikoTokenTransactor) Transfer(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _TaikoToken.contract.Transact(opts, "transfer", to, amount) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 amount) returns(bool) +func (_TaikoToken *TaikoTokenSession) Transfer(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _TaikoToken.Contract.Transfer(&_TaikoToken.TransactOpts, to, amount) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 amount) returns(bool) +func (_TaikoToken *TaikoTokenTransactorSession) Transfer(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _TaikoToken.Contract.Transfer(&_TaikoToken.TransactOpts, to, amount) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool) +func (_TaikoToken *TaikoTokenTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _TaikoToken.contract.Transact(opts, "transferFrom", from, to, amount) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool) +func (_TaikoToken *TaikoTokenSession) TransferFrom(from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _TaikoToken.Contract.TransferFrom(&_TaikoToken.TransactOpts, from, to, amount) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool) +func (_TaikoToken *TaikoTokenTransactorSession) TransferFrom(from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _TaikoToken.Contract.TransferFrom(&_TaikoToken.TransactOpts, from, to, amount) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_TaikoToken *TaikoTokenTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _TaikoToken.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_TaikoToken *TaikoTokenSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _TaikoToken.Contract.TransferOwnership(&_TaikoToken.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_TaikoToken *TaikoTokenTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _TaikoToken.Contract.TransferOwnership(&_TaikoToken.TransactOpts, newOwner) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_TaikoToken *TaikoTokenTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TaikoToken.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_TaikoToken *TaikoTokenSession) Unpause() (*types.Transaction, error) { + return _TaikoToken.Contract.Unpause(&_TaikoToken.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_TaikoToken *TaikoTokenTransactorSession) Unpause() (*types.Transaction, error) { + return _TaikoToken.Contract.Unpause(&_TaikoToken.TransactOpts) +} + +// TaikoTokenAddressManagerChangedIterator is returned from FilterAddressManagerChanged and is used to iterate over the raw logs and unpacked data for AddressManagerChanged events raised by the TaikoToken contract. +type TaikoTokenAddressManagerChangedIterator struct { + Event *TaikoTokenAddressManagerChanged // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoTokenAddressManagerChangedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoTokenAddressManagerChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoTokenAddressManagerChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoTokenAddressManagerChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoTokenAddressManagerChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoTokenAddressManagerChanged represents a AddressManagerChanged event raised by the TaikoToken contract. +type TaikoTokenAddressManagerChanged struct { + AddressManager common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAddressManagerChanged is a free log retrieval operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b. +// +// Solidity: event AddressManagerChanged(address addressManager) +func (_TaikoToken *TaikoTokenFilterer) FilterAddressManagerChanged(opts *bind.FilterOpts) (*TaikoTokenAddressManagerChangedIterator, error) { + + logs, sub, err := _TaikoToken.contract.FilterLogs(opts, "AddressManagerChanged") + if err != nil { + return nil, err + } + return &TaikoTokenAddressManagerChangedIterator{contract: _TaikoToken.contract, event: "AddressManagerChanged", logs: logs, sub: sub}, nil +} + +// WatchAddressManagerChanged is a free log subscription operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b. +// +// Solidity: event AddressManagerChanged(address addressManager) +func (_TaikoToken *TaikoTokenFilterer) WatchAddressManagerChanged(opts *bind.WatchOpts, sink chan<- *TaikoTokenAddressManagerChanged) (event.Subscription, error) { + + logs, sub, err := _TaikoToken.contract.WatchLogs(opts, "AddressManagerChanged") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoTokenAddressManagerChanged) + if err := _TaikoToken.contract.UnpackLog(event, "AddressManagerChanged", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseAddressManagerChanged is a log parse operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b. +// +// Solidity: event AddressManagerChanged(address addressManager) +func (_TaikoToken *TaikoTokenFilterer) ParseAddressManagerChanged(log types.Log) (*TaikoTokenAddressManagerChanged, error) { + event := new(TaikoTokenAddressManagerChanged) + if err := _TaikoToken.contract.UnpackLog(event, "AddressManagerChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoTokenApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the TaikoToken contract. +type TaikoTokenApprovalIterator struct { + Event *TaikoTokenApproval // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoTokenApprovalIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoTokenApproval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoTokenApproval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoTokenApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoTokenApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoTokenApproval represents a Approval event raised by the TaikoToken contract. +type TaikoTokenApproval struct { + Owner common.Address + Spender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_TaikoToken *TaikoTokenFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*TaikoTokenApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _TaikoToken.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &TaikoTokenApprovalIterator{contract: _TaikoToken.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_TaikoToken *TaikoTokenFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *TaikoTokenApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _TaikoToken.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoTokenApproval) + if err := _TaikoToken.contract.UnpackLog(event, "Approval", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_TaikoToken *TaikoTokenFilterer) ParseApproval(log types.Log) (*TaikoTokenApproval, error) { + event := new(TaikoTokenApproval) + if err := _TaikoToken.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoTokenBurnIterator is returned from FilterBurn and is used to iterate over the raw logs and unpacked data for Burn events raised by the TaikoToken contract. +type TaikoTokenBurnIterator struct { + Event *TaikoTokenBurn // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoTokenBurnIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoTokenBurn) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoTokenBurn) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoTokenBurnIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoTokenBurnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoTokenBurn represents a Burn event raised by the TaikoToken contract. +type TaikoTokenBurn struct { + Account common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBurn is a free log retrieval operation binding the contract event 0xcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5. +// +// Solidity: event Burn(address account, uint256 amount) +func (_TaikoToken *TaikoTokenFilterer) FilterBurn(opts *bind.FilterOpts) (*TaikoTokenBurnIterator, error) { + + logs, sub, err := _TaikoToken.contract.FilterLogs(opts, "Burn") + if err != nil { + return nil, err + } + return &TaikoTokenBurnIterator{contract: _TaikoToken.contract, event: "Burn", logs: logs, sub: sub}, nil +} + +// WatchBurn is a free log subscription operation binding the contract event 0xcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5. +// +// Solidity: event Burn(address account, uint256 amount) +func (_TaikoToken *TaikoTokenFilterer) WatchBurn(opts *bind.WatchOpts, sink chan<- *TaikoTokenBurn) (event.Subscription, error) { + + logs, sub, err := _TaikoToken.contract.WatchLogs(opts, "Burn") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoTokenBurn) + if err := _TaikoToken.contract.UnpackLog(event, "Burn", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseBurn is a log parse operation binding the contract event 0xcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5. +// +// Solidity: event Burn(address account, uint256 amount) +func (_TaikoToken *TaikoTokenFilterer) ParseBurn(log types.Log) (*TaikoTokenBurn, error) { + event := new(TaikoTokenBurn) + if err := _TaikoToken.contract.UnpackLog(event, "Burn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoTokenDelegateChangedIterator is returned from FilterDelegateChanged and is used to iterate over the raw logs and unpacked data for DelegateChanged events raised by the TaikoToken contract. +type TaikoTokenDelegateChangedIterator struct { + Event *TaikoTokenDelegateChanged // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoTokenDelegateChangedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoTokenDelegateChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoTokenDelegateChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoTokenDelegateChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoTokenDelegateChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoTokenDelegateChanged represents a DelegateChanged event raised by the TaikoToken contract. +type TaikoTokenDelegateChanged struct { + Delegator common.Address + FromDelegate common.Address + ToDelegate common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDelegateChanged is a free log retrieval operation binding the contract event 0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f. +// +// Solidity: event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate) +func (_TaikoToken *TaikoTokenFilterer) FilterDelegateChanged(opts *bind.FilterOpts, delegator []common.Address, fromDelegate []common.Address, toDelegate []common.Address) (*TaikoTokenDelegateChangedIterator, error) { + + var delegatorRule []interface{} + for _, delegatorItem := range delegator { + delegatorRule = append(delegatorRule, delegatorItem) + } + var fromDelegateRule []interface{} + for _, fromDelegateItem := range fromDelegate { + fromDelegateRule = append(fromDelegateRule, fromDelegateItem) + } + var toDelegateRule []interface{} + for _, toDelegateItem := range toDelegate { + toDelegateRule = append(toDelegateRule, toDelegateItem) + } + + logs, sub, err := _TaikoToken.contract.FilterLogs(opts, "DelegateChanged", delegatorRule, fromDelegateRule, toDelegateRule) + if err != nil { + return nil, err + } + return &TaikoTokenDelegateChangedIterator{contract: _TaikoToken.contract, event: "DelegateChanged", logs: logs, sub: sub}, nil +} + +// WatchDelegateChanged is a free log subscription operation binding the contract event 0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f. +// +// Solidity: event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate) +func (_TaikoToken *TaikoTokenFilterer) WatchDelegateChanged(opts *bind.WatchOpts, sink chan<- *TaikoTokenDelegateChanged, delegator []common.Address, fromDelegate []common.Address, toDelegate []common.Address) (event.Subscription, error) { + + var delegatorRule []interface{} + for _, delegatorItem := range delegator { + delegatorRule = append(delegatorRule, delegatorItem) + } + var fromDelegateRule []interface{} + for _, fromDelegateItem := range fromDelegate { + fromDelegateRule = append(fromDelegateRule, fromDelegateItem) + } + var toDelegateRule []interface{} + for _, toDelegateItem := range toDelegate { + toDelegateRule = append(toDelegateRule, toDelegateItem) + } + + logs, sub, err := _TaikoToken.contract.WatchLogs(opts, "DelegateChanged", delegatorRule, fromDelegateRule, toDelegateRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoTokenDelegateChanged) + if err := _TaikoToken.contract.UnpackLog(event, "DelegateChanged", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseDelegateChanged is a log parse operation binding the contract event 0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f. +// +// Solidity: event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate) +func (_TaikoToken *TaikoTokenFilterer) ParseDelegateChanged(log types.Log) (*TaikoTokenDelegateChanged, error) { + event := new(TaikoTokenDelegateChanged) + if err := _TaikoToken.contract.UnpackLog(event, "DelegateChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoTokenDelegateVotesChangedIterator is returned from FilterDelegateVotesChanged and is used to iterate over the raw logs and unpacked data for DelegateVotesChanged events raised by the TaikoToken contract. +type TaikoTokenDelegateVotesChangedIterator struct { + Event *TaikoTokenDelegateVotesChanged // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoTokenDelegateVotesChangedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoTokenDelegateVotesChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoTokenDelegateVotesChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoTokenDelegateVotesChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoTokenDelegateVotesChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoTokenDelegateVotesChanged represents a DelegateVotesChanged event raised by the TaikoToken contract. +type TaikoTokenDelegateVotesChanged struct { + Delegate common.Address + PreviousBalance *big.Int + NewBalance *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDelegateVotesChanged is a free log retrieval operation binding the contract event 0xdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724. +// +// Solidity: event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance) +func (_TaikoToken *TaikoTokenFilterer) FilterDelegateVotesChanged(opts *bind.FilterOpts, delegate []common.Address) (*TaikoTokenDelegateVotesChangedIterator, error) { + + var delegateRule []interface{} + for _, delegateItem := range delegate { + delegateRule = append(delegateRule, delegateItem) + } + + logs, sub, err := _TaikoToken.contract.FilterLogs(opts, "DelegateVotesChanged", delegateRule) + if err != nil { + return nil, err + } + return &TaikoTokenDelegateVotesChangedIterator{contract: _TaikoToken.contract, event: "DelegateVotesChanged", logs: logs, sub: sub}, nil +} + +// WatchDelegateVotesChanged is a free log subscription operation binding the contract event 0xdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724. +// +// Solidity: event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance) +func (_TaikoToken *TaikoTokenFilterer) WatchDelegateVotesChanged(opts *bind.WatchOpts, sink chan<- *TaikoTokenDelegateVotesChanged, delegate []common.Address) (event.Subscription, error) { + + var delegateRule []interface{} + for _, delegateItem := range delegate { + delegateRule = append(delegateRule, delegateItem) + } + + logs, sub, err := _TaikoToken.contract.WatchLogs(opts, "DelegateVotesChanged", delegateRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoTokenDelegateVotesChanged) + if err := _TaikoToken.contract.UnpackLog(event, "DelegateVotesChanged", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseDelegateVotesChanged is a log parse operation binding the contract event 0xdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724. +// +// Solidity: event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance) +func (_TaikoToken *TaikoTokenFilterer) ParseDelegateVotesChanged(log types.Log) (*TaikoTokenDelegateVotesChanged, error) { + event := new(TaikoTokenDelegateVotesChanged) + if err := _TaikoToken.contract.UnpackLog(event, "DelegateVotesChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoTokenInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the TaikoToken contract. +type TaikoTokenInitializedIterator struct { + Event *TaikoTokenInitialized // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoTokenInitializedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoTokenInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoTokenInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoTokenInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoTokenInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoTokenInitialized represents a Initialized event raised by the TaikoToken contract. +type TaikoTokenInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_TaikoToken *TaikoTokenFilterer) FilterInitialized(opts *bind.FilterOpts) (*TaikoTokenInitializedIterator, error) { + + logs, sub, err := _TaikoToken.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &TaikoTokenInitializedIterator{contract: _TaikoToken.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_TaikoToken *TaikoTokenFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *TaikoTokenInitialized) (event.Subscription, error) { + + logs, sub, err := _TaikoToken.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoTokenInitialized) + if err := _TaikoToken.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_TaikoToken *TaikoTokenFilterer) ParseInitialized(log types.Log) (*TaikoTokenInitialized, error) { + event := new(TaikoTokenInitialized) + if err := _TaikoToken.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoTokenMintIterator is returned from FilterMint and is used to iterate over the raw logs and unpacked data for Mint events raised by the TaikoToken contract. +type TaikoTokenMintIterator struct { + Event *TaikoTokenMint // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoTokenMintIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoTokenMint) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoTokenMint) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoTokenMintIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoTokenMintIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoTokenMint represents a Mint event raised by the TaikoToken contract. +type TaikoTokenMint struct { + Account common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMint is a free log retrieval operation binding the contract event 0x0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885. +// +// Solidity: event Mint(address account, uint256 amount) +func (_TaikoToken *TaikoTokenFilterer) FilterMint(opts *bind.FilterOpts) (*TaikoTokenMintIterator, error) { + + logs, sub, err := _TaikoToken.contract.FilterLogs(opts, "Mint") + if err != nil { + return nil, err + } + return &TaikoTokenMintIterator{contract: _TaikoToken.contract, event: "Mint", logs: logs, sub: sub}, nil +} + +// WatchMint is a free log subscription operation binding the contract event 0x0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885. +// +// Solidity: event Mint(address account, uint256 amount) +func (_TaikoToken *TaikoTokenFilterer) WatchMint(opts *bind.WatchOpts, sink chan<- *TaikoTokenMint) (event.Subscription, error) { + + logs, sub, err := _TaikoToken.contract.WatchLogs(opts, "Mint") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoTokenMint) + if err := _TaikoToken.contract.UnpackLog(event, "Mint", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseMint is a log parse operation binding the contract event 0x0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885. +// +// Solidity: event Mint(address account, uint256 amount) +func (_TaikoToken *TaikoTokenFilterer) ParseMint(log types.Log) (*TaikoTokenMint, error) { + event := new(TaikoTokenMint) + if err := _TaikoToken.contract.UnpackLog(event, "Mint", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoTokenOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the TaikoToken contract. +type TaikoTokenOwnershipTransferredIterator struct { + Event *TaikoTokenOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoTokenOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoTokenOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoTokenOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoTokenOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoTokenOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoTokenOwnershipTransferred represents a OwnershipTransferred event raised by the TaikoToken contract. +type TaikoTokenOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_TaikoToken *TaikoTokenFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*TaikoTokenOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _TaikoToken.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &TaikoTokenOwnershipTransferredIterator{contract: _TaikoToken.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_TaikoToken *TaikoTokenFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *TaikoTokenOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _TaikoToken.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoTokenOwnershipTransferred) + if err := _TaikoToken.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_TaikoToken *TaikoTokenFilterer) ParseOwnershipTransferred(log types.Log) (*TaikoTokenOwnershipTransferred, error) { + event := new(TaikoTokenOwnershipTransferred) + if err := _TaikoToken.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoTokenPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the TaikoToken contract. +type TaikoTokenPausedIterator struct { + Event *TaikoTokenPaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoTokenPausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoTokenPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoTokenPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoTokenPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoTokenPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoTokenPaused represents a Paused event raised by the TaikoToken contract. +type TaikoTokenPaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_TaikoToken *TaikoTokenFilterer) FilterPaused(opts *bind.FilterOpts) (*TaikoTokenPausedIterator, error) { + + logs, sub, err := _TaikoToken.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &TaikoTokenPausedIterator{contract: _TaikoToken.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_TaikoToken *TaikoTokenFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *TaikoTokenPaused) (event.Subscription, error) { + + logs, sub, err := _TaikoToken.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoTokenPaused) + if err := _TaikoToken.contract.UnpackLog(event, "Paused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_TaikoToken *TaikoTokenFilterer) ParsePaused(log types.Log) (*TaikoTokenPaused, error) { + event := new(TaikoTokenPaused) + if err := _TaikoToken.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoTokenSnapshotIterator is returned from FilterSnapshot and is used to iterate over the raw logs and unpacked data for Snapshot events raised by the TaikoToken contract. +type TaikoTokenSnapshotIterator struct { + Event *TaikoTokenSnapshot // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoTokenSnapshotIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoTokenSnapshot) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoTokenSnapshot) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoTokenSnapshotIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoTokenSnapshotIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoTokenSnapshot represents a Snapshot event raised by the TaikoToken contract. +type TaikoTokenSnapshot struct { + Id *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSnapshot is a free log retrieval operation binding the contract event 0x8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67. +// +// Solidity: event Snapshot(uint256 id) +func (_TaikoToken *TaikoTokenFilterer) FilterSnapshot(opts *bind.FilterOpts) (*TaikoTokenSnapshotIterator, error) { + + logs, sub, err := _TaikoToken.contract.FilterLogs(opts, "Snapshot") + if err != nil { + return nil, err + } + return &TaikoTokenSnapshotIterator{contract: _TaikoToken.contract, event: "Snapshot", logs: logs, sub: sub}, nil +} + +// WatchSnapshot is a free log subscription operation binding the contract event 0x8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67. +// +// Solidity: event Snapshot(uint256 id) +func (_TaikoToken *TaikoTokenFilterer) WatchSnapshot(opts *bind.WatchOpts, sink chan<- *TaikoTokenSnapshot) (event.Subscription, error) { + + logs, sub, err := _TaikoToken.contract.WatchLogs(opts, "Snapshot") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoTokenSnapshot) + if err := _TaikoToken.contract.UnpackLog(event, "Snapshot", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSnapshot is a log parse operation binding the contract event 0x8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67. +// +// Solidity: event Snapshot(uint256 id) +func (_TaikoToken *TaikoTokenFilterer) ParseSnapshot(log types.Log) (*TaikoTokenSnapshot, error) { + event := new(TaikoTokenSnapshot) + if err := _TaikoToken.contract.UnpackLog(event, "Snapshot", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoTokenTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the TaikoToken contract. +type TaikoTokenTransferIterator struct { + Event *TaikoTokenTransfer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoTokenTransferIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoTokenTransfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoTokenTransfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoTokenTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoTokenTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoTokenTransfer represents a Transfer event raised by the TaikoToken contract. +type TaikoTokenTransfer struct { + From common.Address + To common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_TaikoToken *TaikoTokenFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*TaikoTokenTransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _TaikoToken.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &TaikoTokenTransferIterator{contract: _TaikoToken.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_TaikoToken *TaikoTokenFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *TaikoTokenTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _TaikoToken.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoTokenTransfer) + if err := _TaikoToken.contract.UnpackLog(event, "Transfer", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_TaikoToken *TaikoTokenFilterer) ParseTransfer(log types.Log) (*TaikoTokenTransfer, error) { + event := new(TaikoTokenTransfer) + if err := _TaikoToken.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoTokenUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the TaikoToken contract. +type TaikoTokenUnpausedIterator struct { + Event *TaikoTokenUnpaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoTokenUnpausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoTokenUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoTokenUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoTokenUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoTokenUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoTokenUnpaused represents a Unpaused event raised by the TaikoToken contract. +type TaikoTokenUnpaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_TaikoToken *TaikoTokenFilterer) FilterUnpaused(opts *bind.FilterOpts) (*TaikoTokenUnpausedIterator, error) { + + logs, sub, err := _TaikoToken.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &TaikoTokenUnpausedIterator{contract: _TaikoToken.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_TaikoToken *TaikoTokenFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *TaikoTokenUnpaused) (event.Subscription, error) { + + logs, sub, err := _TaikoToken.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoTokenUnpaused) + if err := _TaikoToken.contract.UnpackLog(event, "Unpaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_TaikoToken *TaikoTokenFilterer) ParseUnpaused(log types.Log) (*TaikoTokenUnpaused, error) { + event := new(TaikoTokenUnpaused) + if err := _TaikoToken.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/cmd/flags/proposer.go b/cmd/flags/proposer.go index 9b2dac781..5373cc4e9 100644 --- a/cmd/flags/proposer.go +++ b/cmd/flags/proposer.go @@ -20,6 +20,12 @@ var ( Required: true, Category: proposerCategory, } + L1TaikoTokenAddress = &cli.StringFlag{ + Name: "l1.taikoTokenAddress", + Usage: "Address of the taiko token L1 contract", + Required: true, + Category: proposerCategory, + } ) // Optional flags used by proposer. diff --git a/driver/chain_syncer/calldata/syncer_test.go b/driver/chain_syncer/calldata/syncer_test.go index 780f0082e..67e6d79f0 100644 --- a/driver/chain_syncer/calldata/syncer_test.go +++ b/driver/chain_syncer/calldata/syncer_test.go @@ -50,6 +50,7 @@ func (s *CalldataSyncerTestSuite) SetupTest() { L2Endpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"), TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")), TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")), + TaikoTokenL1Address: common.HexToAddress(os.Getenv("TAIKO_TOKEN_L1_ADDRESS")), L1ProposerPrivKey: l1ProposerPrivKey, L2SuggestedFeeRecipient: common.HexToAddress(os.Getenv("L2_SUGGESTED_FEE_RECIPIENT")), ProposeInterval: &proposeInterval, diff --git a/driver/driver_test.go b/driver/driver_test.go index ad5c53852..2b0eaf290 100644 --- a/driver/driver_test.go +++ b/driver/driver_test.go @@ -56,6 +56,7 @@ func (s *DriverTestSuite) SetupTest() { L2Endpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"), TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")), TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")), + TaikoTokenL1Address: common.HexToAddress(os.Getenv("TAIKO_TOKEN_L1_ADDRESS")), L1ProposerPrivKey: l1ProposerPrivKey, L2SuggestedFeeRecipient: common.HexToAddress(os.Getenv("L2_SUGGESTED_FEE_RECIPIENT")), ProposeInterval: &proposeInterval, // No need to periodically propose transactions list in unit tests diff --git a/integration_test/entrypoint.sh b/integration_test/entrypoint.sh index 6a7279886..65c02abc0 100755 --- a/integration_test/entrypoint.sh +++ b/integration_test/entrypoint.sh @@ -27,7 +27,8 @@ $DIR/nodes/init.sh DEPLOYMENT_JSON=$(cat $TAIKO_MONO_DIR/packages/protocol/deployments/deploy_l1.json) TAIKO_L1_CONTRACT_ADDRESS=$(echo $DEPLOYMENT_JSON | jq '.taiko' | sed 's/\"//g') -TAIKO_PROVER_POOL_L1_CONTRACT_ADDRESS=$(echo $DEPLOYMENT_JSON | jq '.taiko_prover_pool' | sed 's/\"//g') +TAIKO_PROVER_POOL_L1_CONTRACT_ADDRESS=$(echo $DEPLOYMENT_JSON | jq '.prover_pool' | sed 's/\"//g') +TAIKO_TOKEN_L1_CONTRACT_ADDRESS=$(echo $DEPLOYMENT_JSON | jq '.taiko_token' | sed 's/\"//g') L1_SIGNAL_SERVICE_CONTRACT_ADDRESS=$(echo $DEPLOYMENT_JSON | jq '.signal_service' | sed 's/\"//g') trap "docker compose -f $TESTNET_CONFIG down -v" EXIT INT KILL ERR @@ -46,6 +47,7 @@ if [ "$RUN_TESTS" == "true" ]; then L2_EXECUTION_ENGINE_AUTH_ENDPOINT=http://localhost:28551 \ TAIKO_L1_ADDRESS=$TAIKO_L1_CONTRACT_ADDRESS \ TAIKO_PROVER_POOL_L1_ADDRESS=$TAIKO_PROVER_POOL_L1_CONTRACT_ADDRESS \ + TAIKO_TOKEN_L1_ADDRESS=$TAIKO_TOKEN_L1_CONTRACT_ADDRESS \ TAIKO_L2_ADDRESS=0x1000777700000000000000000000000000000001 \ L1_SIGNAL_SERVICE_CONTRACT_ADDRESS=$L1_SIGNAL_SERVICE_CONTRACT_ADDRESS \ L1_CONTRACT_OWNER_PRIVATE_KEY=ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 \ diff --git a/pkg/rpc/client.go b/pkg/rpc/client.go index 0d481cd64..4697443da 100644 --- a/pkg/rpc/client.go +++ b/pkg/rpc/client.go @@ -30,6 +30,7 @@ type Client struct { TaikoL1 *bindings.TaikoL1Client TaikoL2 *bindings.TaikoL2Client TaikoProverPoolL1 *bindings.TaikoL1ProverPool + TaikoTokenL1 *bindings.TaikoToken // Chain IDs L1ChainID *big.Int L2ChainID *big.Int @@ -45,6 +46,7 @@ type ClientConfig struct { TaikoL1Address common.Address TaikoProverPoolL1Address common.Address TaikoL2Address common.Address + TaikoTokenL1Address common.Address L2EngineEndpoint string JwtSecret string RetryInterval time.Duration @@ -62,9 +64,20 @@ func NewClient(ctx context.Context, cfg *ClientConfig) (*Client, error) { return nil, err } - taikoProverPoolL1, err := bindings.NewTaikoL1ProverPool(cfg.TaikoProverPoolL1Address, l1RPC) - if err != nil { - return nil, err + var taikoProverPoolL1 *bindings.TaikoL1ProverPool + if cfg.TaikoProverPoolL1Address.Hex() != "" { + taikoProverPoolL1, err = bindings.NewTaikoL1ProverPool(cfg.TaikoProverPoolL1Address, l1RPC) + if err != nil { + return nil, err + } + } + + var taikoTokenL1 *bindings.TaikoToken + if cfg.TaikoTokenL1Address.Hex() != "" { + taikoTokenL1, err = bindings.NewTaikoToken(cfg.TaikoTokenL1Address, l1RPC) + if err != nil { + return nil, err + } } l2RPC, err := DialClientWithBackoff(ctx, cfg.L2Endpoint, cfg.RetryInterval) @@ -130,6 +143,7 @@ func NewClient(ctx context.Context, cfg *ClientConfig) (*Client, error) { TaikoL1: taikoL1, TaikoL2: taikoL2, TaikoProverPoolL1: taikoProverPoolL1, + TaikoTokenL1: taikoTokenL1, L1ChainID: l1ChainID, L2ChainID: l2ChainID, } diff --git a/pkg/rpc/client_test.go b/pkg/rpc/client_test.go index 7fc0b9971..774a40aa3 100644 --- a/pkg/rpc/client_test.go +++ b/pkg/rpc/client_test.go @@ -17,6 +17,7 @@ func newTestClient(t *testing.T) *Client { TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")), TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")), TaikoProverPoolL1Address: common.HexToAddress(os.Getenv("TAIKO_PROVER_POOL_L1_ADDRESS")), + TaikoTokenL1Address: common.HexToAddress(os.Getenv("TAIKO_TOKEN_L1_ADDRESS")), L2EngineEndpoint: os.Getenv("L2_EXECUTION_ENGINE_AUTH_ENDPOINT"), JwtSecret: os.Getenv("JWT_SECRET"), RetryInterval: backoff.DefaultMaxInterval, diff --git a/proposer/config.go b/proposer/config.go index 91502d2a3..4f81cac7d 100644 --- a/proposer/config.go +++ b/proposer/config.go @@ -18,6 +18,7 @@ type Config struct { L2Endpoint string TaikoL1Address common.Address TaikoL2Address common.Address + TaikoTokenL1Address common.Address L1ProposerPrivKey *ecdsa.PrivateKey L2SuggestedFeeRecipient common.Address ProposeInterval *time.Duration @@ -85,6 +86,7 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) { L2Endpoint: c.String(flags.L2HTTPEndpoint.Name), TaikoL1Address: common.HexToAddress(c.String(flags.TaikoL1Address.Name)), TaikoL2Address: common.HexToAddress(c.String(flags.TaikoL2Address.Name)), + TaikoTokenL1Address: common.HexToAddress(c.String(flags.L1TaikoTokenAddress.Name)), L1ProposerPrivKey: l1ProposerPrivKey, L2SuggestedFeeRecipient: common.HexToAddress(l2SuggestedFeeRecipient), ProposeInterval: proposingInterval, diff --git a/proposer/config_test.go b/proposer/config_test.go index 6615b2e2b..b20d36661 100644 --- a/proposer/config_test.go +++ b/proposer/config_test.go @@ -16,6 +16,7 @@ func (s *ProposerTestSuite) TestNewConfigFromCliContext() { l2Endpoint := os.Getenv("L2_EXECUTION_ENGINE_HTTP_ENDPOINT") taikoL1 := os.Getenv("TAIKO_L1_ADDRESS") taikoL2 := os.Getenv("TAIKO_L2_ADDRESS") + taikoTokenL1 := os.Getenv("TAIKO_TOKEN_L1_ADDRESS") proposeInterval := "10s" commitSlot := 1024 @@ -31,6 +32,7 @@ func (s *ProposerTestSuite) TestNewConfigFromCliContext() { &cli.StringFlag{Name: flags.L2HTTPEndpoint.Name}, &cli.StringFlag{Name: flags.TaikoL1Address.Name}, &cli.StringFlag{Name: flags.TaikoL2Address.Name}, + &cli.StringFlag{Name: flags.L1TaikoTokenAddress.Name}, &cli.StringFlag{Name: flags.L1ProposerPrivKey.Name}, &cli.StringFlag{Name: flags.L2SuggestedFeeRecipient.Name}, &cli.StringFlag{Name: flags.ProposeInterval.Name}, @@ -44,6 +46,7 @@ func (s *ProposerTestSuite) TestNewConfigFromCliContext() { s.Equal(l2Endpoint, c.L2Endpoint) s.Equal(taikoL1, c.TaikoL1Address.String()) s.Equal(taikoL2, c.TaikoL2Address.String()) + s.Equal(taikoTokenL1, c.TaikoTokenL1Address.String()) s.Equal(goldenTouchAddress, crypto.PubkeyToAddress(c.L1ProposerPrivKey.PublicKey)) s.Equal(goldenTouchAddress, c.L2SuggestedFeeRecipient) s.Equal(float64(10), c.ProposeInterval.Seconds()) @@ -61,6 +64,7 @@ func (s *ProposerTestSuite) TestNewConfigFromCliContext() { "-" + flags.L2HTTPEndpoint.Name, l2Endpoint, "-" + flags.TaikoL1Address.Name, taikoL1, "-" + flags.TaikoL2Address.Name, taikoL2, + "-" + flags.L1TaikoTokenAddress.Name, taikoTokenL1, "-" + flags.L1ProposerPrivKey.Name, common.Bytes2Hex(goldenTouchPrivKey.Bytes()), "-" + flags.L2SuggestedFeeRecipient.Name, goldenTouchAddress.Hex(), "-" + flags.ProposeInterval.Name, proposeInterval, diff --git a/proposer/proposer.go b/proposer/proposer.go index b847526d6..050e0863d 100644 --- a/proposer/proposer.go +++ b/proposer/proposer.go @@ -41,6 +41,9 @@ type Proposer struct { l1ProposerAddress common.Address l2SuggestedFeeRecipient common.Address + // Contract addresses + taikoL1Address common.Address + // Proposing configurations proposingInterval *time.Duration proposeEmptyBlocksInterval *time.Duration @@ -77,6 +80,7 @@ func InitFromConfig(ctx context.Context, p *Proposer, cfg *Config) (err error) { p.l1ProposerPrivKey = cfg.L1ProposerPrivKey p.l1ProposerAddress = crypto.PubkeyToAddress(cfg.L1ProposerPrivKey.PublicKey) p.l2SuggestedFeeRecipient = cfg.L2SuggestedFeeRecipient + p.taikoL1Address = cfg.TaikoL1Address p.proposingInterval = cfg.ProposeInterval p.proposeEmptyBlocksInterval = cfg.ProposeEmptyBlocksInterval p.proposeBlockTxGasLimit = cfg.ProposeBlockTxGasLimit @@ -88,11 +92,12 @@ func InitFromConfig(ctx context.Context, p *Proposer, cfg *Config) (err error) { // RPC clients if p.rpc, err = rpc.NewClient(p.ctx, &rpc.ClientConfig{ - L1Endpoint: cfg.L1Endpoint, - L2Endpoint: cfg.L2Endpoint, - TaikoL1Address: cfg.TaikoL1Address, - TaikoL2Address: cfg.TaikoL2Address, - RetryInterval: cfg.BackOffRetryInterval, + L1Endpoint: cfg.L1Endpoint, + L2Endpoint: cfg.L2Endpoint, + TaikoL1Address: cfg.TaikoL1Address, + TaikoL2Address: cfg.TaikoL2Address, + TaikoTokenL1Address: cfg.TaikoTokenL1Address, + RetryInterval: cfg.BackOffRetryInterval, }); err != nil { return fmt.Errorf("initialize rpc clients error: %w", err) } @@ -395,6 +400,8 @@ func getTxOpts( return opts, nil } +// checkTaikoTokenBalance ensures you have at least the block fee in your balance, and approved, before +// attempting to propose block, as it will use transferFrom. func (p *Proposer) checkTaikoTokenBalance() error { fee, err := p.rpc.TaikoL1.GetBlockFee(nil, uint32(p.protocolConfigs.BlockMaxGasLimit)) if err != nil { @@ -409,7 +416,7 @@ func (p *Proposer) checkTaikoTokenBalance() error { metrics.ProposerBlockFeeGauge.Update(int64(fee)) } - balance, err := p.rpc.TaikoL1.GetTaikoTokenBalance(nil, p.l1ProposerAddress) + balance, err := p.rpc.TaikoTokenL1.BalanceOf(nil, p.l1ProposerAddress) if err != nil { return fmt.Errorf("failed to get tko balance: %w", err) } @@ -418,5 +425,18 @@ func (p *Proposer) checkTaikoTokenBalance() error { return fmt.Errorf("proposer does not have enough tko balance to propose, balance: %d, fee: %d", balance, fee) } + allowance, err := p.rpc.TaikoTokenL1.Allowance(nil, p.l1ProposerAddress, p.taikoL1Address) + if err != nil { + return fmt.Errorf("failed to get allowance: %w", err) + } + + if allowance.Cmp(new(big.Int).SetUint64(fee)) == -1 { + return fmt.Errorf( + "proposer has not given allowance to taikoL1address required for block fee, requiredAllowance: %v, currentAllowance: %v", + fee, + allowance.String(), + ) + } + return nil } diff --git a/proposer/proposer_test.go b/proposer/proposer_test.go index 38b1574fc..ea2b2213d 100644 --- a/proposer/proposer_test.go +++ b/proposer/proposer_test.go @@ -36,6 +36,7 @@ func (s *ProposerTestSuite) SetupTest() { L2Endpoint: os.Getenv("L2_EXECUTION_ENGINE_HTTP_ENDPOINT"), TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")), TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")), + TaikoTokenL1Address: common.HexToAddress(os.Getenv("TAIKO_TOKEN_L1_ADDRESS")), L1ProposerPrivKey: l1ProposerPrivKey, L2SuggestedFeeRecipient: common.HexToAddress(os.Getenv("L2_SUGGESTED_FEE_RECIPIENT")), ProposeInterval: &proposeInterval, diff --git a/prover/prover_test.go b/prover/prover_test.go index 9bf322990..690d641da 100644 --- a/prover/prover_test.go +++ b/prover/prover_test.go @@ -79,6 +79,7 @@ func (s *ProverTestSuite) SetupTest() { L2Endpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"), TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")), TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")), + TaikoTokenL1Address: common.HexToAddress(os.Getenv("TAIKO_TOKEN_L1_ADDRESS")), L1ProposerPrivKey: l1ProposerPrivKey, L2SuggestedFeeRecipient: common.HexToAddress(os.Getenv("L2_SUGGESTED_FEE_RECIPIENT")), ProposeInterval: &proposeInterval, // No need to periodically propose transactions list in unit tests diff --git a/scripts/gen_bindings.sh b/scripts/gen_bindings.sh index 01e43f8bb..2df3f57cd 100755 --- a/scripts/gen_bindings.sh +++ b/scripts/gen_bindings.sh @@ -35,10 +35,14 @@ cat ${TAIKO_MONO_DIR}/packages/protocol/out/TaikoL2.sol/TaikoL2.json | jq .abi | ${ABIGEN_BIN} --abi - --type TaikoL2Client --pkg bindings --out $DIR/../bindings/gen_taiko_l2.go -cat ${TAIKO_MONO_DIR}/packages/protocol/out/TaikoProverPool.sol/TaikoProverPool.json | +cat ${TAIKO_MONO_DIR}/packages/protocol/out/StakingProverPool.sol/StakingProverPool.json | jq .abi | ${ABIGEN_BIN} --abi - --type TaikoL1ProverPool --pkg bindings --out $DIR/../bindings/gen_taiko_prover_pool_l1.go +cat ${TAIKO_MONO_DIR}/packages/protocol/out/TaikoToken.sol/TaikoToken.json | + jq .abi | + ${ABIGEN_BIN} --abi - --type TaikoToken --pkg bindings --out $DIR/../bindings/gen_taiko_token_l1.go + git -C ${TAIKO_MONO_DIR} log --format="%H" -n 1 >./bindings/.githead echo "🍻 Go contract bindings generated!" diff --git a/testutils/helper.go b/testutils/helper.go index 42d7ba6c4..1eeb17b31 100644 --- a/testutils/helper.go +++ b/testutils/helper.go @@ -166,16 +166,16 @@ func ProposeAndInsertValidBlock( return event } -func DepositEtherToL2(s *ClientTestSuite, depositerPrivKey *ecdsa.PrivateKey) { +func DepositEtherToL2(s *ClientTestSuite, depositerPrivKey *ecdsa.PrivateKey, recipient common.Address) { config, err := s.RpcClient.TaikoL1.GetConfig(nil) s.Nil(err) opts, err := bind.NewKeyedTransactorWithChainID(depositerPrivKey, s.RpcClient.L1ChainID) s.Nil(err) - opts.Value = config.MinEthDepositAmount + opts.Value = config.EthDepositMinAmount - for i := 0; i < int(config.MinEthDepositsPerBlock); i++ { - _, err = s.RpcClient.TaikoL1.DepositEtherToL2(opts) + for i := 0; i < int(config.EthDepositMinCountPerBlock); i++ { + _, err = s.RpcClient.TaikoL1.DepositEtherToL2(opts, recipient) s.Nil(err) } } diff --git a/testutils/suite.go b/testutils/suite.go index c142f93ab..f6eab6564 100644 --- a/testutils/suite.go +++ b/testutils/suite.go @@ -4,12 +4,12 @@ import ( "context" "crypto/ecdsa" "math" + "math/big" "os" "github.com/cenkalti/backoff/v4" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" "github.com/stretchr/testify/suite" @@ -53,35 +53,63 @@ func (s *ClientTestSuite) SetupTest() { s.Nil(err) s.NotEmpty(jwtSecret) + taikoL1Address := common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")) + rpcCli, err := rpc.NewClient(context.Background(), &rpc.ClientConfig{ - L1Endpoint: os.Getenv("L1_NODE_WS_ENDPOINT"), - L2Endpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"), - TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")), - TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")), - L2EngineEndpoint: os.Getenv("L2_EXECUTION_ENGINE_AUTH_ENDPOINT"), - JwtSecret: string(jwtSecret), - RetryInterval: backoff.DefaultMaxInterval, + L1Endpoint: os.Getenv("L1_NODE_WS_ENDPOINT"), + L2Endpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"), + TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")), + TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")), + TaikoTokenL1Address: common.HexToAddress(os.Getenv("TAIKO_TOKEN_L1_ADDRESS")), + TaikoProverPoolL1Address: common.HexToAddress(os.Getenv("TAIKO_PROVER_POOL_L1_ADDRESS")), + L2EngineEndpoint: os.Getenv("L2_EXECUTION_ENGINE_AUTH_ENDPOINT"), + JwtSecret: string(jwtSecret), + RetryInterval: backoff.DefaultMaxInterval, }) s.Nil(err) s.RpcClient = rpcCli + // set allowance l1ProposerPrivKey, err := crypto.ToECDSA(common.Hex2Bytes(os.Getenv("L1_PROPOSER_PRIVATE_KEY"))) s.Nil(err) - opts, err := bind.NewKeyedTransactorWithChainID(l1ProposerPrivKey, rpcCli.L1ChainID) + proposerOpts, err := bind.NewKeyedTransactorWithChainID(l1ProposerPrivKey, rpcCli.L1ChainID) s.Nil(err) - balance, err := rpcCli.TaikoL1.GetTaikoTokenBalance(nil, crypto.PubkeyToAddress(l1ProposerPrivKey.PublicKey)) + _, err = s.RpcClient.TaikoTokenL1.Approve(proposerOpts, taikoL1Address, new(big.Int).SetUint64(uint64(math.Pow(2, 32)))) s.Nil(err) - if balance.Cmp(common.Big0) == 0 { - tx, err := rpcCli.TaikoL1.DepositTaikoToken(opts, uint64(math.Pow(2, 32))) - s.Nil(err) + // register prover as a staker/eligible prover + + l1ProverPrivKey, err := crypto.ToECDSA(common.Hex2Bytes(os.Getenv("L1_PROVER_PRIVATE_KEY"))) + s.Nil(err) + + proverOpts, err := bind.NewKeyedTransactorWithChainID(l1ProverPrivKey, rpcCli.L1ChainID) + s.Nil(err) + + minTkoAmount, err := s.RpcClient.TaikoProverPoolL1.MINTKOAMOUNT(nil) + s.Nil(err) - receipt, err := rpc.WaitReceipt(context.Background(), rpcCli.L1, tx) + amt := new(big.Int).Add(minTkoAmount, big.NewInt(1)) + + // proposer has tKO, need to transfer to prover + _, err = s.RpcClient.TaikoTokenL1.Transfer(proposerOpts, crypto.PubkeyToAddress(l1ProverPrivKey.PublicKey), amt) + s.Nil(err) + + prover, err := s.RpcClient.TaikoProverPoolL1.Provers(nil, crypto.PubkeyToAddress(l1ProverPrivKey.PublicKey)) + s.Nil(err) + + if prover.ProverAddress != crypto.PubkeyToAddress(l1ProverPrivKey.PublicKey) { + minFeeMultiplier, err := s.RpcClient.TaikoProverPoolL1.MINMULTIPLIER(nil) + s.Nil(err) + _, err = s.RpcClient.TaikoProverPoolL1.EnterProverPool( + proverOpts, + amt, + new(big.Int).SetUint64(uint64(minFeeMultiplier)), + 32, + ) s.Nil(err) - s.Equal(types.ReceiptStatusSuccessful, receipt.Status) } s.Nil(rpcCli.L1RawRPC.CallContext(context.Background(), &s.testnetL1SnapshotID, "evm_snapshot")) From 6096a5f4d0f5f1062b486336a1c0022ae4f43559 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Mon, 19 Jun 2023 00:01:47 -0700 Subject: [PATCH 06/37] lint --- proposer/proposer.go | 2 +- testutils/suite.go | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/proposer/proposer.go b/proposer/proposer.go index 050e0863d..eef35098c 100644 --- a/proposer/proposer.go +++ b/proposer/proposer.go @@ -432,7 +432,7 @@ func (p *Proposer) checkTaikoTokenBalance() error { if allowance.Cmp(new(big.Int).SetUint64(fee)) == -1 { return fmt.Errorf( - "proposer has not given allowance to taikoL1address required for block fee, requiredAllowance: %v, currentAllowance: %v", + "requiredAllowance: %v, currentAllowance: %v", fee, allowance.String(), ) diff --git a/testutils/suite.go b/testutils/suite.go index f6eab6564..0f17c4351 100644 --- a/testutils/suite.go +++ b/testutils/suite.go @@ -77,7 +77,11 @@ func (s *ClientTestSuite) SetupTest() { proposerOpts, err := bind.NewKeyedTransactorWithChainID(l1ProposerPrivKey, rpcCli.L1ChainID) s.Nil(err) - _, err = s.RpcClient.TaikoTokenL1.Approve(proposerOpts, taikoL1Address, new(big.Int).SetUint64(uint64(math.Pow(2, 32)))) + _, err = s.RpcClient.TaikoTokenL1.Approve( + proposerOpts, + taikoL1Address, + new(big.Int).SetUint64(uint64(math.Pow(2, 32))), + ) s.Nil(err) // register prover as a staker/eligible prover From 57e127ba6a109e223a7893e1614a482137c58acf Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Mon, 26 Jun 2023 16:51:11 -0700 Subject: [PATCH 07/37] merge main, + update implementation to alpha-4-base branch, + valid proof submissions --- .github/workflows/test.yml | 2 +- bindings/.githead | 2 +- bindings/gen_taiko_l1.go | 317 ++-- bindings/gen_taiko_prover_pool_l1.go | 1493 +++++++----------- driver/chain_syncer/calldata/syncer.go | 7 +- driver/driver.go | 2 +- pkg/rpc/methods.go | 2 +- proposer/proposer.go | 6 +- prover/proof_producer/zkevm_rpcd_producer.go | 6 +- prover/prover.go | 20 +- prover/prover_test.go | 6 +- scripts/gen_bindings.sh | 2 +- testutils/suite.go | 42 +- 13 files changed, 756 insertions(+), 1151 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cb6d6ba4c..fd580b854 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,7 +45,7 @@ jobs: with: repository: taikoxyz/taiko-mono path: ${{ env.TAIKO_MONO_DIR }} - ref: staking_tokenomicis_1 + ref: alpha-4-base - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 diff --git a/bindings/.githead b/bindings/.githead index 161cd6d7c..f2e507b9a 100644 --- a/bindings/.githead +++ b/bindings/.githead @@ -1 +1 @@ -b2d980fac7a1fd87a3b0a294c6cb911e4b89c4cb +1bca3c719f4fdd2d8b52d5e6541f1088b30f5326 diff --git a/bindings/gen_taiko_l1.go b/bindings/gen_taiko_l1.go index d5289601e..5fec3d2e5 100644 --- a/bindings/gen_taiko_l1.go +++ b/bindings/gen_taiko_l1.go @@ -48,24 +48,29 @@ type TaikoDataBlockMetadata struct { // TaikoDataConfig is an auto generated low-level Go binding around an user-defined struct. type TaikoDataConfig struct { ChainId *big.Int - MaxNumProposedBlocks *big.Int + RelaySignalRoot bool + BlockMaxProposals *big.Int BlockRingBufferSize *big.Int - MaxVerificationsPerTx *big.Int - BlockMaxGasLimit uint64 - BlockFeeBaseGas uint64 - MaxTransactionsPerBlock uint64 - MaxBytesPerTxList uint64 - TxListCacheExpiry *big.Int - ProofCooldownPeriod *big.Int - SystemProofCooldownPeriod *big.Int + BlockMaxVerificationsPerTx *big.Int + BlockMaxGasLimit uint32 + BlockFeeBaseGas uint32 + BlockMaxTransactions uint64 + BlockMaxTxListBytes uint64 + BlockTxListExpiry *big.Int + ProofRegularCooldown *big.Int + ProofOracleCooldown *big.Int + ProofMinWindow uint16 + ProofMaxWindow uint16 EthDepositRingBufferSize *big.Int EthDepositMinCountPerBlock uint64 EthDepositMaxCountPerBlock uint64 - EthDepositMaxAmount *big.Int EthDepositMinAmount *big.Int + EthDepositMaxAmount *big.Int EthDepositGas *big.Int EthDepositMaxFee *big.Int - RelaySignalRoot bool + RewardPerGasRange uint32 + RewardOpenMultipler uint8 + RewardOpenMaxCount *big.Int } // TaikoDataEthDeposit is an auto generated low-level Go binding around an user-defined struct. @@ -80,14 +85,14 @@ type TaikoDataForkChoice struct { Key [32]byte BlockHash [32]byte SignalRoot [32]byte - ProvenAt uint64 Prover common.Address + ProvenAt uint64 GasUsed uint32 } // TaikoDataStateVariables is an auto generated low-level Go binding around an user-defined struct. type TaikoDataStateVariables struct { - FeePerGas *big.Int + FeePerGas uint32 GenesisHeight uint64 GenesisTimestamp uint64 NumBlocks uint64 @@ -98,7 +103,7 @@ type TaikoDataStateVariables struct { // TaikoL1ClientMetaData contains all meta data concerning the TaikoL1Client contract. var TaikoL1ClientMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BATCH_NOT_AUCTIONABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF_OVERWRITE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF_OVERWRITE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_BETTER_BID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_PROVEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_PROVEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_SPECIAL_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockFee\",\"type\":\"uint64\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockFee\",\"type\":\"uint64\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"reward\",\"type\":\"uint64\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"reward\",\"type\":\"uint64\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"proofTimeTarget\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"proofTimeIssued\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockFee\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"adjustmentQuotient\",\"type\":\"uint16\"}],\"name\":\"ProofParamsChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"canDepositEthToL2\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"depositEtherToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getBlock\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"_metaHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_proposer\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_proposedAt\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"getBlockFee\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxNumProposedBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxVerificationsPerTx\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockFeeBaseGas\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxTransactionsPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxBytesPerTxList\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"txListCacheExpiry\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofCooldownPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"systemProofCooldownPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMinCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMaxCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMaxAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMinAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositMaxFee\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"relaySignalRoot\",\"type\":\"bool\"}],\"internalType\":\"structTaikoData.Config\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getCrossChainBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getCrossChainSignalRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"getForkChoice\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"provenAt\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasUsed\",\"type\":\"uint32\"}],\"internalType\":\"structTaikoData.ForkChoice\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStateVariables\",\"outputs\":[{\"components\":[{\"internalType\":\"uint48\",\"name\":\"feePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.StateVariables\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"id\",\"type\":\"uint16\"}],\"name\":\"getVerifierName\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_genesisBlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint48\",\"name\":\"_initFeePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint16\",\"name\":\"_initAvgProofDelay\",\"type\":\"uint16\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"txList\",\"type\":\"bytes\"}],\"name\":\"proposeBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"proveBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"state\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved70\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved71\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved80\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint48\",\"name\":\"feePerGas\",\"type\":\"uint48\"},{\"internalType\":\"uint16\",\"name\":\"avgProofDelay\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"__reserved90\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxBlocks\",\"type\":\"uint256\"}],\"name\":\"verifyBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + ABI: "[{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BATCH_NOT_AUCTIONABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF_OVERWRITE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF_OVERWRITE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_BETTER_BID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_PROVEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_PROVEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_SPECIAL_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_OPEN_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_OPEN_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"reward\",\"type\":\"uint64\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"reward\",\"type\":\"uint64\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"canDepositEthToL2\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"depositEtherToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getBlock\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"_metaHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_proposer\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_proposedAt\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_assignedProver\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"getBlockFee\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"relaySignalRoot\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"blockMaxProposals\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockMaxVerificationsPerTx\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"blockMaxGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockFeeBaseGas\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxTransactions\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxTxListBytes\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"blockTxListExpiry\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofRegularCooldown\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofOracleCooldown\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"proofMinWindow\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"proofMaxWindow\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMinCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMaxCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMinAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMaxAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositMaxFee\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"rewardPerGasRange\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"rewardOpenMultipler\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"rewardOpenMaxCount\",\"type\":\"uint256\"}],\"internalType\":\"structTaikoData.Config\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getCrossChainBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getCrossChainSignalRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"getForkChoice\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"provenAt\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"gasUsed\",\"type\":\"uint32\"}],\"internalType\":\"structTaikoData.ForkChoice\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStateVariables\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"feePerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.StateVariables\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"id\",\"type\":\"uint16\"}],\"name\":\"getVerifierName\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_genesisBlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"_initFeePerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_initAvgProofDelay\",\"type\":\"uint16\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"txList\",\"type\":\"bytes\"}],\"name\":\"proposeBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"proveBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"state\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved70\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved71\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numOpenBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved90\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"feePerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"avgProofDelay\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxBlocks\",\"type\":\"uint256\"}],\"name\":\"verifyBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", } // TaikoL1ClientABI is the input ABI used to generate the binding from. @@ -311,19 +316,21 @@ func (_TaikoL1Client *TaikoL1ClientCallerSession) CanDepositEthToL2(amount *big. // GetBlock is a free data retrieval call binding the contract method 0x04c07569. // -// Solidity: function getBlock(uint256 blockId) view returns(bytes32 _metaHash, address _proposer, uint64 _proposedAt) +// Solidity: function getBlock(uint256 blockId) view returns(bytes32 _metaHash, address _proposer, uint64 _proposedAt, address _assignedProver) func (_TaikoL1Client *TaikoL1ClientCaller) GetBlock(opts *bind.CallOpts, blockId *big.Int) (struct { - MetaHash [32]byte - Proposer common.Address - ProposedAt uint64 + MetaHash [32]byte + Proposer common.Address + ProposedAt uint64 + AssignedProver common.Address }, error) { var out []interface{} err := _TaikoL1Client.contract.Call(opts, &out, "getBlock", blockId) outstruct := new(struct { - MetaHash [32]byte - Proposer common.Address - ProposedAt uint64 + MetaHash [32]byte + Proposer common.Address + ProposedAt uint64 + AssignedProver common.Address }) if err != nil { return *outstruct, err @@ -332,6 +339,7 @@ func (_TaikoL1Client *TaikoL1ClientCaller) GetBlock(opts *bind.CallOpts, blockId outstruct.MetaHash = *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) outstruct.Proposer = *abi.ConvertType(out[1], new(common.Address)).(*common.Address) outstruct.ProposedAt = *abi.ConvertType(out[2], new(uint64)).(*uint64) + outstruct.AssignedProver = *abi.ConvertType(out[3], new(common.Address)).(*common.Address) return *outstruct, err @@ -339,22 +347,24 @@ func (_TaikoL1Client *TaikoL1ClientCaller) GetBlock(opts *bind.CallOpts, blockId // GetBlock is a free data retrieval call binding the contract method 0x04c07569. // -// Solidity: function getBlock(uint256 blockId) view returns(bytes32 _metaHash, address _proposer, uint64 _proposedAt) +// Solidity: function getBlock(uint256 blockId) view returns(bytes32 _metaHash, address _proposer, uint64 _proposedAt, address _assignedProver) func (_TaikoL1Client *TaikoL1ClientSession) GetBlock(blockId *big.Int) (struct { - MetaHash [32]byte - Proposer common.Address - ProposedAt uint64 + MetaHash [32]byte + Proposer common.Address + ProposedAt uint64 + AssignedProver common.Address }, error) { return _TaikoL1Client.Contract.GetBlock(&_TaikoL1Client.CallOpts, blockId) } // GetBlock is a free data retrieval call binding the contract method 0x04c07569. // -// Solidity: function getBlock(uint256 blockId) view returns(bytes32 _metaHash, address _proposer, uint64 _proposedAt) +// Solidity: function getBlock(uint256 blockId) view returns(bytes32 _metaHash, address _proposer, uint64 _proposedAt, address _assignedProver) func (_TaikoL1Client *TaikoL1ClientCallerSession) GetBlock(blockId *big.Int) (struct { - MetaHash [32]byte - Proposer common.Address - ProposedAt uint64 + MetaHash [32]byte + Proposer common.Address + ProposedAt uint64 + AssignedProver common.Address }, error) { return _TaikoL1Client.Contract.GetBlock(&_TaikoL1Client.CallOpts, blockId) } @@ -392,7 +402,7 @@ func (_TaikoL1Client *TaikoL1ClientCallerSession) GetBlockFee(gasLimit uint32) ( // GetConfig is a free data retrieval call binding the contract method 0xc3f909d4. // -// Solidity: function getConfig() pure returns((uint256,uint256,uint256,uint256,uint64,uint64,uint64,uint64,uint256,uint256,uint256,uint256,uint64,uint64,uint96,uint96,uint256,uint256,bool)) +// Solidity: function getConfig() pure returns((uint256,bool,uint256,uint256,uint256,uint32,uint32,uint64,uint64,uint256,uint256,uint256,uint16,uint16,uint256,uint64,uint64,uint96,uint96,uint256,uint256,uint32,uint8,uint256)) func (_TaikoL1Client *TaikoL1ClientCaller) GetConfig(opts *bind.CallOpts) (TaikoDataConfig, error) { var out []interface{} err := _TaikoL1Client.contract.Call(opts, &out, "getConfig") @@ -409,14 +419,14 @@ func (_TaikoL1Client *TaikoL1ClientCaller) GetConfig(opts *bind.CallOpts) (Taiko // GetConfig is a free data retrieval call binding the contract method 0xc3f909d4. // -// Solidity: function getConfig() pure returns((uint256,uint256,uint256,uint256,uint64,uint64,uint64,uint64,uint256,uint256,uint256,uint256,uint64,uint64,uint96,uint96,uint256,uint256,bool)) +// Solidity: function getConfig() pure returns((uint256,bool,uint256,uint256,uint256,uint32,uint32,uint64,uint64,uint256,uint256,uint256,uint16,uint16,uint256,uint64,uint64,uint96,uint96,uint256,uint256,uint32,uint8,uint256)) func (_TaikoL1Client *TaikoL1ClientSession) GetConfig() (TaikoDataConfig, error) { return _TaikoL1Client.Contract.GetConfig(&_TaikoL1Client.CallOpts) } // GetConfig is a free data retrieval call binding the contract method 0xc3f909d4. // -// Solidity: function getConfig() pure returns((uint256,uint256,uint256,uint256,uint64,uint64,uint64,uint64,uint256,uint256,uint256,uint256,uint64,uint64,uint96,uint96,uint256,uint256,bool)) +// Solidity: function getConfig() pure returns((uint256,bool,uint256,uint256,uint256,uint32,uint32,uint64,uint64,uint256,uint256,uint256,uint16,uint16,uint256,uint64,uint64,uint96,uint96,uint256,uint256,uint32,uint8,uint256)) func (_TaikoL1Client *TaikoL1ClientCallerSession) GetConfig() (TaikoDataConfig, error) { return _TaikoL1Client.Contract.GetConfig(&_TaikoL1Client.CallOpts) } @@ -485,7 +495,7 @@ func (_TaikoL1Client *TaikoL1ClientCallerSession) GetCrossChainSignalRoot(blockI // GetForkChoice is a free data retrieval call binding the contract method 0x7163e0ed. // -// Solidity: function getForkChoice(uint256 blockId, bytes32 parentHash, uint32 parentGasUsed) view returns((bytes32,bytes32,bytes32,uint64,address,uint32)) +// Solidity: function getForkChoice(uint256 blockId, bytes32 parentHash, uint32 parentGasUsed) view returns((bytes32,bytes32,bytes32,address,uint64,uint32)) func (_TaikoL1Client *TaikoL1ClientCaller) GetForkChoice(opts *bind.CallOpts, blockId *big.Int, parentHash [32]byte, parentGasUsed uint32) (TaikoDataForkChoice, error) { var out []interface{} err := _TaikoL1Client.contract.Call(opts, &out, "getForkChoice", blockId, parentHash, parentGasUsed) @@ -502,21 +512,21 @@ func (_TaikoL1Client *TaikoL1ClientCaller) GetForkChoice(opts *bind.CallOpts, bl // GetForkChoice is a free data retrieval call binding the contract method 0x7163e0ed. // -// Solidity: function getForkChoice(uint256 blockId, bytes32 parentHash, uint32 parentGasUsed) view returns((bytes32,bytes32,bytes32,uint64,address,uint32)) +// Solidity: function getForkChoice(uint256 blockId, bytes32 parentHash, uint32 parentGasUsed) view returns((bytes32,bytes32,bytes32,address,uint64,uint32)) func (_TaikoL1Client *TaikoL1ClientSession) GetForkChoice(blockId *big.Int, parentHash [32]byte, parentGasUsed uint32) (TaikoDataForkChoice, error) { return _TaikoL1Client.Contract.GetForkChoice(&_TaikoL1Client.CallOpts, blockId, parentHash, parentGasUsed) } // GetForkChoice is a free data retrieval call binding the contract method 0x7163e0ed. // -// Solidity: function getForkChoice(uint256 blockId, bytes32 parentHash, uint32 parentGasUsed) view returns((bytes32,bytes32,bytes32,uint64,address,uint32)) +// Solidity: function getForkChoice(uint256 blockId, bytes32 parentHash, uint32 parentGasUsed) view returns((bytes32,bytes32,bytes32,address,uint64,uint32)) func (_TaikoL1Client *TaikoL1ClientCallerSession) GetForkChoice(blockId *big.Int, parentHash [32]byte, parentGasUsed uint32) (TaikoDataForkChoice, error) { return _TaikoL1Client.Contract.GetForkChoice(&_TaikoL1Client.CallOpts, blockId, parentHash, parentGasUsed) } // GetStateVariables is a free data retrieval call binding the contract method 0xdde89cf5. // -// Solidity: function getStateVariables() view returns((uint48,uint64,uint64,uint64,uint64,uint64,uint64)) +// Solidity: function getStateVariables() view returns((uint32,uint64,uint64,uint64,uint64,uint64,uint64)) func (_TaikoL1Client *TaikoL1ClientCaller) GetStateVariables(opts *bind.CallOpts) (TaikoDataStateVariables, error) { var out []interface{} err := _TaikoL1Client.contract.Call(opts, &out, "getStateVariables") @@ -533,14 +543,14 @@ func (_TaikoL1Client *TaikoL1ClientCaller) GetStateVariables(opts *bind.CallOpts // GetStateVariables is a free data retrieval call binding the contract method 0xdde89cf5. // -// Solidity: function getStateVariables() view returns((uint48,uint64,uint64,uint64,uint64,uint64,uint64)) +// Solidity: function getStateVariables() view returns((uint32,uint64,uint64,uint64,uint64,uint64,uint64)) func (_TaikoL1Client *TaikoL1ClientSession) GetStateVariables() (TaikoDataStateVariables, error) { return _TaikoL1Client.Contract.GetStateVariables(&_TaikoL1Client.CallOpts) } // GetStateVariables is a free data retrieval call binding the contract method 0xdde89cf5. // -// Solidity: function getStateVariables() view returns((uint48,uint64,uint64,uint64,uint64,uint64,uint64)) +// Solidity: function getStateVariables() view returns((uint32,uint64,uint64,uint64,uint64,uint64,uint64)) func (_TaikoL1Client *TaikoL1ClientCallerSession) GetStateVariables() (TaikoDataStateVariables, error) { return _TaikoL1Client.Contract.GetStateVariables(&_TaikoL1Client.CallOpts) } @@ -671,21 +681,21 @@ func (_TaikoL1Client *TaikoL1ClientCallerSession) Resolve0(name [32]byte, allowZ // State is a free data retrieval call binding the contract method 0xc19d93fb. // -// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint64 __reserved70, uint64 __reserved71, uint64 __reserved80, uint64 numEthDeposits, uint64 numBlocks, uint64 nextEthDepositToProcess, uint64 lastVerifiedAt, uint64 lastVerifiedBlockId, uint48 feePerGas, uint16 avgProofDelay, uint64 __reserved90) +// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint64 __reserved70, uint64 __reserved71, uint64 numOpenBlocks, uint64 numEthDeposits, uint64 numBlocks, uint64 nextEthDepositToProcess, uint64 lastVerifiedAt, uint64 lastVerifiedBlockId, uint64 __reserved90, uint32 feePerGas, uint16 avgProofDelay) func (_TaikoL1Client *TaikoL1ClientCaller) State(opts *bind.CallOpts) (struct { GenesisHeight uint64 GenesisTimestamp uint64 Reserved70 uint64 Reserved71 uint64 - Reserved80 uint64 + NumOpenBlocks uint64 NumEthDeposits uint64 NumBlocks uint64 NextEthDepositToProcess uint64 LastVerifiedAt uint64 LastVerifiedBlockId uint64 - FeePerGas *big.Int - AvgProofDelay uint16 Reserved90 uint64 + FeePerGas uint32 + AvgProofDelay uint16 }, error) { var out []interface{} err := _TaikoL1Client.contract.Call(opts, &out, "state") @@ -695,15 +705,15 @@ func (_TaikoL1Client *TaikoL1ClientCaller) State(opts *bind.CallOpts) (struct { GenesisTimestamp uint64 Reserved70 uint64 Reserved71 uint64 - Reserved80 uint64 + NumOpenBlocks uint64 NumEthDeposits uint64 NumBlocks uint64 NextEthDepositToProcess uint64 LastVerifiedAt uint64 LastVerifiedBlockId uint64 - FeePerGas *big.Int - AvgProofDelay uint16 Reserved90 uint64 + FeePerGas uint32 + AvgProofDelay uint16 }) if err != nil { return *outstruct, err @@ -713,15 +723,15 @@ func (_TaikoL1Client *TaikoL1ClientCaller) State(opts *bind.CallOpts) (struct { outstruct.GenesisTimestamp = *abi.ConvertType(out[1], new(uint64)).(*uint64) outstruct.Reserved70 = *abi.ConvertType(out[2], new(uint64)).(*uint64) outstruct.Reserved71 = *abi.ConvertType(out[3], new(uint64)).(*uint64) - outstruct.Reserved80 = *abi.ConvertType(out[4], new(uint64)).(*uint64) + outstruct.NumOpenBlocks = *abi.ConvertType(out[4], new(uint64)).(*uint64) outstruct.NumEthDeposits = *abi.ConvertType(out[5], new(uint64)).(*uint64) outstruct.NumBlocks = *abi.ConvertType(out[6], new(uint64)).(*uint64) outstruct.NextEthDepositToProcess = *abi.ConvertType(out[7], new(uint64)).(*uint64) outstruct.LastVerifiedAt = *abi.ConvertType(out[8], new(uint64)).(*uint64) outstruct.LastVerifiedBlockId = *abi.ConvertType(out[9], new(uint64)).(*uint64) - outstruct.FeePerGas = *abi.ConvertType(out[10], new(*big.Int)).(**big.Int) - outstruct.AvgProofDelay = *abi.ConvertType(out[11], new(uint16)).(*uint16) - outstruct.Reserved90 = *abi.ConvertType(out[12], new(uint64)).(*uint64) + outstruct.Reserved90 = *abi.ConvertType(out[10], new(uint64)).(*uint64) + outstruct.FeePerGas = *abi.ConvertType(out[11], new(uint32)).(*uint32) + outstruct.AvgProofDelay = *abi.ConvertType(out[12], new(uint16)).(*uint16) return *outstruct, err @@ -729,42 +739,42 @@ func (_TaikoL1Client *TaikoL1ClientCaller) State(opts *bind.CallOpts) (struct { // State is a free data retrieval call binding the contract method 0xc19d93fb. // -// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint64 __reserved70, uint64 __reserved71, uint64 __reserved80, uint64 numEthDeposits, uint64 numBlocks, uint64 nextEthDepositToProcess, uint64 lastVerifiedAt, uint64 lastVerifiedBlockId, uint48 feePerGas, uint16 avgProofDelay, uint64 __reserved90) +// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint64 __reserved70, uint64 __reserved71, uint64 numOpenBlocks, uint64 numEthDeposits, uint64 numBlocks, uint64 nextEthDepositToProcess, uint64 lastVerifiedAt, uint64 lastVerifiedBlockId, uint64 __reserved90, uint32 feePerGas, uint16 avgProofDelay) func (_TaikoL1Client *TaikoL1ClientSession) State() (struct { GenesisHeight uint64 GenesisTimestamp uint64 Reserved70 uint64 Reserved71 uint64 - Reserved80 uint64 + NumOpenBlocks uint64 NumEthDeposits uint64 NumBlocks uint64 NextEthDepositToProcess uint64 LastVerifiedAt uint64 LastVerifiedBlockId uint64 - FeePerGas *big.Int - AvgProofDelay uint16 Reserved90 uint64 + FeePerGas uint32 + AvgProofDelay uint16 }, error) { return _TaikoL1Client.Contract.State(&_TaikoL1Client.CallOpts) } // State is a free data retrieval call binding the contract method 0xc19d93fb. // -// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint64 __reserved70, uint64 __reserved71, uint64 __reserved80, uint64 numEthDeposits, uint64 numBlocks, uint64 nextEthDepositToProcess, uint64 lastVerifiedAt, uint64 lastVerifiedBlockId, uint48 feePerGas, uint16 avgProofDelay, uint64 __reserved90) +// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint64 __reserved70, uint64 __reserved71, uint64 numOpenBlocks, uint64 numEthDeposits, uint64 numBlocks, uint64 nextEthDepositToProcess, uint64 lastVerifiedAt, uint64 lastVerifiedBlockId, uint64 __reserved90, uint32 feePerGas, uint16 avgProofDelay) func (_TaikoL1Client *TaikoL1ClientCallerSession) State() (struct { GenesisHeight uint64 GenesisTimestamp uint64 Reserved70 uint64 Reserved71 uint64 - Reserved80 uint64 + NumOpenBlocks uint64 NumEthDeposits uint64 NumBlocks uint64 NextEthDepositToProcess uint64 LastVerifiedAt uint64 LastVerifiedBlockId uint64 - FeePerGas *big.Int - AvgProofDelay uint16 Reserved90 uint64 + FeePerGas uint32 + AvgProofDelay uint16 }, error) { return _TaikoL1Client.Contract.State(&_TaikoL1Client.CallOpts) } @@ -790,24 +800,24 @@ func (_TaikoL1Client *TaikoL1ClientTransactorSession) DepositEtherToL2(recipient return _TaikoL1Client.Contract.DepositEtherToL2(&_TaikoL1Client.TransactOpts, recipient) } -// Init is a paid mutator transaction binding the contract method 0xa2fdc693. +// Init is a paid mutator transaction binding the contract method 0xa72111dc. // -// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint48 _initFeePerGas, uint16 _initAvgProofDelay) returns() -func (_TaikoL1Client *TaikoL1ClientTransactor) Init(opts *bind.TransactOpts, _addressManager common.Address, _genesisBlockHash [32]byte, _initFeePerGas *big.Int, _initAvgProofDelay uint16) (*types.Transaction, error) { +// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint32 _initFeePerGas, uint16 _initAvgProofDelay) returns() +func (_TaikoL1Client *TaikoL1ClientTransactor) Init(opts *bind.TransactOpts, _addressManager common.Address, _genesisBlockHash [32]byte, _initFeePerGas uint32, _initAvgProofDelay uint16) (*types.Transaction, error) { return _TaikoL1Client.contract.Transact(opts, "init", _addressManager, _genesisBlockHash, _initFeePerGas, _initAvgProofDelay) } -// Init is a paid mutator transaction binding the contract method 0xa2fdc693. +// Init is a paid mutator transaction binding the contract method 0xa72111dc. // -// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint48 _initFeePerGas, uint16 _initAvgProofDelay) returns() -func (_TaikoL1Client *TaikoL1ClientSession) Init(_addressManager common.Address, _genesisBlockHash [32]byte, _initFeePerGas *big.Int, _initAvgProofDelay uint16) (*types.Transaction, error) { +// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint32 _initFeePerGas, uint16 _initAvgProofDelay) returns() +func (_TaikoL1Client *TaikoL1ClientSession) Init(_addressManager common.Address, _genesisBlockHash [32]byte, _initFeePerGas uint32, _initAvgProofDelay uint16) (*types.Transaction, error) { return _TaikoL1Client.Contract.Init(&_TaikoL1Client.TransactOpts, _addressManager, _genesisBlockHash, _initFeePerGas, _initAvgProofDelay) } -// Init is a paid mutator transaction binding the contract method 0xa2fdc693. +// Init is a paid mutator transaction binding the contract method 0xa72111dc. // -// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint48 _initFeePerGas, uint16 _initAvgProofDelay) returns() -func (_TaikoL1Client *TaikoL1ClientTransactorSession) Init(_addressManager common.Address, _genesisBlockHash [32]byte, _initFeePerGas *big.Int, _initAvgProofDelay uint16) (*types.Transaction, error) { +// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint32 _initFeePerGas, uint16 _initAvgProofDelay) returns() +func (_TaikoL1Client *TaikoL1ClientTransactorSession) Init(_addressManager common.Address, _genesisBlockHash [32]byte, _initFeePerGas uint32, _initAvgProofDelay uint16) (*types.Transaction, error) { return _TaikoL1Client.Contract.Init(&_TaikoL1Client.TransactOpts, _addressManager, _genesisBlockHash, _initFeePerGas, _initAvgProofDelay) } @@ -1161,15 +1171,14 @@ func (it *TaikoL1ClientBlockProposedIterator) Close() error { // TaikoL1ClientBlockProposed represents a BlockProposed event raised by the TaikoL1Client contract. type TaikoL1ClientBlockProposed struct { - Id *big.Int - Meta TaikoDataBlockMetadata - BlockFee uint64 - Raw types.Log // Blockchain specific contextual infos + Id *big.Int + Meta TaikoDataBlockMetadata + Raw types.Log // Blockchain specific contextual infos } -// FilterBlockProposed is a free log retrieval operation binding the contract event 0x555304f14500c230922dd951cfdbb74012005afbcd7350b4b9fd27dc12d710fe. +// FilterBlockProposed is a free log retrieval operation binding the contract event 0xb10849493846e4879f64f36789172a1a650464eb8b5e0a706a86d886f50e6ba0. // -// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta, uint64 blockFee) +// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta) func (_TaikoL1Client *TaikoL1ClientFilterer) FilterBlockProposed(opts *bind.FilterOpts, id []*big.Int) (*TaikoL1ClientBlockProposedIterator, error) { var idRule []interface{} @@ -1184,9 +1193,9 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) FilterBlockProposed(opts *bind.Filt return &TaikoL1ClientBlockProposedIterator{contract: _TaikoL1Client.contract, event: "BlockProposed", logs: logs, sub: sub}, nil } -// WatchBlockProposed is a free log subscription operation binding the contract event 0x555304f14500c230922dd951cfdbb74012005afbcd7350b4b9fd27dc12d710fe. +// WatchBlockProposed is a free log subscription operation binding the contract event 0xb10849493846e4879f64f36789172a1a650464eb8b5e0a706a86d886f50e6ba0. // -// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta, uint64 blockFee) +// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta) func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockProposed(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientBlockProposed, id []*big.Int) (event.Subscription, error) { var idRule []interface{} @@ -1226,9 +1235,9 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockProposed(opts *bind.Watch }), nil } -// ParseBlockProposed is a log parse operation binding the contract event 0x555304f14500c230922dd951cfdbb74012005afbcd7350b4b9fd27dc12d710fe. +// ParseBlockProposed is a log parse operation binding the contract event 0xb10849493846e4879f64f36789172a1a650464eb8b5e0a706a86d886f50e6ba0. // -// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta, uint64 blockFee) +// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta) func (_TaikoL1Client *TaikoL1ClientFilterer) ParseBlockProposed(log types.Log) (*TaikoL1ClientBlockProposed, error) { event := new(TaikoL1ClientBlockProposed) if err := _TaikoL1Client.contract.UnpackLog(event, "BlockProposed", log); err != nil { @@ -1307,15 +1316,14 @@ func (it *TaikoL1ClientBlockProposed0Iterator) Close() error { // TaikoL1ClientBlockProposed0 represents a BlockProposed0 event raised by the TaikoL1Client contract. type TaikoL1ClientBlockProposed0 struct { - Id *big.Int - Meta TaikoDataBlockMetadata - BlockFee uint64 - Raw types.Log // Blockchain specific contextual infos + Id *big.Int + Meta TaikoDataBlockMetadata + Raw types.Log // Blockchain specific contextual infos } -// FilterBlockProposed0 is a free log retrieval operation binding the contract event 0x555304f14500c230922dd951cfdbb74012005afbcd7350b4b9fd27dc12d710fe. +// FilterBlockProposed0 is a free log retrieval operation binding the contract event 0xb10849493846e4879f64f36789172a1a650464eb8b5e0a706a86d886f50e6ba0. // -// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta, uint64 blockFee) +// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta) func (_TaikoL1Client *TaikoL1ClientFilterer) FilterBlockProposed0(opts *bind.FilterOpts, id []*big.Int) (*TaikoL1ClientBlockProposed0Iterator, error) { var idRule []interface{} @@ -1330,9 +1338,9 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) FilterBlockProposed0(opts *bind.Fil return &TaikoL1ClientBlockProposed0Iterator{contract: _TaikoL1Client.contract, event: "BlockProposed0", logs: logs, sub: sub}, nil } -// WatchBlockProposed0 is a free log subscription operation binding the contract event 0x555304f14500c230922dd951cfdbb74012005afbcd7350b4b9fd27dc12d710fe. +// WatchBlockProposed0 is a free log subscription operation binding the contract event 0xb10849493846e4879f64f36789172a1a650464eb8b5e0a706a86d886f50e6ba0. // -// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta, uint64 blockFee) +// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta) func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockProposed0(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientBlockProposed0, id []*big.Int) (event.Subscription, error) { var idRule []interface{} @@ -1372,9 +1380,9 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockProposed0(opts *bind.Watc }), nil } -// ParseBlockProposed0 is a log parse operation binding the contract event 0x555304f14500c230922dd951cfdbb74012005afbcd7350b4b9fd27dc12d710fe. +// ParseBlockProposed0 is a log parse operation binding the contract event 0xb10849493846e4879f64f36789172a1a650464eb8b5e0a706a86d886f50e6ba0. // -// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta, uint64 blockFee) +// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta) func (_TaikoL1Client *TaikoL1ClientFilterer) ParseBlockProposed0(log types.Log) (*TaikoL1ClientBlockProposed0, error) { event := new(TaikoL1ClientBlockProposed0) if err := _TaikoL1Client.contract.UnpackLog(event, "BlockProposed0", log); err != nil { @@ -2820,140 +2828,3 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) ParseOwnershipTransferred(log types event.Raw = log return event, nil } - -// TaikoL1ClientProofParamsChangedIterator is returned from FilterProofParamsChanged and is used to iterate over the raw logs and unpacked data for ProofParamsChanged events raised by the TaikoL1Client contract. -type TaikoL1ClientProofParamsChangedIterator struct { - Event *TaikoL1ClientProofParamsChanged // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *TaikoL1ClientProofParamsChangedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(TaikoL1ClientProofParamsChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(TaikoL1ClientProofParamsChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoL1ClientProofParamsChangedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *TaikoL1ClientProofParamsChangedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// TaikoL1ClientProofParamsChanged represents a ProofParamsChanged event raised by the TaikoL1Client contract. -type TaikoL1ClientProofParamsChanged struct { - ProofTimeTarget uint64 - ProofTimeIssued uint64 - BlockFee uint64 - AdjustmentQuotient uint16 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterProofParamsChanged is a free log retrieval operation binding the contract event 0x565e5aa69c99d81e441dd3bb8535d888585683743f3c6a3bf49e5e1b227bd8f9. -// -// Solidity: event ProofParamsChanged(uint64 proofTimeTarget, uint64 proofTimeIssued, uint64 blockFee, uint16 adjustmentQuotient) -func (_TaikoL1Client *TaikoL1ClientFilterer) FilterProofParamsChanged(opts *bind.FilterOpts) (*TaikoL1ClientProofParamsChangedIterator, error) { - - logs, sub, err := _TaikoL1Client.contract.FilterLogs(opts, "ProofParamsChanged") - if err != nil { - return nil, err - } - return &TaikoL1ClientProofParamsChangedIterator{contract: _TaikoL1Client.contract, event: "ProofParamsChanged", logs: logs, sub: sub}, nil -} - -// WatchProofParamsChanged is a free log subscription operation binding the contract event 0x565e5aa69c99d81e441dd3bb8535d888585683743f3c6a3bf49e5e1b227bd8f9. -// -// Solidity: event ProofParamsChanged(uint64 proofTimeTarget, uint64 proofTimeIssued, uint64 blockFee, uint16 adjustmentQuotient) -func (_TaikoL1Client *TaikoL1ClientFilterer) WatchProofParamsChanged(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientProofParamsChanged) (event.Subscription, error) { - - logs, sub, err := _TaikoL1Client.contract.WatchLogs(opts, "ProofParamsChanged") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(TaikoL1ClientProofParamsChanged) - if err := _TaikoL1Client.contract.UnpackLog(event, "ProofParamsChanged", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseProofParamsChanged is a log parse operation binding the contract event 0x565e5aa69c99d81e441dd3bb8535d888585683743f3c6a3bf49e5e1b227bd8f9. -// -// Solidity: event ProofParamsChanged(uint64 proofTimeTarget, uint64 proofTimeIssued, uint64 blockFee, uint16 adjustmentQuotient) -func (_TaikoL1Client *TaikoL1ClientFilterer) ParseProofParamsChanged(log types.Log) (*TaikoL1ClientProofParamsChanged, error) { - event := new(TaikoL1ClientProofParamsChanged) - if err := _TaikoL1Client.contract.UnpackLog(event, "ProofParamsChanged", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/bindings/gen_taiko_prover_pool_l1.go b/bindings/gen_taiko_prover_pool_l1.go index d8bea5160..ab30c49da 100644 --- a/bindings/gen_taiko_prover_pool_l1.go +++ b/bindings/gen_taiko_prover_pool_l1.go @@ -29,9 +29,24 @@ var ( _ = abi.ConvertType ) +// ProverPoolProver is an auto generated low-level Go binding around an user-defined struct. +type ProverPoolProver struct { + StakedAmount uint32 + RewardPerGas uint16 + CurrentCapacity uint16 +} + +// ProverPoolStaker is an auto generated low-level Go binding around an user-defined struct. +type ProverPoolStaker struct { + ExitRequestedAt uint64 + ExitAmount uint32 + MaxCapacity uint16 + ProverId uint8 +} + // TaikoL1ProverPoolMetaData contains all meta data concerning the TaikoL1ProverPool contract. var TaikoL1ProverPoolMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"oldCapacity\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newCapacity\",\"type\":\"uint32\"}],\"name\":\"ProverAdjustedCapacity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldFeeMultiplier\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newFeeMultiplier\",\"type\":\"uint256\"}],\"name\":\"ProverAdjustedFeeMultiplier\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"feeMultiplier\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"capacity\",\"type\":\"uint64\"}],\"name\":\"ProverEntered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"name\":\"ProverExited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ProverSlashed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalStaked\",\"type\":\"uint256\"}],\"name\":\"ProverStakedMoreTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ProverWithdrawAwards\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MAX_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_TKO_AMOUNT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newCapacity\",\"type\":\"uint32\"}],\"name\":\"adjustCapacity\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"newFeeMultiplier\",\"type\":\"uint8\"}],\"name\":\"adjustFeeMultiplier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"blockIdToProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"capacity\",\"type\":\"uint32\"}],\"name\":\"enterProverPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"exit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_maxPoolSize\",\"type\":\"uint16\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxPoolSize\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"randomNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"pickRandomProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"provers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"proverAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"stakedTokens\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"healthScore\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastBlockTsToBeProven\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"capacity\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numAssignedBlocks\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"feeMultiplier\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proversInPool\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"name\":\"slashProver\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stakeMoreTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"topProvers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"name\":\"withdrawRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + ABI: "[{\"inputs\":[],\"name\":\"INVALID_PARAMS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NO_MATURE_EXIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PROVER_NOT_GOOD_ENOUGH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UNAUTHORIZED\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"amount\",\"type\":\"uint32\"}],\"name\":\"Exited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"amount\",\"type\":\"uint32\"}],\"name\":\"Slashed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"amount\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"rewardPerGas\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"currentCapacity\",\"type\":\"uint16\"}],\"name\":\"Staked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"amount\",\"type\":\"uint32\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"EXIT_PERIOD\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_CAPACITY_LOWER_BOUND\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_NUM_PROVERS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_STAKE_PER_CAPACITY\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ONE_TKO\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SLASH_POINTS\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"feePerGas\",\"type\":\"uint32\"}],\"name\":\"assignProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"rewardPerGas\",\"type\":\"uint32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"exit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCapacity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"capacity\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProvers\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"stakedAmount\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"rewardPerGas\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"currentCapacity\",\"type\":\"uint16\"}],\"internalType\":\"structProverPool.Prover[]\",\"name\":\"_provers\",\"type\":\"tuple[]\"},{\"internalType\":\"address[]\",\"name\":\"_stakers\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getStaker\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"exitRequestedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"exitAmount\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"maxCapacity\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"proverId\",\"type\":\"uint8\"}],\"internalType\":\"structProverPool.Staker\",\"name\":\"staker\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"stakedAmount\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"rewardPerGas\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"currentCapacity\",\"type\":\"uint16\"}],\"internalType\":\"structProverPool.Prover\",\"name\":\"prover\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"feePerGas\",\"type\":\"uint32\"}],\"name\":\"getWeights\",\"outputs\":[{\"internalType\":\"uint256[32]\",\"name\":\"weights\",\"type\":\"uint256[32]\"},{\"internalType\":\"uint256\",\"name\":\"totalWeight\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"idToProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"releaseProver\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"slashProver\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"amount\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"rewardPerGas\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"maxCapacity\",\"type\":\"uint16\"}],\"name\":\"stake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"stakers\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"exitRequestedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"exitAmount\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"maxCapacity\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"proverId\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } // TaikoL1ProverPoolABI is the input ABI used to generate the binding from. @@ -180,74 +195,74 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorRaw) Transact(opts *bind.Tr return _TaikoL1ProverPool.Contract.contract.Transact(opts, method, params...) } -// MAXMULTIPLIER is a free data retrieval call binding the contract method 0x5d6a618d. +// EXITPERIOD is a free data retrieval call binding the contract method 0xc04b5f65. // -// Solidity: function MAX_MULTIPLIER() view returns(uint8) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) MAXMULTIPLIER(opts *bind.CallOpts) (uint8, error) { +// Solidity: function EXIT_PERIOD() view returns(uint64) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) EXITPERIOD(opts *bind.CallOpts) (uint64, error) { var out []interface{} - err := _TaikoL1ProverPool.contract.Call(opts, &out, "MAX_MULTIPLIER") + err := _TaikoL1ProverPool.contract.Call(opts, &out, "EXIT_PERIOD") if err != nil { - return *new(uint8), err + return *new(uint64), err } - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) return out0, err } -// MAXMULTIPLIER is a free data retrieval call binding the contract method 0x5d6a618d. +// EXITPERIOD is a free data retrieval call binding the contract method 0xc04b5f65. // -// Solidity: function MAX_MULTIPLIER() view returns(uint8) -func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) MAXMULTIPLIER() (uint8, error) { - return _TaikoL1ProverPool.Contract.MAXMULTIPLIER(&_TaikoL1ProverPool.CallOpts) +// Solidity: function EXIT_PERIOD() view returns(uint64) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) EXITPERIOD() (uint64, error) { + return _TaikoL1ProverPool.Contract.EXITPERIOD(&_TaikoL1ProverPool.CallOpts) } -// MAXMULTIPLIER is a free data retrieval call binding the contract method 0x5d6a618d. +// EXITPERIOD is a free data retrieval call binding the contract method 0xc04b5f65. // -// Solidity: function MAX_MULTIPLIER() view returns(uint8) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) MAXMULTIPLIER() (uint8, error) { - return _TaikoL1ProverPool.Contract.MAXMULTIPLIER(&_TaikoL1ProverPool.CallOpts) +// Solidity: function EXIT_PERIOD() view returns(uint64) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) EXITPERIOD() (uint64, error) { + return _TaikoL1ProverPool.Contract.EXITPERIOD(&_TaikoL1ProverPool.CallOpts) } -// MINMULTIPLIER is a free data retrieval call binding the contract method 0xed03e78c. +// MAXCAPACITYLOWERBOUND is a free data retrieval call binding the contract method 0x35acc933. // -// Solidity: function MIN_MULTIPLIER() view returns(uint8) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) MINMULTIPLIER(opts *bind.CallOpts) (uint8, error) { +// Solidity: function MAX_CAPACITY_LOWER_BOUND() view returns(uint32) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) MAXCAPACITYLOWERBOUND(opts *bind.CallOpts) (uint32, error) { var out []interface{} - err := _TaikoL1ProverPool.contract.Call(opts, &out, "MIN_MULTIPLIER") + err := _TaikoL1ProverPool.contract.Call(opts, &out, "MAX_CAPACITY_LOWER_BOUND") if err != nil { - return *new(uint8), err + return *new(uint32), err } - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) return out0, err } -// MINMULTIPLIER is a free data retrieval call binding the contract method 0xed03e78c. +// MAXCAPACITYLOWERBOUND is a free data retrieval call binding the contract method 0x35acc933. // -// Solidity: function MIN_MULTIPLIER() view returns(uint8) -func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) MINMULTIPLIER() (uint8, error) { - return _TaikoL1ProverPool.Contract.MINMULTIPLIER(&_TaikoL1ProverPool.CallOpts) +// Solidity: function MAX_CAPACITY_LOWER_BOUND() view returns(uint32) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) MAXCAPACITYLOWERBOUND() (uint32, error) { + return _TaikoL1ProverPool.Contract.MAXCAPACITYLOWERBOUND(&_TaikoL1ProverPool.CallOpts) } -// MINMULTIPLIER is a free data retrieval call binding the contract method 0xed03e78c. +// MAXCAPACITYLOWERBOUND is a free data retrieval call binding the contract method 0x35acc933. // -// Solidity: function MIN_MULTIPLIER() view returns(uint8) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) MINMULTIPLIER() (uint8, error) { - return _TaikoL1ProverPool.Contract.MINMULTIPLIER(&_TaikoL1ProverPool.CallOpts) +// Solidity: function MAX_CAPACITY_LOWER_BOUND() view returns(uint32) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) MAXCAPACITYLOWERBOUND() (uint32, error) { + return _TaikoL1ProverPool.Contract.MAXCAPACITYLOWERBOUND(&_TaikoL1ProverPool.CallOpts) } -// MINTKOAMOUNT is a free data retrieval call binding the contract method 0x005eb8f8. +// MAXNUMPROVERS is a free data retrieval call binding the contract method 0x62c0fd98. // -// Solidity: function MIN_TKO_AMOUNT() view returns(uint256) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) MINTKOAMOUNT(opts *bind.CallOpts) (*big.Int, error) { +// Solidity: function MAX_NUM_PROVERS() view returns(uint256) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) MAXNUMPROVERS(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _TaikoL1ProverPool.contract.Call(opts, &out, "MIN_TKO_AMOUNT") + err := _TaikoL1ProverPool.contract.Call(opts, &out, "MAX_NUM_PROVERS") if err != nil { return *new(*big.Int), err @@ -259,18 +274,111 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) MINTKOAMOUNT(opts *bind.CallO } -// MINTKOAMOUNT is a free data retrieval call binding the contract method 0x005eb8f8. +// MAXNUMPROVERS is a free data retrieval call binding the contract method 0x62c0fd98. +// +// Solidity: function MAX_NUM_PROVERS() view returns(uint256) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) MAXNUMPROVERS() (*big.Int, error) { + return _TaikoL1ProverPool.Contract.MAXNUMPROVERS(&_TaikoL1ProverPool.CallOpts) +} + +// MAXNUMPROVERS is a free data retrieval call binding the contract method 0x62c0fd98. +// +// Solidity: function MAX_NUM_PROVERS() view returns(uint256) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) MAXNUMPROVERS() (*big.Int, error) { + return _TaikoL1ProverPool.Contract.MAXNUMPROVERS(&_TaikoL1ProverPool.CallOpts) +} + +// MINSTAKEPERCAPACITY is a free data retrieval call binding the contract method 0x7d62c057. +// +// Solidity: function MIN_STAKE_PER_CAPACITY() view returns(uint32) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) MINSTAKEPERCAPACITY(opts *bind.CallOpts) (uint32, error) { + var out []interface{} + err := _TaikoL1ProverPool.contract.Call(opts, &out, "MIN_STAKE_PER_CAPACITY") + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// MINSTAKEPERCAPACITY is a free data retrieval call binding the contract method 0x7d62c057. +// +// Solidity: function MIN_STAKE_PER_CAPACITY() view returns(uint32) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) MINSTAKEPERCAPACITY() (uint32, error) { + return _TaikoL1ProverPool.Contract.MINSTAKEPERCAPACITY(&_TaikoL1ProverPool.CallOpts) +} + +// MINSTAKEPERCAPACITY is a free data retrieval call binding the contract method 0x7d62c057. +// +// Solidity: function MIN_STAKE_PER_CAPACITY() view returns(uint32) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) MINSTAKEPERCAPACITY() (uint32, error) { + return _TaikoL1ProverPool.Contract.MINSTAKEPERCAPACITY(&_TaikoL1ProverPool.CallOpts) +} + +// ONETKO is a free data retrieval call binding the contract method 0xe22fcaaa. +// +// Solidity: function ONE_TKO() view returns(uint64) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) ONETKO(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _TaikoL1ProverPool.contract.Call(opts, &out, "ONE_TKO") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// ONETKO is a free data retrieval call binding the contract method 0xe22fcaaa. +// +// Solidity: function ONE_TKO() view returns(uint64) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) ONETKO() (uint64, error) { + return _TaikoL1ProverPool.Contract.ONETKO(&_TaikoL1ProverPool.CallOpts) +} + +// ONETKO is a free data retrieval call binding the contract method 0xe22fcaaa. +// +// Solidity: function ONE_TKO() view returns(uint64) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) ONETKO() (uint64, error) { + return _TaikoL1ProverPool.Contract.ONETKO(&_TaikoL1ProverPool.CallOpts) +} + +// SLASHPOINTS is a free data retrieval call binding the contract method 0xdd9fb65c. +// +// Solidity: function SLASH_POINTS() view returns(uint32) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) SLASHPOINTS(opts *bind.CallOpts) (uint32, error) { + var out []interface{} + err := _TaikoL1ProverPool.contract.Call(opts, &out, "SLASH_POINTS") + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// SLASHPOINTS is a free data retrieval call binding the contract method 0xdd9fb65c. // -// Solidity: function MIN_TKO_AMOUNT() view returns(uint256) -func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) MINTKOAMOUNT() (*big.Int, error) { - return _TaikoL1ProverPool.Contract.MINTKOAMOUNT(&_TaikoL1ProverPool.CallOpts) +// Solidity: function SLASH_POINTS() view returns(uint32) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) SLASHPOINTS() (uint32, error) { + return _TaikoL1ProverPool.Contract.SLASHPOINTS(&_TaikoL1ProverPool.CallOpts) } -// MINTKOAMOUNT is a free data retrieval call binding the contract method 0x005eb8f8. +// SLASHPOINTS is a free data retrieval call binding the contract method 0xdd9fb65c. // -// Solidity: function MIN_TKO_AMOUNT() view returns(uint256) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) MINTKOAMOUNT() (*big.Int, error) { - return _TaikoL1ProverPool.Contract.MINTKOAMOUNT(&_TaikoL1ProverPool.CallOpts) +// Solidity: function SLASH_POINTS() view returns(uint32) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) SLASHPOINTS() (uint32, error) { + return _TaikoL1ProverPool.Contract.SLASHPOINTS(&_TaikoL1ProverPool.CallOpts) } // AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f. @@ -304,234 +412,232 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) AddressManager() (comm return _TaikoL1ProverPool.Contract.AddressManager(&_TaikoL1ProverPool.CallOpts) } -// BlockIdToProver is a free data retrieval call binding the contract method 0xf33ed81e. +// GetCapacity is a free data retrieval call binding the contract method 0xc40000d4. // -// Solidity: function blockIdToProver(uint256 blockId) view returns(address prover) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) BlockIdToProver(opts *bind.CallOpts, blockId *big.Int) (common.Address, error) { +// Solidity: function getCapacity() view returns(uint256 capacity) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) GetCapacity(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _TaikoL1ProverPool.contract.Call(opts, &out, "blockIdToProver", blockId) + err := _TaikoL1ProverPool.contract.Call(opts, &out, "getCapacity") if err != nil { - return *new(common.Address), err + return *new(*big.Int), err } - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } -// BlockIdToProver is a free data retrieval call binding the contract method 0xf33ed81e. +// GetCapacity is a free data retrieval call binding the contract method 0xc40000d4. // -// Solidity: function blockIdToProver(uint256 blockId) view returns(address prover) -func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) BlockIdToProver(blockId *big.Int) (common.Address, error) { - return _TaikoL1ProverPool.Contract.BlockIdToProver(&_TaikoL1ProverPool.CallOpts, blockId) +// Solidity: function getCapacity() view returns(uint256 capacity) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) GetCapacity() (*big.Int, error) { + return _TaikoL1ProverPool.Contract.GetCapacity(&_TaikoL1ProverPool.CallOpts) } -// BlockIdToProver is a free data retrieval call binding the contract method 0xf33ed81e. +// GetCapacity is a free data retrieval call binding the contract method 0xc40000d4. // -// Solidity: function blockIdToProver(uint256 blockId) view returns(address prover) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) BlockIdToProver(blockId *big.Int) (common.Address, error) { - return _TaikoL1ProverPool.Contract.BlockIdToProver(&_TaikoL1ProverPool.CallOpts, blockId) +// Solidity: function getCapacity() view returns(uint256 capacity) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) GetCapacity() (*big.Int, error) { + return _TaikoL1ProverPool.Contract.GetCapacity(&_TaikoL1ProverPool.CallOpts) } -// GetProver is a free data retrieval call binding the contract method 0xe02f1931. +// GetProvers is a free data retrieval call binding the contract method 0xc0bfd036. // -// Solidity: function getProver(uint256 blockId) view returns(address) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) GetProver(opts *bind.CallOpts, blockId *big.Int) (common.Address, error) { +// Solidity: function getProvers() view returns((uint32,uint16,uint16)[] _provers, address[] _stakers) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) GetProvers(opts *bind.CallOpts) (struct { + Provers []ProverPoolProver + Stakers []common.Address +}, error) { var out []interface{} - err := _TaikoL1ProverPool.contract.Call(opts, &out, "getProver", blockId) + err := _TaikoL1ProverPool.contract.Call(opts, &out, "getProvers") + outstruct := new(struct { + Provers []ProverPoolProver + Stakers []common.Address + }) if err != nil { - return *new(common.Address), err + return *outstruct, err } - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + outstruct.Provers = *abi.ConvertType(out[0], new([]ProverPoolProver)).(*[]ProverPoolProver) + outstruct.Stakers = *abi.ConvertType(out[1], new([]common.Address)).(*[]common.Address) - return out0, err + return *outstruct, err } -// GetProver is a free data retrieval call binding the contract method 0xe02f1931. +// GetProvers is a free data retrieval call binding the contract method 0xc0bfd036. // -// Solidity: function getProver(uint256 blockId) view returns(address) -func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) GetProver(blockId *big.Int) (common.Address, error) { - return _TaikoL1ProverPool.Contract.GetProver(&_TaikoL1ProverPool.CallOpts, blockId) +// Solidity: function getProvers() view returns((uint32,uint16,uint16)[] _provers, address[] _stakers) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) GetProvers() (struct { + Provers []ProverPoolProver + Stakers []common.Address +}, error) { + return _TaikoL1ProverPool.Contract.GetProvers(&_TaikoL1ProverPool.CallOpts) } -// GetProver is a free data retrieval call binding the contract method 0xe02f1931. +// GetProvers is a free data retrieval call binding the contract method 0xc0bfd036. // -// Solidity: function getProver(uint256 blockId) view returns(address) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) GetProver(blockId *big.Int) (common.Address, error) { - return _TaikoL1ProverPool.Contract.GetProver(&_TaikoL1ProverPool.CallOpts, blockId) +// Solidity: function getProvers() view returns((uint32,uint16,uint16)[] _provers, address[] _stakers) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) GetProvers() (struct { + Provers []ProverPoolProver + Stakers []common.Address +}, error) { + return _TaikoL1ProverPool.Contract.GetProvers(&_TaikoL1ProverPool.CallOpts) } -// MaxPoolSize is a free data retrieval call binding the contract method 0xc5579dc0. +// GetStaker is a free data retrieval call binding the contract method 0xa23c44b1. // -// Solidity: function maxPoolSize() view returns(uint16) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) MaxPoolSize(opts *bind.CallOpts) (uint16, error) { +// Solidity: function getStaker(address addr) view returns((uint64,uint32,uint16,uint8) staker, (uint32,uint16,uint16) prover) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) GetStaker(opts *bind.CallOpts, addr common.Address) (struct { + Staker ProverPoolStaker + Prover ProverPoolProver +}, error) { var out []interface{} - err := _TaikoL1ProverPool.contract.Call(opts, &out, "maxPoolSize") + err := _TaikoL1ProverPool.contract.Call(opts, &out, "getStaker", addr) + outstruct := new(struct { + Staker ProverPoolStaker + Prover ProverPoolProver + }) if err != nil { - return *new(uint16), err + return *outstruct, err } - out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16) + outstruct.Staker = *abi.ConvertType(out[0], new(ProverPoolStaker)).(*ProverPoolStaker) + outstruct.Prover = *abi.ConvertType(out[1], new(ProverPoolProver)).(*ProverPoolProver) - return out0, err + return *outstruct, err } -// MaxPoolSize is a free data retrieval call binding the contract method 0xc5579dc0. +// GetStaker is a free data retrieval call binding the contract method 0xa23c44b1. // -// Solidity: function maxPoolSize() view returns(uint16) -func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) MaxPoolSize() (uint16, error) { - return _TaikoL1ProverPool.Contract.MaxPoolSize(&_TaikoL1ProverPool.CallOpts) +// Solidity: function getStaker(address addr) view returns((uint64,uint32,uint16,uint8) staker, (uint32,uint16,uint16) prover) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) GetStaker(addr common.Address) (struct { + Staker ProverPoolStaker + Prover ProverPoolProver +}, error) { + return _TaikoL1ProverPool.Contract.GetStaker(&_TaikoL1ProverPool.CallOpts, addr) } -// MaxPoolSize is a free data retrieval call binding the contract method 0xc5579dc0. +// GetStaker is a free data retrieval call binding the contract method 0xa23c44b1. // -// Solidity: function maxPoolSize() view returns(uint16) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) MaxPoolSize() (uint16, error) { - return _TaikoL1ProverPool.Contract.MaxPoolSize(&_TaikoL1ProverPool.CallOpts) +// Solidity: function getStaker(address addr) view returns((uint64,uint32,uint16,uint8) staker, (uint32,uint16,uint16) prover) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) GetStaker(addr common.Address) (struct { + Staker ProverPoolStaker + Prover ProverPoolProver +}, error) { + return _TaikoL1ProverPool.Contract.GetStaker(&_TaikoL1ProverPool.CallOpts, addr) } -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// GetWeights is a free data retrieval call binding the contract method 0xc2082974. // -// Solidity: function owner() view returns(address) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) Owner(opts *bind.CallOpts) (common.Address, error) { +// Solidity: function getWeights(uint32 feePerGas) view returns(uint256[32] weights, uint256 totalWeight) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) GetWeights(opts *bind.CallOpts, feePerGas uint32) (struct { + Weights [32]*big.Int + TotalWeight *big.Int +}, error) { var out []interface{} - err := _TaikoL1ProverPool.contract.Call(opts, &out, "owner") + err := _TaikoL1ProverPool.contract.Call(opts, &out, "getWeights", feePerGas) + outstruct := new(struct { + Weights [32]*big.Int + TotalWeight *big.Int + }) if err != nil { - return *new(common.Address), err + return *outstruct, err } - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + outstruct.Weights = *abi.ConvertType(out[0], new([32]*big.Int)).(*[32]*big.Int) + outstruct.TotalWeight = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) - return out0, err + return *outstruct, err } -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// GetWeights is a free data retrieval call binding the contract method 0xc2082974. // -// Solidity: function owner() view returns(address) -func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) Owner() (common.Address, error) { - return _TaikoL1ProverPool.Contract.Owner(&_TaikoL1ProverPool.CallOpts) +// Solidity: function getWeights(uint32 feePerGas) view returns(uint256[32] weights, uint256 totalWeight) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) GetWeights(feePerGas uint32) (struct { + Weights [32]*big.Int + TotalWeight *big.Int +}, error) { + return _TaikoL1ProverPool.Contract.GetWeights(&_TaikoL1ProverPool.CallOpts, feePerGas) } -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// GetWeights is a free data retrieval call binding the contract method 0xc2082974. // -// Solidity: function owner() view returns(address) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) Owner() (common.Address, error) { - return _TaikoL1ProverPool.Contract.Owner(&_TaikoL1ProverPool.CallOpts) +// Solidity: function getWeights(uint32 feePerGas) view returns(uint256[32] weights, uint256 totalWeight) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) GetWeights(feePerGas uint32) (struct { + Weights [32]*big.Int + TotalWeight *big.Int +}, error) { + return _TaikoL1ProverPool.Contract.GetWeights(&_TaikoL1ProverPool.CallOpts, feePerGas) } -// Provers is a free data retrieval call binding the contract method 0x1dec844b. +// IdToProver is a free data retrieval call binding the contract method 0x2f88a7fe. // -// Solidity: function provers(address ) view returns(address proverAddress, uint256 stakedTokens, uint256 rewards, uint256 healthScore, uint256 lastBlockTsToBeProven, uint32 capacity, uint32 numAssignedBlocks, uint8 feeMultiplier) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) Provers(opts *bind.CallOpts, arg0 common.Address) (struct { - ProverAddress common.Address - StakedTokens *big.Int - Rewards *big.Int - HealthScore *big.Int - LastBlockTsToBeProven *big.Int - Capacity uint32 - NumAssignedBlocks uint32 - FeeMultiplier uint8 -}, error) { +// Solidity: function idToProver(uint256 id) view returns(address prover) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) IdToProver(opts *bind.CallOpts, id *big.Int) (common.Address, error) { var out []interface{} - err := _TaikoL1ProverPool.contract.Call(opts, &out, "provers", arg0) + err := _TaikoL1ProverPool.contract.Call(opts, &out, "idToProver", id) - outstruct := new(struct { - ProverAddress common.Address - StakedTokens *big.Int - Rewards *big.Int - HealthScore *big.Int - LastBlockTsToBeProven *big.Int - Capacity uint32 - NumAssignedBlocks uint32 - FeeMultiplier uint8 - }) if err != nil { - return *outstruct, err + return *new(common.Address), err } - outstruct.ProverAddress = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - outstruct.StakedTokens = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) - outstruct.Rewards = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) - outstruct.HealthScore = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) - outstruct.LastBlockTsToBeProven = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) - outstruct.Capacity = *abi.ConvertType(out[5], new(uint32)).(*uint32) - outstruct.NumAssignedBlocks = *abi.ConvertType(out[6], new(uint32)).(*uint32) - outstruct.FeeMultiplier = *abi.ConvertType(out[7], new(uint8)).(*uint8) + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - return *outstruct, err + return out0, err } -// Provers is a free data retrieval call binding the contract method 0x1dec844b. +// IdToProver is a free data retrieval call binding the contract method 0x2f88a7fe. // -// Solidity: function provers(address ) view returns(address proverAddress, uint256 stakedTokens, uint256 rewards, uint256 healthScore, uint256 lastBlockTsToBeProven, uint32 capacity, uint32 numAssignedBlocks, uint8 feeMultiplier) -func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) Provers(arg0 common.Address) (struct { - ProverAddress common.Address - StakedTokens *big.Int - Rewards *big.Int - HealthScore *big.Int - LastBlockTsToBeProven *big.Int - Capacity uint32 - NumAssignedBlocks uint32 - FeeMultiplier uint8 -}, error) { - return _TaikoL1ProverPool.Contract.Provers(&_TaikoL1ProverPool.CallOpts, arg0) +// Solidity: function idToProver(uint256 id) view returns(address prover) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) IdToProver(id *big.Int) (common.Address, error) { + return _TaikoL1ProverPool.Contract.IdToProver(&_TaikoL1ProverPool.CallOpts, id) } -// Provers is a free data retrieval call binding the contract method 0x1dec844b. +// IdToProver is a free data retrieval call binding the contract method 0x2f88a7fe. // -// Solidity: function provers(address ) view returns(address proverAddress, uint256 stakedTokens, uint256 rewards, uint256 healthScore, uint256 lastBlockTsToBeProven, uint32 capacity, uint32 numAssignedBlocks, uint8 feeMultiplier) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) Provers(arg0 common.Address) (struct { - ProverAddress common.Address - StakedTokens *big.Int - Rewards *big.Int - HealthScore *big.Int - LastBlockTsToBeProven *big.Int - Capacity uint32 - NumAssignedBlocks uint32 - FeeMultiplier uint8 -}, error) { - return _TaikoL1ProverPool.Contract.Provers(&_TaikoL1ProverPool.CallOpts, arg0) +// Solidity: function idToProver(uint256 id) view returns(address prover) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) IdToProver(id *big.Int) (common.Address, error) { + return _TaikoL1ProverPool.Contract.IdToProver(&_TaikoL1ProverPool.CallOpts, id) } -// ProversInPool is a free data retrieval call binding the contract method 0xb0aa5fcc. +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function proversInPool() view returns(uint16) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) ProversInPool(opts *bind.CallOpts) (uint16, error) { +// Solidity: function owner() view returns(address) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) Owner(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _TaikoL1ProverPool.contract.Call(opts, &out, "proversInPool") + err := _TaikoL1ProverPool.contract.Call(opts, &out, "owner") if err != nil { - return *new(uint16), err + return *new(common.Address), err } - out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16) + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) return out0, err } -// ProversInPool is a free data retrieval call binding the contract method 0xb0aa5fcc. +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function proversInPool() view returns(uint16) -func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) ProversInPool() (uint16, error) { - return _TaikoL1ProverPool.Contract.ProversInPool(&_TaikoL1ProverPool.CallOpts) +// Solidity: function owner() view returns(address) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) Owner() (common.Address, error) { + return _TaikoL1ProverPool.Contract.Owner(&_TaikoL1ProverPool.CallOpts) } -// ProversInPool is a free data retrieval call binding the contract method 0xb0aa5fcc. +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function proversInPool() view returns(uint16) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) ProversInPool() (uint16, error) { - return _TaikoL1ProverPool.Contract.ProversInPool(&_TaikoL1ProverPool.CallOpts) +// Solidity: function owner() view returns(address) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) Owner() (common.Address, error) { + return _TaikoL1ProverPool.Contract.Owner(&_TaikoL1ProverPool.CallOpts) } // Resolve is a free data retrieval call binding the contract method 0x6c6563f6. @@ -596,98 +702,80 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) Resolve0(name [32]byte return _TaikoL1ProverPool.Contract.Resolve0(&_TaikoL1ProverPool.CallOpts, name, allowZeroAddress) } -// TopProvers is a free data retrieval call binding the contract method 0xd70e4ea6. +// Stakers is a free data retrieval call binding the contract method 0x9168ae72. // -// Solidity: function topProvers(uint256 ) view returns(address) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) TopProvers(opts *bind.CallOpts, arg0 *big.Int) (common.Address, error) { +// Solidity: function stakers(address staker) view returns(uint64 exitRequestedAt, uint32 exitAmount, uint16 maxCapacity, uint8 proverId) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) Stakers(opts *bind.CallOpts, staker common.Address) (struct { + ExitRequestedAt uint64 + ExitAmount uint32 + MaxCapacity uint16 + ProverId uint8 +}, error) { var out []interface{} - err := _TaikoL1ProverPool.contract.Call(opts, &out, "topProvers", arg0) + err := _TaikoL1ProverPool.contract.Call(opts, &out, "stakers", staker) + outstruct := new(struct { + ExitRequestedAt uint64 + ExitAmount uint32 + MaxCapacity uint16 + ProverId uint8 + }) if err != nil { - return *new(common.Address), err + return *outstruct, err } - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// TopProvers is a free data retrieval call binding the contract method 0xd70e4ea6. -// -// Solidity: function topProvers(uint256 ) view returns(address) -func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) TopProvers(arg0 *big.Int) (common.Address, error) { - return _TaikoL1ProverPool.Contract.TopProvers(&_TaikoL1ProverPool.CallOpts, arg0) -} - -// TopProvers is a free data retrieval call binding the contract method 0xd70e4ea6. -// -// Solidity: function topProvers(uint256 ) view returns(address) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) TopProvers(arg0 *big.Int) (common.Address, error) { - return _TaikoL1ProverPool.Contract.TopProvers(&_TaikoL1ProverPool.CallOpts, arg0) -} - -// AdjustCapacity is a paid mutator transaction binding the contract method 0x426759e3. -// -// Solidity: function adjustCapacity(uint32 newCapacity) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) AdjustCapacity(opts *bind.TransactOpts, newCapacity uint32) (*types.Transaction, error) { - return _TaikoL1ProverPool.contract.Transact(opts, "adjustCapacity", newCapacity) -} - -// AdjustCapacity is a paid mutator transaction binding the contract method 0x426759e3. -// -// Solidity: function adjustCapacity(uint32 newCapacity) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) AdjustCapacity(newCapacity uint32) (*types.Transaction, error) { - return _TaikoL1ProverPool.Contract.AdjustCapacity(&_TaikoL1ProverPool.TransactOpts, newCapacity) -} + outstruct.ExitRequestedAt = *abi.ConvertType(out[0], new(uint64)).(*uint64) + outstruct.ExitAmount = *abi.ConvertType(out[1], new(uint32)).(*uint32) + outstruct.MaxCapacity = *abi.ConvertType(out[2], new(uint16)).(*uint16) + outstruct.ProverId = *abi.ConvertType(out[3], new(uint8)).(*uint8) -// AdjustCapacity is a paid mutator transaction binding the contract method 0x426759e3. -// -// Solidity: function adjustCapacity(uint32 newCapacity) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) AdjustCapacity(newCapacity uint32) (*types.Transaction, error) { - return _TaikoL1ProverPool.Contract.AdjustCapacity(&_TaikoL1ProverPool.TransactOpts, newCapacity) -} + return *outstruct, err -// AdjustFeeMultiplier is a paid mutator transaction binding the contract method 0x4e07a0ce. -// -// Solidity: function adjustFeeMultiplier(uint8 newFeeMultiplier) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) AdjustFeeMultiplier(opts *bind.TransactOpts, newFeeMultiplier uint8) (*types.Transaction, error) { - return _TaikoL1ProverPool.contract.Transact(opts, "adjustFeeMultiplier", newFeeMultiplier) } -// AdjustFeeMultiplier is a paid mutator transaction binding the contract method 0x4e07a0ce. +// Stakers is a free data retrieval call binding the contract method 0x9168ae72. // -// Solidity: function adjustFeeMultiplier(uint8 newFeeMultiplier) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) AdjustFeeMultiplier(newFeeMultiplier uint8) (*types.Transaction, error) { - return _TaikoL1ProverPool.Contract.AdjustFeeMultiplier(&_TaikoL1ProverPool.TransactOpts, newFeeMultiplier) +// Solidity: function stakers(address staker) view returns(uint64 exitRequestedAt, uint32 exitAmount, uint16 maxCapacity, uint8 proverId) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) Stakers(staker common.Address) (struct { + ExitRequestedAt uint64 + ExitAmount uint32 + MaxCapacity uint16 + ProverId uint8 +}, error) { + return _TaikoL1ProverPool.Contract.Stakers(&_TaikoL1ProverPool.CallOpts, staker) } -// AdjustFeeMultiplier is a paid mutator transaction binding the contract method 0x4e07a0ce. +// Stakers is a free data retrieval call binding the contract method 0x9168ae72. // -// Solidity: function adjustFeeMultiplier(uint8 newFeeMultiplier) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) AdjustFeeMultiplier(newFeeMultiplier uint8) (*types.Transaction, error) { - return _TaikoL1ProverPool.Contract.AdjustFeeMultiplier(&_TaikoL1ProverPool.TransactOpts, newFeeMultiplier) +// Solidity: function stakers(address staker) view returns(uint64 exitRequestedAt, uint32 exitAmount, uint16 maxCapacity, uint8 proverId) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) Stakers(staker common.Address) (struct { + ExitRequestedAt uint64 + ExitAmount uint32 + MaxCapacity uint16 + ProverId uint8 +}, error) { + return _TaikoL1ProverPool.Contract.Stakers(&_TaikoL1ProverPool.CallOpts, staker) } -// EnterProverPool is a paid mutator transaction binding the contract method 0xd12037ff. +// AssignProver is a paid mutator transaction binding the contract method 0xbd849fe9. // -// Solidity: function enterProverPool(uint256 amount, uint256 feeMultiplier, uint32 capacity) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) EnterProverPool(opts *bind.TransactOpts, amount *big.Int, feeMultiplier *big.Int, capacity uint32) (*types.Transaction, error) { - return _TaikoL1ProverPool.contract.Transact(opts, "enterProverPool", amount, feeMultiplier, capacity) +// Solidity: function assignProver(uint64 blockId, uint32 feePerGas) returns(address prover, uint32 rewardPerGas) +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) AssignProver(opts *bind.TransactOpts, blockId uint64, feePerGas uint32) (*types.Transaction, error) { + return _TaikoL1ProverPool.contract.Transact(opts, "assignProver", blockId, feePerGas) } -// EnterProverPool is a paid mutator transaction binding the contract method 0xd12037ff. +// AssignProver is a paid mutator transaction binding the contract method 0xbd849fe9. // -// Solidity: function enterProverPool(uint256 amount, uint256 feeMultiplier, uint32 capacity) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) EnterProverPool(amount *big.Int, feeMultiplier *big.Int, capacity uint32) (*types.Transaction, error) { - return _TaikoL1ProverPool.Contract.EnterProverPool(&_TaikoL1ProverPool.TransactOpts, amount, feeMultiplier, capacity) +// Solidity: function assignProver(uint64 blockId, uint32 feePerGas) returns(address prover, uint32 rewardPerGas) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) AssignProver(blockId uint64, feePerGas uint32) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.AssignProver(&_TaikoL1ProverPool.TransactOpts, blockId, feePerGas) } -// EnterProverPool is a paid mutator transaction binding the contract method 0xd12037ff. +// AssignProver is a paid mutator transaction binding the contract method 0xbd849fe9. // -// Solidity: function enterProverPool(uint256 amount, uint256 feeMultiplier, uint32 capacity) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) EnterProverPool(amount *big.Int, feeMultiplier *big.Int, capacity uint32) (*types.Transaction, error) { - return _TaikoL1ProverPool.Contract.EnterProverPool(&_TaikoL1ProverPool.TransactOpts, amount, feeMultiplier, capacity) +// Solidity: function assignProver(uint64 blockId, uint32 feePerGas) returns(address prover, uint32 rewardPerGas) +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) AssignProver(blockId uint64, feePerGas uint32) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.AssignProver(&_TaikoL1ProverPool.TransactOpts, blockId, feePerGas) } // Exit is a paid mutator transaction binding the contract method 0xe9fad8ee. @@ -711,46 +799,46 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) Exit() (*types.Tra return _TaikoL1ProverPool.Contract.Exit(&_TaikoL1ProverPool.TransactOpts) } -// Init is a paid mutator transaction binding the contract method 0xd2fd155e. +// Init is a paid mutator transaction binding the contract method 0x19ab453c. // -// Solidity: function init(address _addressManager, uint16 _maxPoolSize) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) Init(opts *bind.TransactOpts, _addressManager common.Address, _maxPoolSize uint16) (*types.Transaction, error) { - return _TaikoL1ProverPool.contract.Transact(opts, "init", _addressManager, _maxPoolSize) +// Solidity: function init(address _addressManager) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) Init(opts *bind.TransactOpts, _addressManager common.Address) (*types.Transaction, error) { + return _TaikoL1ProverPool.contract.Transact(opts, "init", _addressManager) } -// Init is a paid mutator transaction binding the contract method 0xd2fd155e. +// Init is a paid mutator transaction binding the contract method 0x19ab453c. // -// Solidity: function init(address _addressManager, uint16 _maxPoolSize) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) Init(_addressManager common.Address, _maxPoolSize uint16) (*types.Transaction, error) { - return _TaikoL1ProverPool.Contract.Init(&_TaikoL1ProverPool.TransactOpts, _addressManager, _maxPoolSize) +// Solidity: function init(address _addressManager) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) Init(_addressManager common.Address) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.Init(&_TaikoL1ProverPool.TransactOpts, _addressManager) } -// Init is a paid mutator transaction binding the contract method 0xd2fd155e. +// Init is a paid mutator transaction binding the contract method 0x19ab453c. // -// Solidity: function init(address _addressManager, uint16 _maxPoolSize) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) Init(_addressManager common.Address, _maxPoolSize uint16) (*types.Transaction, error) { - return _TaikoL1ProverPool.Contract.Init(&_TaikoL1ProverPool.TransactOpts, _addressManager, _maxPoolSize) +// Solidity: function init(address _addressManager) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) Init(_addressManager common.Address) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.Init(&_TaikoL1ProverPool.TransactOpts, _addressManager) } -// PickRandomProver is a paid mutator transaction binding the contract method 0xc9117290. +// ReleaseProver is a paid mutator transaction binding the contract method 0xcba0414f. // -// Solidity: function pickRandomProver(uint256 randomNumber, uint256 blockId) returns(address) -func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) PickRandomProver(opts *bind.TransactOpts, randomNumber *big.Int, blockId *big.Int) (*types.Transaction, error) { - return _TaikoL1ProverPool.contract.Transact(opts, "pickRandomProver", randomNumber, blockId) +// Solidity: function releaseProver(address addr) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) ReleaseProver(opts *bind.TransactOpts, addr common.Address) (*types.Transaction, error) { + return _TaikoL1ProverPool.contract.Transact(opts, "releaseProver", addr) } -// PickRandomProver is a paid mutator transaction binding the contract method 0xc9117290. +// ReleaseProver is a paid mutator transaction binding the contract method 0xcba0414f. // -// Solidity: function pickRandomProver(uint256 randomNumber, uint256 blockId) returns(address) -func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) PickRandomProver(randomNumber *big.Int, blockId *big.Int) (*types.Transaction, error) { - return _TaikoL1ProverPool.Contract.PickRandomProver(&_TaikoL1ProverPool.TransactOpts, randomNumber, blockId) +// Solidity: function releaseProver(address addr) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) ReleaseProver(addr common.Address) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.ReleaseProver(&_TaikoL1ProverPool.TransactOpts, addr) } -// PickRandomProver is a paid mutator transaction binding the contract method 0xc9117290. +// ReleaseProver is a paid mutator transaction binding the contract method 0xcba0414f. // -// Solidity: function pickRandomProver(uint256 randomNumber, uint256 blockId) returns(address) -func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) PickRandomProver(randomNumber *big.Int, blockId *big.Int) (*types.Transaction, error) { - return _TaikoL1ProverPool.Contract.PickRandomProver(&_TaikoL1ProverPool.TransactOpts, randomNumber, blockId) +// Solidity: function releaseProver(address addr) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) ReleaseProver(addr common.Address) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.ReleaseProver(&_TaikoL1ProverPool.TransactOpts, addr) } // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. @@ -797,44 +885,44 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) SetAddressManager( // SlashProver is a paid mutator transaction binding the contract method 0xcd362a5b. // -// Solidity: function slashProver(address prover) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) SlashProver(opts *bind.TransactOpts, prover common.Address) (*types.Transaction, error) { - return _TaikoL1ProverPool.contract.Transact(opts, "slashProver", prover) +// Solidity: function slashProver(address addr) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) SlashProver(opts *bind.TransactOpts, addr common.Address) (*types.Transaction, error) { + return _TaikoL1ProverPool.contract.Transact(opts, "slashProver", addr) } // SlashProver is a paid mutator transaction binding the contract method 0xcd362a5b. // -// Solidity: function slashProver(address prover) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) SlashProver(prover common.Address) (*types.Transaction, error) { - return _TaikoL1ProverPool.Contract.SlashProver(&_TaikoL1ProverPool.TransactOpts, prover) +// Solidity: function slashProver(address addr) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) SlashProver(addr common.Address) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.SlashProver(&_TaikoL1ProverPool.TransactOpts, addr) } // SlashProver is a paid mutator transaction binding the contract method 0xcd362a5b. // -// Solidity: function slashProver(address prover) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) SlashProver(prover common.Address) (*types.Transaction, error) { - return _TaikoL1ProverPool.Contract.SlashProver(&_TaikoL1ProverPool.TransactOpts, prover) +// Solidity: function slashProver(address addr) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) SlashProver(addr common.Address) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.SlashProver(&_TaikoL1ProverPool.TransactOpts, addr) } -// StakeMoreTokens is a paid mutator transaction binding the contract method 0x9e8008d1. +// Stake is a paid mutator transaction binding the contract method 0x3ca316f1. // -// Solidity: function stakeMoreTokens(uint256 amount) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) StakeMoreTokens(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { - return _TaikoL1ProverPool.contract.Transact(opts, "stakeMoreTokens", amount) +// Solidity: function stake(uint32 amount, uint16 rewardPerGas, uint16 maxCapacity) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) Stake(opts *bind.TransactOpts, amount uint32, rewardPerGas uint16, maxCapacity uint16) (*types.Transaction, error) { + return _TaikoL1ProverPool.contract.Transact(opts, "stake", amount, rewardPerGas, maxCapacity) } -// StakeMoreTokens is a paid mutator transaction binding the contract method 0x9e8008d1. +// Stake is a paid mutator transaction binding the contract method 0x3ca316f1. // -// Solidity: function stakeMoreTokens(uint256 amount) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) StakeMoreTokens(amount *big.Int) (*types.Transaction, error) { - return _TaikoL1ProverPool.Contract.StakeMoreTokens(&_TaikoL1ProverPool.TransactOpts, amount) +// Solidity: function stake(uint32 amount, uint16 rewardPerGas, uint16 maxCapacity) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) Stake(amount uint32, rewardPerGas uint16, maxCapacity uint16) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.Stake(&_TaikoL1ProverPool.TransactOpts, amount, rewardPerGas, maxCapacity) } -// StakeMoreTokens is a paid mutator transaction binding the contract method 0x9e8008d1. +// Stake is a paid mutator transaction binding the contract method 0x3ca316f1. // -// Solidity: function stakeMoreTokens(uint256 amount) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) StakeMoreTokens(amount *big.Int) (*types.Transaction, error) { - return _TaikoL1ProverPool.Contract.StakeMoreTokens(&_TaikoL1ProverPool.TransactOpts, amount) +// Solidity: function stake(uint32 amount, uint16 rewardPerGas, uint16 maxCapacity) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) Stake(amount uint32, rewardPerGas uint16, maxCapacity uint16) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.Stake(&_TaikoL1ProverPool.TransactOpts, amount, rewardPerGas, maxCapacity) } // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. @@ -858,25 +946,25 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) TransferOwnership( return _TaikoL1ProverPool.Contract.TransferOwnership(&_TaikoL1ProverPool.TransactOpts, newOwner) } -// WithdrawRewards is a paid mutator transaction binding the contract method 0x45c69831. +// Withdraw is a paid mutator transaction binding the contract method 0x3ccfd60b. // -// Solidity: function withdrawRewards(uint64 amount) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) WithdrawRewards(opts *bind.TransactOpts, amount uint64) (*types.Transaction, error) { - return _TaikoL1ProverPool.contract.Transact(opts, "withdrawRewards", amount) +// Solidity: function withdraw() returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) Withdraw(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TaikoL1ProverPool.contract.Transact(opts, "withdraw") } -// WithdrawRewards is a paid mutator transaction binding the contract method 0x45c69831. +// Withdraw is a paid mutator transaction binding the contract method 0x3ccfd60b. // -// Solidity: function withdrawRewards(uint64 amount) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) WithdrawRewards(amount uint64) (*types.Transaction, error) { - return _TaikoL1ProverPool.Contract.WithdrawRewards(&_TaikoL1ProverPool.TransactOpts, amount) +// Solidity: function withdraw() returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) Withdraw() (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.Withdraw(&_TaikoL1ProverPool.TransactOpts) } -// WithdrawRewards is a paid mutator transaction binding the contract method 0x45c69831. +// Withdraw is a paid mutator transaction binding the contract method 0x3ccfd60b. // -// Solidity: function withdrawRewards(uint64 amount) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) WithdrawRewards(amount uint64) (*types.Transaction, error) { - return _TaikoL1ProverPool.Contract.WithdrawRewards(&_TaikoL1ProverPool.TransactOpts, amount) +// Solidity: function withdraw() returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) Withdraw() (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.Withdraw(&_TaikoL1ProverPool.TransactOpts) } // TaikoL1ProverPoolAddressManagerChangedIterator is returned from FilterAddressManagerChanged and is used to iterate over the raw logs and unpacked data for AddressManagerChanged events raised by the TaikoL1ProverPool contract. @@ -1013,9 +1101,9 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseAddressManagerChanged( return event, nil } -// TaikoL1ProverPoolInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the TaikoL1ProverPool contract. -type TaikoL1ProverPoolInitializedIterator struct { - Event *TaikoL1ProverPoolInitialized // Event containing the contract specifics and raw log +// TaikoL1ProverPoolExitedIterator is returned from FilterExited and is used to iterate over the raw logs and unpacked data for Exited events raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolExitedIterator struct { + Event *TaikoL1ProverPoolExited // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1029,7 +1117,7 @@ type TaikoL1ProverPoolInitializedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *TaikoL1ProverPoolInitializedIterator) Next() bool { +func (it *TaikoL1ProverPoolExitedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1038,7 +1126,7 @@ func (it *TaikoL1ProverPoolInitializedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(TaikoL1ProverPoolInitialized) + it.Event = new(TaikoL1ProverPoolExited) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1053,7 +1141,7 @@ func (it *TaikoL1ProverPoolInitializedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(TaikoL1ProverPoolInitialized) + it.Event = new(TaikoL1ProverPoolExited) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1069,41 +1157,52 @@ func (it *TaikoL1ProverPoolInitializedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoL1ProverPoolInitializedIterator) Error() error { +func (it *TaikoL1ProverPoolExitedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *TaikoL1ProverPoolInitializedIterator) Close() error { +func (it *TaikoL1ProverPoolExitedIterator) Close() error { it.sub.Unsubscribe() return nil } -// TaikoL1ProverPoolInitialized represents a Initialized event raised by the TaikoL1ProverPool contract. -type TaikoL1ProverPoolInitialized struct { - Version uint8 - Raw types.Log // Blockchain specific contextual infos +// TaikoL1ProverPoolExited represents a Exited event raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolExited struct { + Addr common.Address + Amount uint32 + Raw types.Log // Blockchain specific contextual infos } -// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// FilterExited is a free log retrieval operation binding the contract event 0xfa715c30456da257872290458c962d9495b3a623e7df06cacb5b8dd68668554d. // -// Solidity: event Initialized(uint8 version) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterInitialized(opts *bind.FilterOpts) (*TaikoL1ProverPoolInitializedIterator, error) { +// Solidity: event Exited(address indexed addr, uint32 amount) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterExited(opts *bind.FilterOpts, addr []common.Address) (*TaikoL1ProverPoolExitedIterator, error) { - logs, sub, err := _TaikoL1ProverPool.contract.FilterLogs(opts, "Initialized") + var addrRule []interface{} + for _, addrItem := range addr { + addrRule = append(addrRule, addrItem) + } + + logs, sub, err := _TaikoL1ProverPool.contract.FilterLogs(opts, "Exited", addrRule) if err != nil { return nil, err } - return &TaikoL1ProverPoolInitializedIterator{contract: _TaikoL1ProverPool.contract, event: "Initialized", logs: logs, sub: sub}, nil + return &TaikoL1ProverPoolExitedIterator{contract: _TaikoL1ProverPool.contract, event: "Exited", logs: logs, sub: sub}, nil } -// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// WatchExited is a free log subscription operation binding the contract event 0xfa715c30456da257872290458c962d9495b3a623e7df06cacb5b8dd68668554d. // -// Solidity: event Initialized(uint8 version) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolInitialized) (event.Subscription, error) { +// Solidity: event Exited(address indexed addr, uint32 amount) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchExited(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolExited, addr []common.Address) (event.Subscription, error) { - logs, sub, err := _TaikoL1ProverPool.contract.WatchLogs(opts, "Initialized") + var addrRule []interface{} + for _, addrItem := range addr { + addrRule = append(addrRule, addrItem) + } + + logs, sub, err := _TaikoL1ProverPool.contract.WatchLogs(opts, "Exited", addrRule) if err != nil { return nil, err } @@ -1113,8 +1212,8 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchInitialized(opts *bind select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(TaikoL1ProverPoolInitialized) - if err := _TaikoL1ProverPool.contract.UnpackLog(event, "Initialized", log); err != nil { + event := new(TaikoL1ProverPoolExited) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "Exited", log); err != nil { return err } event.Raw = log @@ -1135,21 +1234,21 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchInitialized(opts *bind }), nil } -// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// ParseExited is a log parse operation binding the contract event 0xfa715c30456da257872290458c962d9495b3a623e7df06cacb5b8dd68668554d. // -// Solidity: event Initialized(uint8 version) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseInitialized(log types.Log) (*TaikoL1ProverPoolInitialized, error) { - event := new(TaikoL1ProverPoolInitialized) - if err := _TaikoL1ProverPool.contract.UnpackLog(event, "Initialized", log); err != nil { +// Solidity: event Exited(address indexed addr, uint32 amount) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseExited(log types.Log) (*TaikoL1ProverPoolExited, error) { + event := new(TaikoL1ProverPoolExited) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "Exited", log); err != nil { return nil, err } event.Raw = log return event, nil } -// TaikoL1ProverPoolOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the TaikoL1ProverPool contract. -type TaikoL1ProverPoolOwnershipTransferredIterator struct { - Event *TaikoL1ProverPoolOwnershipTransferred // Event containing the contract specifics and raw log +// TaikoL1ProverPoolInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolInitializedIterator struct { + Event *TaikoL1ProverPoolInitialized // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1163,7 +1262,7 @@ type TaikoL1ProverPoolOwnershipTransferredIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *TaikoL1ProverPoolOwnershipTransferredIterator) Next() bool { +func (it *TaikoL1ProverPoolInitializedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1172,7 +1271,7 @@ func (it *TaikoL1ProverPoolOwnershipTransferredIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(TaikoL1ProverPoolOwnershipTransferred) + it.Event = new(TaikoL1ProverPoolInitialized) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1187,7 +1286,7 @@ func (it *TaikoL1ProverPoolOwnershipTransferredIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(TaikoL1ProverPoolOwnershipTransferred) + it.Event = new(TaikoL1ProverPoolInitialized) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1203,60 +1302,41 @@ func (it *TaikoL1ProverPoolOwnershipTransferredIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoL1ProverPoolOwnershipTransferredIterator) Error() error { +func (it *TaikoL1ProverPoolInitializedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *TaikoL1ProverPoolOwnershipTransferredIterator) Close() error { +func (it *TaikoL1ProverPoolInitializedIterator) Close() error { it.sub.Unsubscribe() return nil } -// TaikoL1ProverPoolOwnershipTransferred represents a OwnershipTransferred event raised by the TaikoL1ProverPool contract. -type TaikoL1ProverPoolOwnershipTransferred struct { - PreviousOwner common.Address - NewOwner common.Address - Raw types.Log // Blockchain specific contextual infos +// TaikoL1ProverPoolInitialized represents a Initialized event raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos } -// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. // -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*TaikoL1ProverPoolOwnershipTransferredIterator, error) { - - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } +// Solidity: event Initialized(uint8 version) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterInitialized(opts *bind.FilterOpts) (*TaikoL1ProverPoolInitializedIterator, error) { - logs, sub, err := _TaikoL1ProverPool.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + logs, sub, err := _TaikoL1ProverPool.contract.FilterLogs(opts, "Initialized") if err != nil { return nil, err } - return &TaikoL1ProverPoolOwnershipTransferredIterator{contract: _TaikoL1ProverPool.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil + return &TaikoL1ProverPoolInitializedIterator{contract: _TaikoL1ProverPool.contract, event: "Initialized", logs: logs, sub: sub}, nil } -// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. // -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { - - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } +// Solidity: event Initialized(uint8 version) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolInitialized) (event.Subscription, error) { - logs, sub, err := _TaikoL1ProverPool.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + logs, sub, err := _TaikoL1ProverPool.contract.WatchLogs(opts, "Initialized") if err != nil { return nil, err } @@ -1266,8 +1346,8 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchOwnershipTransferred(o select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(TaikoL1ProverPoolOwnershipTransferred) - if err := _TaikoL1ProverPool.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + event := new(TaikoL1ProverPoolInitialized) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "Initialized", log); err != nil { return err } event.Raw = log @@ -1288,21 +1368,21 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchOwnershipTransferred(o }), nil } -// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. // -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseOwnershipTransferred(log types.Log) (*TaikoL1ProverPoolOwnershipTransferred, error) { - event := new(TaikoL1ProverPoolOwnershipTransferred) - if err := _TaikoL1ProverPool.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err +// Solidity: event Initialized(uint8 version) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseInitialized(log types.Log) (*TaikoL1ProverPoolInitialized, error) { + event := new(TaikoL1ProverPoolInitialized) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err } event.Raw = log return event, nil } -// TaikoL1ProverPoolProverAdjustedCapacityIterator is returned from FilterProverAdjustedCapacity and is used to iterate over the raw logs and unpacked data for ProverAdjustedCapacity events raised by the TaikoL1ProverPool contract. -type TaikoL1ProverPoolProverAdjustedCapacityIterator struct { - Event *TaikoL1ProverPoolProverAdjustedCapacity // Event containing the contract specifics and raw log +// TaikoL1ProverPoolOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolOwnershipTransferredIterator struct { + Event *TaikoL1ProverPoolOwnershipTransferred // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1316,7 +1396,7 @@ type TaikoL1ProverPoolProverAdjustedCapacityIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *TaikoL1ProverPoolProverAdjustedCapacityIterator) Next() bool { +func (it *TaikoL1ProverPoolOwnershipTransferredIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1325,7 +1405,7 @@ func (it *TaikoL1ProverPoolProverAdjustedCapacityIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(TaikoL1ProverPoolProverAdjustedCapacity) + it.Event = new(TaikoL1ProverPoolOwnershipTransferred) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1340,7 +1420,7 @@ func (it *TaikoL1ProverPoolProverAdjustedCapacityIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(TaikoL1ProverPoolProverAdjustedCapacity) + it.Event = new(TaikoL1ProverPoolOwnershipTransferred) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1356,179 +1436,60 @@ func (it *TaikoL1ProverPoolProverAdjustedCapacityIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoL1ProverPoolProverAdjustedCapacityIterator) Error() error { +func (it *TaikoL1ProverPoolOwnershipTransferredIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *TaikoL1ProverPoolProverAdjustedCapacityIterator) Close() error { +func (it *TaikoL1ProverPoolOwnershipTransferredIterator) Close() error { it.sub.Unsubscribe() return nil } -// TaikoL1ProverPoolProverAdjustedCapacity represents a ProverAdjustedCapacity event raised by the TaikoL1ProverPool contract. -type TaikoL1ProverPoolProverAdjustedCapacity struct { - Prover common.Address - OldCapacity uint32 - NewCapacity uint32 - Raw types.Log // Blockchain specific contextual infos +// TaikoL1ProverPoolOwnershipTransferred represents a OwnershipTransferred event raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos } -// FilterProverAdjustedCapacity is a free log retrieval operation binding the contract event 0xa426d28c428ee95eedf18d1c934f2069b32d38457a5f7f87127aeb8ea0729fb2. +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. // -// Solidity: event ProverAdjustedCapacity(address prover, uint32 oldCapacity, uint32 newCapacity) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterProverAdjustedCapacity(opts *bind.FilterOpts) (*TaikoL1ProverPoolProverAdjustedCapacityIterator, error) { +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*TaikoL1ProverPoolOwnershipTransferredIterator, error) { - logs, sub, err := _TaikoL1ProverPool.contract.FilterLogs(opts, "ProverAdjustedCapacity") - if err != nil { - return nil, err + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) } - return &TaikoL1ProverPoolProverAdjustedCapacityIterator{contract: _TaikoL1ProverPool.contract, event: "ProverAdjustedCapacity", logs: logs, sub: sub}, nil -} - -// WatchProverAdjustedCapacity is a free log subscription operation binding the contract event 0xa426d28c428ee95eedf18d1c934f2069b32d38457a5f7f87127aeb8ea0729fb2. -// -// Solidity: event ProverAdjustedCapacity(address prover, uint32 oldCapacity, uint32 newCapacity) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchProverAdjustedCapacity(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolProverAdjustedCapacity) (event.Subscription, error) { - logs, sub, err := _TaikoL1ProverPool.contract.WatchLogs(opts, "ProverAdjustedCapacity") + logs, sub, err := _TaikoL1ProverPool.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) if err != nil { return nil, err } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(TaikoL1ProverPoolProverAdjustedCapacity) - if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverAdjustedCapacity", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil + return &TaikoL1ProverPoolOwnershipTransferredIterator{contract: _TaikoL1ProverPool.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil } -// ParseProverAdjustedCapacity is a log parse operation binding the contract event 0xa426d28c428ee95eedf18d1c934f2069b32d38457a5f7f87127aeb8ea0729fb2. +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. // -// Solidity: event ProverAdjustedCapacity(address prover, uint32 oldCapacity, uint32 newCapacity) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseProverAdjustedCapacity(log types.Log) (*TaikoL1ProverPoolProverAdjustedCapacity, error) { - event := new(TaikoL1ProverPoolProverAdjustedCapacity) - if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverAdjustedCapacity", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// TaikoL1ProverPoolProverAdjustedFeeMultiplierIterator is returned from FilterProverAdjustedFeeMultiplier and is used to iterate over the raw logs and unpacked data for ProverAdjustedFeeMultiplier events raised by the TaikoL1ProverPool contract. -type TaikoL1ProverPoolProverAdjustedFeeMultiplierIterator struct { - Event *TaikoL1ProverPoolProverAdjustedFeeMultiplier // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *TaikoL1ProverPoolProverAdjustedFeeMultiplierIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(TaikoL1ProverPoolProverAdjustedFeeMultiplier) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(TaikoL1ProverPoolProverAdjustedFeeMultiplier) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoL1ProverPoolProverAdjustedFeeMultiplierIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *TaikoL1ProverPoolProverAdjustedFeeMultiplierIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// TaikoL1ProverPoolProverAdjustedFeeMultiplier represents a ProverAdjustedFeeMultiplier event raised by the TaikoL1ProverPool contract. -type TaikoL1ProverPoolProverAdjustedFeeMultiplier struct { - Prover common.Address - OldFeeMultiplier *big.Int - NewFeeMultiplier *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterProverAdjustedFeeMultiplier is a free log retrieval operation binding the contract event 0xe2ab56ce94312a84cb6aa7b090126fd821c5fad200bf22a7c55f675ec668db9e. -// -// Solidity: event ProverAdjustedFeeMultiplier(address prover, uint256 oldFeeMultiplier, uint256 newFeeMultiplier) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterProverAdjustedFeeMultiplier(opts *bind.FilterOpts) (*TaikoL1ProverPoolProverAdjustedFeeMultiplierIterator, error) { - - logs, sub, err := _TaikoL1ProverPool.contract.FilterLogs(opts, "ProverAdjustedFeeMultiplier") - if err != nil { - return nil, err + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) } - return &TaikoL1ProverPoolProverAdjustedFeeMultiplierIterator{contract: _TaikoL1ProverPool.contract, event: "ProverAdjustedFeeMultiplier", logs: logs, sub: sub}, nil -} -// WatchProverAdjustedFeeMultiplier is a free log subscription operation binding the contract event 0xe2ab56ce94312a84cb6aa7b090126fd821c5fad200bf22a7c55f675ec668db9e. -// -// Solidity: event ProverAdjustedFeeMultiplier(address prover, uint256 oldFeeMultiplier, uint256 newFeeMultiplier) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchProverAdjustedFeeMultiplier(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolProverAdjustedFeeMultiplier) (event.Subscription, error) { - - logs, sub, err := _TaikoL1ProverPool.contract.WatchLogs(opts, "ProverAdjustedFeeMultiplier") + logs, sub, err := _TaikoL1ProverPool.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) if err != nil { return nil, err } @@ -1538,8 +1499,8 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchProverAdjustedFeeMulti select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(TaikoL1ProverPoolProverAdjustedFeeMultiplier) - if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverAdjustedFeeMultiplier", log); err != nil { + event := new(TaikoL1ProverPoolOwnershipTransferred) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { return err } event.Raw = log @@ -1560,21 +1521,21 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchProverAdjustedFeeMulti }), nil } -// ParseProverAdjustedFeeMultiplier is a log parse operation binding the contract event 0xe2ab56ce94312a84cb6aa7b090126fd821c5fad200bf22a7c55f675ec668db9e. +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. // -// Solidity: event ProverAdjustedFeeMultiplier(address prover, uint256 oldFeeMultiplier, uint256 newFeeMultiplier) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseProverAdjustedFeeMultiplier(log types.Log) (*TaikoL1ProverPoolProverAdjustedFeeMultiplier, error) { - event := new(TaikoL1ProverPoolProverAdjustedFeeMultiplier) - if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverAdjustedFeeMultiplier", log); err != nil { +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseOwnershipTransferred(log types.Log) (*TaikoL1ProverPoolOwnershipTransferred, error) { + event := new(TaikoL1ProverPoolOwnershipTransferred) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { return nil, err } event.Raw = log return event, nil } -// TaikoL1ProverPoolProverEnteredIterator is returned from FilterProverEntered and is used to iterate over the raw logs and unpacked data for ProverEntered events raised by the TaikoL1ProverPool contract. -type TaikoL1ProverPoolProverEnteredIterator struct { - Event *TaikoL1ProverPoolProverEntered // Event containing the contract specifics and raw log +// TaikoL1ProverPoolSlashedIterator is returned from FilterSlashed and is used to iterate over the raw logs and unpacked data for Slashed events raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolSlashedIterator struct { + Event *TaikoL1ProverPoolSlashed // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1588,7 +1549,7 @@ type TaikoL1ProverPoolProverEnteredIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *TaikoL1ProverPoolProverEnteredIterator) Next() bool { +func (it *TaikoL1ProverPoolSlashedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1597,7 +1558,7 @@ func (it *TaikoL1ProverPoolProverEnteredIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(TaikoL1ProverPoolProverEntered) + it.Event = new(TaikoL1ProverPoolSlashed) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1612,7 +1573,7 @@ func (it *TaikoL1ProverPoolProverEnteredIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(TaikoL1ProverPoolProverEntered) + it.Event = new(TaikoL1ProverPoolSlashed) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1628,178 +1589,52 @@ func (it *TaikoL1ProverPoolProverEnteredIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoL1ProverPoolProverEnteredIterator) Error() error { +func (it *TaikoL1ProverPoolSlashedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *TaikoL1ProverPoolProverEnteredIterator) Close() error { +func (it *TaikoL1ProverPoolSlashedIterator) Close() error { it.sub.Unsubscribe() return nil } -// TaikoL1ProverPoolProverEntered represents a ProverEntered event raised by the TaikoL1ProverPool contract. -type TaikoL1ProverPoolProverEntered struct { - Prover common.Address - Amount *big.Int - FeeMultiplier *big.Int - Capacity uint64 - Raw types.Log // Blockchain specific contextual infos +// TaikoL1ProverPoolSlashed represents a Slashed event raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolSlashed struct { + Addr common.Address + Amount uint32 + Raw types.Log // Blockchain specific contextual infos } -// FilterProverEntered is a free log retrieval operation binding the contract event 0x1b14a9db786d0b879f833a7bd117d424ee00758960ef3c2e812b2abf0a51f892. +// FilterSlashed is a free log retrieval operation binding the contract event 0xf2ca0cd8f45e853110fce6e92f38f84a31350c1168dce2735a782f9d6424e648. // -// Solidity: event ProverEntered(address prover, uint256 amount, uint256 feeMultiplier, uint64 capacity) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterProverEntered(opts *bind.FilterOpts) (*TaikoL1ProverPoolProverEnteredIterator, error) { +// Solidity: event Slashed(address indexed addr, uint32 amount) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterSlashed(opts *bind.FilterOpts, addr []common.Address) (*TaikoL1ProverPoolSlashedIterator, error) { - logs, sub, err := _TaikoL1ProverPool.contract.FilterLogs(opts, "ProverEntered") - if err != nil { - return nil, err + var addrRule []interface{} + for _, addrItem := range addr { + addrRule = append(addrRule, addrItem) } - return &TaikoL1ProverPoolProverEnteredIterator{contract: _TaikoL1ProverPool.contract, event: "ProverEntered", logs: logs, sub: sub}, nil -} -// WatchProverEntered is a free log subscription operation binding the contract event 0x1b14a9db786d0b879f833a7bd117d424ee00758960ef3c2e812b2abf0a51f892. -// -// Solidity: event ProverEntered(address prover, uint256 amount, uint256 feeMultiplier, uint64 capacity) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchProverEntered(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolProverEntered) (event.Subscription, error) { - - logs, sub, err := _TaikoL1ProverPool.contract.WatchLogs(opts, "ProverEntered") + logs, sub, err := _TaikoL1ProverPool.contract.FilterLogs(opts, "Slashed", addrRule) if err != nil { return nil, err } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(TaikoL1ProverPoolProverEntered) - if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverEntered", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseProverEntered is a log parse operation binding the contract event 0x1b14a9db786d0b879f833a7bd117d424ee00758960ef3c2e812b2abf0a51f892. -// -// Solidity: event ProverEntered(address prover, uint256 amount, uint256 feeMultiplier, uint64 capacity) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseProverEntered(log types.Log) (*TaikoL1ProverPoolProverEntered, error) { - event := new(TaikoL1ProverPoolProverEntered) - if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverEntered", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// TaikoL1ProverPoolProverExitedIterator is returned from FilterProverExited and is used to iterate over the raw logs and unpacked data for ProverExited events raised by the TaikoL1ProverPool contract. -type TaikoL1ProverPoolProverExitedIterator struct { - Event *TaikoL1ProverPoolProverExited // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *TaikoL1ProverPoolProverExitedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(TaikoL1ProverPoolProverExited) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(TaikoL1ProverPoolProverExited) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoL1ProverPoolProverExitedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *TaikoL1ProverPoolProverExitedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// TaikoL1ProverPoolProverExited represents a ProverExited event raised by the TaikoL1ProverPool contract. -type TaikoL1ProverPoolProverExited struct { - Prover common.Address - Raw types.Log // Blockchain specific contextual infos + return &TaikoL1ProverPoolSlashedIterator{contract: _TaikoL1ProverPool.contract, event: "Slashed", logs: logs, sub: sub}, nil } -// FilterProverExited is a free log retrieval operation binding the contract event 0x2815fc337451500d2c4aa22628a7584582edde5bf78b2ba9caa6efbd6cce4a8e. +// WatchSlashed is a free log subscription operation binding the contract event 0xf2ca0cd8f45e853110fce6e92f38f84a31350c1168dce2735a782f9d6424e648. // -// Solidity: event ProverExited(address prover) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterProverExited(opts *bind.FilterOpts) (*TaikoL1ProverPoolProverExitedIterator, error) { +// Solidity: event Slashed(address indexed addr, uint32 amount) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchSlashed(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolSlashed, addr []common.Address) (event.Subscription, error) { - logs, sub, err := _TaikoL1ProverPool.contract.FilterLogs(opts, "ProverExited") - if err != nil { - return nil, err + var addrRule []interface{} + for _, addrItem := range addr { + addrRule = append(addrRule, addrItem) } - return &TaikoL1ProverPoolProverExitedIterator{contract: _TaikoL1ProverPool.contract, event: "ProverExited", logs: logs, sub: sub}, nil -} -// WatchProverExited is a free log subscription operation binding the contract event 0x2815fc337451500d2c4aa22628a7584582edde5bf78b2ba9caa6efbd6cce4a8e. -// -// Solidity: event ProverExited(address prover) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchProverExited(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolProverExited) (event.Subscription, error) { - - logs, sub, err := _TaikoL1ProverPool.contract.WatchLogs(opts, "ProverExited") + logs, sub, err := _TaikoL1ProverPool.contract.WatchLogs(opts, "Slashed", addrRule) if err != nil { return nil, err } @@ -1809,8 +1644,8 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchProverExited(opts *bin select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(TaikoL1ProverPoolProverExited) - if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverExited", log); err != nil { + event := new(TaikoL1ProverPoolSlashed) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "Slashed", log); err != nil { return err } event.Raw = log @@ -1831,21 +1666,21 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchProverExited(opts *bin }), nil } -// ParseProverExited is a log parse operation binding the contract event 0x2815fc337451500d2c4aa22628a7584582edde5bf78b2ba9caa6efbd6cce4a8e. +// ParseSlashed is a log parse operation binding the contract event 0xf2ca0cd8f45e853110fce6e92f38f84a31350c1168dce2735a782f9d6424e648. // -// Solidity: event ProverExited(address prover) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseProverExited(log types.Log) (*TaikoL1ProverPoolProverExited, error) { - event := new(TaikoL1ProverPoolProverExited) - if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverExited", log); err != nil { +// Solidity: event Slashed(address indexed addr, uint32 amount) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseSlashed(log types.Log) (*TaikoL1ProverPoolSlashed, error) { + event := new(TaikoL1ProverPoolSlashed) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "Slashed", log); err != nil { return nil, err } event.Raw = log return event, nil } -// TaikoL1ProverPoolProverSlashedIterator is returned from FilterProverSlashed and is used to iterate over the raw logs and unpacked data for ProverSlashed events raised by the TaikoL1ProverPool contract. -type TaikoL1ProverPoolProverSlashedIterator struct { - Event *TaikoL1ProverPoolProverSlashed // Event containing the contract specifics and raw log +// TaikoL1ProverPoolStakedIterator is returned from FilterStaked and is used to iterate over the raw logs and unpacked data for Staked events raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolStakedIterator struct { + Event *TaikoL1ProverPoolStaked // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1859,7 +1694,7 @@ type TaikoL1ProverPoolProverSlashedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *TaikoL1ProverPoolProverSlashedIterator) Next() bool { +func (it *TaikoL1ProverPoolStakedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1868,7 +1703,7 @@ func (it *TaikoL1ProverPoolProverSlashedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(TaikoL1ProverPoolProverSlashed) + it.Event = new(TaikoL1ProverPoolStaked) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1883,7 +1718,7 @@ func (it *TaikoL1ProverPoolProverSlashedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(TaikoL1ProverPoolProverSlashed) + it.Event = new(TaikoL1ProverPoolStaked) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1899,178 +1734,54 @@ func (it *TaikoL1ProverPoolProverSlashedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoL1ProverPoolProverSlashedIterator) Error() error { +func (it *TaikoL1ProverPoolStakedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *TaikoL1ProverPoolProverSlashedIterator) Close() error { +func (it *TaikoL1ProverPoolStakedIterator) Close() error { it.sub.Unsubscribe() return nil } -// TaikoL1ProverPoolProverSlashed represents a ProverSlashed event raised by the TaikoL1ProverPool contract. -type TaikoL1ProverPoolProverSlashed struct { - Prover common.Address - Amount *big.Int - Raw types.Log // Blockchain specific contextual infos +// TaikoL1ProverPoolStaked represents a Staked event raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolStaked struct { + Addr common.Address + Amount uint32 + RewardPerGas uint16 + CurrentCapacity uint16 + Raw types.Log // Blockchain specific contextual infos } -// FilterProverSlashed is a free log retrieval operation binding the contract event 0x664b84a0f5b173c1d62371e87f48268f943748c0fe5805d64ebfab28af48e17b. +// FilterStaked is a free log retrieval operation binding the contract event 0xe2232b717d57a877785c68aad0aae9fa2caea5035fa13efd62421b4e0ac23dfe. // -// Solidity: event ProverSlashed(address prover, uint256 amount) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterProverSlashed(opts *bind.FilterOpts) (*TaikoL1ProverPoolProverSlashedIterator, error) { +// Solidity: event Staked(address indexed addr, uint32 amount, uint16 rewardPerGas, uint16 currentCapacity) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterStaked(opts *bind.FilterOpts, addr []common.Address) (*TaikoL1ProverPoolStakedIterator, error) { - logs, sub, err := _TaikoL1ProverPool.contract.FilterLogs(opts, "ProverSlashed") - if err != nil { - return nil, err + var addrRule []interface{} + for _, addrItem := range addr { + addrRule = append(addrRule, addrItem) } - return &TaikoL1ProverPoolProverSlashedIterator{contract: _TaikoL1ProverPool.contract, event: "ProverSlashed", logs: logs, sub: sub}, nil -} - -// WatchProverSlashed is a free log subscription operation binding the contract event 0x664b84a0f5b173c1d62371e87f48268f943748c0fe5805d64ebfab28af48e17b. -// -// Solidity: event ProverSlashed(address prover, uint256 amount) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchProverSlashed(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolProverSlashed) (event.Subscription, error) { - logs, sub, err := _TaikoL1ProverPool.contract.WatchLogs(opts, "ProverSlashed") + logs, sub, err := _TaikoL1ProverPool.contract.FilterLogs(opts, "Staked", addrRule) if err != nil { return nil, err } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(TaikoL1ProverPoolProverSlashed) - if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverSlashed", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseProverSlashed is a log parse operation binding the contract event 0x664b84a0f5b173c1d62371e87f48268f943748c0fe5805d64ebfab28af48e17b. -// -// Solidity: event ProverSlashed(address prover, uint256 amount) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseProverSlashed(log types.Log) (*TaikoL1ProverPoolProverSlashed, error) { - event := new(TaikoL1ProverPoolProverSlashed) - if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverSlashed", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// TaikoL1ProverPoolProverStakedMoreTokensIterator is returned from FilterProverStakedMoreTokens and is used to iterate over the raw logs and unpacked data for ProverStakedMoreTokens events raised by the TaikoL1ProverPool contract. -type TaikoL1ProverPoolProverStakedMoreTokensIterator struct { - Event *TaikoL1ProverPoolProverStakedMoreTokens // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *TaikoL1ProverPoolProverStakedMoreTokensIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(TaikoL1ProverPoolProverStakedMoreTokens) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(TaikoL1ProverPoolProverStakedMoreTokens) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoL1ProverPoolProverStakedMoreTokensIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *TaikoL1ProverPoolProverStakedMoreTokensIterator) Close() error { - it.sub.Unsubscribe() - return nil + return &TaikoL1ProverPoolStakedIterator{contract: _TaikoL1ProverPool.contract, event: "Staked", logs: logs, sub: sub}, nil } -// TaikoL1ProverPoolProverStakedMoreTokens represents a ProverStakedMoreTokens event raised by the TaikoL1ProverPool contract. -type TaikoL1ProverPoolProverStakedMoreTokens struct { - Prover common.Address - Amount *big.Int - TotalStaked *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterProverStakedMoreTokens is a free log retrieval operation binding the contract event 0xede799219aee9e2d2e6ce762bb15b4cdfb387b1618280f67b3404dc12463c382. +// WatchStaked is a free log subscription operation binding the contract event 0xe2232b717d57a877785c68aad0aae9fa2caea5035fa13efd62421b4e0ac23dfe. // -// Solidity: event ProverStakedMoreTokens(address prover, uint256 amount, uint256 totalStaked) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterProverStakedMoreTokens(opts *bind.FilterOpts) (*TaikoL1ProverPoolProverStakedMoreTokensIterator, error) { +// Solidity: event Staked(address indexed addr, uint32 amount, uint16 rewardPerGas, uint16 currentCapacity) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchStaked(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolStaked, addr []common.Address) (event.Subscription, error) { - logs, sub, err := _TaikoL1ProverPool.contract.FilterLogs(opts, "ProverStakedMoreTokens") - if err != nil { - return nil, err + var addrRule []interface{} + for _, addrItem := range addr { + addrRule = append(addrRule, addrItem) } - return &TaikoL1ProverPoolProverStakedMoreTokensIterator{contract: _TaikoL1ProverPool.contract, event: "ProverStakedMoreTokens", logs: logs, sub: sub}, nil -} -// WatchProverStakedMoreTokens is a free log subscription operation binding the contract event 0xede799219aee9e2d2e6ce762bb15b4cdfb387b1618280f67b3404dc12463c382. -// -// Solidity: event ProverStakedMoreTokens(address prover, uint256 amount, uint256 totalStaked) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchProverStakedMoreTokens(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolProverStakedMoreTokens) (event.Subscription, error) { - - logs, sub, err := _TaikoL1ProverPool.contract.WatchLogs(opts, "ProverStakedMoreTokens") + logs, sub, err := _TaikoL1ProverPool.contract.WatchLogs(opts, "Staked", addrRule) if err != nil { return nil, err } @@ -2080,8 +1791,8 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchProverStakedMoreTokens select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(TaikoL1ProverPoolProverStakedMoreTokens) - if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverStakedMoreTokens", log); err != nil { + event := new(TaikoL1ProverPoolStaked) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "Staked", log); err != nil { return err } event.Raw = log @@ -2102,21 +1813,21 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchProverStakedMoreTokens }), nil } -// ParseProverStakedMoreTokens is a log parse operation binding the contract event 0xede799219aee9e2d2e6ce762bb15b4cdfb387b1618280f67b3404dc12463c382. +// ParseStaked is a log parse operation binding the contract event 0xe2232b717d57a877785c68aad0aae9fa2caea5035fa13efd62421b4e0ac23dfe. // -// Solidity: event ProverStakedMoreTokens(address prover, uint256 amount, uint256 totalStaked) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseProverStakedMoreTokens(log types.Log) (*TaikoL1ProverPoolProverStakedMoreTokens, error) { - event := new(TaikoL1ProverPoolProverStakedMoreTokens) - if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverStakedMoreTokens", log); err != nil { +// Solidity: event Staked(address indexed addr, uint32 amount, uint16 rewardPerGas, uint16 currentCapacity) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseStaked(log types.Log) (*TaikoL1ProverPoolStaked, error) { + event := new(TaikoL1ProverPoolStaked) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "Staked", log); err != nil { return nil, err } event.Raw = log return event, nil } -// TaikoL1ProverPoolProverWithdrawAwardsIterator is returned from FilterProverWithdrawAwards and is used to iterate over the raw logs and unpacked data for ProverWithdrawAwards events raised by the TaikoL1ProverPool contract. -type TaikoL1ProverPoolProverWithdrawAwardsIterator struct { - Event *TaikoL1ProverPoolProverWithdrawAwards // Event containing the contract specifics and raw log +// TaikoL1ProverPoolWithdrawnIterator is returned from FilterWithdrawn and is used to iterate over the raw logs and unpacked data for Withdrawn events raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolWithdrawnIterator struct { + Event *TaikoL1ProverPoolWithdrawn // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -2130,7 +1841,7 @@ type TaikoL1ProverPoolProverWithdrawAwardsIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *TaikoL1ProverPoolProverWithdrawAwardsIterator) Next() bool { +func (it *TaikoL1ProverPoolWithdrawnIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -2139,7 +1850,7 @@ func (it *TaikoL1ProverPoolProverWithdrawAwardsIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(TaikoL1ProverPoolProverWithdrawAwards) + it.Event = new(TaikoL1ProverPoolWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2154,7 +1865,7 @@ func (it *TaikoL1ProverPoolProverWithdrawAwardsIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(TaikoL1ProverPoolProverWithdrawAwards) + it.Event = new(TaikoL1ProverPoolWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2170,42 +1881,52 @@ func (it *TaikoL1ProverPoolProverWithdrawAwardsIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoL1ProverPoolProverWithdrawAwardsIterator) Error() error { +func (it *TaikoL1ProverPoolWithdrawnIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *TaikoL1ProverPoolProverWithdrawAwardsIterator) Close() error { +func (it *TaikoL1ProverPoolWithdrawnIterator) Close() error { it.sub.Unsubscribe() return nil } -// TaikoL1ProverPoolProverWithdrawAwards represents a ProverWithdrawAwards event raised by the TaikoL1ProverPool contract. -type TaikoL1ProverPoolProverWithdrawAwards struct { - Prover common.Address - Amount *big.Int +// TaikoL1ProverPoolWithdrawn represents a Withdrawn event raised by the TaikoL1ProverPool contract. +type TaikoL1ProverPoolWithdrawn struct { + Addr common.Address + Amount uint32 Raw types.Log // Blockchain specific contextual infos } -// FilterProverWithdrawAwards is a free log retrieval operation binding the contract event 0x78e57d846371816e02bd37310e6cc83bb7a979a78e86a5f47214fa6f90518be4. +// FilterWithdrawn is a free log retrieval operation binding the contract event 0x28f8f642e0ef98c9c0d14e1bd28a687ea91da388d69e6ca60165b772ef408c7c. // -// Solidity: event ProverWithdrawAwards(address prover, uint256 amount) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterProverWithdrawAwards(opts *bind.FilterOpts) (*TaikoL1ProverPoolProverWithdrawAwardsIterator, error) { +// Solidity: event Withdrawn(address indexed addr, uint32 amount) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterWithdrawn(opts *bind.FilterOpts, addr []common.Address) (*TaikoL1ProverPoolWithdrawnIterator, error) { + + var addrRule []interface{} + for _, addrItem := range addr { + addrRule = append(addrRule, addrItem) + } - logs, sub, err := _TaikoL1ProverPool.contract.FilterLogs(opts, "ProverWithdrawAwards") + logs, sub, err := _TaikoL1ProverPool.contract.FilterLogs(opts, "Withdrawn", addrRule) if err != nil { return nil, err } - return &TaikoL1ProverPoolProverWithdrawAwardsIterator{contract: _TaikoL1ProverPool.contract, event: "ProverWithdrawAwards", logs: logs, sub: sub}, nil + return &TaikoL1ProverPoolWithdrawnIterator{contract: _TaikoL1ProverPool.contract, event: "Withdrawn", logs: logs, sub: sub}, nil } -// WatchProverWithdrawAwards is a free log subscription operation binding the contract event 0x78e57d846371816e02bd37310e6cc83bb7a979a78e86a5f47214fa6f90518be4. +// WatchWithdrawn is a free log subscription operation binding the contract event 0x28f8f642e0ef98c9c0d14e1bd28a687ea91da388d69e6ca60165b772ef408c7c. // -// Solidity: event ProverWithdrawAwards(address prover, uint256 amount) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchProverWithdrawAwards(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolProverWithdrawAwards) (event.Subscription, error) { +// Solidity: event Withdrawn(address indexed addr, uint32 amount) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchWithdrawn(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolWithdrawn, addr []common.Address) (event.Subscription, error) { + + var addrRule []interface{} + for _, addrItem := range addr { + addrRule = append(addrRule, addrItem) + } - logs, sub, err := _TaikoL1ProverPool.contract.WatchLogs(opts, "ProverWithdrawAwards") + logs, sub, err := _TaikoL1ProverPool.contract.WatchLogs(opts, "Withdrawn", addrRule) if err != nil { return nil, err } @@ -2215,8 +1936,8 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchProverWithdrawAwards(o select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(TaikoL1ProverPoolProverWithdrawAwards) - if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverWithdrawAwards", log); err != nil { + event := new(TaikoL1ProverPoolWithdrawn) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "Withdrawn", log); err != nil { return err } event.Raw = log @@ -2237,12 +1958,12 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchProverWithdrawAwards(o }), nil } -// ParseProverWithdrawAwards is a log parse operation binding the contract event 0x78e57d846371816e02bd37310e6cc83bb7a979a78e86a5f47214fa6f90518be4. +// ParseWithdrawn is a log parse operation binding the contract event 0x28f8f642e0ef98c9c0d14e1bd28a687ea91da388d69e6ca60165b772ef408c7c. // -// Solidity: event ProverWithdrawAwards(address prover, uint256 amount) -func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseProverWithdrawAwards(log types.Log) (*TaikoL1ProverPoolProverWithdrawAwards, error) { - event := new(TaikoL1ProverPoolProverWithdrawAwards) - if err := _TaikoL1ProverPool.contract.UnpackLog(event, "ProverWithdrawAwards", log); err != nil { +// Solidity: event Withdrawn(address indexed addr, uint32 amount) +func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseWithdrawn(log types.Log) (*TaikoL1ProverPoolWithdrawn, error) { + event := new(TaikoL1ProverPoolWithdrawn) + if err := _TaikoL1ProverPool.contract.UnpackLog(event, "Withdrawn", log); err != nil { return nil, err } event.Raw = log diff --git a/driver/chain_syncer/calldata/syncer.go b/driver/chain_syncer/calldata/syncer.go index adf7e4e57..ab08ff448 100644 --- a/driver/chain_syncer/calldata/syncer.go +++ b/driver/chain_syncer/calldata/syncer.go @@ -64,9 +64,9 @@ func NewSyncer( progressTracker: progressTracker, anchorConstructor: constructor, txListValidator: txListValidator.NewTxListValidator( - configs.BlockMaxGasLimit, - configs.MaxTransactionsPerBlock, - configs.MaxBytesPerTxList, + uint64(configs.BlockMaxGasLimit), + configs.BlockMaxTransactions, + configs.BlockMaxTxListBytes, rpc.L2ChainID, ), }, nil @@ -176,7 +176,6 @@ func (s *Syncer) onBlockProposed( "L1Height", event.Raw.BlockNumber, "L1Hash", event.Raw.BlockHash, "BlockID", event.Id, - "BlockFee", event.BlockFee, "Removed", event.Raw.Removed, ) diff --git a/driver/driver.go b/driver/driver.go index 6c13ef870..efd2ad8f3 100644 --- a/driver/driver.go +++ b/driver/driver.go @@ -197,7 +197,7 @@ func (d *Driver) reportProtocolStatus() { return err } - maxNumBlocks = configs.MaxNumProposedBlocks.Uint64() + maxNumBlocks = configs.BlockMaxProposals.Uint64() return nil }, backoff.NewConstantBackOff(d.backOffRetryInterval), diff --git a/pkg/rpc/methods.go b/pkg/rpc/methods.go index 075195295..eb309f45b 100644 --- a/pkg/rpc/methods.go +++ b/pkg/rpc/methods.go @@ -213,7 +213,7 @@ func (c *Client) WaitL1Origin(ctx context.Context, blockID *big.Int) (*rawdb.L1O func (c *Client) GetPoolContent( ctx context.Context, maxTransactionsPerBlock uint64, - blockMaxGasLimit uint64, + blockMaxGasLimit uint32, maxBytesPerTxList uint64, locals []common.Address, ) ([]types.Transactions, error) { diff --git a/proposer/proposer.go b/proposer/proposer.go index eef35098c..27e9ea2c4 100644 --- a/proposer/proposer.go +++ b/proposer/proposer.go @@ -110,7 +110,7 @@ func InitFromConfig(ctx context.Context, p *Proposer, cfg *Config) (err error) { p.protocolConfigs = &protocolConfigs if cfg.MinBlockGasLimit != 0 { - if cfg.MinBlockGasLimit > p.protocolConfigs.BlockMaxGasLimit { + if uint32(cfg.MinBlockGasLimit) > p.protocolConfigs.BlockMaxGasLimit { return fmt.Errorf( "minimal block gas limit too large, set: %d, limit: %d", cfg.MinBlockGasLimit, @@ -203,9 +203,9 @@ func (p *Proposer) ProposeOp(ctx context.Context) error { txLists, err := p.rpc.GetPoolContent( ctx, - p.protocolConfigs.MaxTransactionsPerBlock, + p.protocolConfigs.BlockMaxTransactions, p.protocolConfigs.BlockMaxGasLimit, - p.protocolConfigs.MaxBytesPerTxList, + p.protocolConfigs.BlockMaxTxListBytes, p.locals, ) if err != nil { diff --git a/prover/proof_producer/zkevm_rpcd_producer.go b/prover/proof_producer/zkevm_rpcd_producer.go index 3b9013abc..382d41fbe 100644 --- a/prover/proof_producer/zkevm_rpcd_producer.go +++ b/prover/proof_producer/zkevm_rpcd_producer.go @@ -208,9 +208,9 @@ func (p *ZkevmRpcdProducer) requestProof(opts *ProofRequestOptions) (*RpcdOutput Graffiti: opts.Graffiti, GasUsed: opts.GasUsed, ParentGasUsed: opts.ParentGasUsed, - BlockMaxGasLimit: p.ProtocolConfig.BlockMaxGasLimit, - MaxTransactionsPerBlock: p.ProtocolConfig.MaxTransactionsPerBlock, - MaxBytesPerTxList: p.ProtocolConfig.MaxBytesPerTxList, + BlockMaxGasLimit: uint64(p.ProtocolConfig.BlockMaxGasLimit), + MaxTransactionsPerBlock: p.ProtocolConfig.BlockMaxTransactions, + MaxBytesPerTxList: p.ProtocolConfig.BlockMaxTxListBytes, }}, } diff --git a/prover/prover.go b/prover/prover.go index e6f5f0246..1e093f5e6 100644 --- a/prover/prover.go +++ b/prover/prover.go @@ -115,14 +115,14 @@ func InitFromConfig(ctx context.Context, p *Prover, cfg *Config) (err error) { p.submitProofTxMutex = &sync.Mutex{} p.txListValidator = txListValidator.NewTxListValidator( - p.protocolConfigs.BlockMaxGasLimit, - p.protocolConfigs.MaxTransactionsPerBlock, - p.protocolConfigs.MaxBytesPerTxList, + uint64(p.protocolConfigs.BlockMaxGasLimit), + p.protocolConfigs.BlockMaxTransactions, + p.protocolConfigs.BlockMaxTxListBytes, p.rpc.L2ChainID, ) p.proverAddress = crypto.PubkeyToAddress(p.cfg.L1ProverPrivKey.PublicKey) - chBufferSize := p.protocolConfigs.MaxNumProposedBlocks.Uint64() + chBufferSize := p.protocolConfigs.BlockMaxProposals.Uint64() p.blockProposedCh = make(chan *bindings.TaikoL1ClientBlockProposed, chBufferSize) p.blockVerifiedCh = make(chan *bindings.TaikoL1ClientBlockVerified, chBufferSize) p.blockProvenCh = make(chan *bindings.TaikoL1ClientBlockProven, chBufferSize) @@ -235,7 +235,7 @@ func (p *Prover) eventLoop() { // If there is no new block verification in `proofCooldownPeriod * 2` seconeds, and the current prover is // a special prover, we will go back to try proving the block whose id is `lastVerifiedBlockId + 1`. verificationCheckTicker := time.NewTicker( - time.Duration(p.protocolConfigs.ProofCooldownPeriod.Uint64()*2) * time.Second, + time.Duration(p.protocolConfigs.ProofRegularCooldown.Uint64()*2) * time.Second, ) defer verificationCheckTicker.Stop() @@ -376,7 +376,6 @@ func (p *Prover) onBlockProposed( "L1Height", event.Raw.BlockNumber, "L1Hash", event.Raw.BlockHash, "BlockID", event.Id, - "BlockFee", event.BlockFee, "Removed", event.Raw.Removed, ) metrics.ProverReceivedProposedBlockGauge.Update(event.Id.Int64()) @@ -418,14 +417,13 @@ func (p *Prover) onBlockProposed( p.cancelProof(ctx, event.Meta.Id) } - // check whether this prover has been chosen through PoS mechanism to prove the block - chosenProver, err := p.rpc.TaikoProverPoolL1.GetProver(nil, event.Id) + block, err := p.rpc.TaikoL1.GetBlock(nil, event.Id) if err != nil { return err } - if chosenProver != p.proverAddress { - log.Info("proposed block not proveable", "blockID", event.Id, "prover", chosenProver.Hex()) + if block.AssignedProver != p.proverAddress { + log.Info("proposed block not proveable", "blockID", event.Id, "prover", block.AssignedProver.Hex()) return nil } @@ -605,7 +603,7 @@ func (p *Prover) checkChainVerification(lastLatestVerifiedL1Height uint64) error log.Warn( "No new block verification in `proofCooldownPeriod * 2` seconeds", "latestVerifiedL1Height", p.latestVerifiedL1Height, - "proofCooldownPeriod", p.protocolConfigs.ProofCooldownPeriod, + "proofCooldownPeriod", p.protocolConfigs.ProofRegularCooldown, ) stateVar, err := p.rpc.TaikoL1.GetStateVariables(nil) diff --git a/prover/prover_test.go b/prover/prover_test.go index 690d641da..8ffb9bc5a 100644 --- a/prover/prover_test.go +++ b/prover/prover_test.go @@ -102,8 +102,7 @@ func (s *ProverTestSuite) TestOnBlockProposed() { // Valid block e := testutils.ProposeAndInsertValidBlock(&s.ClientTestSuite, s.proposer, s.d.ChainSyncer().CalldataSyncer()) s.Nil(s.p.onBlockProposed(context.Background(), e, func() {})) - // TODO: uncomment once the protocol code has the ability to actually select a prover - //s.Nil(s.p.validProofSubmitter.SubmitProof(context.Background(), <-s.p.proofGenerationCh)) + s.Nil(s.p.validProofSubmitter.SubmitProof(context.Background(), <-s.p.proofGenerationCh)) // Empty blocks for _, e = range testutils.ProposeAndInsertEmptyBlocks( @@ -113,8 +112,7 @@ func (s *ProverTestSuite) TestOnBlockProposed() { ) { s.Nil(s.p.onBlockProposed(context.Background(), e, func() {})) - // TODO: uncomment once the protocol code has the ability to actually select a prover - //s.Nil(s.p.validProofSubmitter.SubmitProof(context.Background(), <-s.p.proofGenerationCh)) + s.Nil(s.p.validProofSubmitter.SubmitProof(context.Background(), <-s.p.proofGenerationCh)) } } diff --git a/scripts/gen_bindings.sh b/scripts/gen_bindings.sh index 2df3f57cd..5e389b614 100755 --- a/scripts/gen_bindings.sh +++ b/scripts/gen_bindings.sh @@ -35,7 +35,7 @@ cat ${TAIKO_MONO_DIR}/packages/protocol/out/TaikoL2.sol/TaikoL2.json | jq .abi | ${ABIGEN_BIN} --abi - --type TaikoL2Client --pkg bindings --out $DIR/../bindings/gen_taiko_l2.go -cat ${TAIKO_MONO_DIR}/packages/protocol/out/StakingProverPool.sol/StakingProverPool.json | +cat ${TAIKO_MONO_DIR}/packages/protocol/out/ProverPool.sol/ProverPool.json | jq .abi | ${ABIGEN_BIN} --abi - --type TaikoL1ProverPool --pkg bindings --out $DIR/../bindings/gen_taiko_prover_pool_l1.go diff --git a/testutils/suite.go b/testutils/suite.go index 0f17c4351..0ccc62da6 100644 --- a/testutils/suite.go +++ b/testutils/suite.go @@ -3,6 +3,7 @@ package testutils import ( "context" "crypto/ecdsa" + "fmt" "math" "math/big" "os" @@ -92,26 +93,43 @@ func (s *ClientTestSuite) SetupTest() { proverOpts, err := bind.NewKeyedTransactorWithChainID(l1ProverPrivKey, rpcCli.L1ChainID) s.Nil(err) - minTkoAmount, err := s.RpcClient.TaikoProverPoolL1.MINTKOAMOUNT(nil) + balance, err := s.RpcClient.TaikoTokenL1.BalanceOf(nil, crypto.PubkeyToAddress(l1ProverPrivKey.PublicKey)) s.Nil(err) - amt := new(big.Int).Add(minTkoAmount, big.NewInt(1)) + fmt.Println("prover balance", "balance", balance.String()) - // proposer has tKO, need to transfer to prover - _, err = s.RpcClient.TaikoTokenL1.Transfer(proposerOpts, crypto.PubkeyToAddress(l1ProverPrivKey.PublicKey), amt) + proverInfo, err := s.RpcClient.TaikoProverPoolL1.GetStaker(nil, crypto.PubkeyToAddress(l1ProverPrivKey.PublicKey)) s.Nil(err) - prover, err := s.RpcClient.TaikoProverPoolL1.Provers(nil, crypto.PubkeyToAddress(l1ProverPrivKey.PublicKey)) - s.Nil(err) + log.Info("proverInfo", "proverId", proverInfo.Staker.ProverId, "capacity", proverInfo.Staker.MaxCapacity) + + if proverInfo.Staker.ProverId == 0 { + + minStakePerCapacity, err := s.RpcClient.TaikoProverPoolL1.MINSTAKEPERCAPACITY(nil) + s.Nil(err) + + capacity, err := s.RpcClient.TaikoProverPoolL1.MAXCAPACITYLOWERBOUND(nil) + s.Nil(err) + amt := new(big.Int).Mul(big.NewInt(int64(minStakePerCapacity)), big.NewInt(int64(capacity))) + + oneTko, err := s.RpcClient.TaikoProverPoolL1.ONETKO(nil) + s.Nil(err) + + amtTko := new(big.Int).Mul(amt, new(big.Int).SetInt64(int64(oneTko))) + + log.Info("amt to stake", "amt", amtTko) + + // proposer has tKO, need to transfer to prover + _, err = s.RpcClient.TaikoTokenL1.Transfer(proposerOpts, crypto.PubkeyToAddress(l1ProverPrivKey.PublicKey), amtTko) + s.Nil(err) - if prover.ProverAddress != crypto.PubkeyToAddress(l1ProverPrivKey.PublicKey) { - minFeeMultiplier, err := s.RpcClient.TaikoProverPoolL1.MINMULTIPLIER(nil) + rewardPerGas := 1 s.Nil(err) - _, err = s.RpcClient.TaikoProverPoolL1.EnterProverPool( + _, err = s.RpcClient.TaikoProverPoolL1.Stake( proverOpts, - amt, - new(big.Int).SetUint64(uint64(minFeeMultiplier)), - 32, + uint32(amt.Uint64()), + uint16(rewardPerGas), + uint16(capacity), ) s.Nil(err) } From e9ea2947b26fa9fa3962d6925b891e57d36dd42c Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Mon, 26 Jun 2023 16:54:07 -0700 Subject: [PATCH 08/37] zero address means its proveable --- prover/prover.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/prover/prover.go b/prover/prover.go index 1e093f5e6..f36cc66b4 100644 --- a/prover/prover.go +++ b/prover/prover.go @@ -26,6 +26,10 @@ import ( "github.com/urfave/cli/v2" ) +var ( + zeroAddress = common.HexToAddress("0x0000000000000000000000000000000000000000") +) + type cancelFunc func() // Prover keep trying to prove new proposed blocks valid/invalid. @@ -422,7 +426,8 @@ func (p *Prover) onBlockProposed( return err } - if block.AssignedProver != p.proverAddress { + // zero address means anyone can prove + if block.AssignedProver != p.proverAddress && block.AssignedProver != zeroAddress { log.Info("proposed block not proveable", "blockID", event.Id, "prover", block.AssignedProver.Hex()) return nil } From 4dbaa859b2d9b63089f1181b4a2b59f1ca560106 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Mon, 26 Jun 2023 17:26:56 -0700 Subject: [PATCH 09/37] regenerate bindings with proofWindow, plus have a watcher for blockIds we cant prove, but potentially could when proofWindow expires --- .github/workflows/test.yml | 2 +- bindings/.githead | 2 +- bindings/gen_taiko_l1.go | 13 ++++-- prover/prover.go | 95 ++++++++++++++++++++++++++++++++++---- 4 files changed, 96 insertions(+), 16 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fd580b854..94baf89a2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,7 +45,7 @@ jobs: with: repository: taikoxyz/taiko-mono path: ${{ env.TAIKO_MONO_DIR }} - ref: alpha-4-base + ref: get_block_info - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 diff --git a/bindings/.githead b/bindings/.githead index f2e507b9a..bc2172988 100644 --- a/bindings/.githead +++ b/bindings/.githead @@ -1 +1 @@ -1bca3c719f4fdd2d8b52d5e6541f1088b30f5326 +92f4f0e0e826f826713461d4ee2d48ba8c9554f3 diff --git a/bindings/gen_taiko_l1.go b/bindings/gen_taiko_l1.go index 5fec3d2e5..aefb48e10 100644 --- a/bindings/gen_taiko_l1.go +++ b/bindings/gen_taiko_l1.go @@ -103,7 +103,7 @@ type TaikoDataStateVariables struct { // TaikoL1ClientMetaData contains all meta data concerning the TaikoL1Client contract. var TaikoL1ClientMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BATCH_NOT_AUCTIONABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF_OVERWRITE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF_OVERWRITE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_BETTER_BID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_PROVEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_PROVEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_SPECIAL_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_OPEN_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_OPEN_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"reward\",\"type\":\"uint64\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"reward\",\"type\":\"uint64\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"canDepositEthToL2\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"depositEtherToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getBlock\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"_metaHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_proposer\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_proposedAt\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_assignedProver\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"getBlockFee\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"relaySignalRoot\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"blockMaxProposals\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockMaxVerificationsPerTx\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"blockMaxGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockFeeBaseGas\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxTransactions\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxTxListBytes\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"blockTxListExpiry\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofRegularCooldown\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofOracleCooldown\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"proofMinWindow\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"proofMaxWindow\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMinCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMaxCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMinAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMaxAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositMaxFee\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"rewardPerGasRange\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"rewardOpenMultipler\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"rewardOpenMaxCount\",\"type\":\"uint256\"}],\"internalType\":\"structTaikoData.Config\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getCrossChainBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getCrossChainSignalRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"getForkChoice\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"provenAt\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"gasUsed\",\"type\":\"uint32\"}],\"internalType\":\"structTaikoData.ForkChoice\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStateVariables\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"feePerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.StateVariables\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"id\",\"type\":\"uint16\"}],\"name\":\"getVerifierName\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_genesisBlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"_initFeePerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_initAvgProofDelay\",\"type\":\"uint16\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"txList\",\"type\":\"bytes\"}],\"name\":\"proposeBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"proveBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"state\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved70\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved71\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numOpenBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved90\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"feePerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"avgProofDelay\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxBlocks\",\"type\":\"uint256\"}],\"name\":\"verifyBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + ABI: "[{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BATCH_NOT_AUCTIONABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF_OVERWRITE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF_OVERWRITE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_BETTER_BID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_PROVEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_PROVEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_SPECIAL_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_OPEN_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_OPEN_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"reward\",\"type\":\"uint64\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"reward\",\"type\":\"uint64\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"canDepositEthToL2\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"depositEtherToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getBlock\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"_metaHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_proposer\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_proposedAt\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_assignedProver\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_proofWindow\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"getBlockFee\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"relaySignalRoot\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"blockMaxProposals\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockMaxVerificationsPerTx\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"blockMaxGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockFeeBaseGas\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxTransactions\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxTxListBytes\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"blockTxListExpiry\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofRegularCooldown\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofOracleCooldown\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"proofMinWindow\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"proofMaxWindow\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMinCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMaxCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMinAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMaxAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositMaxFee\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"rewardPerGasRange\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"rewardOpenMultipler\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"rewardOpenMaxCount\",\"type\":\"uint256\"}],\"internalType\":\"structTaikoData.Config\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getCrossChainBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getCrossChainSignalRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"getForkChoice\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"provenAt\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"gasUsed\",\"type\":\"uint32\"}],\"internalType\":\"structTaikoData.ForkChoice\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStateVariables\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"feePerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.StateVariables\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"id\",\"type\":\"uint16\"}],\"name\":\"getVerifierName\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_genesisBlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"_initFeePerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_initAvgProofDelay\",\"type\":\"uint16\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"txList\",\"type\":\"bytes\"}],\"name\":\"proposeBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"proveBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"state\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved70\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved71\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numOpenBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved90\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"feePerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"avgProofDelay\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxBlocks\",\"type\":\"uint256\"}],\"name\":\"verifyBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", } // TaikoL1ClientABI is the input ABI used to generate the binding from. @@ -316,12 +316,13 @@ func (_TaikoL1Client *TaikoL1ClientCallerSession) CanDepositEthToL2(amount *big. // GetBlock is a free data retrieval call binding the contract method 0x04c07569. // -// Solidity: function getBlock(uint256 blockId) view returns(bytes32 _metaHash, address _proposer, uint64 _proposedAt, address _assignedProver) +// Solidity: function getBlock(uint256 blockId) view returns(bytes32 _metaHash, address _proposer, uint64 _proposedAt, address _assignedProver, uint64 _proofWindow) func (_TaikoL1Client *TaikoL1ClientCaller) GetBlock(opts *bind.CallOpts, blockId *big.Int) (struct { MetaHash [32]byte Proposer common.Address ProposedAt uint64 AssignedProver common.Address + ProofWindow uint64 }, error) { var out []interface{} err := _TaikoL1Client.contract.Call(opts, &out, "getBlock", blockId) @@ -331,6 +332,7 @@ func (_TaikoL1Client *TaikoL1ClientCaller) GetBlock(opts *bind.CallOpts, blockId Proposer common.Address ProposedAt uint64 AssignedProver common.Address + ProofWindow uint64 }) if err != nil { return *outstruct, err @@ -340,6 +342,7 @@ func (_TaikoL1Client *TaikoL1ClientCaller) GetBlock(opts *bind.CallOpts, blockId outstruct.Proposer = *abi.ConvertType(out[1], new(common.Address)).(*common.Address) outstruct.ProposedAt = *abi.ConvertType(out[2], new(uint64)).(*uint64) outstruct.AssignedProver = *abi.ConvertType(out[3], new(common.Address)).(*common.Address) + outstruct.ProofWindow = *abi.ConvertType(out[4], new(uint64)).(*uint64) return *outstruct, err @@ -347,24 +350,26 @@ func (_TaikoL1Client *TaikoL1ClientCaller) GetBlock(opts *bind.CallOpts, blockId // GetBlock is a free data retrieval call binding the contract method 0x04c07569. // -// Solidity: function getBlock(uint256 blockId) view returns(bytes32 _metaHash, address _proposer, uint64 _proposedAt, address _assignedProver) +// Solidity: function getBlock(uint256 blockId) view returns(bytes32 _metaHash, address _proposer, uint64 _proposedAt, address _assignedProver, uint64 _proofWindow) func (_TaikoL1Client *TaikoL1ClientSession) GetBlock(blockId *big.Int) (struct { MetaHash [32]byte Proposer common.Address ProposedAt uint64 AssignedProver common.Address + ProofWindow uint64 }, error) { return _TaikoL1Client.Contract.GetBlock(&_TaikoL1Client.CallOpts, blockId) } // GetBlock is a free data retrieval call binding the contract method 0x04c07569. // -// Solidity: function getBlock(uint256 blockId) view returns(bytes32 _metaHash, address _proposer, uint64 _proposedAt, address _assignedProver) +// Solidity: function getBlock(uint256 blockId) view returns(bytes32 _metaHash, address _proposer, uint64 _proposedAt, address _assignedProver, uint64 _proofWindow) func (_TaikoL1Client *TaikoL1ClientCallerSession) GetBlock(blockId *big.Int) (struct { MetaHash [32]byte Proposer common.Address ProposedAt uint64 AssignedProver common.Address + ProofWindow uint64 }, error) { return _TaikoL1Client.Contract.GetBlock(&_TaikoL1Client.CallOpts, blockId) } diff --git a/prover/prover.go b/prover/prover.go index f36cc66b4..1b19cf8ba 100644 --- a/prover/prover.go +++ b/prover/prover.go @@ -62,7 +62,7 @@ type Prover struct { blockProvenSub event.Subscription blockVerifiedCh chan *bindings.TaikoL1ClientBlockVerified blockVerifiedSub event.Subscription - proveNotify chan struct{} + proveNotify chan *big.Int // Proof related proofGenerationCh chan *proofProducer.ProofWithHeader @@ -72,8 +72,10 @@ type Prover struct { submitProofConcurrencyGuard chan struct{} submitProofTxMutex *sync.Mutex - currentBlocksBeingProven map[uint64]cancelFunc - currentBlocksBeingProvenMutex *sync.Mutex + currentBlocksBeingProven map[uint64]cancelFunc + currentBlocksBeingProvenMutex *sync.Mutex + currentBlocksWaitingForProofWindow map[uint64]cancelFunc + currentBlocksWaitingForProofWindowMutex *sync.Mutex ctx context.Context wg sync.WaitGroup @@ -95,6 +97,8 @@ func InitFromConfig(ctx context.Context, p *Prover, cfg *Config) (err error) { p.ctx = ctx p.currentBlocksBeingProven = make(map[uint64]cancelFunc) p.currentBlocksBeingProvenMutex = &sync.Mutex{} + p.currentBlocksWaitingForProofWindow = make(map[uint64]cancelFunc) + p.currentBlocksWaitingForProofWindowMutex = &sync.Mutex{} // Clients if p.rpc, err = rpc.NewClient(p.ctx, &rpc.ClientConfig{ @@ -131,7 +135,7 @@ func InitFromConfig(ctx context.Context, p *Prover, cfg *Config) (err error) { p.blockVerifiedCh = make(chan *bindings.TaikoL1ClientBlockVerified, chBufferSize) p.blockProvenCh = make(chan *bindings.TaikoL1ClientBlockProven, chBufferSize) p.proofGenerationCh = make(chan *proofProducer.ProofWithHeader, chBufferSize) - p.proveNotify = make(chan struct{}, 1) + p.proveNotify = make(chan *big.Int, 1) if err := p.initL1Current(cfg.StartingBlockID); err != nil { return fmt.Errorf("initialize L1 current cursor error: %w", err) } @@ -223,7 +227,7 @@ func (p *Prover) eventLoop() { // if we are already proving. reqProving := func() { select { - case p.proveNotify <- struct{}{}: + case p.proveNotify <- nil: default: } } @@ -243,6 +247,9 @@ func (p *Prover) eventLoop() { ) defer verificationCheckTicker.Stop() + checkProofWindowExpiredTicker := time.NewTicker(10 * time.Second) + defer checkProofWindowExpiredTicker.Stop() + // Call reqProving() right away to catch up with the latest state. reqProving() @@ -257,10 +264,14 @@ func (p *Prover) eventLoop() { ); err != nil { log.Error("Check chain verification error", "error", err) } + case <-checkProofWindowExpiredTicker.C: + if err := p.checkProofWindowsExpired(p.ctx); err != nil { + log.Error("error checking proof window expired", "error", "err") + } case proofWithHeader := <-p.proofGenerationCh: p.submitProofOp(p.ctx, proofWithHeader) case <-p.proveNotify: - if err := p.proveOp(); err != nil { + if err := p.proveOp(nil); err != nil { log.Error("Prove new blocks error", "error", err) } case <-p.blockProposedCh: @@ -287,8 +298,12 @@ func (p *Prover) Close() { // proveOp performs a proving operation, find current unproven blocks, then // request generating proofs for them. -func (p *Prover) proveOp() error { +func (p *Prover) proveOp(startHeight *big.Int) error { firstTry := true + + if startHeight == nil { + startHeight = new(big.Int).SetUint64(p.l1Current) + } for firstTry || p.reorgDetectedFlag { p.reorgDetectedFlag = false firstTry = false @@ -296,7 +311,7 @@ func (p *Prover) proveOp() error { iter, err := eventIterator.NewBlockProposedIterator(p.ctx, &eventIterator.BlockProposedIteratorConfig{ Client: p.rpc.L1, TaikoL1: p.rpc.TaikoL1, - StartHeight: new(big.Int).SetUint64(p.l1Current), + StartHeight: startHeight, OnBlockProposedEvent: p.onBlockProposed, }) if err != nil { @@ -426,9 +441,21 @@ func (p *Prover) onBlockProposed( return err } - // zero address means anyone can prove - if block.AssignedProver != p.proverAddress && block.AssignedProver != zeroAddress { + proofWindowExpired := uint64(time.Now().Unix()) > block.ProposedAt+block.ProofWindow + // zero address means anyone can prove, proofWindowExpired means anyone can prove even if not zero address + if block.AssignedProver != p.proverAddress && block.AssignedProver != zeroAddress && !proofWindowExpired { log.Info("proposed block not proveable", "blockID", event.Id, "prover", block.AssignedProver.Hex()) + + if !proofWindowExpired { + // if we cant prove it + p.currentBlocksWaitingForProofWindowMutex.Lock() + p.currentBlocksWaitingForProofWindow[event.Meta.Id] = cancelFunc(func() { + p.currentBlocksWaitingForProofWindowMutex.Lock() + defer p.currentBlocksWaitingForProofWindowMutex.Unlock() + delete(p.currentBlocksWaitingForProofWindow, event.Meta.Id) + }) + } + return nil } @@ -655,3 +682,51 @@ func (p *Prover) cancelProof(ctx context.Context, blockID uint64) { delete(p.currentBlocksBeingProven, blockID) } } + +func (p *Prover) checkProofWindowsExpired(ctx context.Context) error { + for blockId, cancel := range p.currentBlocksWaitingForProofWindow { + if err := p.checkProofWindowExpired(ctx, blockId, cancel); err != nil { + return err + } + } + + return nil +} + +func (p *Prover) checkProofWindowExpired(ctx context.Context, blockId uint64, cancel cancelFunc) error { + p.currentBlocksWaitingForProofWindowMutex.Lock() + defer p.currentBlocksWaitingForProofWindowMutex.Unlock() + + block, err := p.rpc.TaikoL1.GetBlock(nil, big.NewInt(int64(blockId))) + if err != nil { + return err + } + + if time.Now().Unix() > int64(block.ProposedAt)+int64(block.ProofWindow) { + // we can see if a fork choice with correct parentHash/gasUsed has come in. + // if it hasnt, we can start to generate a proof for this. + + parent, err := p.rpc.L2ParentByBlockId(ctx, big.NewInt(int64(blockId))) + if err != nil { + return err + } + + forkChoice, err := p.rpc.TaikoL1.GetForkChoice(nil, big.NewInt(int64(blockId)), parent.Hash(), uint32(parent.GasUsed)) + if err != nil { + return err + } + + if forkChoice.Prover == zeroAddress { + // we can generate the proof + p.proveNotify <- big.NewInt(int64(blockId)) + } else { + // we should remove this block from being watched, a proof has already come in that agrees with + // our expected fork choice. + // cancel will remove this from the map. + cancel() + } + } + + // otherwise, keep it in the map and check again next iteration + return nil +} From 941e02696cd57d9d98d70412109bb44da6b8d2d8 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Mon, 26 Jun 2023 17:27:37 -0700 Subject: [PATCH 10/37] rm test log --- testutils/suite.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/testutils/suite.go b/testutils/suite.go index 0ccc62da6..8da2e2248 100644 --- a/testutils/suite.go +++ b/testutils/suite.go @@ -3,7 +3,6 @@ package testutils import ( "context" "crypto/ecdsa" - "fmt" "math" "math/big" "os" @@ -93,16 +92,9 @@ func (s *ClientTestSuite) SetupTest() { proverOpts, err := bind.NewKeyedTransactorWithChainID(l1ProverPrivKey, rpcCli.L1ChainID) s.Nil(err) - balance, err := s.RpcClient.TaikoTokenL1.BalanceOf(nil, crypto.PubkeyToAddress(l1ProverPrivKey.PublicKey)) - s.Nil(err) - - fmt.Println("prover balance", "balance", balance.String()) - proverInfo, err := s.RpcClient.TaikoProverPoolL1.GetStaker(nil, crypto.PubkeyToAddress(l1ProverPrivKey.PublicKey)) s.Nil(err) - log.Info("proverInfo", "proverId", proverInfo.Staker.ProverId, "capacity", proverInfo.Staker.MaxCapacity) - if proverInfo.Staker.ProverId == 0 { minStakePerCapacity, err := s.RpcClient.TaikoProverPoolL1.MINSTAKEPERCAPACITY(nil) From 6f3cc2bee19bd0c18320fd82f43731ea53a9c7df Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Mon, 26 Jun 2023 17:33:23 -0700 Subject: [PATCH 11/37] lint --- proposer/proposer.go | 2 +- testutils/suite.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/proposer/proposer.go b/proposer/proposer.go index 27e9ea2c4..cd0fd6da6 100644 --- a/proposer/proposer.go +++ b/proposer/proposer.go @@ -403,7 +403,7 @@ func getTxOpts( // checkTaikoTokenBalance ensures you have at least the block fee in your balance, and approved, before // attempting to propose block, as it will use transferFrom. func (p *Proposer) checkTaikoTokenBalance() error { - fee, err := p.rpc.TaikoL1.GetBlockFee(nil, uint32(p.protocolConfigs.BlockMaxGasLimit)) + fee, err := p.rpc.TaikoL1.GetBlockFee(nil, p.protocolConfigs.BlockMaxGasLimit) if err != nil { return fmt.Errorf("failed to get block fee: %w", err) } diff --git a/testutils/suite.go b/testutils/suite.go index 8da2e2248..1385e7b57 100644 --- a/testutils/suite.go +++ b/testutils/suite.go @@ -96,7 +96,6 @@ func (s *ClientTestSuite) SetupTest() { s.Nil(err) if proverInfo.Staker.ProverId == 0 { - minStakePerCapacity, err := s.RpcClient.TaikoProverPoolL1.MINSTAKEPERCAPACITY(nil) s.Nil(err) From b0482b4ec22a07e198858aa3f20ef9c382546513 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Tue, 27 Jun 2023 01:06:55 -0700 Subject: [PATCH 12/37] base branch --- .github/workflows/test.yml | 2 +- prover/prover.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 94baf89a2..fd580b854 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,7 +45,7 @@ jobs: with: repository: taikoxyz/taiko-mono path: ${{ env.TAIKO_MONO_DIR }} - ref: get_block_info + ref: alpha-4-base - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 diff --git a/prover/prover.go b/prover/prover.go index 1b19cf8ba..a595eb6bb 100644 --- a/prover/prover.go +++ b/prover/prover.go @@ -266,12 +266,12 @@ func (p *Prover) eventLoop() { } case <-checkProofWindowExpiredTicker.C: if err := p.checkProofWindowsExpired(p.ctx); err != nil { - log.Error("error checking proof window expired", "error", "err") + log.Error("error checking proof window expired", "error", err) } case proofWithHeader := <-p.proofGenerationCh: p.submitProofOp(p.ctx, proofWithHeader) - case <-p.proveNotify: - if err := p.proveOp(nil); err != nil { + case blockId := <-p.proveNotify: + if err := p.proveOp(blockId); err != nil { log.Error("Prove new blocks error", "error", err) } case <-p.blockProposedCh: From 6dedef4077f624994c67aed3b275590ed40b4c56 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Tue, 27 Jun 2023 16:17:21 -0700 Subject: [PATCH 13/37] slice instead of map --- prover/prover.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/prover/prover.go b/prover/prover.go index a595eb6bb..763bce85a 100644 --- a/prover/prover.go +++ b/prover/prover.go @@ -74,7 +74,7 @@ type Prover struct { currentBlocksBeingProven map[uint64]cancelFunc currentBlocksBeingProvenMutex *sync.Mutex - currentBlocksWaitingForProofWindow map[uint64]cancelFunc + currentBlocksWaitingForProofWindow []uint64 currentBlocksWaitingForProofWindowMutex *sync.Mutex ctx context.Context @@ -97,7 +97,7 @@ func InitFromConfig(ctx context.Context, p *Prover, cfg *Config) (err error) { p.ctx = ctx p.currentBlocksBeingProven = make(map[uint64]cancelFunc) p.currentBlocksBeingProvenMutex = &sync.Mutex{} - p.currentBlocksWaitingForProofWindow = make(map[uint64]cancelFunc) + p.currentBlocksWaitingForProofWindow = make([]uint64, 0) p.currentBlocksWaitingForProofWindowMutex = &sync.Mutex{} // Clients @@ -449,11 +449,8 @@ func (p *Prover) onBlockProposed( if !proofWindowExpired { // if we cant prove it p.currentBlocksWaitingForProofWindowMutex.Lock() - p.currentBlocksWaitingForProofWindow[event.Meta.Id] = cancelFunc(func() { - p.currentBlocksWaitingForProofWindowMutex.Lock() - defer p.currentBlocksWaitingForProofWindowMutex.Unlock() - delete(p.currentBlocksWaitingForProofWindow, event.Meta.Id) - }) + p.currentBlocksWaitingForProofWindow = append(p.currentBlocksWaitingForProofWindow, event.Meta.Id) + p.currentBlocksBeingProvenMutex.Unlock() } return nil @@ -684,8 +681,8 @@ func (p *Prover) cancelProof(ctx context.Context, blockID uint64) { } func (p *Prover) checkProofWindowsExpired(ctx context.Context) error { - for blockId, cancel := range p.currentBlocksWaitingForProofWindow { - if err := p.checkProofWindowExpired(ctx, blockId, cancel); err != nil { + for i, blockId := range p.currentBlocksWaitingForProofWindow { + if err := p.checkProofWindowExpired(ctx, i, blockId); err != nil { return err } } @@ -693,7 +690,7 @@ func (p *Prover) checkProofWindowsExpired(ctx context.Context) error { return nil } -func (p *Prover) checkProofWindowExpired(ctx context.Context, blockId uint64, cancel cancelFunc) error { +func (p *Prover) checkProofWindowExpired(ctx context.Context, i int, blockId uint64) error { p.currentBlocksWaitingForProofWindowMutex.Lock() defer p.currentBlocksWaitingForProofWindowMutex.Unlock() @@ -723,7 +720,10 @@ func (p *Prover) checkProofWindowExpired(ctx context.Context, blockId uint64, ca // we should remove this block from being watched, a proof has already come in that agrees with // our expected fork choice. // cancel will remove this from the map. - cancel() + p.currentBlocksWaitingForProofWindow = append( + p.currentBlocksWaitingForProofWindow[:i], + p.currentBlocksWaitingForProofWindow[i+1:]..., + ) } } From 71b037ad482b20216db7c59b290681238df6e4d9 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Wed, 28 Jun 2023 12:38:03 -0700 Subject: [PATCH 14/37] git ref update --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fd580b854..42b5be71e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,7 +45,7 @@ jobs: with: repository: taikoxyz/taiko-mono path: ${{ env.TAIKO_MONO_DIR }} - ref: alpha-4-base + ref: alpha-4 - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 From f4954b81c61662e4649afe7e4e5a710a503ac277 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Wed, 28 Jun 2023 16:54:56 -0700 Subject: [PATCH 15/37] catch up to prover pool1 changes --- .github/workflows/test.yml | 2 +- bindings/.githead | 2 +- bindings/gen_taiko_l1.go | 197 ++++++++++++++----- bindings/gen_taiko_prover_pool_l1.go | 279 ++++++++++++++------------- proposer/proposer.go | 15 +- testutils/suite.go | 10 +- 6 files changed, 302 insertions(+), 203 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 42b5be71e..93c21a5f4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,7 +45,7 @@ jobs: with: repository: taikoxyz/taiko-mono path: ${{ env.TAIKO_MONO_DIR }} - ref: alpha-4 + ref: improve_staking5 - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 diff --git a/bindings/.githead b/bindings/.githead index bc2172988..c651b9f87 100644 --- a/bindings/.githead +++ b/bindings/.githead @@ -1 +1 @@ -92f4f0e0e826f826713461d4ee2d48ba8c9554f3 +8b5f9feb3757d778ef19f3056bac390326a3a314 diff --git a/bindings/gen_taiko_l1.go b/bindings/gen_taiko_l1.go index aefb48e10..0596918ca 100644 --- a/bindings/gen_taiko_l1.go +++ b/bindings/gen_taiko_l1.go @@ -103,7 +103,7 @@ type TaikoDataStateVariables struct { // TaikoL1ClientMetaData contains all meta data concerning the TaikoL1Client contract. var TaikoL1ClientMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BATCH_NOT_AUCTIONABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF_OVERWRITE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF_OVERWRITE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_BETTER_BID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_PROVEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_PROVEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_SPECIAL_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_OPEN_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_OPEN_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"reward\",\"type\":\"uint64\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"reward\",\"type\":\"uint64\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"canDepositEthToL2\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"depositEtherToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getBlock\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"_metaHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_proposer\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_proposedAt\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_assignedProver\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_proofWindow\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"getBlockFee\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"relaySignalRoot\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"blockMaxProposals\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockMaxVerificationsPerTx\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"blockMaxGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockFeeBaseGas\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxTransactions\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxTxListBytes\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"blockTxListExpiry\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofRegularCooldown\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofOracleCooldown\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"proofMinWindow\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"proofMaxWindow\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMinCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMaxCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMinAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMaxAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositMaxFee\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"rewardPerGasRange\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"rewardOpenMultipler\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"rewardOpenMaxCount\",\"type\":\"uint256\"}],\"internalType\":\"structTaikoData.Config\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getCrossChainBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getCrossChainSignalRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"getForkChoice\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"provenAt\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"gasUsed\",\"type\":\"uint32\"}],\"internalType\":\"structTaikoData.ForkChoice\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStateVariables\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"feePerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.StateVariables\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"id\",\"type\":\"uint16\"}],\"name\":\"getVerifierName\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_genesisBlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"_initFeePerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_initAvgProofDelay\",\"type\":\"uint16\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"txList\",\"type\":\"bytes\"}],\"name\":\"proposeBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"proveBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"state\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved70\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved71\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numOpenBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved90\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"feePerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"avgProofDelay\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxBlocks\",\"type\":\"uint256\"}],\"name\":\"verifyBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + ABI: "[{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BATCH_NOT_AUCTIONABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF_OVERWRITE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF_OVERWRITE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_BETTER_BID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_PROVEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_PROVEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_SPECIAL_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_OPEN_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_OPEN_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockFee\",\"type\":\"uint64\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockFee\",\"type\":\"uint64\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"reward\",\"type\":\"uint64\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"reward\",\"type\":\"uint64\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"canDepositEthToL2\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"depositEtherToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"depositTaikoToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getBlock\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"_metaHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"_gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"_nextForkChoiceId\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"_verifiedForkChoiceId\",\"type\":\"uint24\"},{\"internalType\":\"bool\",\"name\":\"_proverReleased\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"_proposer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_feePerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"_proposedAt\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_assignedProver\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_rewardPerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"_proofWindow\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"getBlockFee\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"relaySignalRoot\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"blockMaxProposals\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockMaxVerificationsPerTx\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"blockMaxGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockFeeBaseGas\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxTransactions\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxTxListBytes\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"blockTxListExpiry\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofRegularCooldown\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofOracleCooldown\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"proofMinWindow\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"proofMaxWindow\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMinCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMaxCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMinAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMaxAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositMaxFee\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"rewardPerGasRange\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"rewardOpenMultipler\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"rewardOpenMaxCount\",\"type\":\"uint256\"}],\"internalType\":\"structTaikoData.Config\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getCrossChainBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getCrossChainSignalRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"getForkChoice\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"provenAt\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"gasUsed\",\"type\":\"uint32\"}],\"internalType\":\"structTaikoData.ForkChoice\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStateVariables\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"feePerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.StateVariables\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getTaikoTokenBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"id\",\"type\":\"uint16\"}],\"name\":\"getVerifierName\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_genesisBlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"_initFeePerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_initAvgProofDelay\",\"type\":\"uint16\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"txList\",\"type\":\"bytes\"}],\"name\":\"proposeBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"proveBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"state\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved70\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved71\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numOpenBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved90\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"feePerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"avgProofDelay\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxBlocks\",\"type\":\"uint256\"}],\"name\":\"verifyBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTaikoToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", } // TaikoL1ClientABI is the input ABI used to generate the binding from. @@ -316,33 +316,51 @@ func (_TaikoL1Client *TaikoL1ClientCallerSession) CanDepositEthToL2(amount *big. // GetBlock is a free data retrieval call binding the contract method 0x04c07569. // -// Solidity: function getBlock(uint256 blockId) view returns(bytes32 _metaHash, address _proposer, uint64 _proposedAt, address _assignedProver, uint64 _proofWindow) +// Solidity: function getBlock(uint256 blockId) view returns(bytes32 _metaHash, uint32 _gasLimit, uint24 _nextForkChoiceId, uint24 _verifiedForkChoiceId, bool _proverReleased, address _proposer, uint32 _feePerGas, uint64 _proposedAt, address _assignedProver, uint32 _rewardPerGas, uint64 _proofWindow) func (_TaikoL1Client *TaikoL1ClientCaller) GetBlock(opts *bind.CallOpts, blockId *big.Int) (struct { - MetaHash [32]byte - Proposer common.Address - ProposedAt uint64 - AssignedProver common.Address - ProofWindow uint64 + MetaHash [32]byte + GasLimit uint32 + NextForkChoiceId *big.Int + VerifiedForkChoiceId *big.Int + ProverReleased bool + Proposer common.Address + FeePerGas uint32 + ProposedAt uint64 + AssignedProver common.Address + RewardPerGas uint32 + ProofWindow uint64 }, error) { var out []interface{} err := _TaikoL1Client.contract.Call(opts, &out, "getBlock", blockId) outstruct := new(struct { - MetaHash [32]byte - Proposer common.Address - ProposedAt uint64 - AssignedProver common.Address - ProofWindow uint64 + MetaHash [32]byte + GasLimit uint32 + NextForkChoiceId *big.Int + VerifiedForkChoiceId *big.Int + ProverReleased bool + Proposer common.Address + FeePerGas uint32 + ProposedAt uint64 + AssignedProver common.Address + RewardPerGas uint32 + ProofWindow uint64 }) if err != nil { return *outstruct, err } outstruct.MetaHash = *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - outstruct.Proposer = *abi.ConvertType(out[1], new(common.Address)).(*common.Address) - outstruct.ProposedAt = *abi.ConvertType(out[2], new(uint64)).(*uint64) - outstruct.AssignedProver = *abi.ConvertType(out[3], new(common.Address)).(*common.Address) - outstruct.ProofWindow = *abi.ConvertType(out[4], new(uint64)).(*uint64) + outstruct.GasLimit = *abi.ConvertType(out[1], new(uint32)).(*uint32) + outstruct.NextForkChoiceId = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.VerifiedForkChoiceId = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + outstruct.ProverReleased = *abi.ConvertType(out[4], new(bool)).(*bool) + outstruct.Proposer = *abi.ConvertType(out[5], new(common.Address)).(*common.Address) + outstruct.FeePerGas = *abi.ConvertType(out[6], new(uint32)).(*uint32) + outstruct.ProposedAt = *abi.ConvertType(out[7], new(uint64)).(*uint64) + outstruct.AssignedProver = *abi.ConvertType(out[8], new(common.Address)).(*common.Address) + outstruct.RewardPerGas = *abi.ConvertType(out[9], new(uint32)).(*uint32) + outstruct.ProofWindow = *abi.ConvertType(out[10], new(uint64)).(*uint64) return *outstruct, err @@ -350,26 +368,38 @@ func (_TaikoL1Client *TaikoL1ClientCaller) GetBlock(opts *bind.CallOpts, blockId // GetBlock is a free data retrieval call binding the contract method 0x04c07569. // -// Solidity: function getBlock(uint256 blockId) view returns(bytes32 _metaHash, address _proposer, uint64 _proposedAt, address _assignedProver, uint64 _proofWindow) +// Solidity: function getBlock(uint256 blockId) view returns(bytes32 _metaHash, uint32 _gasLimit, uint24 _nextForkChoiceId, uint24 _verifiedForkChoiceId, bool _proverReleased, address _proposer, uint32 _feePerGas, uint64 _proposedAt, address _assignedProver, uint32 _rewardPerGas, uint64 _proofWindow) func (_TaikoL1Client *TaikoL1ClientSession) GetBlock(blockId *big.Int) (struct { - MetaHash [32]byte - Proposer common.Address - ProposedAt uint64 - AssignedProver common.Address - ProofWindow uint64 + MetaHash [32]byte + GasLimit uint32 + NextForkChoiceId *big.Int + VerifiedForkChoiceId *big.Int + ProverReleased bool + Proposer common.Address + FeePerGas uint32 + ProposedAt uint64 + AssignedProver common.Address + RewardPerGas uint32 + ProofWindow uint64 }, error) { return _TaikoL1Client.Contract.GetBlock(&_TaikoL1Client.CallOpts, blockId) } // GetBlock is a free data retrieval call binding the contract method 0x04c07569. // -// Solidity: function getBlock(uint256 blockId) view returns(bytes32 _metaHash, address _proposer, uint64 _proposedAt, address _assignedProver, uint64 _proofWindow) +// Solidity: function getBlock(uint256 blockId) view returns(bytes32 _metaHash, uint32 _gasLimit, uint24 _nextForkChoiceId, uint24 _verifiedForkChoiceId, bool _proverReleased, address _proposer, uint32 _feePerGas, uint64 _proposedAt, address _assignedProver, uint32 _rewardPerGas, uint64 _proofWindow) func (_TaikoL1Client *TaikoL1ClientCallerSession) GetBlock(blockId *big.Int) (struct { - MetaHash [32]byte - Proposer common.Address - ProposedAt uint64 - AssignedProver common.Address - ProofWindow uint64 + MetaHash [32]byte + GasLimit uint32 + NextForkChoiceId *big.Int + VerifiedForkChoiceId *big.Int + ProverReleased bool + Proposer common.Address + FeePerGas uint32 + ProposedAt uint64 + AssignedProver common.Address + RewardPerGas uint32 + ProofWindow uint64 }, error) { return _TaikoL1Client.Contract.GetBlock(&_TaikoL1Client.CallOpts, blockId) } @@ -560,6 +590,37 @@ func (_TaikoL1Client *TaikoL1ClientCallerSession) GetStateVariables() (TaikoData return _TaikoL1Client.Contract.GetStateVariables(&_TaikoL1Client.CallOpts) } +// GetTaikoTokenBalance is a free data retrieval call binding the contract method 0x8dff9cea. +// +// Solidity: function getTaikoTokenBalance(address addr) view returns(uint256) +func (_TaikoL1Client *TaikoL1ClientCaller) GetTaikoTokenBalance(opts *bind.CallOpts, addr common.Address) (*big.Int, error) { + var out []interface{} + err := _TaikoL1Client.contract.Call(opts, &out, "getTaikoTokenBalance", addr) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTaikoTokenBalance is a free data retrieval call binding the contract method 0x8dff9cea. +// +// Solidity: function getTaikoTokenBalance(address addr) view returns(uint256) +func (_TaikoL1Client *TaikoL1ClientSession) GetTaikoTokenBalance(addr common.Address) (*big.Int, error) { + return _TaikoL1Client.Contract.GetTaikoTokenBalance(&_TaikoL1Client.CallOpts, addr) +} + +// GetTaikoTokenBalance is a free data retrieval call binding the contract method 0x8dff9cea. +// +// Solidity: function getTaikoTokenBalance(address addr) view returns(uint256) +func (_TaikoL1Client *TaikoL1ClientCallerSession) GetTaikoTokenBalance(addr common.Address) (*big.Int, error) { + return _TaikoL1Client.Contract.GetTaikoTokenBalance(&_TaikoL1Client.CallOpts, addr) +} + // GetVerifierName is a free data retrieval call binding the contract method 0x0372303d. // // Solidity: function getVerifierName(uint16 id) pure returns(bytes32) @@ -805,6 +866,27 @@ func (_TaikoL1Client *TaikoL1ClientTransactorSession) DepositEtherToL2(recipient return _TaikoL1Client.Contract.DepositEtherToL2(&_TaikoL1Client.TransactOpts, recipient) } +// DepositTaikoToken is a paid mutator transaction binding the contract method 0x98f39aba. +// +// Solidity: function depositTaikoToken(uint256 amount) returns() +func (_TaikoL1Client *TaikoL1ClientTransactor) DepositTaikoToken(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { + return _TaikoL1Client.contract.Transact(opts, "depositTaikoToken", amount) +} + +// DepositTaikoToken is a paid mutator transaction binding the contract method 0x98f39aba. +// +// Solidity: function depositTaikoToken(uint256 amount) returns() +func (_TaikoL1Client *TaikoL1ClientSession) DepositTaikoToken(amount *big.Int) (*types.Transaction, error) { + return _TaikoL1Client.Contract.DepositTaikoToken(&_TaikoL1Client.TransactOpts, amount) +} + +// DepositTaikoToken is a paid mutator transaction binding the contract method 0x98f39aba. +// +// Solidity: function depositTaikoToken(uint256 amount) returns() +func (_TaikoL1Client *TaikoL1ClientTransactorSession) DepositTaikoToken(amount *big.Int) (*types.Transaction, error) { + return _TaikoL1Client.Contract.DepositTaikoToken(&_TaikoL1Client.TransactOpts, amount) +} + // Init is a paid mutator transaction binding the contract method 0xa72111dc. // // Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint32 _initFeePerGas, uint16 _initAvgProofDelay) returns() @@ -952,6 +1034,27 @@ func (_TaikoL1Client *TaikoL1ClientTransactorSession) VerifyBlocks(maxBlocks *bi return _TaikoL1Client.Contract.VerifyBlocks(&_TaikoL1Client.TransactOpts, maxBlocks) } +// WithdrawTaikoToken is a paid mutator transaction binding the contract method 0x5043f059. +// +// Solidity: function withdrawTaikoToken(uint256 amount) returns() +func (_TaikoL1Client *TaikoL1ClientTransactor) WithdrawTaikoToken(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { + return _TaikoL1Client.contract.Transact(opts, "withdrawTaikoToken", amount) +} + +// WithdrawTaikoToken is a paid mutator transaction binding the contract method 0x5043f059. +// +// Solidity: function withdrawTaikoToken(uint256 amount) returns() +func (_TaikoL1Client *TaikoL1ClientSession) WithdrawTaikoToken(amount *big.Int) (*types.Transaction, error) { + return _TaikoL1Client.Contract.WithdrawTaikoToken(&_TaikoL1Client.TransactOpts, amount) +} + +// WithdrawTaikoToken is a paid mutator transaction binding the contract method 0x5043f059. +// +// Solidity: function withdrawTaikoToken(uint256 amount) returns() +func (_TaikoL1Client *TaikoL1ClientTransactorSession) WithdrawTaikoToken(amount *big.Int) (*types.Transaction, error) { + return _TaikoL1Client.Contract.WithdrawTaikoToken(&_TaikoL1Client.TransactOpts, amount) +} + // Receive is a paid mutator transaction binding the contract receive function. // // Solidity: receive() payable returns() @@ -1176,14 +1279,15 @@ func (it *TaikoL1ClientBlockProposedIterator) Close() error { // TaikoL1ClientBlockProposed represents a BlockProposed event raised by the TaikoL1Client contract. type TaikoL1ClientBlockProposed struct { - Id *big.Int - Meta TaikoDataBlockMetadata - Raw types.Log // Blockchain specific contextual infos + Id *big.Int + Meta TaikoDataBlockMetadata + BlockFee uint64 + Raw types.Log // Blockchain specific contextual infos } -// FilterBlockProposed is a free log retrieval operation binding the contract event 0xb10849493846e4879f64f36789172a1a650464eb8b5e0a706a86d886f50e6ba0. +// FilterBlockProposed is a free log retrieval operation binding the contract event 0x555304f14500c230922dd951cfdbb74012005afbcd7350b4b9fd27dc12d710fe. // -// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta) +// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta, uint64 blockFee) func (_TaikoL1Client *TaikoL1ClientFilterer) FilterBlockProposed(opts *bind.FilterOpts, id []*big.Int) (*TaikoL1ClientBlockProposedIterator, error) { var idRule []interface{} @@ -1198,9 +1302,9 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) FilterBlockProposed(opts *bind.Filt return &TaikoL1ClientBlockProposedIterator{contract: _TaikoL1Client.contract, event: "BlockProposed", logs: logs, sub: sub}, nil } -// WatchBlockProposed is a free log subscription operation binding the contract event 0xb10849493846e4879f64f36789172a1a650464eb8b5e0a706a86d886f50e6ba0. +// WatchBlockProposed is a free log subscription operation binding the contract event 0x555304f14500c230922dd951cfdbb74012005afbcd7350b4b9fd27dc12d710fe. // -// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta) +// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta, uint64 blockFee) func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockProposed(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientBlockProposed, id []*big.Int) (event.Subscription, error) { var idRule []interface{} @@ -1240,9 +1344,9 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockProposed(opts *bind.Watch }), nil } -// ParseBlockProposed is a log parse operation binding the contract event 0xb10849493846e4879f64f36789172a1a650464eb8b5e0a706a86d886f50e6ba0. +// ParseBlockProposed is a log parse operation binding the contract event 0x555304f14500c230922dd951cfdbb74012005afbcd7350b4b9fd27dc12d710fe. // -// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta) +// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta, uint64 blockFee) func (_TaikoL1Client *TaikoL1ClientFilterer) ParseBlockProposed(log types.Log) (*TaikoL1ClientBlockProposed, error) { event := new(TaikoL1ClientBlockProposed) if err := _TaikoL1Client.contract.UnpackLog(event, "BlockProposed", log); err != nil { @@ -1321,14 +1425,15 @@ func (it *TaikoL1ClientBlockProposed0Iterator) Close() error { // TaikoL1ClientBlockProposed0 represents a BlockProposed0 event raised by the TaikoL1Client contract. type TaikoL1ClientBlockProposed0 struct { - Id *big.Int - Meta TaikoDataBlockMetadata - Raw types.Log // Blockchain specific contextual infos + Id *big.Int + Meta TaikoDataBlockMetadata + BlockFee uint64 + Raw types.Log // Blockchain specific contextual infos } -// FilterBlockProposed0 is a free log retrieval operation binding the contract event 0xb10849493846e4879f64f36789172a1a650464eb8b5e0a706a86d886f50e6ba0. +// FilterBlockProposed0 is a free log retrieval operation binding the contract event 0x555304f14500c230922dd951cfdbb74012005afbcd7350b4b9fd27dc12d710fe. // -// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta) +// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta, uint64 blockFee) func (_TaikoL1Client *TaikoL1ClientFilterer) FilterBlockProposed0(opts *bind.FilterOpts, id []*big.Int) (*TaikoL1ClientBlockProposed0Iterator, error) { var idRule []interface{} @@ -1343,9 +1448,9 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) FilterBlockProposed0(opts *bind.Fil return &TaikoL1ClientBlockProposed0Iterator{contract: _TaikoL1Client.contract, event: "BlockProposed0", logs: logs, sub: sub}, nil } -// WatchBlockProposed0 is a free log subscription operation binding the contract event 0xb10849493846e4879f64f36789172a1a650464eb8b5e0a706a86d886f50e6ba0. +// WatchBlockProposed0 is a free log subscription operation binding the contract event 0x555304f14500c230922dd951cfdbb74012005afbcd7350b4b9fd27dc12d710fe. // -// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta) +// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta, uint64 blockFee) func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockProposed0(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientBlockProposed0, id []*big.Int) (event.Subscription, error) { var idRule []interface{} @@ -1385,9 +1490,9 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockProposed0(opts *bind.Watc }), nil } -// ParseBlockProposed0 is a log parse operation binding the contract event 0xb10849493846e4879f64f36789172a1a650464eb8b5e0a706a86d886f50e6ba0. +// ParseBlockProposed0 is a log parse operation binding the contract event 0x555304f14500c230922dd951cfdbb74012005afbcd7350b4b9fd27dc12d710fe. // -// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta) +// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta, uint64 blockFee) func (_TaikoL1Client *TaikoL1ClientFilterer) ParseBlockProposed0(log types.Log) (*TaikoL1ClientBlockProposed0, error) { event := new(TaikoL1ClientBlockProposed0) if err := _TaikoL1Client.contract.UnpackLog(event, "BlockProposed0", log); err != nil { diff --git a/bindings/gen_taiko_prover_pool_l1.go b/bindings/gen_taiko_prover_pool_l1.go index ab30c49da..8d9579910 100644 --- a/bindings/gen_taiko_prover_pool_l1.go +++ b/bindings/gen_taiko_prover_pool_l1.go @@ -31,22 +31,23 @@ var ( // ProverPoolProver is an auto generated low-level Go binding around an user-defined struct. type ProverPoolProver struct { - StakedAmount uint32 + StakedAmount uint64 RewardPerGas uint16 CurrentCapacity uint16 + Weight uint64 } // ProverPoolStaker is an auto generated low-level Go binding around an user-defined struct. type ProverPoolStaker struct { ExitRequestedAt uint64 - ExitAmount uint32 + ExitAmount uint64 MaxCapacity uint16 ProverId uint8 } // TaikoL1ProverPoolMetaData contains all meta data concerning the TaikoL1ProverPool contract. var TaikoL1ProverPoolMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"name\":\"INVALID_PARAMS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NO_MATURE_EXIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PROVER_NOT_GOOD_ENOUGH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UNAUTHORIZED\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"amount\",\"type\":\"uint32\"}],\"name\":\"Exited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"amount\",\"type\":\"uint32\"}],\"name\":\"Slashed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"amount\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"rewardPerGas\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"currentCapacity\",\"type\":\"uint16\"}],\"name\":\"Staked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"amount\",\"type\":\"uint32\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"EXIT_PERIOD\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_CAPACITY_LOWER_BOUND\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_NUM_PROVERS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_STAKE_PER_CAPACITY\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ONE_TKO\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SLASH_POINTS\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"feePerGas\",\"type\":\"uint32\"}],\"name\":\"assignProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"rewardPerGas\",\"type\":\"uint32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"exit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCapacity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"capacity\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProvers\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"stakedAmount\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"rewardPerGas\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"currentCapacity\",\"type\":\"uint16\"}],\"internalType\":\"structProverPool.Prover[]\",\"name\":\"_provers\",\"type\":\"tuple[]\"},{\"internalType\":\"address[]\",\"name\":\"_stakers\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getStaker\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"exitRequestedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"exitAmount\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"maxCapacity\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"proverId\",\"type\":\"uint8\"}],\"internalType\":\"structProverPool.Staker\",\"name\":\"staker\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"stakedAmount\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"rewardPerGas\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"currentCapacity\",\"type\":\"uint16\"}],\"internalType\":\"structProverPool.Prover\",\"name\":\"prover\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"feePerGas\",\"type\":\"uint32\"}],\"name\":\"getWeights\",\"outputs\":[{\"internalType\":\"uint256[32]\",\"name\":\"weights\",\"type\":\"uint256[32]\"},{\"internalType\":\"uint256\",\"name\":\"totalWeight\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"idToProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"releaseProver\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"slashProver\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"amount\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"rewardPerGas\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"maxCapacity\",\"type\":\"uint16\"}],\"name\":\"stake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"stakers\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"exitRequestedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"exitAmount\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"maxCapacity\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"proverId\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + ABI: "[{\"inputs\":[],\"name\":\"INVALID_PARAMS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NO_MATURE_EXIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PROVER_NOT_GOOD_ENOUGH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UNAUTHORIZED\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"name\":\"Exited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"name\":\"Slashed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"rewardPerGas\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"currentCapacity\",\"type\":\"uint16\"}],\"name\":\"Staked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"EXIT_PERIOD\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_CAPACITY_LOWER_BOUND\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_NUM_PROVERS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_SLASH_AMOUNT\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_STAKE_PER_CAPACITY\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SLASH_POINTS\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"assignProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"rewardPerGas\",\"type\":\"uint32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"exit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCapacity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"capacity\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProvers\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"stakedAmount\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"rewardPerGas\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"currentCapacity\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"internalType\":\"structProverPool.Prover[]\",\"name\":\"_provers\",\"type\":\"tuple[]\"},{\"internalType\":\"address[]\",\"name\":\"_stakers\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getStaker\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"exitRequestedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"exitAmount\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"maxCapacity\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"proverId\",\"type\":\"uint8\"}],\"internalType\":\"structProverPool.Staker\",\"name\":\"staker\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"stakedAmount\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"rewardPerGas\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"currentCapacity\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"internalType\":\"structProverPool.Prover\",\"name\":\"prover\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"idToProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"provers\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"stakedAmount\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"rewardPerGas\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"currentCapacity\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"releaseProver\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"slashProver\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"rewardPerGas\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"maxCapacity\",\"type\":\"uint16\"}],\"name\":\"stake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"stakers\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"exitRequestedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"exitAmount\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"maxCapacity\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"proverId\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } // TaikoL1ProverPoolABI is the input ABI used to generate the binding from. @@ -288,43 +289,43 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) MAXNUMPROVERS() (*big. return _TaikoL1ProverPool.Contract.MAXNUMPROVERS(&_TaikoL1ProverPool.CallOpts) } -// MINSTAKEPERCAPACITY is a free data retrieval call binding the contract method 0x7d62c057. +// MINSLASHAMOUNT is a free data retrieval call binding the contract method 0x1972bc0d. // -// Solidity: function MIN_STAKE_PER_CAPACITY() view returns(uint32) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) MINSTAKEPERCAPACITY(opts *bind.CallOpts) (uint32, error) { +// Solidity: function MIN_SLASH_AMOUNT() view returns(uint64) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) MINSLASHAMOUNT(opts *bind.CallOpts) (uint64, error) { var out []interface{} - err := _TaikoL1ProverPool.contract.Call(opts, &out, "MIN_STAKE_PER_CAPACITY") + err := _TaikoL1ProverPool.contract.Call(opts, &out, "MIN_SLASH_AMOUNT") if err != nil { - return *new(uint32), err + return *new(uint64), err } - out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) return out0, err } -// MINSTAKEPERCAPACITY is a free data retrieval call binding the contract method 0x7d62c057. +// MINSLASHAMOUNT is a free data retrieval call binding the contract method 0x1972bc0d. // -// Solidity: function MIN_STAKE_PER_CAPACITY() view returns(uint32) -func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) MINSTAKEPERCAPACITY() (uint32, error) { - return _TaikoL1ProverPool.Contract.MINSTAKEPERCAPACITY(&_TaikoL1ProverPool.CallOpts) +// Solidity: function MIN_SLASH_AMOUNT() view returns(uint64) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) MINSLASHAMOUNT() (uint64, error) { + return _TaikoL1ProverPool.Contract.MINSLASHAMOUNT(&_TaikoL1ProverPool.CallOpts) } -// MINSTAKEPERCAPACITY is a free data retrieval call binding the contract method 0x7d62c057. +// MINSLASHAMOUNT is a free data retrieval call binding the contract method 0x1972bc0d. // -// Solidity: function MIN_STAKE_PER_CAPACITY() view returns(uint32) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) MINSTAKEPERCAPACITY() (uint32, error) { - return _TaikoL1ProverPool.Contract.MINSTAKEPERCAPACITY(&_TaikoL1ProverPool.CallOpts) +// Solidity: function MIN_SLASH_AMOUNT() view returns(uint64) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) MINSLASHAMOUNT() (uint64, error) { + return _TaikoL1ProverPool.Contract.MINSLASHAMOUNT(&_TaikoL1ProverPool.CallOpts) } -// ONETKO is a free data retrieval call binding the contract method 0xe22fcaaa. +// MINSTAKEPERCAPACITY is a free data retrieval call binding the contract method 0x7d62c057. // -// Solidity: function ONE_TKO() view returns(uint64) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) ONETKO(opts *bind.CallOpts) (uint64, error) { +// Solidity: function MIN_STAKE_PER_CAPACITY() view returns(uint64) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) MINSTAKEPERCAPACITY(opts *bind.CallOpts) (uint64, error) { var out []interface{} - err := _TaikoL1ProverPool.contract.Call(opts, &out, "ONE_TKO") + err := _TaikoL1ProverPool.contract.Call(opts, &out, "MIN_STAKE_PER_CAPACITY") if err != nil { return *new(uint64), err @@ -336,18 +337,18 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) ONETKO(opts *bind.CallOpts) ( } -// ONETKO is a free data retrieval call binding the contract method 0xe22fcaaa. +// MINSTAKEPERCAPACITY is a free data retrieval call binding the contract method 0x7d62c057. // -// Solidity: function ONE_TKO() view returns(uint64) -func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) ONETKO() (uint64, error) { - return _TaikoL1ProverPool.Contract.ONETKO(&_TaikoL1ProverPool.CallOpts) +// Solidity: function MIN_STAKE_PER_CAPACITY() view returns(uint64) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) MINSTAKEPERCAPACITY() (uint64, error) { + return _TaikoL1ProverPool.Contract.MINSTAKEPERCAPACITY(&_TaikoL1ProverPool.CallOpts) } -// ONETKO is a free data retrieval call binding the contract method 0xe22fcaaa. +// MINSTAKEPERCAPACITY is a free data retrieval call binding the contract method 0x7d62c057. // -// Solidity: function ONE_TKO() view returns(uint64) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) ONETKO() (uint64, error) { - return _TaikoL1ProverPool.Contract.ONETKO(&_TaikoL1ProverPool.CallOpts) +// Solidity: function MIN_STAKE_PER_CAPACITY() view returns(uint64) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) MINSTAKEPERCAPACITY() (uint64, error) { + return _TaikoL1ProverPool.Contract.MINSTAKEPERCAPACITY(&_TaikoL1ProverPool.CallOpts) } // SLASHPOINTS is a free data retrieval call binding the contract method 0xdd9fb65c. @@ -445,7 +446,7 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) GetCapacity() (*big.In // GetProvers is a free data retrieval call binding the contract method 0xc0bfd036. // -// Solidity: function getProvers() view returns((uint32,uint16,uint16)[] _provers, address[] _stakers) +// Solidity: function getProvers() view returns((uint64,uint16,uint16,uint64)[] _provers, address[] _stakers) func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) GetProvers(opts *bind.CallOpts) (struct { Provers []ProverPoolProver Stakers []common.Address @@ -470,7 +471,7 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) GetProvers(opts *bind.CallOpt // GetProvers is a free data retrieval call binding the contract method 0xc0bfd036. // -// Solidity: function getProvers() view returns((uint32,uint16,uint16)[] _provers, address[] _stakers) +// Solidity: function getProvers() view returns((uint64,uint16,uint16,uint64)[] _provers, address[] _stakers) func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) GetProvers() (struct { Provers []ProverPoolProver Stakers []common.Address @@ -480,7 +481,7 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) GetProvers() (struct { // GetProvers is a free data retrieval call binding the contract method 0xc0bfd036. // -// Solidity: function getProvers() view returns((uint32,uint16,uint16)[] _provers, address[] _stakers) +// Solidity: function getProvers() view returns((uint64,uint16,uint16,uint64)[] _provers, address[] _stakers) func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) GetProvers() (struct { Provers []ProverPoolProver Stakers []common.Address @@ -490,7 +491,7 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) GetProvers() (struct { // GetStaker is a free data retrieval call binding the contract method 0xa23c44b1. // -// Solidity: function getStaker(address addr) view returns((uint64,uint32,uint16,uint8) staker, (uint32,uint16,uint16) prover) +// Solidity: function getStaker(address addr) view returns((uint64,uint64,uint16,uint8) staker, (uint64,uint16,uint16,uint64) prover) func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) GetStaker(opts *bind.CallOpts, addr common.Address) (struct { Staker ProverPoolStaker Prover ProverPoolProver @@ -515,7 +516,7 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) GetStaker(opts *bind.CallOpts // GetStaker is a free data retrieval call binding the contract method 0xa23c44b1. // -// Solidity: function getStaker(address addr) view returns((uint64,uint32,uint16,uint8) staker, (uint32,uint16,uint16) prover) +// Solidity: function getStaker(address addr) view returns((uint64,uint64,uint16,uint8) staker, (uint64,uint16,uint16,uint64) prover) func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) GetStaker(addr common.Address) (struct { Staker ProverPoolStaker Prover ProverPoolProver @@ -525,7 +526,7 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) GetStaker(addr common.Addres // GetStaker is a free data retrieval call binding the contract method 0xa23c44b1. // -// Solidity: function getStaker(address addr) view returns((uint64,uint32,uint16,uint8) staker, (uint32,uint16,uint16) prover) +// Solidity: function getStaker(address addr) view returns((uint64,uint64,uint16,uint8) staker, (uint64,uint16,uint16,uint64) prover) func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) GetStaker(addr common.Address) (struct { Staker ProverPoolStaker Prover ProverPoolProver @@ -533,51 +534,6 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) GetStaker(addr common. return _TaikoL1ProverPool.Contract.GetStaker(&_TaikoL1ProverPool.CallOpts, addr) } -// GetWeights is a free data retrieval call binding the contract method 0xc2082974. -// -// Solidity: function getWeights(uint32 feePerGas) view returns(uint256[32] weights, uint256 totalWeight) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) GetWeights(opts *bind.CallOpts, feePerGas uint32) (struct { - Weights [32]*big.Int - TotalWeight *big.Int -}, error) { - var out []interface{} - err := _TaikoL1ProverPool.contract.Call(opts, &out, "getWeights", feePerGas) - - outstruct := new(struct { - Weights [32]*big.Int - TotalWeight *big.Int - }) - if err != nil { - return *outstruct, err - } - - outstruct.Weights = *abi.ConvertType(out[0], new([32]*big.Int)).(*[32]*big.Int) - outstruct.TotalWeight = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) - - return *outstruct, err - -} - -// GetWeights is a free data retrieval call binding the contract method 0xc2082974. -// -// Solidity: function getWeights(uint32 feePerGas) view returns(uint256[32] weights, uint256 totalWeight) -func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) GetWeights(feePerGas uint32) (struct { - Weights [32]*big.Int - TotalWeight *big.Int -}, error) { - return _TaikoL1ProverPool.Contract.GetWeights(&_TaikoL1ProverPool.CallOpts, feePerGas) -} - -// GetWeights is a free data retrieval call binding the contract method 0xc2082974. -// -// Solidity: function getWeights(uint32 feePerGas) view returns(uint256[32] weights, uint256 totalWeight) -func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) GetWeights(feePerGas uint32) (struct { - Weights [32]*big.Int - TotalWeight *big.Int -}, error) { - return _TaikoL1ProverPool.Contract.GetWeights(&_TaikoL1ProverPool.CallOpts, feePerGas) -} - // IdToProver is a free data retrieval call binding the contract method 0x2f88a7fe. // // Solidity: function idToProver(uint256 id) view returns(address prover) @@ -640,6 +596,61 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) Owner() (common.Addres return _TaikoL1ProverPool.Contract.Owner(&_TaikoL1ProverPool.CallOpts) } +// Provers is a free data retrieval call binding the contract method 0xfd1190ea. +// +// Solidity: function provers(uint256 ) view returns(uint64 stakedAmount, uint16 rewardPerGas, uint16 currentCapacity, uint64 weight) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) Provers(opts *bind.CallOpts, arg0 *big.Int) (struct { + StakedAmount uint64 + RewardPerGas uint16 + CurrentCapacity uint16 + Weight uint64 +}, error) { + var out []interface{} + err := _TaikoL1ProverPool.contract.Call(opts, &out, "provers", arg0) + + outstruct := new(struct { + StakedAmount uint64 + RewardPerGas uint16 + CurrentCapacity uint16 + Weight uint64 + }) + if err != nil { + return *outstruct, err + } + + outstruct.StakedAmount = *abi.ConvertType(out[0], new(uint64)).(*uint64) + outstruct.RewardPerGas = *abi.ConvertType(out[1], new(uint16)).(*uint16) + outstruct.CurrentCapacity = *abi.ConvertType(out[2], new(uint16)).(*uint16) + outstruct.Weight = *abi.ConvertType(out[3], new(uint64)).(*uint64) + + return *outstruct, err + +} + +// Provers is a free data retrieval call binding the contract method 0xfd1190ea. +// +// Solidity: function provers(uint256 ) view returns(uint64 stakedAmount, uint16 rewardPerGas, uint16 currentCapacity, uint64 weight) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) Provers(arg0 *big.Int) (struct { + StakedAmount uint64 + RewardPerGas uint16 + CurrentCapacity uint16 + Weight uint64 +}, error) { + return _TaikoL1ProverPool.Contract.Provers(&_TaikoL1ProverPool.CallOpts, arg0) +} + +// Provers is a free data retrieval call binding the contract method 0xfd1190ea. +// +// Solidity: function provers(uint256 ) view returns(uint64 stakedAmount, uint16 rewardPerGas, uint16 currentCapacity, uint64 weight) +func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) Provers(arg0 *big.Int) (struct { + StakedAmount uint64 + RewardPerGas uint16 + CurrentCapacity uint16 + Weight uint64 +}, error) { + return _TaikoL1ProverPool.Contract.Provers(&_TaikoL1ProverPool.CallOpts, arg0) +} + // Resolve is a free data retrieval call binding the contract method 0x6c6563f6. // // Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address) @@ -704,10 +715,10 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) Resolve0(name [32]byte // Stakers is a free data retrieval call binding the contract method 0x9168ae72. // -// Solidity: function stakers(address staker) view returns(uint64 exitRequestedAt, uint32 exitAmount, uint16 maxCapacity, uint8 proverId) +// Solidity: function stakers(address staker) view returns(uint64 exitRequestedAt, uint64 exitAmount, uint16 maxCapacity, uint8 proverId) func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) Stakers(opts *bind.CallOpts, staker common.Address) (struct { ExitRequestedAt uint64 - ExitAmount uint32 + ExitAmount uint64 MaxCapacity uint16 ProverId uint8 }, error) { @@ -716,7 +727,7 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) Stakers(opts *bind.CallOpts, outstruct := new(struct { ExitRequestedAt uint64 - ExitAmount uint32 + ExitAmount uint64 MaxCapacity uint16 ProverId uint8 }) @@ -725,7 +736,7 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) Stakers(opts *bind.CallOpts, } outstruct.ExitRequestedAt = *abi.ConvertType(out[0], new(uint64)).(*uint64) - outstruct.ExitAmount = *abi.ConvertType(out[1], new(uint32)).(*uint32) + outstruct.ExitAmount = *abi.ConvertType(out[1], new(uint64)).(*uint64) outstruct.MaxCapacity = *abi.ConvertType(out[2], new(uint16)).(*uint16) outstruct.ProverId = *abi.ConvertType(out[3], new(uint8)).(*uint8) @@ -735,10 +746,10 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolCaller) Stakers(opts *bind.CallOpts, // Stakers is a free data retrieval call binding the contract method 0x9168ae72. // -// Solidity: function stakers(address staker) view returns(uint64 exitRequestedAt, uint32 exitAmount, uint16 maxCapacity, uint8 proverId) +// Solidity: function stakers(address staker) view returns(uint64 exitRequestedAt, uint64 exitAmount, uint16 maxCapacity, uint8 proverId) func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) Stakers(staker common.Address) (struct { ExitRequestedAt uint64 - ExitAmount uint32 + ExitAmount uint64 MaxCapacity uint16 ProverId uint8 }, error) { @@ -747,10 +758,10 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) Stakers(staker common.Addres // Stakers is a free data retrieval call binding the contract method 0x9168ae72. // -// Solidity: function stakers(address staker) view returns(uint64 exitRequestedAt, uint32 exitAmount, uint16 maxCapacity, uint8 proverId) +// Solidity: function stakers(address staker) view returns(uint64 exitRequestedAt, uint64 exitAmount, uint16 maxCapacity, uint8 proverId) func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) Stakers(staker common.Address) (struct { ExitRequestedAt uint64 - ExitAmount uint32 + ExitAmount uint64 MaxCapacity uint16 ProverId uint8 }, error) { @@ -759,23 +770,23 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolCallerSession) Stakers(staker common. // AssignProver is a paid mutator transaction binding the contract method 0xbd849fe9. // -// Solidity: function assignProver(uint64 blockId, uint32 feePerGas) returns(address prover, uint32 rewardPerGas) -func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) AssignProver(opts *bind.TransactOpts, blockId uint64, feePerGas uint32) (*types.Transaction, error) { - return _TaikoL1ProverPool.contract.Transact(opts, "assignProver", blockId, feePerGas) +// Solidity: function assignProver(uint64 blockId, uint32 ) returns(address prover, uint32 rewardPerGas) +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) AssignProver(opts *bind.TransactOpts, blockId uint64, arg1 uint32) (*types.Transaction, error) { + return _TaikoL1ProverPool.contract.Transact(opts, "assignProver", blockId, arg1) } // AssignProver is a paid mutator transaction binding the contract method 0xbd849fe9. // -// Solidity: function assignProver(uint64 blockId, uint32 feePerGas) returns(address prover, uint32 rewardPerGas) -func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) AssignProver(blockId uint64, feePerGas uint32) (*types.Transaction, error) { - return _TaikoL1ProverPool.Contract.AssignProver(&_TaikoL1ProverPool.TransactOpts, blockId, feePerGas) +// Solidity: function assignProver(uint64 blockId, uint32 ) returns(address prover, uint32 rewardPerGas) +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) AssignProver(blockId uint64, arg1 uint32) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.AssignProver(&_TaikoL1ProverPool.TransactOpts, blockId, arg1) } // AssignProver is a paid mutator transaction binding the contract method 0xbd849fe9. // -// Solidity: function assignProver(uint64 blockId, uint32 feePerGas) returns(address prover, uint32 rewardPerGas) -func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) AssignProver(blockId uint64, feePerGas uint32) (*types.Transaction, error) { - return _TaikoL1ProverPool.Contract.AssignProver(&_TaikoL1ProverPool.TransactOpts, blockId, feePerGas) +// Solidity: function assignProver(uint64 blockId, uint32 ) returns(address prover, uint32 rewardPerGas) +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) AssignProver(blockId uint64, arg1 uint32) (*types.Transaction, error) { + return _TaikoL1ProverPool.Contract.AssignProver(&_TaikoL1ProverPool.TransactOpts, blockId, arg1) } // Exit is a paid mutator transaction binding the contract method 0xe9fad8ee. @@ -904,24 +915,24 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) SlashProver(addr c return _TaikoL1ProverPool.Contract.SlashProver(&_TaikoL1ProverPool.TransactOpts, addr) } -// Stake is a paid mutator transaction binding the contract method 0x3ca316f1. +// Stake is a paid mutator transaction binding the contract method 0x75244643. // -// Solidity: function stake(uint32 amount, uint16 rewardPerGas, uint16 maxCapacity) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) Stake(opts *bind.TransactOpts, amount uint32, rewardPerGas uint16, maxCapacity uint16) (*types.Transaction, error) { +// Solidity: function stake(uint64 amount, uint16 rewardPerGas, uint16 maxCapacity) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactor) Stake(opts *bind.TransactOpts, amount uint64, rewardPerGas uint16, maxCapacity uint16) (*types.Transaction, error) { return _TaikoL1ProverPool.contract.Transact(opts, "stake", amount, rewardPerGas, maxCapacity) } -// Stake is a paid mutator transaction binding the contract method 0x3ca316f1. +// Stake is a paid mutator transaction binding the contract method 0x75244643. // -// Solidity: function stake(uint32 amount, uint16 rewardPerGas, uint16 maxCapacity) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) Stake(amount uint32, rewardPerGas uint16, maxCapacity uint16) (*types.Transaction, error) { +// Solidity: function stake(uint64 amount, uint16 rewardPerGas, uint16 maxCapacity) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolSession) Stake(amount uint64, rewardPerGas uint16, maxCapacity uint16) (*types.Transaction, error) { return _TaikoL1ProverPool.Contract.Stake(&_TaikoL1ProverPool.TransactOpts, amount, rewardPerGas, maxCapacity) } -// Stake is a paid mutator transaction binding the contract method 0x3ca316f1. +// Stake is a paid mutator transaction binding the contract method 0x75244643. // -// Solidity: function stake(uint32 amount, uint16 rewardPerGas, uint16 maxCapacity) returns() -func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) Stake(amount uint32, rewardPerGas uint16, maxCapacity uint16) (*types.Transaction, error) { +// Solidity: function stake(uint64 amount, uint16 rewardPerGas, uint16 maxCapacity) returns() +func (_TaikoL1ProverPool *TaikoL1ProverPoolTransactorSession) Stake(amount uint64, rewardPerGas uint16, maxCapacity uint16) (*types.Transaction, error) { return _TaikoL1ProverPool.Contract.Stake(&_TaikoL1ProverPool.TransactOpts, amount, rewardPerGas, maxCapacity) } @@ -1171,13 +1182,13 @@ func (it *TaikoL1ProverPoolExitedIterator) Close() error { // TaikoL1ProverPoolExited represents a Exited event raised by the TaikoL1ProverPool contract. type TaikoL1ProverPoolExited struct { Addr common.Address - Amount uint32 + Amount uint64 Raw types.Log // Blockchain specific contextual infos } -// FilterExited is a free log retrieval operation binding the contract event 0xfa715c30456da257872290458c962d9495b3a623e7df06cacb5b8dd68668554d. +// FilterExited is a free log retrieval operation binding the contract event 0x7b870040d0137f84191e3e446a10f48b5ac5d26ec96be3f795fcfc4c954410fe. // -// Solidity: event Exited(address indexed addr, uint32 amount) +// Solidity: event Exited(address indexed addr, uint64 amount) func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterExited(opts *bind.FilterOpts, addr []common.Address) (*TaikoL1ProverPoolExitedIterator, error) { var addrRule []interface{} @@ -1192,9 +1203,9 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterExited(opts *bind.Fil return &TaikoL1ProverPoolExitedIterator{contract: _TaikoL1ProverPool.contract, event: "Exited", logs: logs, sub: sub}, nil } -// WatchExited is a free log subscription operation binding the contract event 0xfa715c30456da257872290458c962d9495b3a623e7df06cacb5b8dd68668554d. +// WatchExited is a free log subscription operation binding the contract event 0x7b870040d0137f84191e3e446a10f48b5ac5d26ec96be3f795fcfc4c954410fe. // -// Solidity: event Exited(address indexed addr, uint32 amount) +// Solidity: event Exited(address indexed addr, uint64 amount) func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchExited(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolExited, addr []common.Address) (event.Subscription, error) { var addrRule []interface{} @@ -1234,9 +1245,9 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchExited(opts *bind.Watc }), nil } -// ParseExited is a log parse operation binding the contract event 0xfa715c30456da257872290458c962d9495b3a623e7df06cacb5b8dd68668554d. +// ParseExited is a log parse operation binding the contract event 0x7b870040d0137f84191e3e446a10f48b5ac5d26ec96be3f795fcfc4c954410fe. // -// Solidity: event Exited(address indexed addr, uint32 amount) +// Solidity: event Exited(address indexed addr, uint64 amount) func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseExited(log types.Log) (*TaikoL1ProverPoolExited, error) { event := new(TaikoL1ProverPoolExited) if err := _TaikoL1ProverPool.contract.UnpackLog(event, "Exited", log); err != nil { @@ -1603,13 +1614,13 @@ func (it *TaikoL1ProverPoolSlashedIterator) Close() error { // TaikoL1ProverPoolSlashed represents a Slashed event raised by the TaikoL1ProverPool contract. type TaikoL1ProverPoolSlashed struct { Addr common.Address - Amount uint32 + Amount uint64 Raw types.Log // Blockchain specific contextual infos } -// FilterSlashed is a free log retrieval operation binding the contract event 0xf2ca0cd8f45e853110fce6e92f38f84a31350c1168dce2735a782f9d6424e648. +// FilterSlashed is a free log retrieval operation binding the contract event 0xdd80bbe216163c1792fa59b50e56f1a7ac79674c4815b65da0ef875a39655e08. // -// Solidity: event Slashed(address indexed addr, uint32 amount) +// Solidity: event Slashed(address indexed addr, uint64 amount) func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterSlashed(opts *bind.FilterOpts, addr []common.Address) (*TaikoL1ProverPoolSlashedIterator, error) { var addrRule []interface{} @@ -1624,9 +1635,9 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterSlashed(opts *bind.Fi return &TaikoL1ProverPoolSlashedIterator{contract: _TaikoL1ProverPool.contract, event: "Slashed", logs: logs, sub: sub}, nil } -// WatchSlashed is a free log subscription operation binding the contract event 0xf2ca0cd8f45e853110fce6e92f38f84a31350c1168dce2735a782f9d6424e648. +// WatchSlashed is a free log subscription operation binding the contract event 0xdd80bbe216163c1792fa59b50e56f1a7ac79674c4815b65da0ef875a39655e08. // -// Solidity: event Slashed(address indexed addr, uint32 amount) +// Solidity: event Slashed(address indexed addr, uint64 amount) func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchSlashed(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolSlashed, addr []common.Address) (event.Subscription, error) { var addrRule []interface{} @@ -1666,9 +1677,9 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchSlashed(opts *bind.Wat }), nil } -// ParseSlashed is a log parse operation binding the contract event 0xf2ca0cd8f45e853110fce6e92f38f84a31350c1168dce2735a782f9d6424e648. +// ParseSlashed is a log parse operation binding the contract event 0xdd80bbe216163c1792fa59b50e56f1a7ac79674c4815b65da0ef875a39655e08. // -// Solidity: event Slashed(address indexed addr, uint32 amount) +// Solidity: event Slashed(address indexed addr, uint64 amount) func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseSlashed(log types.Log) (*TaikoL1ProverPoolSlashed, error) { event := new(TaikoL1ProverPoolSlashed) if err := _TaikoL1ProverPool.contract.UnpackLog(event, "Slashed", log); err != nil { @@ -1748,15 +1759,15 @@ func (it *TaikoL1ProverPoolStakedIterator) Close() error { // TaikoL1ProverPoolStaked represents a Staked event raised by the TaikoL1ProverPool contract. type TaikoL1ProverPoolStaked struct { Addr common.Address - Amount uint32 + Amount uint64 RewardPerGas uint16 CurrentCapacity uint16 Raw types.Log // Blockchain specific contextual infos } -// FilterStaked is a free log retrieval operation binding the contract event 0xe2232b717d57a877785c68aad0aae9fa2caea5035fa13efd62421b4e0ac23dfe. +// FilterStaked is a free log retrieval operation binding the contract event 0xb071f01ce43c8c0960b11143f30bedc46b345006ee5631abbdfd2a5cb6562774. // -// Solidity: event Staked(address indexed addr, uint32 amount, uint16 rewardPerGas, uint16 currentCapacity) +// Solidity: event Staked(address indexed addr, uint64 amount, uint16 rewardPerGas, uint16 currentCapacity) func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterStaked(opts *bind.FilterOpts, addr []common.Address) (*TaikoL1ProverPoolStakedIterator, error) { var addrRule []interface{} @@ -1771,9 +1782,9 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterStaked(opts *bind.Fil return &TaikoL1ProverPoolStakedIterator{contract: _TaikoL1ProverPool.contract, event: "Staked", logs: logs, sub: sub}, nil } -// WatchStaked is a free log subscription operation binding the contract event 0xe2232b717d57a877785c68aad0aae9fa2caea5035fa13efd62421b4e0ac23dfe. +// WatchStaked is a free log subscription operation binding the contract event 0xb071f01ce43c8c0960b11143f30bedc46b345006ee5631abbdfd2a5cb6562774. // -// Solidity: event Staked(address indexed addr, uint32 amount, uint16 rewardPerGas, uint16 currentCapacity) +// Solidity: event Staked(address indexed addr, uint64 amount, uint16 rewardPerGas, uint16 currentCapacity) func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchStaked(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolStaked, addr []common.Address) (event.Subscription, error) { var addrRule []interface{} @@ -1813,9 +1824,9 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchStaked(opts *bind.Watc }), nil } -// ParseStaked is a log parse operation binding the contract event 0xe2232b717d57a877785c68aad0aae9fa2caea5035fa13efd62421b4e0ac23dfe. +// ParseStaked is a log parse operation binding the contract event 0xb071f01ce43c8c0960b11143f30bedc46b345006ee5631abbdfd2a5cb6562774. // -// Solidity: event Staked(address indexed addr, uint32 amount, uint16 rewardPerGas, uint16 currentCapacity) +// Solidity: event Staked(address indexed addr, uint64 amount, uint16 rewardPerGas, uint16 currentCapacity) func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseStaked(log types.Log) (*TaikoL1ProverPoolStaked, error) { event := new(TaikoL1ProverPoolStaked) if err := _TaikoL1ProverPool.contract.UnpackLog(event, "Staked", log); err != nil { @@ -1895,13 +1906,13 @@ func (it *TaikoL1ProverPoolWithdrawnIterator) Close() error { // TaikoL1ProverPoolWithdrawn represents a Withdrawn event raised by the TaikoL1ProverPool contract. type TaikoL1ProverPoolWithdrawn struct { Addr common.Address - Amount uint32 + Amount uint64 Raw types.Log // Blockchain specific contextual infos } -// FilterWithdrawn is a free log retrieval operation binding the contract event 0x28f8f642e0ef98c9c0d14e1bd28a687ea91da388d69e6ca60165b772ef408c7c. +// FilterWithdrawn is a free log retrieval operation binding the contract event 0xbae95d59332d6e1e8f1ae78e7bebdaeef072d57b731c8790a636667e3a0a87ee. // -// Solidity: event Withdrawn(address indexed addr, uint32 amount) +// Solidity: event Withdrawn(address indexed addr, uint64 amount) func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterWithdrawn(opts *bind.FilterOpts, addr []common.Address) (*TaikoL1ProverPoolWithdrawnIterator, error) { var addrRule []interface{} @@ -1916,9 +1927,9 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) FilterWithdrawn(opts *bind. return &TaikoL1ProverPoolWithdrawnIterator{contract: _TaikoL1ProverPool.contract, event: "Withdrawn", logs: logs, sub: sub}, nil } -// WatchWithdrawn is a free log subscription operation binding the contract event 0x28f8f642e0ef98c9c0d14e1bd28a687ea91da388d69e6ca60165b772ef408c7c. +// WatchWithdrawn is a free log subscription operation binding the contract event 0xbae95d59332d6e1e8f1ae78e7bebdaeef072d57b731c8790a636667e3a0a87ee. // -// Solidity: event Withdrawn(address indexed addr, uint32 amount) +// Solidity: event Withdrawn(address indexed addr, uint64 amount) func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchWithdrawn(opts *bind.WatchOpts, sink chan<- *TaikoL1ProverPoolWithdrawn, addr []common.Address) (event.Subscription, error) { var addrRule []interface{} @@ -1958,9 +1969,9 @@ func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) WatchWithdrawn(opts *bind.W }), nil } -// ParseWithdrawn is a log parse operation binding the contract event 0x28f8f642e0ef98c9c0d14e1bd28a687ea91da388d69e6ca60165b772ef408c7c. +// ParseWithdrawn is a log parse operation binding the contract event 0xbae95d59332d6e1e8f1ae78e7bebdaeef072d57b731c8790a636667e3a0a87ee. // -// Solidity: event Withdrawn(address indexed addr, uint32 amount) +// Solidity: event Withdrawn(address indexed addr, uint64 amount) func (_TaikoL1ProverPool *TaikoL1ProverPoolFilterer) ParseWithdrawn(log types.Log) (*TaikoL1ProverPoolWithdrawn, error) { event := new(TaikoL1ProverPoolWithdrawn) if err := _TaikoL1ProverPool.contract.UnpackLog(event, "Withdrawn", log); err != nil { diff --git a/proposer/proposer.go b/proposer/proposer.go index cd0fd6da6..f82082c97 100644 --- a/proposer/proposer.go +++ b/proposer/proposer.go @@ -416,7 +416,7 @@ func (p *Proposer) checkTaikoTokenBalance() error { metrics.ProposerBlockFeeGauge.Update(int64(fee)) } - balance, err := p.rpc.TaikoTokenL1.BalanceOf(nil, p.l1ProposerAddress) + balance, err := p.rpc.TaikoL1.GetTaikoTokenBalance(nil, p.l1ProposerAddress) if err != nil { return fmt.Errorf("failed to get tko balance: %w", err) } @@ -425,18 +425,5 @@ func (p *Proposer) checkTaikoTokenBalance() error { return fmt.Errorf("proposer does not have enough tko balance to propose, balance: %d, fee: %d", balance, fee) } - allowance, err := p.rpc.TaikoTokenL1.Allowance(nil, p.l1ProposerAddress, p.taikoL1Address) - if err != nil { - return fmt.Errorf("failed to get allowance: %w", err) - } - - if allowance.Cmp(new(big.Int).SetUint64(fee)) == -1 { - return fmt.Errorf( - "requiredAllowance: %v, currentAllowance: %v", - fee, - allowance.String(), - ) - } - return nil } diff --git a/testutils/suite.go b/testutils/suite.go index 1385e7b57..e2ee46e2c 100644 --- a/testutils/suite.go +++ b/testutils/suite.go @@ -101,14 +101,10 @@ func (s *ClientTestSuite) SetupTest() { capacity, err := s.RpcClient.TaikoProverPoolL1.MAXCAPACITYLOWERBOUND(nil) s.Nil(err) - amt := new(big.Int).Mul(big.NewInt(int64(minStakePerCapacity)), big.NewInt(int64(capacity))) - - oneTko, err := s.RpcClient.TaikoProverPoolL1.ONETKO(nil) - s.Nil(err) - amtTko := new(big.Int).Mul(amt, new(big.Int).SetInt64(int64(oneTko))) + amt := new(big.Int).Mul(big.NewInt(int64(minStakePerCapacity)), big.NewInt(int64(capacity))) - log.Info("amt to stake", "amt", amtTko) + amtTko := new(big.Int).Exp(amt, big.NewInt(8), nil) // proposer has tKO, need to transfer to prover _, err = s.RpcClient.TaikoTokenL1.Transfer(proposerOpts, crypto.PubkeyToAddress(l1ProverPrivKey.PublicKey), amtTko) @@ -118,7 +114,7 @@ func (s *ClientTestSuite) SetupTest() { s.Nil(err) _, err = s.RpcClient.TaikoProverPoolL1.Stake( proverOpts, - uint32(amt.Uint64()), + amt.Uint64(), uint16(rewardPerGas), uint16(capacity), ) From 9ea0a45e3a7ea27221c057f4696727d47f140ca1 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Wed, 28 Jun 2023 17:20:31 -0700 Subject: [PATCH 16/37] account for tko amoutn switch --- testutils/suite.go | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/testutils/suite.go b/testutils/suite.go index e2ee46e2c..ed0e42651 100644 --- a/testutils/suite.go +++ b/testutils/suite.go @@ -53,8 +53,6 @@ func (s *ClientTestSuite) SetupTest() { s.Nil(err) s.NotEmpty(jwtSecret) - taikoL1Address := common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")) - rpcCli, err := rpc.NewClient(context.Background(), &rpc.ClientConfig{ L1Endpoint: os.Getenv("L1_NODE_WS_ENDPOINT"), L2Endpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"), @@ -77,13 +75,6 @@ func (s *ClientTestSuite) SetupTest() { proposerOpts, err := bind.NewKeyedTransactorWithChainID(l1ProposerPrivKey, rpcCli.L1ChainID) s.Nil(err) - _, err = s.RpcClient.TaikoTokenL1.Approve( - proposerOpts, - taikoL1Address, - new(big.Int).SetUint64(uint64(math.Pow(2, 32))), - ) - s.Nil(err) - // register prover as a staker/eligible prover l1ProverPrivKey, err := crypto.ToECDSA(common.Hex2Bytes(os.Getenv("L1_PROVER_PRIVATE_KEY"))) @@ -96,6 +87,9 @@ func (s *ClientTestSuite) SetupTest() { s.Nil(err) if proverInfo.Staker.ProverId == 0 { + _, err = s.RpcClient.TaikoL1.DepositTaikoToken(proposerOpts, new(big.Int).SetUint64(uint64(math.Pow(2, 26)))) + s.Nil(err) + minStakePerCapacity, err := s.RpcClient.TaikoProverPoolL1.MINSTAKEPERCAPACITY(nil) s.Nil(err) @@ -104,7 +98,9 @@ func (s *ClientTestSuite) SetupTest() { amt := new(big.Int).Mul(big.NewInt(int64(minStakePerCapacity)), big.NewInt(int64(capacity))) - amtTko := new(big.Int).Exp(amt, big.NewInt(8), nil) + amtTko := new(big.Int).Mul(amt, big.NewInt(8)) + + log.Info("amtTko", "amt", amtTko.String()) // proposer has tKO, need to transfer to prover _, err = s.RpcClient.TaikoTokenL1.Transfer(proposerOpts, crypto.PubkeyToAddress(l1ProverPrivKey.PublicKey), amtTko) @@ -118,7 +114,7 @@ func (s *ClientTestSuite) SetupTest() { uint16(rewardPerGas), uint16(capacity), ) - s.Nil(err) + s.Nil(err, "2") } s.Nil(rpcCli.L1RawRPC.CallContext(context.Background(), &s.testnetL1SnapshotID, "evm_snapshot")) From f1e861dad30429ce80a3528e33218d2cbae0ea25 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Wed, 28 Jun 2023 17:39:53 -0700 Subject: [PATCH 17/37] test fix --- testutils/suite.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testutils/suite.go b/testutils/suite.go index ed0e42651..f811aaa2b 100644 --- a/testutils/suite.go +++ b/testutils/suite.go @@ -87,7 +87,7 @@ func (s *ClientTestSuite) SetupTest() { s.Nil(err) if proverInfo.Staker.ProverId == 0 { - _, err = s.RpcClient.TaikoL1.DepositTaikoToken(proposerOpts, new(big.Int).SetUint64(uint64(math.Pow(2, 26)))) + _, err = s.RpcClient.TaikoL1.DepositTaikoToken(proposerOpts, new(big.Int).SetUint64(uint64(math.Pow(2, 32)))) s.Nil(err) minStakePerCapacity, err := s.RpcClient.TaikoProverPoolL1.MINSTAKEPERCAPACITY(nil) From 7cfa09a835c29d75e3c8aa6c8d24d8e391d62506 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Thu, 29 Jun 2023 18:31:17 -0700 Subject: [PATCH 18/37] watch slashed event --- .github/workflows/test.yml | 2 +- bindings/.githead | 2 +- pkg/rpc/subscription.go | 18 ++++++++++++++++++ pkg/rpc/subscription_test.go | 7 +++++++ prover/prover.go | 8 ++++++++ 5 files changed, 35 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 93c21a5f4..42b5be71e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,7 +45,7 @@ jobs: with: repository: taikoxyz/taiko-mono path: ${{ env.TAIKO_MONO_DIR }} - ref: improve_staking5 + ref: alpha-4 - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 diff --git a/bindings/.githead b/bindings/.githead index c651b9f87..22806a990 100644 --- a/bindings/.githead +++ b/bindings/.githead @@ -1 +1 @@ -8b5f9feb3757d778ef19f3056bac390326a3a314 +00c23d1ece9f23b600d4cfe77efab90285741cc2 diff --git a/pkg/rpc/subscription.go b/pkg/rpc/subscription.go index 0da211631..a898f38d2 100644 --- a/pkg/rpc/subscription.go +++ b/pkg/rpc/subscription.go @@ -100,6 +100,24 @@ func SubscribeBlockProven( }) } +// SubscribeSlashed subscribes the prover pool's Slashed events. +func SubscribeSlashed( + taikoProverPool *bindings.TaikoL1ProverPool, + ch chan *bindings.TaikoL1ProverPoolSlashed, +) event.Subscription { + return SubscribeEvent("Slashed", func(ctx context.Context) (event.Subscription, error) { + sub, err := taikoProverPool.WatchSlashed(nil, ch, nil) + if err != nil { + log.Error("Create taikoProverPool.WatchSlashed subscription error", "error", err) + return nil, err + } + + defer sub.Unsubscribe() + + return waitSubErr(ctx, sub) + }) +} + // SubscribeChainHead subscribes the new chain heads. func SubscribeChainHead( client *ethclient.Client, diff --git a/pkg/rpc/subscription_test.go b/pkg/rpc/subscription_test.go index b19483f94..21f7bfe06 100644 --- a/pkg/rpc/subscription_test.go +++ b/pkg/rpc/subscription_test.go @@ -44,6 +44,13 @@ func TestSubscribeBlockProven(t *testing.T) { ) } +func TestSubscribeSlashed(t *testing.T) { + require.NotNil(t, SubscribeSlashed( + newTestClient(t).TaikoProverPoolL1, + make(chan *bindings.TaikoL1ProverPoolSlashed, 1024)), + ) +} + func TestSubscribeChainHead(t *testing.T) { require.NotNil(t, SubscribeChainHead( newTestClient(t).L1, diff --git a/prover/prover.go b/prover/prover.go index 763bce85a..59ad80bc6 100644 --- a/prover/prover.go +++ b/prover/prover.go @@ -62,6 +62,8 @@ type Prover struct { blockProvenSub event.Subscription blockVerifiedCh chan *bindings.TaikoL1ClientBlockVerified blockVerifiedSub event.Subscription + proverSlashedCh chan *bindings.TaikoL1ProverPoolSlashed + proverSlashedSub event.Subscription proveNotify chan *big.Int // Proof related @@ -135,6 +137,7 @@ func InitFromConfig(ctx context.Context, p *Prover, cfg *Config) (err error) { p.blockVerifiedCh = make(chan *bindings.TaikoL1ClientBlockVerified, chBufferSize) p.blockProvenCh = make(chan *bindings.TaikoL1ClientBlockProven, chBufferSize) p.proofGenerationCh = make(chan *proofProducer.ProofWithHeader, chBufferSize) + p.proverSlashedCh = make(chan *bindings.TaikoL1ProverPoolSlashed, chBufferSize) p.proveNotify = make(chan *big.Int, 1) if err := p.initL1Current(cfg.StartingBlockID); err != nil { return fmt.Errorf("initialize L1 current cursor error: %w", err) @@ -284,6 +287,10 @@ func (p *Prover) eventLoop() { if err := p.onBlockProven(p.ctx, e); err != nil { log.Error("Handle BlockProven event error", "error", err) } + case e := <-p.proverSlashedCh: + if e.Addr.Hex() == p.proverAddress.Hex() { + log.Info("Prover slashed", "address", e.Addr.Hex(), "amount", e.Amount) + } case <-forceProvingTicker.C: reqProving() } @@ -614,6 +621,7 @@ func (p *Prover) initSubscription() { p.blockProposedSub = rpc.SubscribeBlockProposed(p.rpc.TaikoL1, p.blockProposedCh) p.blockVerifiedSub = rpc.SubscribeBlockVerified(p.rpc.TaikoL1, p.blockVerifiedCh) p.blockProvenSub = rpc.SubscribeBlockProven(p.rpc.TaikoL1, p.blockProvenCh) + p.proverSlashedSub = rpc.SubscribeSlashed(p.rpc.TaikoProverPoolL1, p.proverSlashedCh) } // closeSubscription closes all subscriptions. From ef2ad5da4e2a7d611921d57ba51302578ae98cea Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Thu, 29 Jun 2023 18:32:20 -0700 Subject: [PATCH 19/37] use git ref thats buildable --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 42b5be71e..2e6b9ee5d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,7 +45,7 @@ jobs: with: repository: taikoxyz/taiko-mono path: ${{ env.TAIKO_MONO_DIR }} - ref: alpha-4 + ref: alpha_4_test_fixes - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 From b8011c09dd4a864972f3bdb59c14eeb401b0df2b Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Thu, 29 Jun 2023 19:08:06 -0700 Subject: [PATCH 20/37] dummy proof must be 32 bytes now as protocol relies on that --- prover/proof_producer/dummy_producer.go | 13 ++++++++++--- prover/prover.go | 5 +++++ testutils/suite.go | 4 +--- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/prover/proof_producer/dummy_producer.go b/prover/proof_producer/dummy_producer.go index f6ca986df..5c2125a42 100644 --- a/prover/proof_producer/dummy_producer.go +++ b/prover/proof_producer/dummy_producer.go @@ -39,9 +39,16 @@ func (d *DummyProofProducer) RequestProof( BlockID: blockID, Meta: meta, Header: header, - ZkProof: []byte{0xff}, - Degree: CircuitsDegree10Txs, - Opts: opts, + // proof must be 32 bytes min since protocol uses bytes utils and reads 32 bytes, so even + // make proofs must be 32 bytes + ZkProof: []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, + }, + Degree: CircuitsDegree10Txs, + Opts: opts, } }) diff --git a/prover/prover.go b/prover/prover.go index 59ad80bc6..652ebd1c7 100644 --- a/prover/prover.go +++ b/prover/prover.go @@ -688,6 +688,9 @@ func (p *Prover) cancelProof(ctx context.Context, blockID uint64) { } } +// checkProofWindowsExpired iterates through the current blocks waiting for proof window to expire, +// which are blocks that have been proposed, but we were not selected as the prover. if the proof window +// has expired, we can start generating a proof for them. func (p *Prover) checkProofWindowsExpired(ctx context.Context) error { for i, blockId := range p.currentBlocksWaitingForProofWindow { if err := p.checkProofWindowExpired(ctx, i, blockId); err != nil { @@ -698,6 +701,8 @@ func (p *Prover) checkProofWindowsExpired(ctx context.Context) error { return nil } +// checkProofWindowExpired checks a single instance of a block to see if its proof winodw has expired +// and the proof is now able to be submitted by anyone, not just the blocks assigned prover. func (p *Prover) checkProofWindowExpired(ctx context.Context, i int, blockId uint64) error { p.currentBlocksWaitingForProofWindowMutex.Lock() defer p.currentBlocksWaitingForProofWindowMutex.Unlock() diff --git a/testutils/suite.go b/testutils/suite.go index f811aaa2b..91b65fdb1 100644 --- a/testutils/suite.go +++ b/testutils/suite.go @@ -100,8 +100,6 @@ func (s *ClientTestSuite) SetupTest() { amtTko := new(big.Int).Mul(amt, big.NewInt(8)) - log.Info("amtTko", "amt", amtTko.String()) - // proposer has tKO, need to transfer to prover _, err = s.RpcClient.TaikoTokenL1.Transfer(proposerOpts, crypto.PubkeyToAddress(l1ProverPrivKey.PublicKey), amtTko) s.Nil(err) @@ -114,7 +112,7 @@ func (s *ClientTestSuite) SetupTest() { uint16(rewardPerGas), uint16(capacity), ) - s.Nil(err, "2") + s.Nil(err) } s.Nil(rpcCli.L1RawRPC.CallContext(context.Background(), &s.testnetL1SnapshotID, "evm_snapshot")) From fbbece587b63e574e803df1ef7b0e30e44bb8969 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Fri, 30 Jun 2023 00:49:41 -0700 Subject: [PATCH 21/37] refh ead --- .github/workflows/test.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 880e559ba..42b5be71e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,10 +45,7 @@ jobs: with: repository: taikoxyz/taiko-mono path: ${{ env.TAIKO_MONO_DIR }} -<<<<<<< HEAD - ref: alpha_4_test_fixes -======= ->>>>>>> main + ref: alpha-4 - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 From bf8640dc17b55989a957e5ae0d027d86c57e0b06 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Fri, 30 Jun 2023 00:52:01 -0700 Subject: [PATCH 22/37] expectedreward --- prover/proof_submitter/valid_proof_submitter_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/prover/proof_submitter/valid_proof_submitter_test.go b/prover/proof_submitter/valid_proof_submitter_test.go index be25d864f..e8f6c2234 100644 --- a/prover/proof_submitter/valid_proof_submitter_test.go +++ b/prover/proof_submitter/valid_proof_submitter_test.go @@ -48,7 +48,6 @@ func (s *ProofSubmitterTestSuite) SetupTest() { &sync.Mutex{}, false, "test", - 0, 12*time.Second, ) s.Nil(err) From a4a780db38fb94493b6470abbab3d230c2e32a60 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Fri, 30 Jun 2023 01:06:10 -0700 Subject: [PATCH 23/37] dont need to check neednewproof --- prover/proof_submitter/util.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/prover/proof_submitter/util.go b/prover/proof_submitter/util.go index c2fcdcdcc..c5f21a191 100644 --- a/prover/proof_submitter/util.go +++ b/prover/proof_submitter/util.go @@ -103,22 +103,6 @@ func sendTxWithBackoff( return nil } - // Check if this proof is still needed at first. - needNewProof, err := rpc.NeedNewProof(ctx, cli, blockID, common.Address{}) - if err != nil { - log.Warn( - "Failed to check if the generated proof is needed", - "blockID", blockID, - "error", err, - ) - return err - } - - if !needNewProof { - log.Info("Proof was submitted another prover, skip the current proof submission", "blockID", blockID) - return nil - } - tx, err := sendTxFunc() if err != nil { err = encoding.TryParsingCustomError(err) From cda9c827b747760b7aeba05281a7db9c5a3d1f1f Mon Sep 17 00:00:00 2001 From: David Date: Sat, 1 Jul 2023 14:50:32 +0800 Subject: [PATCH 24/37] chore: update ci --- .github/workflows/docker.yml | 2 +- bindings/.githead | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1b1491c56..ba2ac1ff8 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -2,7 +2,7 @@ name: "Push docker image to GCR" on: push: - branches: [main] + branches: [main,pos_impl] tags: - "v*" diff --git a/bindings/.githead b/bindings/.githead index 49ab85096..386337e81 100644 --- a/bindings/.githead +++ b/bindings/.githead @@ -1 +1 @@ -c133bdd2bee6192bab2531f8463100c778c71820 +8e398f40bd8693af5966c3ac7bf21cb3516d4b2d From 85a530c600dbc847a754707be6f3ce19ee1c5650 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Sat, 1 Jul 2023 01:28:50 -0700 Subject: [PATCH 25/37] taiko1laddress in proposer is unused now due to PoS impl change --- proposer/proposer.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/proposer/proposer.go b/proposer/proposer.go index 8966ffea1..6719df88f 100644 --- a/proposer/proposer.go +++ b/proposer/proposer.go @@ -41,9 +41,6 @@ type Proposer struct { l1ProposerAddress common.Address l2SuggestedFeeRecipient common.Address - // Contract addresses - taikoL1Address common.Address - // Proposing configurations proposingInterval *time.Duration proposeEmptyBlocksInterval *time.Duration @@ -80,7 +77,6 @@ func InitFromConfig(ctx context.Context, p *Proposer, cfg *Config) (err error) { p.l1ProposerPrivKey = cfg.L1ProposerPrivKey p.l1ProposerAddress = crypto.PubkeyToAddress(cfg.L1ProposerPrivKey.PublicKey) p.l2SuggestedFeeRecipient = cfg.L2SuggestedFeeRecipient - p.taikoL1Address = cfg.TaikoL1Address p.proposingInterval = cfg.ProposeInterval p.proposeEmptyBlocksInterval = cfg.ProposeEmptyBlocksInterval p.proposeBlockTxGasLimit = cfg.ProposeBlockTxGasLimit From 2e3e8c7bde2d4301947ef68fb459b66bc508f5fc Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Sat, 1 Jul 2023 01:46:16 -0700 Subject: [PATCH 26/37] taikoTokenL1 uses premint in deployonl1 script now --- .github/workflows/test.yml | 2 +- cmd/flags/proposer.go | 6 ------ integration_test/nodes/init.sh | 4 ++-- pkg/rpc/client.go | 11 ----------- pkg/rpc/client_test.go | 1 - proposer/config.go | 1 - proposer/config_test.go | 4 ---- proposer/proposer.go | 11 +++++------ testutils/suite.go | 7 ------- 9 files changed, 8 insertions(+), 39 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 42b5be71e..e3034f1e2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,7 +45,7 @@ jobs: with: repository: taikoxyz/taiko-mono path: ${{ env.TAIKO_MONO_DIR }} - ref: alpha-4 + ref: premint - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 diff --git a/cmd/flags/proposer.go b/cmd/flags/proposer.go index 5373cc4e9..9b2dac781 100644 --- a/cmd/flags/proposer.go +++ b/cmd/flags/proposer.go @@ -20,12 +20,6 @@ var ( Required: true, Category: proposerCategory, } - L1TaikoTokenAddress = &cli.StringFlag{ - Name: "l1.taikoTokenAddress", - Usage: "Address of the taiko token L1 contract", - Required: true, - Category: proposerCategory, - } ) // Optional flags used by proposer. diff --git a/integration_test/nodes/init.sh b/integration_test/nodes/init.sh index 116fbed49..612f7668a 100755 --- a/integration_test/nodes/init.sh +++ b/integration_test/nodes/init.sh @@ -43,8 +43,8 @@ cd $TAIKO_MONO_DIR/packages/protocol && TAIKO_L2_ADDRESS=0x1000777700000000000000000000000000000001 \ L2_SIGNAL_SERVICE=0x1000777700000000000000000000000000000007 \ SHARED_SIGNAL_SERVICE=0x0000000000000000000000000000000000000000 \ - TAIKO_TOKEN_PREMINT_RECIPIENT=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 \ - TAIKO_TOKEN_PREMINT_AMOUNT=18446744073709551614 \ + TAIKO_TOKEN_PREMINT_RECIPIENTS=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266,0x70997970C51812dc3A010C7d01b50e0d17dc79C8 \ + TAIKO_TOKEN_PREMINT_AMOUNTS=18446744073709551614,18446744073709551614 \ L2_GENESIS_HASH=$L2_GENESIS_HASH \ L2_CHAIN_ID=167001 \ forge script script/DeployOnL1.s.sol:DeployOnL1 \ diff --git a/pkg/rpc/client.go b/pkg/rpc/client.go index 4697443da..9dc32747f 100644 --- a/pkg/rpc/client.go +++ b/pkg/rpc/client.go @@ -30,7 +30,6 @@ type Client struct { TaikoL1 *bindings.TaikoL1Client TaikoL2 *bindings.TaikoL2Client TaikoProverPoolL1 *bindings.TaikoL1ProverPool - TaikoTokenL1 *bindings.TaikoToken // Chain IDs L1ChainID *big.Int L2ChainID *big.Int @@ -46,7 +45,6 @@ type ClientConfig struct { TaikoL1Address common.Address TaikoProverPoolL1Address common.Address TaikoL2Address common.Address - TaikoTokenL1Address common.Address L2EngineEndpoint string JwtSecret string RetryInterval time.Duration @@ -72,14 +70,6 @@ func NewClient(ctx context.Context, cfg *ClientConfig) (*Client, error) { } } - var taikoTokenL1 *bindings.TaikoToken - if cfg.TaikoTokenL1Address.Hex() != "" { - taikoTokenL1, err = bindings.NewTaikoToken(cfg.TaikoTokenL1Address, l1RPC) - if err != nil { - return nil, err - } - } - l2RPC, err := DialClientWithBackoff(ctx, cfg.L2Endpoint, cfg.RetryInterval) if err != nil { return nil, err @@ -143,7 +133,6 @@ func NewClient(ctx context.Context, cfg *ClientConfig) (*Client, error) { TaikoL1: taikoL1, TaikoL2: taikoL2, TaikoProverPoolL1: taikoProverPoolL1, - TaikoTokenL1: taikoTokenL1, L1ChainID: l1ChainID, L2ChainID: l2ChainID, } diff --git a/pkg/rpc/client_test.go b/pkg/rpc/client_test.go index 774a40aa3..7fc0b9971 100644 --- a/pkg/rpc/client_test.go +++ b/pkg/rpc/client_test.go @@ -17,7 +17,6 @@ func newTestClient(t *testing.T) *Client { TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")), TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")), TaikoProverPoolL1Address: common.HexToAddress(os.Getenv("TAIKO_PROVER_POOL_L1_ADDRESS")), - TaikoTokenL1Address: common.HexToAddress(os.Getenv("TAIKO_TOKEN_L1_ADDRESS")), L2EngineEndpoint: os.Getenv("L2_EXECUTION_ENGINE_AUTH_ENDPOINT"), JwtSecret: os.Getenv("JWT_SECRET"), RetryInterval: backoff.DefaultMaxInterval, diff --git a/proposer/config.go b/proposer/config.go index 4f81cac7d..fa991b4a1 100644 --- a/proposer/config.go +++ b/proposer/config.go @@ -86,7 +86,6 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) { L2Endpoint: c.String(flags.L2HTTPEndpoint.Name), TaikoL1Address: common.HexToAddress(c.String(flags.TaikoL1Address.Name)), TaikoL2Address: common.HexToAddress(c.String(flags.TaikoL2Address.Name)), - TaikoTokenL1Address: common.HexToAddress(c.String(flags.L1TaikoTokenAddress.Name)), L1ProposerPrivKey: l1ProposerPrivKey, L2SuggestedFeeRecipient: common.HexToAddress(l2SuggestedFeeRecipient), ProposeInterval: proposingInterval, diff --git a/proposer/config_test.go b/proposer/config_test.go index b20d36661..6615b2e2b 100644 --- a/proposer/config_test.go +++ b/proposer/config_test.go @@ -16,7 +16,6 @@ func (s *ProposerTestSuite) TestNewConfigFromCliContext() { l2Endpoint := os.Getenv("L2_EXECUTION_ENGINE_HTTP_ENDPOINT") taikoL1 := os.Getenv("TAIKO_L1_ADDRESS") taikoL2 := os.Getenv("TAIKO_L2_ADDRESS") - taikoTokenL1 := os.Getenv("TAIKO_TOKEN_L1_ADDRESS") proposeInterval := "10s" commitSlot := 1024 @@ -32,7 +31,6 @@ func (s *ProposerTestSuite) TestNewConfigFromCliContext() { &cli.StringFlag{Name: flags.L2HTTPEndpoint.Name}, &cli.StringFlag{Name: flags.TaikoL1Address.Name}, &cli.StringFlag{Name: flags.TaikoL2Address.Name}, - &cli.StringFlag{Name: flags.L1TaikoTokenAddress.Name}, &cli.StringFlag{Name: flags.L1ProposerPrivKey.Name}, &cli.StringFlag{Name: flags.L2SuggestedFeeRecipient.Name}, &cli.StringFlag{Name: flags.ProposeInterval.Name}, @@ -46,7 +44,6 @@ func (s *ProposerTestSuite) TestNewConfigFromCliContext() { s.Equal(l2Endpoint, c.L2Endpoint) s.Equal(taikoL1, c.TaikoL1Address.String()) s.Equal(taikoL2, c.TaikoL2Address.String()) - s.Equal(taikoTokenL1, c.TaikoTokenL1Address.String()) s.Equal(goldenTouchAddress, crypto.PubkeyToAddress(c.L1ProposerPrivKey.PublicKey)) s.Equal(goldenTouchAddress, c.L2SuggestedFeeRecipient) s.Equal(float64(10), c.ProposeInterval.Seconds()) @@ -64,7 +61,6 @@ func (s *ProposerTestSuite) TestNewConfigFromCliContext() { "-" + flags.L2HTTPEndpoint.Name, l2Endpoint, "-" + flags.TaikoL1Address.Name, taikoL1, "-" + flags.TaikoL2Address.Name, taikoL2, - "-" + flags.L1TaikoTokenAddress.Name, taikoTokenL1, "-" + flags.L1ProposerPrivKey.Name, common.Bytes2Hex(goldenTouchPrivKey.Bytes()), "-" + flags.L2SuggestedFeeRecipient.Name, goldenTouchAddress.Hex(), "-" + flags.ProposeInterval.Name, proposeInterval, diff --git a/proposer/proposer.go b/proposer/proposer.go index 6719df88f..89f47ab2b 100644 --- a/proposer/proposer.go +++ b/proposer/proposer.go @@ -88,12 +88,11 @@ func InitFromConfig(ctx context.Context, p *Proposer, cfg *Config) (err error) { // RPC clients if p.rpc, err = rpc.NewClient(p.ctx, &rpc.ClientConfig{ - L1Endpoint: cfg.L1Endpoint, - L2Endpoint: cfg.L2Endpoint, - TaikoL1Address: cfg.TaikoL1Address, - TaikoL2Address: cfg.TaikoL2Address, - TaikoTokenL1Address: cfg.TaikoTokenL1Address, - RetryInterval: cfg.BackOffRetryInterval, + L1Endpoint: cfg.L1Endpoint, + L2Endpoint: cfg.L2Endpoint, + TaikoL1Address: cfg.TaikoL1Address, + TaikoL2Address: cfg.TaikoL2Address, + RetryInterval: cfg.BackOffRetryInterval, }); err != nil { return fmt.Errorf("initialize rpc clients error: %w", err) } diff --git a/testutils/suite.go b/testutils/suite.go index 204307d8a..a24582383 100644 --- a/testutils/suite.go +++ b/testutils/suite.go @@ -58,7 +58,6 @@ func (s *ClientTestSuite) SetupTest() { L2Endpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"), TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")), TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")), - TaikoTokenL1Address: common.HexToAddress(os.Getenv("TAIKO_TOKEN_L1_ADDRESS")), TaikoProverPoolL1Address: common.HexToAddress(os.Getenv("TAIKO_PROVER_POOL_L1_ADDRESS")), L2EngineEndpoint: os.Getenv("L2_EXECUTION_ENGINE_AUTH_ENDPOINT"), JwtSecret: string(jwtSecret), @@ -97,12 +96,6 @@ func (s *ClientTestSuite) SetupTest() { amt := new(big.Int).Mul(big.NewInt(int64(minStakePerCapacity)), big.NewInt(int64(capacity))) - amtTko := new(big.Int).Mul(amt, big.NewInt(8)) - - // proposer has tKO, need to transfer to prover - _, err = s.RpcClient.TaikoTokenL1.Transfer(proposerOpts, crypto.PubkeyToAddress(l1ProverPrivKey.PublicKey), amtTko) - s.Nil(err) - rewardPerGas := 1 s.Nil(err) _, err = s.RpcClient.TaikoProverPoolL1.Stake( From 79b8410df85fe0f8f966f91cc263d9111423edbc Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Sat, 1 Jul 2023 01:54:31 -0700 Subject: [PATCH 27/37] premint amts --- integration_test/nodes/init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration_test/nodes/init.sh b/integration_test/nodes/init.sh index 612f7668a..c9f903b4c 100755 --- a/integration_test/nodes/init.sh +++ b/integration_test/nodes/init.sh @@ -44,7 +44,7 @@ cd $TAIKO_MONO_DIR/packages/protocol && L2_SIGNAL_SERVICE=0x1000777700000000000000000000000000000007 \ SHARED_SIGNAL_SERVICE=0x0000000000000000000000000000000000000000 \ TAIKO_TOKEN_PREMINT_RECIPIENTS=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266,0x70997970C51812dc3A010C7d01b50e0d17dc79C8 \ - TAIKO_TOKEN_PREMINT_AMOUNTS=18446744073709551614,18446744073709551614 \ + TAIKO_TOKEN_PREMINT_AMOUNTS=9223372036854775807,9223372036854775807 \ L2_GENESIS_HASH=$L2_GENESIS_HASH \ L2_CHAIN_ID=167001 \ forge script script/DeployOnL1.s.sol:DeployOnL1 \ From f8ffffd3e3d6e8422a021e3d8f73ac0a460f0a66 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Sat, 1 Jul 2023 02:02:33 -0700 Subject: [PATCH 28/37] interval to check profo window is a flag --- cmd/flags/prover.go | 7 ++++ prover/config.go | 82 ++++++++++++++++++++++--------------------- prover/config_test.go | 3 ++ prover/prover.go | 7 +++- 4 files changed, 58 insertions(+), 41 deletions(-) diff --git a/cmd/flags/prover.go b/cmd/flags/prover.go index eeda1e286..14438c963 100644 --- a/cmd/flags/prover.go +++ b/cmd/flags/prover.go @@ -75,6 +75,12 @@ var ( Required: true, Category: commonCategory, } + CheckProofWindowExpiredInterval = &cli.Uint64Flag{ + Name: "prover.checkProofWindowExpiredInterval", + Usage: "Interval in seconds to check for expired proof windows from other provers", + Category: commonCategory, + Value: 15, + } ) // All prover flags. @@ -93,4 +99,5 @@ var ProverFlags = MergeFlags(CommonFlags, []cli.Flag{ OracleProverPrivateKey, Graffiti, TaikoProverPoolL1Address, + CheckProofWindowExpiredInterval, }) diff --git a/prover/config.go b/prover/config.go index 273e861c6..6701f489a 100644 --- a/prover/config.go +++ b/prover/config.go @@ -15,26 +15,27 @@ import ( // Config contains the configurations to initialize a Taiko prover. type Config struct { - L1WsEndpoint string - L1HttpEndpoint string - L2WsEndpoint string - L2HttpEndpoint string - TaikoL1Address common.Address - TaikoProverPoolL1Address common.Address - TaikoL2Address common.Address - L1ProverPrivKey *ecdsa.PrivateKey - ZKEvmRpcdEndpoint string - ZkEvmRpcdParamsPath string - StartingBlockID *big.Int - MaxConcurrentProvingJobs uint - Dummy bool - OracleProver bool - OracleProverPrivateKey *ecdsa.PrivateKey - Graffiti string - RandomDummyProofDelayLowerBound *time.Duration - RandomDummyProofDelayUpperBound *time.Duration - BackOffMaxRetrys uint64 - BackOffRetryInterval time.Duration + L1WsEndpoint string + L1HttpEndpoint string + L2WsEndpoint string + L2HttpEndpoint string + TaikoL1Address common.Address + TaikoProverPoolL1Address common.Address + TaikoL2Address common.Address + L1ProverPrivKey *ecdsa.PrivateKey + ZKEvmRpcdEndpoint string + ZkEvmRpcdParamsPath string + StartingBlockID *big.Int + MaxConcurrentProvingJobs uint + Dummy bool + OracleProver bool + OracleProverPrivateKey *ecdsa.PrivateKey + Graffiti string + RandomDummyProofDelayLowerBound *time.Duration + RandomDummyProofDelayUpperBound *time.Duration + BackOffMaxRetrys uint64 + BackOffRetryInterval time.Duration + CheckProofWindowExpiredIntervalInSeconds time.Duration } // NewConfigFromCliContext creates a new config instance from command line flags. @@ -97,25 +98,26 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) { } return &Config{ - L1WsEndpoint: c.String(flags.L1WSEndpoint.Name), - L1HttpEndpoint: c.String(flags.L1HTTPEndpoint.Name), - L2WsEndpoint: c.String(flags.L2WSEndpoint.Name), - L2HttpEndpoint: c.String(flags.L2HTTPEndpoint.Name), - TaikoL1Address: common.HexToAddress(c.String(flags.TaikoL1Address.Name)), - TaikoL2Address: common.HexToAddress(c.String(flags.TaikoL2Address.Name)), - TaikoProverPoolL1Address: common.HexToAddress(c.String(flags.TaikoProverPoolL1Address.Name)), - L1ProverPrivKey: l1ProverPrivKey, - ZKEvmRpcdEndpoint: c.String(flags.ZkEvmRpcdEndpoint.Name), - ZkEvmRpcdParamsPath: c.String(flags.ZkEvmRpcdParamsPath.Name), - StartingBlockID: startingBlockID, - MaxConcurrentProvingJobs: c.Uint(flags.MaxConcurrentProvingJobs.Name), - Dummy: c.Bool(flags.Dummy.Name), - OracleProver: c.Bool(flags.OracleProver.Name), - OracleProverPrivateKey: oracleProverPrivKey, - Graffiti: c.String(flags.Graffiti.Name), - RandomDummyProofDelayLowerBound: randomDummyProofDelayLowerBound, - RandomDummyProofDelayUpperBound: randomDummyProofDelayUpperBound, - BackOffMaxRetrys: c.Uint64(flags.BackOffMaxRetrys.Name), - BackOffRetryInterval: time.Duration(c.Uint64(flags.BackOffRetryInterval.Name)) * time.Second, + L1WsEndpoint: c.String(flags.L1WSEndpoint.Name), + L1HttpEndpoint: c.String(flags.L1HTTPEndpoint.Name), + L2WsEndpoint: c.String(flags.L2WSEndpoint.Name), + L2HttpEndpoint: c.String(flags.L2HTTPEndpoint.Name), + TaikoL1Address: common.HexToAddress(c.String(flags.TaikoL1Address.Name)), + TaikoL2Address: common.HexToAddress(c.String(flags.TaikoL2Address.Name)), + TaikoProverPoolL1Address: common.HexToAddress(c.String(flags.TaikoProverPoolL1Address.Name)), + L1ProverPrivKey: l1ProverPrivKey, + ZKEvmRpcdEndpoint: c.String(flags.ZkEvmRpcdEndpoint.Name), + ZkEvmRpcdParamsPath: c.String(flags.ZkEvmRpcdParamsPath.Name), + StartingBlockID: startingBlockID, + MaxConcurrentProvingJobs: c.Uint(flags.MaxConcurrentProvingJobs.Name), + Dummy: c.Bool(flags.Dummy.Name), + OracleProver: c.Bool(flags.OracleProver.Name), + OracleProverPrivateKey: oracleProverPrivKey, + Graffiti: c.String(flags.Graffiti.Name), + RandomDummyProofDelayLowerBound: randomDummyProofDelayLowerBound, + RandomDummyProofDelayUpperBound: randomDummyProofDelayUpperBound, + BackOffMaxRetrys: c.Uint64(flags.BackOffMaxRetrys.Name), + BackOffRetryInterval: time.Duration(c.Uint64(flags.BackOffRetryInterval.Name)) * time.Second, + CheckProofWindowExpiredIntervalInSeconds: time.Duration(c.Uint64(flags.CheckProofWindowExpiredInterval.Name)) * time.Second, }, nil } diff --git a/prover/config_test.go b/prover/config_test.go index 0d42729e7..3d7a84615 100644 --- a/prover/config_test.go +++ b/prover/config_test.go @@ -24,6 +24,7 @@ var testFlags = []cli.Flag{ &cli.StringFlag{Name: flags.OracleProverPrivateKey.Name}, &cli.StringFlag{Name: flags.Graffiti.Name}, &cli.StringFlag{Name: flags.TaikoProverPoolL1Address.Name}, + &cli.Uint64Flag{Name: flags.CheckProofWindowExpiredInterval.Name}, } func (s *ProverTestSuite) TestNewConfigFromCliContext_OracleProver() { @@ -60,6 +61,7 @@ func (s *ProverTestSuite) TestNewConfigFromCliContext_OracleProver() { crypto.PubkeyToAddress(c.OracleProverPrivateKey.PublicKey), ) s.Equal("", c.Graffiti) + s.Equal(30, c.CheckProofWindowExpiredIntervalInSeconds) s.Nil(new(Prover).InitFromCli(context.Background(), ctx)) return err @@ -80,6 +82,7 @@ func (s *ProverTestSuite) TestNewConfigFromCliContext_OracleProver() { "-" + flags.OracleProver.Name, "-" + flags.OracleProverPrivateKey.Name, os.Getenv("L1_PROVER_PRIVATE_KEY"), "-" + flags.Graffiti.Name, "", + "-" + flags.CheckProofWindowExpiredInterval.Name, "30", })) } diff --git a/prover/prover.go b/prover/prover.go index 43a290bb9..fe9f03c59 100644 --- a/prover/prover.go +++ b/prover/prover.go @@ -79,6 +79,9 @@ type Prover struct { currentBlocksWaitingForProofWindow []uint64 currentBlocksWaitingForProofWindowMutex *sync.Mutex + // interval settings + checkProofWindowExpiredIntervalInSeconds time.Duration + ctx context.Context wg sync.WaitGroup } @@ -147,6 +150,8 @@ func InitFromConfig(ctx context.Context, p *Prover, cfg *Config) (err error) { p.proposeConcurrencyGuard = make(chan struct{}, cfg.MaxConcurrentProvingJobs) p.submitProofConcurrencyGuard = make(chan struct{}, cfg.MaxConcurrentProvingJobs) + p.checkProofWindowExpiredIntervalInSeconds = p.cfg.CheckProofWindowExpiredIntervalInSeconds + oracleProverAddress, err := p.rpc.TaikoL1.Resolve(nil, p.rpc.L1ChainID, rpc.StringToBytes32("oracle_prover"), true) if err != nil { return err @@ -249,7 +254,7 @@ func (p *Prover) eventLoop() { ) defer verificationCheckTicker.Stop() - checkProofWindowExpiredTicker := time.NewTicker(10 * time.Second) + checkProofWindowExpiredTicker := time.NewTicker(p.checkProofWindowExpiredIntervalInSeconds) defer checkProofWindowExpiredTicker.Stop() // Call reqProving() right away to catch up with the latest state. From 0dc06f8da9dca4af969477a2ec0122c1c52674b9 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Sat, 1 Jul 2023 02:03:53 -0700 Subject: [PATCH 29/37] test --- prover/config_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prover/config_test.go b/prover/config_test.go index 3d7a84615..7718bad71 100644 --- a/prover/config_test.go +++ b/prover/config_test.go @@ -61,7 +61,7 @@ func (s *ProverTestSuite) TestNewConfigFromCliContext_OracleProver() { crypto.PubkeyToAddress(c.OracleProverPrivateKey.PublicKey), ) s.Equal("", c.Graffiti) - s.Equal(30, c.CheckProofWindowExpiredIntervalInSeconds) + s.Equal(30*time.Second, c.CheckProofWindowExpiredIntervalInSeconds) s.Nil(new(Prover).InitFromCli(context.Background(), ctx)) return err From 2f47261eb986d693c9da3d3e8d130fca1d0c3b47 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Sat, 1 Jul 2023 02:05:23 -0700 Subject: [PATCH 30/37] test --- prover/prover_test.go | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/prover/prover_test.go b/prover/prover_test.go index 8ffb9bc5a..1bbcf9b6f 100644 --- a/prover/prover_test.go +++ b/prover/prover_test.go @@ -36,17 +36,18 @@ func (s *ProverTestSuite) SetupTest() { ctx, cancel := context.WithCancel(context.Background()) p := new(Prover) s.Nil(InitFromConfig(ctx, p, (&Config{ - L1WsEndpoint: os.Getenv("L1_NODE_WS_ENDPOINT"), - L1HttpEndpoint: os.Getenv("L1_NODE_HTTP_ENDPOINT"), - L2WsEndpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"), - L2HttpEndpoint: os.Getenv("L2_EXECUTION_ENGINE_HTTP_ENDPOINT"), - TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")), - TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")), - TaikoProverPoolL1Address: common.HexToAddress(os.Getenv("TAIKO_PROVER_POOL_L1_ADDRESS")), - L1ProverPrivKey: l1ProverPrivKey, - OracleProverPrivateKey: l1ProverPrivKey, - Dummy: true, - MaxConcurrentProvingJobs: 1, + L1WsEndpoint: os.Getenv("L1_NODE_WS_ENDPOINT"), + L1HttpEndpoint: os.Getenv("L1_NODE_HTTP_ENDPOINT"), + L2WsEndpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"), + L2HttpEndpoint: os.Getenv("L2_EXECUTION_ENGINE_HTTP_ENDPOINT"), + TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")), + TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")), + TaikoProverPoolL1Address: common.HexToAddress(os.Getenv("TAIKO_PROVER_POOL_L1_ADDRESS")), + L1ProverPrivKey: l1ProverPrivKey, + OracleProverPrivateKey: l1ProverPrivKey, + Dummy: true, + MaxConcurrentProvingJobs: 1, + CheckProofWindowExpiredIntervalInSeconds: time.Duration(5 * time.Second), }))) s.p = p s.cancel = cancel From 0007fea5db19a94de17228f09364954eacbd6723 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Sat, 1 Jul 2023 02:07:55 -0700 Subject: [PATCH 31/37] remove bindigns for ttko --- bindings/gen_taiko_token_l1.go | 2946 -------------------------------- scripts/gen_bindings.sh | 6 +- 2 files changed, 1 insertion(+), 2951 deletions(-) delete mode 100644 bindings/gen_taiko_token_l1.go diff --git a/bindings/gen_taiko_token_l1.go b/bindings/gen_taiko_token_l1.go deleted file mode 100644 index 995b2d9a1..000000000 --- a/bindings/gen_taiko_token_l1.go +++ /dev/null @@ -1,2946 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package bindings - -import ( - "errors" - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" -) - -// Reference imports to suppress errors if they are not otherwise used. -var ( - _ = errors.New - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription - _ = abi.ConvertType -) - -// ERC20VotesUpgradeableCheckpoint is an auto generated low-level Go binding around an user-defined struct. -type ERC20VotesUpgradeableCheckpoint struct { - FromBlock uint32 - Votes *big.Int -} - -// TaikoTokenMetaData contains all meta data concerning the TaikoToken contract. -var TaikoTokenMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TKO_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TKO_INVALID_PREMINT_PARAMS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TKO_MINT_DISALLOWED\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromDelegate\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toDelegate\",\"type\":\"address\"}],\"name\":\"DelegateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"DelegateVotesChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"Snapshot\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"snapshotId\",\"type\":\"uint256\"}],\"name\":\"balanceOfAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"pos\",\"type\":\"uint32\"}],\"name\":\"checkpoints\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fromBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint224\",\"name\":\"votes\",\"type\":\"uint224\"}],\"internalType\":\"structERC20VotesUpgradeable.Checkpoint\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"delegateBySig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPastTotalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPastVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"address[]\",\"name\":\"_premintRecipients\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_premintAmounts\",\"type\":\"uint256[]\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"numCheckpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"snapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"snapshotId\",\"type\":\"uint256\"}],\"name\":\"totalSupplyAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", -} - -// TaikoTokenABI is the input ABI used to generate the binding from. -// Deprecated: Use TaikoTokenMetaData.ABI instead. -var TaikoTokenABI = TaikoTokenMetaData.ABI - -// TaikoToken is an auto generated Go binding around an Ethereum contract. -type TaikoToken struct { - TaikoTokenCaller // Read-only binding to the contract - TaikoTokenTransactor // Write-only binding to the contract - TaikoTokenFilterer // Log filterer for contract events -} - -// TaikoTokenCaller is an auto generated read-only Go binding around an Ethereum contract. -type TaikoTokenCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// TaikoTokenTransactor is an auto generated write-only Go binding around an Ethereum contract. -type TaikoTokenTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// TaikoTokenFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type TaikoTokenFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// TaikoTokenSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type TaikoTokenSession struct { - Contract *TaikoToken // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// TaikoTokenCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type TaikoTokenCallerSession struct { - Contract *TaikoTokenCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// TaikoTokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type TaikoTokenTransactorSession struct { - Contract *TaikoTokenTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// TaikoTokenRaw is an auto generated low-level Go binding around an Ethereum contract. -type TaikoTokenRaw struct { - Contract *TaikoToken // Generic contract binding to access the raw methods on -} - -// TaikoTokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type TaikoTokenCallerRaw struct { - Contract *TaikoTokenCaller // Generic read-only contract binding to access the raw methods on -} - -// TaikoTokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type TaikoTokenTransactorRaw struct { - Contract *TaikoTokenTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewTaikoToken creates a new instance of TaikoToken, bound to a specific deployed contract. -func NewTaikoToken(address common.Address, backend bind.ContractBackend) (*TaikoToken, error) { - contract, err := bindTaikoToken(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &TaikoToken{TaikoTokenCaller: TaikoTokenCaller{contract: contract}, TaikoTokenTransactor: TaikoTokenTransactor{contract: contract}, TaikoTokenFilterer: TaikoTokenFilterer{contract: contract}}, nil -} - -// NewTaikoTokenCaller creates a new read-only instance of TaikoToken, bound to a specific deployed contract. -func NewTaikoTokenCaller(address common.Address, caller bind.ContractCaller) (*TaikoTokenCaller, error) { - contract, err := bindTaikoToken(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &TaikoTokenCaller{contract: contract}, nil -} - -// NewTaikoTokenTransactor creates a new write-only instance of TaikoToken, bound to a specific deployed contract. -func NewTaikoTokenTransactor(address common.Address, transactor bind.ContractTransactor) (*TaikoTokenTransactor, error) { - contract, err := bindTaikoToken(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &TaikoTokenTransactor{contract: contract}, nil -} - -// NewTaikoTokenFilterer creates a new log filterer instance of TaikoToken, bound to a specific deployed contract. -func NewTaikoTokenFilterer(address common.Address, filterer bind.ContractFilterer) (*TaikoTokenFilterer, error) { - contract, err := bindTaikoToken(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &TaikoTokenFilterer{contract: contract}, nil -} - -// bindTaikoToken binds a generic wrapper to an already deployed contract. -func bindTaikoToken(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := TaikoTokenMetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -// Call invokes the (constant) contract method with params as input values and -// sets the output to result. The result type might be a single field for simple -// returns, a slice of interfaces for anonymous returns and a struct for named -// returns. -func (_TaikoToken *TaikoTokenRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _TaikoToken.Contract.TaikoTokenCaller.contract.Call(opts, result, method, params...) -} - -// Transfer initiates a plain transaction to move funds to the contract, calling -// its default method if one is available. -func (_TaikoToken *TaikoTokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _TaikoToken.Contract.TaikoTokenTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_TaikoToken *TaikoTokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _TaikoToken.Contract.TaikoTokenTransactor.contract.Transact(opts, method, params...) -} - -// Call invokes the (constant) contract method with params as input values and -// sets the output to result. The result type might be a single field for simple -// returns, a slice of interfaces for anonymous returns and a struct for named -// returns. -func (_TaikoToken *TaikoTokenCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _TaikoToken.Contract.contract.Call(opts, result, method, params...) -} - -// Transfer initiates a plain transaction to move funds to the contract, calling -// its default method if one is available. -func (_TaikoToken *TaikoTokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _TaikoToken.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_TaikoToken *TaikoTokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _TaikoToken.Contract.contract.Transact(opts, method, params...) -} - -// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. -// -// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) -func (_TaikoToken *TaikoTokenCaller) DOMAINSEPARATOR(opts *bind.CallOpts) ([32]byte, error) { - var out []interface{} - err := _TaikoToken.contract.Call(opts, &out, "DOMAIN_SEPARATOR") - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. -// -// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) -func (_TaikoToken *TaikoTokenSession) DOMAINSEPARATOR() ([32]byte, error) { - return _TaikoToken.Contract.DOMAINSEPARATOR(&_TaikoToken.CallOpts) -} - -// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. -// -// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) -func (_TaikoToken *TaikoTokenCallerSession) DOMAINSEPARATOR() ([32]byte, error) { - return _TaikoToken.Contract.DOMAINSEPARATOR(&_TaikoToken.CallOpts) -} - -// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f. -// -// Solidity: function addressManager() view returns(address) -func (_TaikoToken *TaikoTokenCaller) AddressManager(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _TaikoToken.contract.Call(opts, &out, "addressManager") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f. -// -// Solidity: function addressManager() view returns(address) -func (_TaikoToken *TaikoTokenSession) AddressManager() (common.Address, error) { - return _TaikoToken.Contract.AddressManager(&_TaikoToken.CallOpts) -} - -// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f. -// -// Solidity: function addressManager() view returns(address) -func (_TaikoToken *TaikoTokenCallerSession) AddressManager() (common.Address, error) { - return _TaikoToken.Contract.AddressManager(&_TaikoToken.CallOpts) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_TaikoToken *TaikoTokenCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var out []interface{} - err := _TaikoToken.contract.Call(opts, &out, "allowance", owner, spender) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_TaikoToken *TaikoTokenSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _TaikoToken.Contract.Allowance(&_TaikoToken.CallOpts, owner, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_TaikoToken *TaikoTokenCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _TaikoToken.Contract.Allowance(&_TaikoToken.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_TaikoToken *TaikoTokenCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var out []interface{} - err := _TaikoToken.contract.Call(opts, &out, "balanceOf", account) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_TaikoToken *TaikoTokenSession) BalanceOf(account common.Address) (*big.Int, error) { - return _TaikoToken.Contract.BalanceOf(&_TaikoToken.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_TaikoToken *TaikoTokenCallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _TaikoToken.Contract.BalanceOf(&_TaikoToken.CallOpts, account) -} - -// BalanceOfAt is a free data retrieval call binding the contract method 0x4ee2cd7e. -// -// Solidity: function balanceOfAt(address account, uint256 snapshotId) view returns(uint256) -func (_TaikoToken *TaikoTokenCaller) BalanceOfAt(opts *bind.CallOpts, account common.Address, snapshotId *big.Int) (*big.Int, error) { - var out []interface{} - err := _TaikoToken.contract.Call(opts, &out, "balanceOfAt", account, snapshotId) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// BalanceOfAt is a free data retrieval call binding the contract method 0x4ee2cd7e. -// -// Solidity: function balanceOfAt(address account, uint256 snapshotId) view returns(uint256) -func (_TaikoToken *TaikoTokenSession) BalanceOfAt(account common.Address, snapshotId *big.Int) (*big.Int, error) { - return _TaikoToken.Contract.BalanceOfAt(&_TaikoToken.CallOpts, account, snapshotId) -} - -// BalanceOfAt is a free data retrieval call binding the contract method 0x4ee2cd7e. -// -// Solidity: function balanceOfAt(address account, uint256 snapshotId) view returns(uint256) -func (_TaikoToken *TaikoTokenCallerSession) BalanceOfAt(account common.Address, snapshotId *big.Int) (*big.Int, error) { - return _TaikoToken.Contract.BalanceOfAt(&_TaikoToken.CallOpts, account, snapshotId) -} - -// Checkpoints is a free data retrieval call binding the contract method 0xf1127ed8. -// -// Solidity: function checkpoints(address account, uint32 pos) view returns((uint32,uint224)) -func (_TaikoToken *TaikoTokenCaller) Checkpoints(opts *bind.CallOpts, account common.Address, pos uint32) (ERC20VotesUpgradeableCheckpoint, error) { - var out []interface{} - err := _TaikoToken.contract.Call(opts, &out, "checkpoints", account, pos) - - if err != nil { - return *new(ERC20VotesUpgradeableCheckpoint), err - } - - out0 := *abi.ConvertType(out[0], new(ERC20VotesUpgradeableCheckpoint)).(*ERC20VotesUpgradeableCheckpoint) - - return out0, err - -} - -// Checkpoints is a free data retrieval call binding the contract method 0xf1127ed8. -// -// Solidity: function checkpoints(address account, uint32 pos) view returns((uint32,uint224)) -func (_TaikoToken *TaikoTokenSession) Checkpoints(account common.Address, pos uint32) (ERC20VotesUpgradeableCheckpoint, error) { - return _TaikoToken.Contract.Checkpoints(&_TaikoToken.CallOpts, account, pos) -} - -// Checkpoints is a free data retrieval call binding the contract method 0xf1127ed8. -// -// Solidity: function checkpoints(address account, uint32 pos) view returns((uint32,uint224)) -func (_TaikoToken *TaikoTokenCallerSession) Checkpoints(account common.Address, pos uint32) (ERC20VotesUpgradeableCheckpoint, error) { - return _TaikoToken.Contract.Checkpoints(&_TaikoToken.CallOpts, account, pos) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() pure returns(uint8) -func (_TaikoToken *TaikoTokenCaller) Decimals(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _TaikoToken.contract.Call(opts, &out, "decimals") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() pure returns(uint8) -func (_TaikoToken *TaikoTokenSession) Decimals() (uint8, error) { - return _TaikoToken.Contract.Decimals(&_TaikoToken.CallOpts) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() pure returns(uint8) -func (_TaikoToken *TaikoTokenCallerSession) Decimals() (uint8, error) { - return _TaikoToken.Contract.Decimals(&_TaikoToken.CallOpts) -} - -// Delegates is a free data retrieval call binding the contract method 0x587cde1e. -// -// Solidity: function delegates(address account) view returns(address) -func (_TaikoToken *TaikoTokenCaller) Delegates(opts *bind.CallOpts, account common.Address) (common.Address, error) { - var out []interface{} - err := _TaikoToken.contract.Call(opts, &out, "delegates", account) - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Delegates is a free data retrieval call binding the contract method 0x587cde1e. -// -// Solidity: function delegates(address account) view returns(address) -func (_TaikoToken *TaikoTokenSession) Delegates(account common.Address) (common.Address, error) { - return _TaikoToken.Contract.Delegates(&_TaikoToken.CallOpts, account) -} - -// Delegates is a free data retrieval call binding the contract method 0x587cde1e. -// -// Solidity: function delegates(address account) view returns(address) -func (_TaikoToken *TaikoTokenCallerSession) Delegates(account common.Address) (common.Address, error) { - return _TaikoToken.Contract.Delegates(&_TaikoToken.CallOpts, account) -} - -// GetPastTotalSupply is a free data retrieval call binding the contract method 0x8e539e8c. -// -// Solidity: function getPastTotalSupply(uint256 blockNumber) view returns(uint256) -func (_TaikoToken *TaikoTokenCaller) GetPastTotalSupply(opts *bind.CallOpts, blockNumber *big.Int) (*big.Int, error) { - var out []interface{} - err := _TaikoToken.contract.Call(opts, &out, "getPastTotalSupply", blockNumber) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetPastTotalSupply is a free data retrieval call binding the contract method 0x8e539e8c. -// -// Solidity: function getPastTotalSupply(uint256 blockNumber) view returns(uint256) -func (_TaikoToken *TaikoTokenSession) GetPastTotalSupply(blockNumber *big.Int) (*big.Int, error) { - return _TaikoToken.Contract.GetPastTotalSupply(&_TaikoToken.CallOpts, blockNumber) -} - -// GetPastTotalSupply is a free data retrieval call binding the contract method 0x8e539e8c. -// -// Solidity: function getPastTotalSupply(uint256 blockNumber) view returns(uint256) -func (_TaikoToken *TaikoTokenCallerSession) GetPastTotalSupply(blockNumber *big.Int) (*big.Int, error) { - return _TaikoToken.Contract.GetPastTotalSupply(&_TaikoToken.CallOpts, blockNumber) -} - -// GetPastVotes is a free data retrieval call binding the contract method 0x3a46b1a8. -// -// Solidity: function getPastVotes(address account, uint256 blockNumber) view returns(uint256) -func (_TaikoToken *TaikoTokenCaller) GetPastVotes(opts *bind.CallOpts, account common.Address, blockNumber *big.Int) (*big.Int, error) { - var out []interface{} - err := _TaikoToken.contract.Call(opts, &out, "getPastVotes", account, blockNumber) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetPastVotes is a free data retrieval call binding the contract method 0x3a46b1a8. -// -// Solidity: function getPastVotes(address account, uint256 blockNumber) view returns(uint256) -func (_TaikoToken *TaikoTokenSession) GetPastVotes(account common.Address, blockNumber *big.Int) (*big.Int, error) { - return _TaikoToken.Contract.GetPastVotes(&_TaikoToken.CallOpts, account, blockNumber) -} - -// GetPastVotes is a free data retrieval call binding the contract method 0x3a46b1a8. -// -// Solidity: function getPastVotes(address account, uint256 blockNumber) view returns(uint256) -func (_TaikoToken *TaikoTokenCallerSession) GetPastVotes(account common.Address, blockNumber *big.Int) (*big.Int, error) { - return _TaikoToken.Contract.GetPastVotes(&_TaikoToken.CallOpts, account, blockNumber) -} - -// GetVotes is a free data retrieval call binding the contract method 0x9ab24eb0. -// -// Solidity: function getVotes(address account) view returns(uint256) -func (_TaikoToken *TaikoTokenCaller) GetVotes(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var out []interface{} - err := _TaikoToken.contract.Call(opts, &out, "getVotes", account) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetVotes is a free data retrieval call binding the contract method 0x9ab24eb0. -// -// Solidity: function getVotes(address account) view returns(uint256) -func (_TaikoToken *TaikoTokenSession) GetVotes(account common.Address) (*big.Int, error) { - return _TaikoToken.Contract.GetVotes(&_TaikoToken.CallOpts, account) -} - -// GetVotes is a free data retrieval call binding the contract method 0x9ab24eb0. -// -// Solidity: function getVotes(address account) view returns(uint256) -func (_TaikoToken *TaikoTokenCallerSession) GetVotes(account common.Address) (*big.Int, error) { - return _TaikoToken.Contract.GetVotes(&_TaikoToken.CallOpts, account) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_TaikoToken *TaikoTokenCaller) Name(opts *bind.CallOpts) (string, error) { - var out []interface{} - err := _TaikoToken.contract.Call(opts, &out, "name") - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_TaikoToken *TaikoTokenSession) Name() (string, error) { - return _TaikoToken.Contract.Name(&_TaikoToken.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_TaikoToken *TaikoTokenCallerSession) Name() (string, error) { - return _TaikoToken.Contract.Name(&_TaikoToken.CallOpts) -} - -// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. -// -// Solidity: function nonces(address owner) view returns(uint256) -func (_TaikoToken *TaikoTokenCaller) Nonces(opts *bind.CallOpts, owner common.Address) (*big.Int, error) { - var out []interface{} - err := _TaikoToken.contract.Call(opts, &out, "nonces", owner) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. -// -// Solidity: function nonces(address owner) view returns(uint256) -func (_TaikoToken *TaikoTokenSession) Nonces(owner common.Address) (*big.Int, error) { - return _TaikoToken.Contract.Nonces(&_TaikoToken.CallOpts, owner) -} - -// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. -// -// Solidity: function nonces(address owner) view returns(uint256) -func (_TaikoToken *TaikoTokenCallerSession) Nonces(owner common.Address) (*big.Int, error) { - return _TaikoToken.Contract.Nonces(&_TaikoToken.CallOpts, owner) -} - -// NumCheckpoints is a free data retrieval call binding the contract method 0x6fcfff45. -// -// Solidity: function numCheckpoints(address account) view returns(uint32) -func (_TaikoToken *TaikoTokenCaller) NumCheckpoints(opts *bind.CallOpts, account common.Address) (uint32, error) { - var out []interface{} - err := _TaikoToken.contract.Call(opts, &out, "numCheckpoints", account) - - if err != nil { - return *new(uint32), err - } - - out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) - - return out0, err - -} - -// NumCheckpoints is a free data retrieval call binding the contract method 0x6fcfff45. -// -// Solidity: function numCheckpoints(address account) view returns(uint32) -func (_TaikoToken *TaikoTokenSession) NumCheckpoints(account common.Address) (uint32, error) { - return _TaikoToken.Contract.NumCheckpoints(&_TaikoToken.CallOpts, account) -} - -// NumCheckpoints is a free data retrieval call binding the contract method 0x6fcfff45. -// -// Solidity: function numCheckpoints(address account) view returns(uint32) -func (_TaikoToken *TaikoTokenCallerSession) NumCheckpoints(account common.Address) (uint32, error) { - return _TaikoToken.Contract.NumCheckpoints(&_TaikoToken.CallOpts, account) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_TaikoToken *TaikoTokenCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _TaikoToken.contract.Call(opts, &out, "owner") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_TaikoToken *TaikoTokenSession) Owner() (common.Address, error) { - return _TaikoToken.Contract.Owner(&_TaikoToken.CallOpts) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_TaikoToken *TaikoTokenCallerSession) Owner() (common.Address, error) { - return _TaikoToken.Contract.Owner(&_TaikoToken.CallOpts) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_TaikoToken *TaikoTokenCaller) Paused(opts *bind.CallOpts) (bool, error) { - var out []interface{} - err := _TaikoToken.contract.Call(opts, &out, "paused") - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_TaikoToken *TaikoTokenSession) Paused() (bool, error) { - return _TaikoToken.Contract.Paused(&_TaikoToken.CallOpts) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_TaikoToken *TaikoTokenCallerSession) Paused() (bool, error) { - return _TaikoToken.Contract.Paused(&_TaikoToken.CallOpts) -} - -// Resolve is a free data retrieval call binding the contract method 0x6c6563f6. -// -// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address) -func (_TaikoToken *TaikoTokenCaller) Resolve(opts *bind.CallOpts, chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) { - var out []interface{} - err := _TaikoToken.contract.Call(opts, &out, "resolve", chainId, name, allowZeroAddress) - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Resolve is a free data retrieval call binding the contract method 0x6c6563f6. -// -// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address) -func (_TaikoToken *TaikoTokenSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) { - return _TaikoToken.Contract.Resolve(&_TaikoToken.CallOpts, chainId, name, allowZeroAddress) -} - -// Resolve is a free data retrieval call binding the contract method 0x6c6563f6. -// -// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address) -func (_TaikoToken *TaikoTokenCallerSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) { - return _TaikoToken.Contract.Resolve(&_TaikoToken.CallOpts, chainId, name, allowZeroAddress) -} - -// Resolve0 is a free data retrieval call binding the contract method 0xa86f9d9e. -// -// Solidity: function resolve(bytes32 name, bool allowZeroAddress) view returns(address) -func (_TaikoToken *TaikoTokenCaller) Resolve0(opts *bind.CallOpts, name [32]byte, allowZeroAddress bool) (common.Address, error) { - var out []interface{} - err := _TaikoToken.contract.Call(opts, &out, "resolve0", name, allowZeroAddress) - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Resolve0 is a free data retrieval call binding the contract method 0xa86f9d9e. -// -// Solidity: function resolve(bytes32 name, bool allowZeroAddress) view returns(address) -func (_TaikoToken *TaikoTokenSession) Resolve0(name [32]byte, allowZeroAddress bool) (common.Address, error) { - return _TaikoToken.Contract.Resolve0(&_TaikoToken.CallOpts, name, allowZeroAddress) -} - -// Resolve0 is a free data retrieval call binding the contract method 0xa86f9d9e. -// -// Solidity: function resolve(bytes32 name, bool allowZeroAddress) view returns(address) -func (_TaikoToken *TaikoTokenCallerSession) Resolve0(name [32]byte, allowZeroAddress bool) (common.Address, error) { - return _TaikoToken.Contract.Resolve0(&_TaikoToken.CallOpts, name, allowZeroAddress) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_TaikoToken *TaikoTokenCaller) Symbol(opts *bind.CallOpts) (string, error) { - var out []interface{} - err := _TaikoToken.contract.Call(opts, &out, "symbol") - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_TaikoToken *TaikoTokenSession) Symbol() (string, error) { - return _TaikoToken.Contract.Symbol(&_TaikoToken.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_TaikoToken *TaikoTokenCallerSession) Symbol() (string, error) { - return _TaikoToken.Contract.Symbol(&_TaikoToken.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_TaikoToken *TaikoTokenCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _TaikoToken.contract.Call(opts, &out, "totalSupply") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_TaikoToken *TaikoTokenSession) TotalSupply() (*big.Int, error) { - return _TaikoToken.Contract.TotalSupply(&_TaikoToken.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_TaikoToken *TaikoTokenCallerSession) TotalSupply() (*big.Int, error) { - return _TaikoToken.Contract.TotalSupply(&_TaikoToken.CallOpts) -} - -// TotalSupplyAt is a free data retrieval call binding the contract method 0x981b24d0. -// -// Solidity: function totalSupplyAt(uint256 snapshotId) view returns(uint256) -func (_TaikoToken *TaikoTokenCaller) TotalSupplyAt(opts *bind.CallOpts, snapshotId *big.Int) (*big.Int, error) { - var out []interface{} - err := _TaikoToken.contract.Call(opts, &out, "totalSupplyAt", snapshotId) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// TotalSupplyAt is a free data retrieval call binding the contract method 0x981b24d0. -// -// Solidity: function totalSupplyAt(uint256 snapshotId) view returns(uint256) -func (_TaikoToken *TaikoTokenSession) TotalSupplyAt(snapshotId *big.Int) (*big.Int, error) { - return _TaikoToken.Contract.TotalSupplyAt(&_TaikoToken.CallOpts, snapshotId) -} - -// TotalSupplyAt is a free data retrieval call binding the contract method 0x981b24d0. -// -// Solidity: function totalSupplyAt(uint256 snapshotId) view returns(uint256) -func (_TaikoToken *TaikoTokenCallerSession) TotalSupplyAt(snapshotId *big.Int) (*big.Int, error) { - return _TaikoToken.Contract.TotalSupplyAt(&_TaikoToken.CallOpts, snapshotId) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_TaikoToken *TaikoTokenTransactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _TaikoToken.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_TaikoToken *TaikoTokenSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _TaikoToken.Contract.Approve(&_TaikoToken.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_TaikoToken *TaikoTokenTransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _TaikoToken.Contract.Approve(&_TaikoToken.TransactOpts, spender, amount) -} - -// Burn is a paid mutator transaction binding the contract method 0x42966c68. -// -// Solidity: function burn(uint256 amount) returns() -func (_TaikoToken *TaikoTokenTransactor) Burn(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { - return _TaikoToken.contract.Transact(opts, "burn", amount) -} - -// Burn is a paid mutator transaction binding the contract method 0x42966c68. -// -// Solidity: function burn(uint256 amount) returns() -func (_TaikoToken *TaikoTokenSession) Burn(amount *big.Int) (*types.Transaction, error) { - return _TaikoToken.Contract.Burn(&_TaikoToken.TransactOpts, amount) -} - -// Burn is a paid mutator transaction binding the contract method 0x42966c68. -// -// Solidity: function burn(uint256 amount) returns() -func (_TaikoToken *TaikoTokenTransactorSession) Burn(amount *big.Int) (*types.Transaction, error) { - return _TaikoToken.Contract.Burn(&_TaikoToken.TransactOpts, amount) -} - -// Burn0 is a paid mutator transaction binding the contract method 0x9dc29fac. -// -// Solidity: function burn(address from, uint256 amount) returns() -func (_TaikoToken *TaikoTokenTransactor) Burn0(opts *bind.TransactOpts, from common.Address, amount *big.Int) (*types.Transaction, error) { - return _TaikoToken.contract.Transact(opts, "burn0", from, amount) -} - -// Burn0 is a paid mutator transaction binding the contract method 0x9dc29fac. -// -// Solidity: function burn(address from, uint256 amount) returns() -func (_TaikoToken *TaikoTokenSession) Burn0(from common.Address, amount *big.Int) (*types.Transaction, error) { - return _TaikoToken.Contract.Burn0(&_TaikoToken.TransactOpts, from, amount) -} - -// Burn0 is a paid mutator transaction binding the contract method 0x9dc29fac. -// -// Solidity: function burn(address from, uint256 amount) returns() -func (_TaikoToken *TaikoTokenTransactorSession) Burn0(from common.Address, amount *big.Int) (*types.Transaction, error) { - return _TaikoToken.Contract.Burn0(&_TaikoToken.TransactOpts, from, amount) -} - -// BurnFrom is a paid mutator transaction binding the contract method 0x79cc6790. -// -// Solidity: function burnFrom(address account, uint256 amount) returns() -func (_TaikoToken *TaikoTokenTransactor) BurnFrom(opts *bind.TransactOpts, account common.Address, amount *big.Int) (*types.Transaction, error) { - return _TaikoToken.contract.Transact(opts, "burnFrom", account, amount) -} - -// BurnFrom is a paid mutator transaction binding the contract method 0x79cc6790. -// -// Solidity: function burnFrom(address account, uint256 amount) returns() -func (_TaikoToken *TaikoTokenSession) BurnFrom(account common.Address, amount *big.Int) (*types.Transaction, error) { - return _TaikoToken.Contract.BurnFrom(&_TaikoToken.TransactOpts, account, amount) -} - -// BurnFrom is a paid mutator transaction binding the contract method 0x79cc6790. -// -// Solidity: function burnFrom(address account, uint256 amount) returns() -func (_TaikoToken *TaikoTokenTransactorSession) BurnFrom(account common.Address, amount *big.Int) (*types.Transaction, error) { - return _TaikoToken.Contract.BurnFrom(&_TaikoToken.TransactOpts, account, amount) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_TaikoToken *TaikoTokenTransactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _TaikoToken.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_TaikoToken *TaikoTokenSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _TaikoToken.Contract.DecreaseAllowance(&_TaikoToken.TransactOpts, spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_TaikoToken *TaikoTokenTransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _TaikoToken.Contract.DecreaseAllowance(&_TaikoToken.TransactOpts, spender, subtractedValue) -} - -// Delegate is a paid mutator transaction binding the contract method 0x5c19a95c. -// -// Solidity: function delegate(address delegatee) returns() -func (_TaikoToken *TaikoTokenTransactor) Delegate(opts *bind.TransactOpts, delegatee common.Address) (*types.Transaction, error) { - return _TaikoToken.contract.Transact(opts, "delegate", delegatee) -} - -// Delegate is a paid mutator transaction binding the contract method 0x5c19a95c. -// -// Solidity: function delegate(address delegatee) returns() -func (_TaikoToken *TaikoTokenSession) Delegate(delegatee common.Address) (*types.Transaction, error) { - return _TaikoToken.Contract.Delegate(&_TaikoToken.TransactOpts, delegatee) -} - -// Delegate is a paid mutator transaction binding the contract method 0x5c19a95c. -// -// Solidity: function delegate(address delegatee) returns() -func (_TaikoToken *TaikoTokenTransactorSession) Delegate(delegatee common.Address) (*types.Transaction, error) { - return _TaikoToken.Contract.Delegate(&_TaikoToken.TransactOpts, delegatee) -} - -// DelegateBySig is a paid mutator transaction binding the contract method 0xc3cda520. -// -// Solidity: function delegateBySig(address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) returns() -func (_TaikoToken *TaikoTokenTransactor) DelegateBySig(opts *bind.TransactOpts, delegatee common.Address, nonce *big.Int, expiry *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { - return _TaikoToken.contract.Transact(opts, "delegateBySig", delegatee, nonce, expiry, v, r, s) -} - -// DelegateBySig is a paid mutator transaction binding the contract method 0xc3cda520. -// -// Solidity: function delegateBySig(address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) returns() -func (_TaikoToken *TaikoTokenSession) DelegateBySig(delegatee common.Address, nonce *big.Int, expiry *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { - return _TaikoToken.Contract.DelegateBySig(&_TaikoToken.TransactOpts, delegatee, nonce, expiry, v, r, s) -} - -// DelegateBySig is a paid mutator transaction binding the contract method 0xc3cda520. -// -// Solidity: function delegateBySig(address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) returns() -func (_TaikoToken *TaikoTokenTransactorSession) DelegateBySig(delegatee common.Address, nonce *big.Int, expiry *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { - return _TaikoToken.Contract.DelegateBySig(&_TaikoToken.TransactOpts, delegatee, nonce, expiry, v, r, s) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_TaikoToken *TaikoTokenTransactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _TaikoToken.contract.Transact(opts, "increaseAllowance", spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_TaikoToken *TaikoTokenSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _TaikoToken.Contract.IncreaseAllowance(&_TaikoToken.TransactOpts, spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_TaikoToken *TaikoTokenTransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _TaikoToken.Contract.IncreaseAllowance(&_TaikoToken.TransactOpts, spender, addedValue) -} - -// Init is a paid mutator transaction binding the contract method 0xc3a57123. -// -// Solidity: function init(address _addressManager, string _name, string _symbol, address[] _premintRecipients, uint256[] _premintAmounts) returns() -func (_TaikoToken *TaikoTokenTransactor) Init(opts *bind.TransactOpts, _addressManager common.Address, _name string, _symbol string, _premintRecipients []common.Address, _premintAmounts []*big.Int) (*types.Transaction, error) { - return _TaikoToken.contract.Transact(opts, "init", _addressManager, _name, _symbol, _premintRecipients, _premintAmounts) -} - -// Init is a paid mutator transaction binding the contract method 0xc3a57123. -// -// Solidity: function init(address _addressManager, string _name, string _symbol, address[] _premintRecipients, uint256[] _premintAmounts) returns() -func (_TaikoToken *TaikoTokenSession) Init(_addressManager common.Address, _name string, _symbol string, _premintRecipients []common.Address, _premintAmounts []*big.Int) (*types.Transaction, error) { - return _TaikoToken.Contract.Init(&_TaikoToken.TransactOpts, _addressManager, _name, _symbol, _premintRecipients, _premintAmounts) -} - -// Init is a paid mutator transaction binding the contract method 0xc3a57123. -// -// Solidity: function init(address _addressManager, string _name, string _symbol, address[] _premintRecipients, uint256[] _premintAmounts) returns() -func (_TaikoToken *TaikoTokenTransactorSession) Init(_addressManager common.Address, _name string, _symbol string, _premintRecipients []common.Address, _premintAmounts []*big.Int) (*types.Transaction, error) { - return _TaikoToken.Contract.Init(&_TaikoToken.TransactOpts, _addressManager, _name, _symbol, _premintRecipients, _premintAmounts) -} - -// Mint is a paid mutator transaction binding the contract method 0x40c10f19. -// -// Solidity: function mint(address to, uint256 amount) returns() -func (_TaikoToken *TaikoTokenTransactor) Mint(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { - return _TaikoToken.contract.Transact(opts, "mint", to, amount) -} - -// Mint is a paid mutator transaction binding the contract method 0x40c10f19. -// -// Solidity: function mint(address to, uint256 amount) returns() -func (_TaikoToken *TaikoTokenSession) Mint(to common.Address, amount *big.Int) (*types.Transaction, error) { - return _TaikoToken.Contract.Mint(&_TaikoToken.TransactOpts, to, amount) -} - -// Mint is a paid mutator transaction binding the contract method 0x40c10f19. -// -// Solidity: function mint(address to, uint256 amount) returns() -func (_TaikoToken *TaikoTokenTransactorSession) Mint(to common.Address, amount *big.Int) (*types.Transaction, error) { - return _TaikoToken.Contract.Mint(&_TaikoToken.TransactOpts, to, amount) -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns() -func (_TaikoToken *TaikoTokenTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _TaikoToken.contract.Transact(opts, "pause") -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns() -func (_TaikoToken *TaikoTokenSession) Pause() (*types.Transaction, error) { - return _TaikoToken.Contract.Pause(&_TaikoToken.TransactOpts) -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns() -func (_TaikoToken *TaikoTokenTransactorSession) Pause() (*types.Transaction, error) { - return _TaikoToken.Contract.Pause(&_TaikoToken.TransactOpts) -} - -// Permit is a paid mutator transaction binding the contract method 0xd505accf. -// -// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() -func (_TaikoToken *TaikoTokenTransactor) Permit(opts *bind.TransactOpts, owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { - return _TaikoToken.contract.Transact(opts, "permit", owner, spender, value, deadline, v, r, s) -} - -// Permit is a paid mutator transaction binding the contract method 0xd505accf. -// -// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() -func (_TaikoToken *TaikoTokenSession) Permit(owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { - return _TaikoToken.Contract.Permit(&_TaikoToken.TransactOpts, owner, spender, value, deadline, v, r, s) -} - -// Permit is a paid mutator transaction binding the contract method 0xd505accf. -// -// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() -func (_TaikoToken *TaikoTokenTransactorSession) Permit(owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { - return _TaikoToken.Contract.Permit(&_TaikoToken.TransactOpts, owner, spender, value, deadline, v, r, s) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_TaikoToken *TaikoTokenTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _TaikoToken.contract.Transact(opts, "renounceOwnership") -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_TaikoToken *TaikoTokenSession) RenounceOwnership() (*types.Transaction, error) { - return _TaikoToken.Contract.RenounceOwnership(&_TaikoToken.TransactOpts) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_TaikoToken *TaikoTokenTransactorSession) RenounceOwnership() (*types.Transaction, error) { - return _TaikoToken.Contract.RenounceOwnership(&_TaikoToken.TransactOpts) -} - -// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a. -// -// Solidity: function setAddressManager(address newAddressManager) returns() -func (_TaikoToken *TaikoTokenTransactor) SetAddressManager(opts *bind.TransactOpts, newAddressManager common.Address) (*types.Transaction, error) { - return _TaikoToken.contract.Transact(opts, "setAddressManager", newAddressManager) -} - -// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a. -// -// Solidity: function setAddressManager(address newAddressManager) returns() -func (_TaikoToken *TaikoTokenSession) SetAddressManager(newAddressManager common.Address) (*types.Transaction, error) { - return _TaikoToken.Contract.SetAddressManager(&_TaikoToken.TransactOpts, newAddressManager) -} - -// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a. -// -// Solidity: function setAddressManager(address newAddressManager) returns() -func (_TaikoToken *TaikoTokenTransactorSession) SetAddressManager(newAddressManager common.Address) (*types.Transaction, error) { - return _TaikoToken.Contract.SetAddressManager(&_TaikoToken.TransactOpts, newAddressManager) -} - -// Snapshot is a paid mutator transaction binding the contract method 0x9711715a. -// -// Solidity: function snapshot() returns() -func (_TaikoToken *TaikoTokenTransactor) Snapshot(opts *bind.TransactOpts) (*types.Transaction, error) { - return _TaikoToken.contract.Transact(opts, "snapshot") -} - -// Snapshot is a paid mutator transaction binding the contract method 0x9711715a. -// -// Solidity: function snapshot() returns() -func (_TaikoToken *TaikoTokenSession) Snapshot() (*types.Transaction, error) { - return _TaikoToken.Contract.Snapshot(&_TaikoToken.TransactOpts) -} - -// Snapshot is a paid mutator transaction binding the contract method 0x9711715a. -// -// Solidity: function snapshot() returns() -func (_TaikoToken *TaikoTokenTransactorSession) Snapshot() (*types.Transaction, error) { - return _TaikoToken.Contract.Snapshot(&_TaikoToken.TransactOpts) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address to, uint256 amount) returns(bool) -func (_TaikoToken *TaikoTokenTransactor) Transfer(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { - return _TaikoToken.contract.Transact(opts, "transfer", to, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address to, uint256 amount) returns(bool) -func (_TaikoToken *TaikoTokenSession) Transfer(to common.Address, amount *big.Int) (*types.Transaction, error) { - return _TaikoToken.Contract.Transfer(&_TaikoToken.TransactOpts, to, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address to, uint256 amount) returns(bool) -func (_TaikoToken *TaikoTokenTransactorSession) Transfer(to common.Address, amount *big.Int) (*types.Transaction, error) { - return _TaikoToken.Contract.Transfer(&_TaikoToken.TransactOpts, to, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool) -func (_TaikoToken *TaikoTokenTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { - return _TaikoToken.contract.Transact(opts, "transferFrom", from, to, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool) -func (_TaikoToken *TaikoTokenSession) TransferFrom(from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { - return _TaikoToken.Contract.TransferFrom(&_TaikoToken.TransactOpts, from, to, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool) -func (_TaikoToken *TaikoTokenTransactorSession) TransferFrom(from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { - return _TaikoToken.Contract.TransferFrom(&_TaikoToken.TransactOpts, from, to, amount) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_TaikoToken *TaikoTokenTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { - return _TaikoToken.contract.Transact(opts, "transferOwnership", newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_TaikoToken *TaikoTokenSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _TaikoToken.Contract.TransferOwnership(&_TaikoToken.TransactOpts, newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_TaikoToken *TaikoTokenTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _TaikoToken.Contract.TransferOwnership(&_TaikoToken.TransactOpts, newOwner) -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns() -func (_TaikoToken *TaikoTokenTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _TaikoToken.contract.Transact(opts, "unpause") -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns() -func (_TaikoToken *TaikoTokenSession) Unpause() (*types.Transaction, error) { - return _TaikoToken.Contract.Unpause(&_TaikoToken.TransactOpts) -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns() -func (_TaikoToken *TaikoTokenTransactorSession) Unpause() (*types.Transaction, error) { - return _TaikoToken.Contract.Unpause(&_TaikoToken.TransactOpts) -} - -// TaikoTokenAddressManagerChangedIterator is returned from FilterAddressManagerChanged and is used to iterate over the raw logs and unpacked data for AddressManagerChanged events raised by the TaikoToken contract. -type TaikoTokenAddressManagerChangedIterator struct { - Event *TaikoTokenAddressManagerChanged // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *TaikoTokenAddressManagerChangedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(TaikoTokenAddressManagerChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(TaikoTokenAddressManagerChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoTokenAddressManagerChangedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *TaikoTokenAddressManagerChangedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// TaikoTokenAddressManagerChanged represents a AddressManagerChanged event raised by the TaikoToken contract. -type TaikoTokenAddressManagerChanged struct { - AddressManager common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterAddressManagerChanged is a free log retrieval operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b. -// -// Solidity: event AddressManagerChanged(address addressManager) -func (_TaikoToken *TaikoTokenFilterer) FilterAddressManagerChanged(opts *bind.FilterOpts) (*TaikoTokenAddressManagerChangedIterator, error) { - - logs, sub, err := _TaikoToken.contract.FilterLogs(opts, "AddressManagerChanged") - if err != nil { - return nil, err - } - return &TaikoTokenAddressManagerChangedIterator{contract: _TaikoToken.contract, event: "AddressManagerChanged", logs: logs, sub: sub}, nil -} - -// WatchAddressManagerChanged is a free log subscription operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b. -// -// Solidity: event AddressManagerChanged(address addressManager) -func (_TaikoToken *TaikoTokenFilterer) WatchAddressManagerChanged(opts *bind.WatchOpts, sink chan<- *TaikoTokenAddressManagerChanged) (event.Subscription, error) { - - logs, sub, err := _TaikoToken.contract.WatchLogs(opts, "AddressManagerChanged") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(TaikoTokenAddressManagerChanged) - if err := _TaikoToken.contract.UnpackLog(event, "AddressManagerChanged", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseAddressManagerChanged is a log parse operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b. -// -// Solidity: event AddressManagerChanged(address addressManager) -func (_TaikoToken *TaikoTokenFilterer) ParseAddressManagerChanged(log types.Log) (*TaikoTokenAddressManagerChanged, error) { - event := new(TaikoTokenAddressManagerChanged) - if err := _TaikoToken.contract.UnpackLog(event, "AddressManagerChanged", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// TaikoTokenApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the TaikoToken contract. -type TaikoTokenApprovalIterator struct { - Event *TaikoTokenApproval // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *TaikoTokenApprovalIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(TaikoTokenApproval) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(TaikoTokenApproval) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoTokenApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *TaikoTokenApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// TaikoTokenApproval represents a Approval event raised by the TaikoToken contract. -type TaikoTokenApproval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_TaikoToken *TaikoTokenFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*TaikoTokenApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _TaikoToken.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &TaikoTokenApprovalIterator{contract: _TaikoToken.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_TaikoToken *TaikoTokenFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *TaikoTokenApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _TaikoToken.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(TaikoTokenApproval) - if err := _TaikoToken.contract.UnpackLog(event, "Approval", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_TaikoToken *TaikoTokenFilterer) ParseApproval(log types.Log) (*TaikoTokenApproval, error) { - event := new(TaikoTokenApproval) - if err := _TaikoToken.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// TaikoTokenBurnIterator is returned from FilterBurn and is used to iterate over the raw logs and unpacked data for Burn events raised by the TaikoToken contract. -type TaikoTokenBurnIterator struct { - Event *TaikoTokenBurn // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *TaikoTokenBurnIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(TaikoTokenBurn) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(TaikoTokenBurn) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoTokenBurnIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *TaikoTokenBurnIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// TaikoTokenBurn represents a Burn event raised by the TaikoToken contract. -type TaikoTokenBurn struct { - Account common.Address - Amount *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterBurn is a free log retrieval operation binding the contract event 0xcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5. -// -// Solidity: event Burn(address account, uint256 amount) -func (_TaikoToken *TaikoTokenFilterer) FilterBurn(opts *bind.FilterOpts) (*TaikoTokenBurnIterator, error) { - - logs, sub, err := _TaikoToken.contract.FilterLogs(opts, "Burn") - if err != nil { - return nil, err - } - return &TaikoTokenBurnIterator{contract: _TaikoToken.contract, event: "Burn", logs: logs, sub: sub}, nil -} - -// WatchBurn is a free log subscription operation binding the contract event 0xcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5. -// -// Solidity: event Burn(address account, uint256 amount) -func (_TaikoToken *TaikoTokenFilterer) WatchBurn(opts *bind.WatchOpts, sink chan<- *TaikoTokenBurn) (event.Subscription, error) { - - logs, sub, err := _TaikoToken.contract.WatchLogs(opts, "Burn") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(TaikoTokenBurn) - if err := _TaikoToken.contract.UnpackLog(event, "Burn", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseBurn is a log parse operation binding the contract event 0xcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5. -// -// Solidity: event Burn(address account, uint256 amount) -func (_TaikoToken *TaikoTokenFilterer) ParseBurn(log types.Log) (*TaikoTokenBurn, error) { - event := new(TaikoTokenBurn) - if err := _TaikoToken.contract.UnpackLog(event, "Burn", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// TaikoTokenDelegateChangedIterator is returned from FilterDelegateChanged and is used to iterate over the raw logs and unpacked data for DelegateChanged events raised by the TaikoToken contract. -type TaikoTokenDelegateChangedIterator struct { - Event *TaikoTokenDelegateChanged // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *TaikoTokenDelegateChangedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(TaikoTokenDelegateChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(TaikoTokenDelegateChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoTokenDelegateChangedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *TaikoTokenDelegateChangedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// TaikoTokenDelegateChanged represents a DelegateChanged event raised by the TaikoToken contract. -type TaikoTokenDelegateChanged struct { - Delegator common.Address - FromDelegate common.Address - ToDelegate common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterDelegateChanged is a free log retrieval operation binding the contract event 0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f. -// -// Solidity: event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate) -func (_TaikoToken *TaikoTokenFilterer) FilterDelegateChanged(opts *bind.FilterOpts, delegator []common.Address, fromDelegate []common.Address, toDelegate []common.Address) (*TaikoTokenDelegateChangedIterator, error) { - - var delegatorRule []interface{} - for _, delegatorItem := range delegator { - delegatorRule = append(delegatorRule, delegatorItem) - } - var fromDelegateRule []interface{} - for _, fromDelegateItem := range fromDelegate { - fromDelegateRule = append(fromDelegateRule, fromDelegateItem) - } - var toDelegateRule []interface{} - for _, toDelegateItem := range toDelegate { - toDelegateRule = append(toDelegateRule, toDelegateItem) - } - - logs, sub, err := _TaikoToken.contract.FilterLogs(opts, "DelegateChanged", delegatorRule, fromDelegateRule, toDelegateRule) - if err != nil { - return nil, err - } - return &TaikoTokenDelegateChangedIterator{contract: _TaikoToken.contract, event: "DelegateChanged", logs: logs, sub: sub}, nil -} - -// WatchDelegateChanged is a free log subscription operation binding the contract event 0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f. -// -// Solidity: event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate) -func (_TaikoToken *TaikoTokenFilterer) WatchDelegateChanged(opts *bind.WatchOpts, sink chan<- *TaikoTokenDelegateChanged, delegator []common.Address, fromDelegate []common.Address, toDelegate []common.Address) (event.Subscription, error) { - - var delegatorRule []interface{} - for _, delegatorItem := range delegator { - delegatorRule = append(delegatorRule, delegatorItem) - } - var fromDelegateRule []interface{} - for _, fromDelegateItem := range fromDelegate { - fromDelegateRule = append(fromDelegateRule, fromDelegateItem) - } - var toDelegateRule []interface{} - for _, toDelegateItem := range toDelegate { - toDelegateRule = append(toDelegateRule, toDelegateItem) - } - - logs, sub, err := _TaikoToken.contract.WatchLogs(opts, "DelegateChanged", delegatorRule, fromDelegateRule, toDelegateRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(TaikoTokenDelegateChanged) - if err := _TaikoToken.contract.UnpackLog(event, "DelegateChanged", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseDelegateChanged is a log parse operation binding the contract event 0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f. -// -// Solidity: event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate) -func (_TaikoToken *TaikoTokenFilterer) ParseDelegateChanged(log types.Log) (*TaikoTokenDelegateChanged, error) { - event := new(TaikoTokenDelegateChanged) - if err := _TaikoToken.contract.UnpackLog(event, "DelegateChanged", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// TaikoTokenDelegateVotesChangedIterator is returned from FilterDelegateVotesChanged and is used to iterate over the raw logs and unpacked data for DelegateVotesChanged events raised by the TaikoToken contract. -type TaikoTokenDelegateVotesChangedIterator struct { - Event *TaikoTokenDelegateVotesChanged // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *TaikoTokenDelegateVotesChangedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(TaikoTokenDelegateVotesChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(TaikoTokenDelegateVotesChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoTokenDelegateVotesChangedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *TaikoTokenDelegateVotesChangedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// TaikoTokenDelegateVotesChanged represents a DelegateVotesChanged event raised by the TaikoToken contract. -type TaikoTokenDelegateVotesChanged struct { - Delegate common.Address - PreviousBalance *big.Int - NewBalance *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterDelegateVotesChanged is a free log retrieval operation binding the contract event 0xdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724. -// -// Solidity: event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance) -func (_TaikoToken *TaikoTokenFilterer) FilterDelegateVotesChanged(opts *bind.FilterOpts, delegate []common.Address) (*TaikoTokenDelegateVotesChangedIterator, error) { - - var delegateRule []interface{} - for _, delegateItem := range delegate { - delegateRule = append(delegateRule, delegateItem) - } - - logs, sub, err := _TaikoToken.contract.FilterLogs(opts, "DelegateVotesChanged", delegateRule) - if err != nil { - return nil, err - } - return &TaikoTokenDelegateVotesChangedIterator{contract: _TaikoToken.contract, event: "DelegateVotesChanged", logs: logs, sub: sub}, nil -} - -// WatchDelegateVotesChanged is a free log subscription operation binding the contract event 0xdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724. -// -// Solidity: event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance) -func (_TaikoToken *TaikoTokenFilterer) WatchDelegateVotesChanged(opts *bind.WatchOpts, sink chan<- *TaikoTokenDelegateVotesChanged, delegate []common.Address) (event.Subscription, error) { - - var delegateRule []interface{} - for _, delegateItem := range delegate { - delegateRule = append(delegateRule, delegateItem) - } - - logs, sub, err := _TaikoToken.contract.WatchLogs(opts, "DelegateVotesChanged", delegateRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(TaikoTokenDelegateVotesChanged) - if err := _TaikoToken.contract.UnpackLog(event, "DelegateVotesChanged", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseDelegateVotesChanged is a log parse operation binding the contract event 0xdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724. -// -// Solidity: event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance) -func (_TaikoToken *TaikoTokenFilterer) ParseDelegateVotesChanged(log types.Log) (*TaikoTokenDelegateVotesChanged, error) { - event := new(TaikoTokenDelegateVotesChanged) - if err := _TaikoToken.contract.UnpackLog(event, "DelegateVotesChanged", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// TaikoTokenInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the TaikoToken contract. -type TaikoTokenInitializedIterator struct { - Event *TaikoTokenInitialized // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *TaikoTokenInitializedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(TaikoTokenInitialized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(TaikoTokenInitialized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoTokenInitializedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *TaikoTokenInitializedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// TaikoTokenInitialized represents a Initialized event raised by the TaikoToken contract. -type TaikoTokenInitialized struct { - Version uint8 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. -// -// Solidity: event Initialized(uint8 version) -func (_TaikoToken *TaikoTokenFilterer) FilterInitialized(opts *bind.FilterOpts) (*TaikoTokenInitializedIterator, error) { - - logs, sub, err := _TaikoToken.contract.FilterLogs(opts, "Initialized") - if err != nil { - return nil, err - } - return &TaikoTokenInitializedIterator{contract: _TaikoToken.contract, event: "Initialized", logs: logs, sub: sub}, nil -} - -// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. -// -// Solidity: event Initialized(uint8 version) -func (_TaikoToken *TaikoTokenFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *TaikoTokenInitialized) (event.Subscription, error) { - - logs, sub, err := _TaikoToken.contract.WatchLogs(opts, "Initialized") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(TaikoTokenInitialized) - if err := _TaikoToken.contract.UnpackLog(event, "Initialized", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. -// -// Solidity: event Initialized(uint8 version) -func (_TaikoToken *TaikoTokenFilterer) ParseInitialized(log types.Log) (*TaikoTokenInitialized, error) { - event := new(TaikoTokenInitialized) - if err := _TaikoToken.contract.UnpackLog(event, "Initialized", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// TaikoTokenMintIterator is returned from FilterMint and is used to iterate over the raw logs and unpacked data for Mint events raised by the TaikoToken contract. -type TaikoTokenMintIterator struct { - Event *TaikoTokenMint // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *TaikoTokenMintIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(TaikoTokenMint) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(TaikoTokenMint) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoTokenMintIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *TaikoTokenMintIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// TaikoTokenMint represents a Mint event raised by the TaikoToken contract. -type TaikoTokenMint struct { - Account common.Address - Amount *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterMint is a free log retrieval operation binding the contract event 0x0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885. -// -// Solidity: event Mint(address account, uint256 amount) -func (_TaikoToken *TaikoTokenFilterer) FilterMint(opts *bind.FilterOpts) (*TaikoTokenMintIterator, error) { - - logs, sub, err := _TaikoToken.contract.FilterLogs(opts, "Mint") - if err != nil { - return nil, err - } - return &TaikoTokenMintIterator{contract: _TaikoToken.contract, event: "Mint", logs: logs, sub: sub}, nil -} - -// WatchMint is a free log subscription operation binding the contract event 0x0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885. -// -// Solidity: event Mint(address account, uint256 amount) -func (_TaikoToken *TaikoTokenFilterer) WatchMint(opts *bind.WatchOpts, sink chan<- *TaikoTokenMint) (event.Subscription, error) { - - logs, sub, err := _TaikoToken.contract.WatchLogs(opts, "Mint") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(TaikoTokenMint) - if err := _TaikoToken.contract.UnpackLog(event, "Mint", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseMint is a log parse operation binding the contract event 0x0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885. -// -// Solidity: event Mint(address account, uint256 amount) -func (_TaikoToken *TaikoTokenFilterer) ParseMint(log types.Log) (*TaikoTokenMint, error) { - event := new(TaikoTokenMint) - if err := _TaikoToken.contract.UnpackLog(event, "Mint", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// TaikoTokenOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the TaikoToken contract. -type TaikoTokenOwnershipTransferredIterator struct { - Event *TaikoTokenOwnershipTransferred // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *TaikoTokenOwnershipTransferredIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(TaikoTokenOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(TaikoTokenOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoTokenOwnershipTransferredIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *TaikoTokenOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// TaikoTokenOwnershipTransferred represents a OwnershipTransferred event raised by the TaikoToken contract. -type TaikoTokenOwnershipTransferred struct { - PreviousOwner common.Address - NewOwner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_TaikoToken *TaikoTokenFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*TaikoTokenOwnershipTransferredIterator, error) { - - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } - - logs, sub, err := _TaikoToken.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return &TaikoTokenOwnershipTransferredIterator{contract: _TaikoToken.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil -} - -// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_TaikoToken *TaikoTokenFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *TaikoTokenOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { - - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } - - logs, sub, err := _TaikoToken.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(TaikoTokenOwnershipTransferred) - if err := _TaikoToken.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_TaikoToken *TaikoTokenFilterer) ParseOwnershipTransferred(log types.Log) (*TaikoTokenOwnershipTransferred, error) { - event := new(TaikoTokenOwnershipTransferred) - if err := _TaikoToken.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// TaikoTokenPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the TaikoToken contract. -type TaikoTokenPausedIterator struct { - Event *TaikoTokenPaused // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *TaikoTokenPausedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(TaikoTokenPaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(TaikoTokenPaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoTokenPausedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *TaikoTokenPausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// TaikoTokenPaused represents a Paused event raised by the TaikoToken contract. -type TaikoTokenPaused struct { - Account common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. -// -// Solidity: event Paused(address account) -func (_TaikoToken *TaikoTokenFilterer) FilterPaused(opts *bind.FilterOpts) (*TaikoTokenPausedIterator, error) { - - logs, sub, err := _TaikoToken.contract.FilterLogs(opts, "Paused") - if err != nil { - return nil, err - } - return &TaikoTokenPausedIterator{contract: _TaikoToken.contract, event: "Paused", logs: logs, sub: sub}, nil -} - -// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. -// -// Solidity: event Paused(address account) -func (_TaikoToken *TaikoTokenFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *TaikoTokenPaused) (event.Subscription, error) { - - logs, sub, err := _TaikoToken.contract.WatchLogs(opts, "Paused") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(TaikoTokenPaused) - if err := _TaikoToken.contract.UnpackLog(event, "Paused", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. -// -// Solidity: event Paused(address account) -func (_TaikoToken *TaikoTokenFilterer) ParsePaused(log types.Log) (*TaikoTokenPaused, error) { - event := new(TaikoTokenPaused) - if err := _TaikoToken.contract.UnpackLog(event, "Paused", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// TaikoTokenSnapshotIterator is returned from FilterSnapshot and is used to iterate over the raw logs and unpacked data for Snapshot events raised by the TaikoToken contract. -type TaikoTokenSnapshotIterator struct { - Event *TaikoTokenSnapshot // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *TaikoTokenSnapshotIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(TaikoTokenSnapshot) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(TaikoTokenSnapshot) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoTokenSnapshotIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *TaikoTokenSnapshotIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// TaikoTokenSnapshot represents a Snapshot event raised by the TaikoToken contract. -type TaikoTokenSnapshot struct { - Id *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSnapshot is a free log retrieval operation binding the contract event 0x8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67. -// -// Solidity: event Snapshot(uint256 id) -func (_TaikoToken *TaikoTokenFilterer) FilterSnapshot(opts *bind.FilterOpts) (*TaikoTokenSnapshotIterator, error) { - - logs, sub, err := _TaikoToken.contract.FilterLogs(opts, "Snapshot") - if err != nil { - return nil, err - } - return &TaikoTokenSnapshotIterator{contract: _TaikoToken.contract, event: "Snapshot", logs: logs, sub: sub}, nil -} - -// WatchSnapshot is a free log subscription operation binding the contract event 0x8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67. -// -// Solidity: event Snapshot(uint256 id) -func (_TaikoToken *TaikoTokenFilterer) WatchSnapshot(opts *bind.WatchOpts, sink chan<- *TaikoTokenSnapshot) (event.Subscription, error) { - - logs, sub, err := _TaikoToken.contract.WatchLogs(opts, "Snapshot") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(TaikoTokenSnapshot) - if err := _TaikoToken.contract.UnpackLog(event, "Snapshot", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseSnapshot is a log parse operation binding the contract event 0x8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67. -// -// Solidity: event Snapshot(uint256 id) -func (_TaikoToken *TaikoTokenFilterer) ParseSnapshot(log types.Log) (*TaikoTokenSnapshot, error) { - event := new(TaikoTokenSnapshot) - if err := _TaikoToken.contract.UnpackLog(event, "Snapshot", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// TaikoTokenTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the TaikoToken contract. -type TaikoTokenTransferIterator struct { - Event *TaikoTokenTransfer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *TaikoTokenTransferIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(TaikoTokenTransfer) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(TaikoTokenTransfer) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoTokenTransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *TaikoTokenTransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// TaikoTokenTransfer represents a Transfer event raised by the TaikoToken contract. -type TaikoTokenTransfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_TaikoToken *TaikoTokenFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*TaikoTokenTransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _TaikoToken.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &TaikoTokenTransferIterator{contract: _TaikoToken.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_TaikoToken *TaikoTokenFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *TaikoTokenTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _TaikoToken.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(TaikoTokenTransfer) - if err := _TaikoToken.contract.UnpackLog(event, "Transfer", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_TaikoToken *TaikoTokenFilterer) ParseTransfer(log types.Log) (*TaikoTokenTransfer, error) { - event := new(TaikoTokenTransfer) - if err := _TaikoToken.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// TaikoTokenUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the TaikoToken contract. -type TaikoTokenUnpausedIterator struct { - Event *TaikoTokenUnpaused // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *TaikoTokenUnpausedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(TaikoTokenUnpaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(TaikoTokenUnpaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoTokenUnpausedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *TaikoTokenUnpausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// TaikoTokenUnpaused represents a Unpaused event raised by the TaikoToken contract. -type TaikoTokenUnpaused struct { - Account common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. -// -// Solidity: event Unpaused(address account) -func (_TaikoToken *TaikoTokenFilterer) FilterUnpaused(opts *bind.FilterOpts) (*TaikoTokenUnpausedIterator, error) { - - logs, sub, err := _TaikoToken.contract.FilterLogs(opts, "Unpaused") - if err != nil { - return nil, err - } - return &TaikoTokenUnpausedIterator{contract: _TaikoToken.contract, event: "Unpaused", logs: logs, sub: sub}, nil -} - -// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. -// -// Solidity: event Unpaused(address account) -func (_TaikoToken *TaikoTokenFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *TaikoTokenUnpaused) (event.Subscription, error) { - - logs, sub, err := _TaikoToken.contract.WatchLogs(opts, "Unpaused") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(TaikoTokenUnpaused) - if err := _TaikoToken.contract.UnpackLog(event, "Unpaused", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. -// -// Solidity: event Unpaused(address account) -func (_TaikoToken *TaikoTokenFilterer) ParseUnpaused(log types.Log) (*TaikoTokenUnpaused, error) { - event := new(TaikoTokenUnpaused) - if err := _TaikoToken.contract.UnpackLog(event, "Unpaused", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/scripts/gen_bindings.sh b/scripts/gen_bindings.sh index 5e389b614..94528ea34 100755 --- a/scripts/gen_bindings.sh +++ b/scripts/gen_bindings.sh @@ -38,11 +38,7 @@ cat ${TAIKO_MONO_DIR}/packages/protocol/out/TaikoL2.sol/TaikoL2.json | cat ${TAIKO_MONO_DIR}/packages/protocol/out/ProverPool.sol/ProverPool.json | jq .abi | ${ABIGEN_BIN} --abi - --type TaikoL1ProverPool --pkg bindings --out $DIR/../bindings/gen_taiko_prover_pool_l1.go - -cat ${TAIKO_MONO_DIR}/packages/protocol/out/TaikoToken.sol/TaikoToken.json | - jq .abi | - ${ABIGEN_BIN} --abi - --type TaikoToken --pkg bindings --out $DIR/../bindings/gen_taiko_token_l1.go - + git -C ${TAIKO_MONO_DIR} log --format="%H" -n 1 >./bindings/.githead echo "🍻 Go contract bindings generated!" From 9bc0706c4b963bdd3e31ed97c540d4a1840fbcfa Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Sat, 1 Jul 2023 02:11:09 -0700 Subject: [PATCH 32/37] lints --- prover/config.go | 44 ++++++++++++++++++++++--------------------- prover/prover_test.go | 2 +- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/prover/config.go b/prover/config.go index 6701f489a..f163c16a7 100644 --- a/prover/config.go +++ b/prover/config.go @@ -98,26 +98,28 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) { } return &Config{ - L1WsEndpoint: c.String(flags.L1WSEndpoint.Name), - L1HttpEndpoint: c.String(flags.L1HTTPEndpoint.Name), - L2WsEndpoint: c.String(flags.L2WSEndpoint.Name), - L2HttpEndpoint: c.String(flags.L2HTTPEndpoint.Name), - TaikoL1Address: common.HexToAddress(c.String(flags.TaikoL1Address.Name)), - TaikoL2Address: common.HexToAddress(c.String(flags.TaikoL2Address.Name)), - TaikoProverPoolL1Address: common.HexToAddress(c.String(flags.TaikoProverPoolL1Address.Name)), - L1ProverPrivKey: l1ProverPrivKey, - ZKEvmRpcdEndpoint: c.String(flags.ZkEvmRpcdEndpoint.Name), - ZkEvmRpcdParamsPath: c.String(flags.ZkEvmRpcdParamsPath.Name), - StartingBlockID: startingBlockID, - MaxConcurrentProvingJobs: c.Uint(flags.MaxConcurrentProvingJobs.Name), - Dummy: c.Bool(flags.Dummy.Name), - OracleProver: c.Bool(flags.OracleProver.Name), - OracleProverPrivateKey: oracleProverPrivKey, - Graffiti: c.String(flags.Graffiti.Name), - RandomDummyProofDelayLowerBound: randomDummyProofDelayLowerBound, - RandomDummyProofDelayUpperBound: randomDummyProofDelayUpperBound, - BackOffMaxRetrys: c.Uint64(flags.BackOffMaxRetrys.Name), - BackOffRetryInterval: time.Duration(c.Uint64(flags.BackOffRetryInterval.Name)) * time.Second, - CheckProofWindowExpiredIntervalInSeconds: time.Duration(c.Uint64(flags.CheckProofWindowExpiredInterval.Name)) * time.Second, + L1WsEndpoint: c.String(flags.L1WSEndpoint.Name), + L1HttpEndpoint: c.String(flags.L1HTTPEndpoint.Name), + L2WsEndpoint: c.String(flags.L2WSEndpoint.Name), + L2HttpEndpoint: c.String(flags.L2HTTPEndpoint.Name), + TaikoL1Address: common.HexToAddress(c.String(flags.TaikoL1Address.Name)), + TaikoL2Address: common.HexToAddress(c.String(flags.TaikoL2Address.Name)), + TaikoProverPoolL1Address: common.HexToAddress(c.String(flags.TaikoProverPoolL1Address.Name)), + L1ProverPrivKey: l1ProverPrivKey, + ZKEvmRpcdEndpoint: c.String(flags.ZkEvmRpcdEndpoint.Name), + ZkEvmRpcdParamsPath: c.String(flags.ZkEvmRpcdParamsPath.Name), + StartingBlockID: startingBlockID, + MaxConcurrentProvingJobs: c.Uint(flags.MaxConcurrentProvingJobs.Name), + Dummy: c.Bool(flags.Dummy.Name), + OracleProver: c.Bool(flags.OracleProver.Name), + OracleProverPrivateKey: oracleProverPrivKey, + Graffiti: c.String(flags.Graffiti.Name), + RandomDummyProofDelayLowerBound: randomDummyProofDelayLowerBound, + RandomDummyProofDelayUpperBound: randomDummyProofDelayUpperBound, + BackOffMaxRetrys: c.Uint64(flags.BackOffMaxRetrys.Name), + BackOffRetryInterval: time.Duration(c.Uint64(flags.BackOffRetryInterval.Name)) * time.Second, + CheckProofWindowExpiredIntervalInSeconds: time.Duration( + c.Uint64(flags.CheckProofWindowExpiredInterval.Name), + ) * time.Second, }, nil } diff --git a/prover/prover_test.go b/prover/prover_test.go index 1bbcf9b6f..c2e396ea0 100644 --- a/prover/prover_test.go +++ b/prover/prover_test.go @@ -47,7 +47,7 @@ func (s *ProverTestSuite) SetupTest() { OracleProverPrivateKey: l1ProverPrivKey, Dummy: true, MaxConcurrentProvingJobs: 1, - CheckProofWindowExpiredIntervalInSeconds: time.Duration(5 * time.Second), + CheckProofWindowExpiredIntervalInSeconds: 5 * time.Second, }))) s.p = p s.cancel = cancel From ed8db96122d2babab33226e098956aa5c57dccdc Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Sat, 1 Jul 2023 02:15:58 -0700 Subject: [PATCH 33/37] rm taikoTokenl1 from config in proposer now --- proposer/config.go | 1 - proposer/proposer_test.go | 1 - prover/prover_test.go | 1 - 3 files changed, 3 deletions(-) diff --git a/proposer/config.go b/proposer/config.go index fa991b4a1..91502d2a3 100644 --- a/proposer/config.go +++ b/proposer/config.go @@ -18,7 +18,6 @@ type Config struct { L2Endpoint string TaikoL1Address common.Address TaikoL2Address common.Address - TaikoTokenL1Address common.Address L1ProposerPrivKey *ecdsa.PrivateKey L2SuggestedFeeRecipient common.Address ProposeInterval *time.Duration diff --git a/proposer/proposer_test.go b/proposer/proposer_test.go index ea2b2213d..38b1574fc 100644 --- a/proposer/proposer_test.go +++ b/proposer/proposer_test.go @@ -36,7 +36,6 @@ func (s *ProposerTestSuite) SetupTest() { L2Endpoint: os.Getenv("L2_EXECUTION_ENGINE_HTTP_ENDPOINT"), TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")), TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")), - TaikoTokenL1Address: common.HexToAddress(os.Getenv("TAIKO_TOKEN_L1_ADDRESS")), L1ProposerPrivKey: l1ProposerPrivKey, L2SuggestedFeeRecipient: common.HexToAddress(os.Getenv("L2_SUGGESTED_FEE_RECIPIENT")), ProposeInterval: &proposeInterval, diff --git a/prover/prover_test.go b/prover/prover_test.go index c2e396ea0..ef28ff3df 100644 --- a/prover/prover_test.go +++ b/prover/prover_test.go @@ -80,7 +80,6 @@ func (s *ProverTestSuite) SetupTest() { L2Endpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"), TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")), TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")), - TaikoTokenL1Address: common.HexToAddress(os.Getenv("TAIKO_TOKEN_L1_ADDRESS")), L1ProposerPrivKey: l1ProposerPrivKey, L2SuggestedFeeRecipient: common.HexToAddress(os.Getenv("L2_SUGGESTED_FEE_RECIPIENT")), ProposeInterval: &proposeInterval, // No need to periodically propose transactions list in unit tests From 12d82b1ee1b92fe37ed448bb562556b08f7794a2 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Sat, 1 Jul 2023 02:17:30 -0700 Subject: [PATCH 34/37] test --- driver/chain_syncer/calldata/syncer_test.go | 1 - driver/driver_test.go | 1 - 2 files changed, 2 deletions(-) diff --git a/driver/chain_syncer/calldata/syncer_test.go b/driver/chain_syncer/calldata/syncer_test.go index 67e6d79f0..780f0082e 100644 --- a/driver/chain_syncer/calldata/syncer_test.go +++ b/driver/chain_syncer/calldata/syncer_test.go @@ -50,7 +50,6 @@ func (s *CalldataSyncerTestSuite) SetupTest() { L2Endpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"), TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")), TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")), - TaikoTokenL1Address: common.HexToAddress(os.Getenv("TAIKO_TOKEN_L1_ADDRESS")), L1ProposerPrivKey: l1ProposerPrivKey, L2SuggestedFeeRecipient: common.HexToAddress(os.Getenv("L2_SUGGESTED_FEE_RECIPIENT")), ProposeInterval: &proposeInterval, diff --git a/driver/driver_test.go b/driver/driver_test.go index 2b0eaf290..ad5c53852 100644 --- a/driver/driver_test.go +++ b/driver/driver_test.go @@ -56,7 +56,6 @@ func (s *DriverTestSuite) SetupTest() { L2Endpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"), TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")), TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")), - TaikoTokenL1Address: common.HexToAddress(os.Getenv("TAIKO_TOKEN_L1_ADDRESS")), L1ProposerPrivKey: l1ProposerPrivKey, L2SuggestedFeeRecipient: common.HexToAddress(os.Getenv("L2_SUGGESTED_FEE_RECIPIENT")), ProposeInterval: &proposeInterval, // No need to periodically propose transactions list in unit tests From 2ee922a3e370f48ac911bcf7bfb349083d385279 Mon Sep 17 00:00:00 2001 From: David Date: Sun, 2 Jul 2023 15:03:22 +0800 Subject: [PATCH 35/37] feat: update `OracleProverAddress` --- bindings/encoding/struct.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/encoding/struct.go b/bindings/encoding/struct.go index 577df6555..ac8590fe7 100644 --- a/bindings/encoding/struct.go +++ b/bindings/encoding/struct.go @@ -9,7 +9,7 @@ import ( ) var ( - OracleProverAddress = common.HexToAddress("0x0000000000000000000000000000000000000000") + OracleProverAddress = common.HexToAddress("0x0000000000000000000000000000000000000001") ) type BlockHeader struct { From c31995ed9333f89fa47d0931587a33ebfc7a7969 Mon Sep 17 00:00:00 2001 From: David Date: Sun, 2 Jul 2023 15:13:46 +0800 Subject: [PATCH 36/37] feat: update ci --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e3034f1e2..42b5be71e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,7 +45,7 @@ jobs: with: repository: taikoxyz/taiko-mono path: ${{ env.TAIKO_MONO_DIR }} - ref: premint + ref: alpha-4 - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 From 561087bb6474ee0df145bcf9a4b12dab1c0367eb Mon Sep 17 00:00:00 2001 From: David Date: Mon, 3 Jul 2023 11:27:55 +0800 Subject: [PATCH 37/37] chore: update ci --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index ba2ac1ff8..1b1491c56 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -2,7 +2,7 @@ name: "Push docker image to GCR" on: push: - branches: [main,pos_impl] + branches: [main] tags: - "v*"