From 57e127ba6a109e223a7893e1614a482137c58acf Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Mon, 26 Jun 2023 16:51:11 -0700 Subject: [PATCH] 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) }