diff --git a/.github/workflows/taiko-client--docker.yml b/.github/workflows/taiko-client--docker.yml index 221993e1d4..ab0c78a7ec 100644 --- a/.github/workflows/taiko-client--docker.yml +++ b/.github/workflows/taiko-client--docker.yml @@ -7,6 +7,11 @@ on: - "taiko-client-v*" paths: - "packages/taiko-client/**" + pull_request: + paths: + - "packages/taiko-client/**" + - "go.mod" + - "go.sum" jobs: push-docker-image: diff --git a/packages/protocol/script/DeployOnL1.s.sol b/packages/protocol/script/DeployOnL1.s.sol index 4b2e169525..8b311d2be6 100644 --- a/packages/protocol/script/DeployOnL1.s.sol +++ b/packages/protocol/script/DeployOnL1.s.sol @@ -27,6 +27,7 @@ import "../test/common/erc20/FreeMintERC20.sol"; import "../test/common/erc20/MayFailFreeMintERC20.sol"; import "../test/L1/TestTierProvider.sol"; import "../test/DeployCapability.sol"; +import "../contracts/L1/SequencerRegistry.sol"; // Actually this one is deployed already on mainnet, but we are now deploying our own (non via-ir) // version. For mainnet, it is easier to go with one of: @@ -251,6 +252,13 @@ contract DeployOnL1 is DeployCapability { copyRegister(rollupAddressManager, _sharedAddressManager, "signal_service"); // copyRegister(rollupAddressManager, _sharedAddressManager, "bridge"); + deployProxy({ + name: "sequencer_registry", + impl: address(new SequencerRegistry()), + data: abi.encodeCall(SequencerRegistry.init, (owner)), + registerTo: rollupAddressManager + }); + deployProxy({ name: "taiko", impl: address(new TaikoL1()), diff --git a/packages/taiko-client/bindings/.githead b/packages/taiko-client/bindings/.githead index b377ffaf36..c3fcdc49cf 100644 --- a/packages/taiko-client/bindings/.githead +++ b/packages/taiko-client/bindings/.githead @@ -1 +1 @@ -3c95477a284ac94c7e3ce85c9cefdadc1aaacd06 +c9b2d94656751e368a82a16f9e2170d022636a58 diff --git a/packages/taiko-client/bindings/encoding/input.go b/packages/taiko-client/bindings/encoding/input.go index 2aa5b021ef..aac64cf99b 100644 --- a/packages/taiko-client/bindings/encoding/input.go +++ b/packages/taiko-client/bindings/encoding/input.go @@ -137,6 +137,14 @@ var ( Name: "signature", Type: "bytes", }, + { + Name: "l1StateBlockNumber", + Type: "uint32", + }, + { + Name: "timestamp", + Type: "uint64", + }, } proverAssignmentComponents = []abi.ArgumentMarshaling{ { @@ -239,18 +247,19 @@ var ( // Contract ABIs. var ( - TaikoL1ABI *abi.ABI - TaikoL2ABI *abi.ABI - TaikoTokenABI *abi.ABI - GuardianProverABI *abi.ABI - LibProposingABI *abi.ABI - LibProvingABI *abi.ABI - LibUtilsABI *abi.ABI - LibVerifyingABI *abi.ABI - AssignmentHookABI *abi.ABI - SGXVerifierABI *abi.ABI - GuardianVerifierABI *abi.ABI - ProverSetABI *abi.ABI + TaikoL1ABI *abi.ABI + TaikoL2ABI *abi.ABI + TaikoTokenABI *abi.ABI + GuardianProverABI *abi.ABI + LibProposingABI *abi.ABI + LibProvingABI *abi.ABI + LibUtilsABI *abi.ABI + LibVerifyingABI *abi.ABI + AssignmentHookABI *abi.ABI + SGXVerifierABI *abi.ABI + GuardianVerifierABI *abi.ABI + ProverSetABI *abi.ABI + SequencerRegistryABI *abi.ABI customErrorMaps []map[string]abi.Error ) @@ -306,6 +315,10 @@ func init() { log.Crit("Get ProverSet ABI error", "error", err) } + if SequencerRegistryABI, err = bindings.SequencerRegistryMetaData.GetAbi(); err != nil { + log.Crit("Get SequencerRegistry ABI error", "error", err) + } + customErrorMaps = []map[string]abi.Error{ TaikoL1ABI.Errors, TaikoL2ABI.Errors, @@ -318,6 +331,7 @@ func init() { SGXVerifierABI.Errors, GuardianVerifierABI.Errors, ProverSetABI.Errors, + SequencerRegistryABI.Errors, } } diff --git a/packages/taiko-client/bindings/encoding/struct.go b/packages/taiko-client/bindings/encoding/struct.go index e230bb94e1..ee5e9b89b4 100644 --- a/packages/taiko-client/bindings/encoding/struct.go +++ b/packages/taiko-client/bindings/encoding/struct.go @@ -33,12 +33,14 @@ type HookCall struct { // BlockParams should be same with TaikoData.BlockParams. type BlockParams struct { - AssignedProver common.Address - Coinbase common.Address - ExtraData [32]byte - ParentMetaHash [32]byte - HookCalls []HookCall - Signature []byte + AssignedProver common.Address + Coinbase common.Address + ExtraData [32]byte + ParentMetaHash [32]byte + HookCalls []HookCall + Signature []byte + L1StateBlockNumber uint32 + Timestamp uint64 } // TierFee should be same with TaikoData.TierFee. diff --git a/packages/taiko-client/bindings/gen_guardian_prover.go b/packages/taiko-client/bindings/gen_guardian_prover.go index cb41c7d23e..6731aa8524 100644 --- a/packages/taiko-client/bindings/gen_guardian_prover.go +++ b/packages/taiko-client/bindings/gen_guardian_prover.go @@ -29,6 +29,41 @@ var ( _ = abi.ConvertType ) +// IVerifierContext is an auto generated low-level Go binding around an user-defined struct. +type IVerifierContext struct { + MetaHash [32]byte + BlobHash [32]byte + Prover common.Address + BlockId uint64 + IsContesting bool + BlobUsed bool + MsgSender common.Address +} + +// TaikoDataBlockMetadata is an auto generated low-level Go binding around an user-defined struct. +type TaikoDataBlockMetadata struct { + L1Hash [32]byte + Difficulty [32]byte + BlobHash [32]byte + ExtraData [32]byte + DepositsHash [32]byte + Coinbase common.Address + Id uint64 + GasLimit uint32 + Timestamp uint64 + L1Height uint64 + MinTier uint16 + BlobUsed bool + ParentMetaHash [32]byte + Sender common.Address +} + +// TaikoDataTierProof is an auto generated low-level Go binding around an user-defined struct. +type TaikoDataTierProof struct { + Tier uint16 + Data []byte +} + // GuardianProverMetaData contains all meta data concerning the GuardianProver contract. var GuardianProverMetaData = &bind.MetaData{ ABI: "[{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addressManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"approvals\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"proofHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"approvalBits\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"approve\",\"inputs\":[{\"name\":\"_meta\",\"type\":\"tuple\",\"internalType\":\"structTaikoData.BlockMetadata\",\"components\":[{\"name\":\"l1Hash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"difficulty\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blobHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"extraData\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"depositsHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"coinbase\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"gasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"l1Height\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"minTier\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"blobUsed\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"parentMetaHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"name\":\"_tran\",\"type\":\"tuple\",\"internalType\":\"structTaikoData.Transition\",\"components\":[{\"name\":\"parentHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blockHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stateRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"graffiti\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"_proof\",\"type\":\"tuple\",\"internalType\":\"structTaikoData.TierProof\",\"components\":[{\"name\":\"tier\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"approved_\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"enableProvingAutoPause\",\"inputs\":[{\"name\":\"_enable\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"enableTaikoTokenAllowance\",\"inputs\":[{\"name\":\"_enable\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"guardianIds\",\"inputs\":[{\"name\":\"guardian\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"guardians\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"impl\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"inNonReentrant\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"init\",\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_addressManager\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"lastUnpausedAt\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestProofHash\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"blockId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"hash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"minGuardians\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"numGuardians\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseTaikoProving\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"provingAutoPauseEnabled\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proxiableUUID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"resolve\",\"inputs\":[{\"name\":\"_chainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_name\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_allowZeroAddress\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"addresspayable\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"resolve\",\"inputs\":[{\"name\":\"_name\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_allowZeroAddress\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"addresspayable\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setGuardians\",\"inputs\":[{\"name\":\"_newGuardians\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_minGuardians\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"_clearData\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"upgradeTo\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"upgradeToAndCall\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"verifyProof\",\"inputs\":[{\"name\":\"_ctx\",\"type\":\"tuple\",\"internalType\":\"structIVerifier.Context\",\"components\":[{\"name\":\"metaHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blobHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"prover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"blockId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"isContesting\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"blobUsed\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"msgSender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structTaikoData.Transition\",\"components\":[{\"name\":\"parentHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blockHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stateRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"graffiti\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structTaikoData.TierProof\",\"components\":[{\"name\":\"tier\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdrawTaikoToken\",\"inputs\":[{\"name\":\"_to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"AdminChanged\",\"inputs\":[{\"name\":\"previousAdmin\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"newAdmin\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Approved\",\"inputs\":[{\"name\":\"operationId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"approvalBits\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"minGuardiansReached\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BeaconUpgraded\",\"inputs\":[{\"name\":\"beacon\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ConflictingProofs\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"guardian\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"currentProofHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"newProofHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"provingPaused\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GuardianApproval\",\"inputs\":[{\"name\":\"addr\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"blockHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"approved\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"},{\"name\":\"proofData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GuardiansUpdated\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"guardians\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProvingAutoPauseEnabled\",\"inputs\":[{\"name\":\"enabled\",\"type\":\"bool\",\"indexed\":true,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"FUNC_NOT_IMPLEMENTED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"GP_INVALID_GUARDIAN\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"GP_INVALID_GUARDIAN_SET\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"GP_INVALID_MIN_GUARDIANS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"GP_INVALID_STATUS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"GV_PERMISSION_DENIED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"GV_ZERO_ADDRESS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"INVALID_PAUSE_STATUS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"REENTRANT_CALL\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RESOLVER_DENIED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RESOLVER_INVALID_MANAGER\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RESOLVER_UNEXPECTED_CHAINID\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RESOLVER_ZERO_ADDR\",\"inputs\":[{\"name\":\"chainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"name\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"ZERO_ADDRESS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ZERO_VALUE\",\"inputs\":[]}]", diff --git a/packages/taiko-client/bindings/gen_lib_proposing.go b/packages/taiko-client/bindings/gen_lib_proposing.go index e78ca3e317..d004dca714 100644 --- a/packages/taiko-client/bindings/gen_lib_proposing.go +++ b/packages/taiko-client/bindings/gen_lib_proposing.go @@ -29,9 +29,10 @@ var ( _ = abi.ConvertType ) + // LibProposingMetaData contains all meta data concerning the LibProposing contract. var LibProposingMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"event\",\"name\":\"BlockProposed\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"assignedProver\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"livenessBond\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"},{\"name\":\"meta\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"components\":[{\"name\":\"l1Hash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"difficulty\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blobHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"extraData\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"depositsHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"coinbase\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"gasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"l1Height\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"minTier\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"blobUsed\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"parentMetaHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"name\":\"depositsProcessed\",\"type\":\"tuple[]\",\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit[]\",\"components\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"id\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"CalldataTxList\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"txList\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"L1_BLOB_NOT_AVAILABLE\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_BLOB_NOT_FOUND\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_SIG\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_LIVENESS_BOND_NOT_RECEIVED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_TOO_MANY_BLOCKS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_UNEXPECTED_PARENT\",\"inputs\":[]}]", + ABI: "[{\"type\":\"event\",\"name\":\"BlockProposed\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"assignedProver\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"livenessBond\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"},{\"name\":\"meta\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"components\":[{\"name\":\"l1Hash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"difficulty\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blobHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"extraData\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"depositsHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"coinbase\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"gasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"l1Height\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"minTier\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"blobUsed\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"parentMetaHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"name\":\"depositsProcessed\",\"type\":\"tuple[]\",\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit[]\",\"components\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"id\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"CalldataTxList\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"txList\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"L1_BLOB_NOT_AVAILABLE\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_BLOB_NOT_FOUND\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_L1_STATE_BLOCK\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_SIG\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_TIMESTAMP\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_LIVENESS_BOND_NOT_RECEIVED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_TOO_MANY_BLOCKS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_UNEXPECTED_PARENT\",\"inputs\":[]}]", } // LibProposingABI is the input ABI used to generate the binding from. diff --git a/packages/taiko-client/bindings/gen_lib_proving.go b/packages/taiko-client/bindings/gen_lib_proving.go index a95a8249d9..0c3cc33907 100644 --- a/packages/taiko-client/bindings/gen_lib_proving.go +++ b/packages/taiko-client/bindings/gen_lib_proving.go @@ -29,6 +29,7 @@ var ( _ = abi.ConvertType ) + // LibProvingMetaData contains all meta data concerning the LibProving contract. var LibProvingMetaData = &bind.MetaData{ ABI: "[{\"type\":\"event\",\"name\":\"ProvingPaused\",\"inputs\":[{\"name\":\"paused\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TransitionContested\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"tran\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structTaikoData.Transition\",\"components\":[{\"name\":\"parentHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blockHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stateRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"graffiti\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"contester\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"contestBond\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"},{\"name\":\"tier\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TransitionProved\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"tran\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structTaikoData.Transition\",\"components\":[{\"name\":\"parentHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blockHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stateRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"graffiti\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"prover\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"validityBond\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"},{\"name\":\"tier\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"L1_ALREADY_CONTESTED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_ALREADY_PROVED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_BLOCK_MISMATCH\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_CANNOT_CONTEST\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_BLOCK_ID\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_PAUSE_STATUS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_TIER\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_TRANSITION\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_NOT_ASSIGNED_PROVER\",\"inputs\":[]}]", diff --git a/packages/taiko-client/bindings/gen_sequencer_registry.go b/packages/taiko-client/bindings/gen_sequencer_registry.go new file mode 100644 index 0000000000..0bdd05b190 --- /dev/null +++ b/packages/taiko-client/bindings/gen_sequencer_registry.go @@ -0,0 +1,2018 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// SequencerRegistryMetaData contains all meta data concerning the SequencerRegistry contract. +var SequencerRegistryMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addressManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"impl\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"inNonReentrant\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"init\",\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isEligibleSigner\",\"inputs\":[{\"name\":\"_proposer\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"lastUnpausedAt\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proxiableUUID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"resolve\",\"inputs\":[{\"name\":\"_chainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_name\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_allowZeroAddress\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"addresspayable\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"resolve\",\"inputs\":[{\"name\":\"_name\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_allowZeroAddress\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"addresspayable\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"sequencers\",\"inputs\":[{\"name\":\"sequencer\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"enabled\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setSequencers\",\"inputs\":[{\"name\":\"_sequencers\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_enabled\",\"type\":\"bool[]\",\"internalType\":\"bool[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"upgradeTo\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"upgradeToAndCall\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"event\",\"name\":\"AdminChanged\",\"inputs\":[{\"name\":\"previousAdmin\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"newAdmin\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BeaconUpgraded\",\"inputs\":[{\"name\":\"beacon\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SequencerUpdated\",\"inputs\":[{\"name\":\"sequencer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"enabled\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"FUNC_NOT_IMPLEMENTED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"INVALID_PAUSE_STATUS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"REENTRANT_CALL\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RESOLVER_DENIED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RESOLVER_INVALID_MANAGER\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RESOLVER_UNEXPECTED_CHAINID\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RESOLVER_ZERO_ADDR\",\"inputs\":[{\"name\":\"chainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"name\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"ZERO_ADDRESS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ZERO_VALUE\",\"inputs\":[]}]", +} + +// SequencerRegistryABI is the input ABI used to generate the binding from. +// Deprecated: Use SequencerRegistryMetaData.ABI instead. +var SequencerRegistryABI = SequencerRegistryMetaData.ABI + +// SequencerRegistry is an auto generated Go binding around an Ethereum contract. +type SequencerRegistry struct { + SequencerRegistryCaller // Read-only binding to the contract + SequencerRegistryTransactor // Write-only binding to the contract + SequencerRegistryFilterer // Log filterer for contract events +} + +// SequencerRegistryCaller is an auto generated read-only Go binding around an Ethereum contract. +type SequencerRegistryCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SequencerRegistryTransactor is an auto generated write-only Go binding around an Ethereum contract. +type SequencerRegistryTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SequencerRegistryFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type SequencerRegistryFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SequencerRegistrySession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type SequencerRegistrySession struct { + Contract *SequencerRegistry // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SequencerRegistryCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type SequencerRegistryCallerSession struct { + Contract *SequencerRegistryCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// SequencerRegistryTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type SequencerRegistryTransactorSession struct { + Contract *SequencerRegistryTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SequencerRegistryRaw is an auto generated low-level Go binding around an Ethereum contract. +type SequencerRegistryRaw struct { + Contract *SequencerRegistry // Generic contract binding to access the raw methods on +} + +// SequencerRegistryCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type SequencerRegistryCallerRaw struct { + Contract *SequencerRegistryCaller // Generic read-only contract binding to access the raw methods on +} + +// SequencerRegistryTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type SequencerRegistryTransactorRaw struct { + Contract *SequencerRegistryTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewSequencerRegistry creates a new instance of SequencerRegistry, bound to a specific deployed contract. +func NewSequencerRegistry(address common.Address, backend bind.ContractBackend) (*SequencerRegistry, error) { + contract, err := bindSequencerRegistry(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &SequencerRegistry{SequencerRegistryCaller: SequencerRegistryCaller{contract: contract}, SequencerRegistryTransactor: SequencerRegistryTransactor{contract: contract}, SequencerRegistryFilterer: SequencerRegistryFilterer{contract: contract}}, nil +} + +// NewSequencerRegistryCaller creates a new read-only instance of SequencerRegistry, bound to a specific deployed contract. +func NewSequencerRegistryCaller(address common.Address, caller bind.ContractCaller) (*SequencerRegistryCaller, error) { + contract, err := bindSequencerRegistry(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &SequencerRegistryCaller{contract: contract}, nil +} + +// NewSequencerRegistryTransactor creates a new write-only instance of SequencerRegistry, bound to a specific deployed contract. +func NewSequencerRegistryTransactor(address common.Address, transactor bind.ContractTransactor) (*SequencerRegistryTransactor, error) { + contract, err := bindSequencerRegistry(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &SequencerRegistryTransactor{contract: contract}, nil +} + +// NewSequencerRegistryFilterer creates a new log filterer instance of SequencerRegistry, bound to a specific deployed contract. +func NewSequencerRegistryFilterer(address common.Address, filterer bind.ContractFilterer) (*SequencerRegistryFilterer, error) { + contract, err := bindSequencerRegistry(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &SequencerRegistryFilterer{contract: contract}, nil +} + +// bindSequencerRegistry binds a generic wrapper to an already deployed contract. +func bindSequencerRegistry(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := SequencerRegistryMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_SequencerRegistry *SequencerRegistryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _SequencerRegistry.Contract.SequencerRegistryCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_SequencerRegistry *SequencerRegistryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SequencerRegistry.Contract.SequencerRegistryTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SequencerRegistry *SequencerRegistryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SequencerRegistry.Contract.SequencerRegistryTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_SequencerRegistry *SequencerRegistryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _SequencerRegistry.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_SequencerRegistry *SequencerRegistryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SequencerRegistry.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SequencerRegistry *SequencerRegistryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SequencerRegistry.Contract.contract.Transact(opts, method, params...) +} + +// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f. +// +// Solidity: function addressManager() view returns(address) +func (_SequencerRegistry *SequencerRegistryCaller) AddressManager(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _SequencerRegistry.contract.Call(opts, &out, "addressManager") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f. +// +// Solidity: function addressManager() view returns(address) +func (_SequencerRegistry *SequencerRegistrySession) AddressManager() (common.Address, error) { + return _SequencerRegistry.Contract.AddressManager(&_SequencerRegistry.CallOpts) +} + +// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f. +// +// Solidity: function addressManager() view returns(address) +func (_SequencerRegistry *SequencerRegistryCallerSession) AddressManager() (common.Address, error) { + return _SequencerRegistry.Contract.AddressManager(&_SequencerRegistry.CallOpts) +} + +// Impl is a free data retrieval call binding the contract method 0x8abf6077. +// +// Solidity: function impl() view returns(address) +func (_SequencerRegistry *SequencerRegistryCaller) Impl(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _SequencerRegistry.contract.Call(opts, &out, "impl") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Impl is a free data retrieval call binding the contract method 0x8abf6077. +// +// Solidity: function impl() view returns(address) +func (_SequencerRegistry *SequencerRegistrySession) Impl() (common.Address, error) { + return _SequencerRegistry.Contract.Impl(&_SequencerRegistry.CallOpts) +} + +// Impl is a free data retrieval call binding the contract method 0x8abf6077. +// +// Solidity: function impl() view returns(address) +func (_SequencerRegistry *SequencerRegistryCallerSession) Impl() (common.Address, error) { + return _SequencerRegistry.Contract.Impl(&_SequencerRegistry.CallOpts) +} + +// InNonReentrant is a free data retrieval call binding the contract method 0x3075db56. +// +// Solidity: function inNonReentrant() view returns(bool) +func (_SequencerRegistry *SequencerRegistryCaller) InNonReentrant(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _SequencerRegistry.contract.Call(opts, &out, "inNonReentrant") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// InNonReentrant is a free data retrieval call binding the contract method 0x3075db56. +// +// Solidity: function inNonReentrant() view returns(bool) +func (_SequencerRegistry *SequencerRegistrySession) InNonReentrant() (bool, error) { + return _SequencerRegistry.Contract.InNonReentrant(&_SequencerRegistry.CallOpts) +} + +// InNonReentrant is a free data retrieval call binding the contract method 0x3075db56. +// +// Solidity: function inNonReentrant() view returns(bool) +func (_SequencerRegistry *SequencerRegistryCallerSession) InNonReentrant() (bool, error) { + return _SequencerRegistry.Contract.InNonReentrant(&_SequencerRegistry.CallOpts) +} + +// IsEligibleSigner is a free data retrieval call binding the contract method 0x1872ae94. +// +// Solidity: function isEligibleSigner(address _proposer) view returns(bool) +func (_SequencerRegistry *SequencerRegistryCaller) IsEligibleSigner(opts *bind.CallOpts, _proposer common.Address) (bool, error) { + var out []interface{} + err := _SequencerRegistry.contract.Call(opts, &out, "isEligibleSigner", _proposer) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsEligibleSigner is a free data retrieval call binding the contract method 0x1872ae94. +// +// Solidity: function isEligibleSigner(address _proposer) view returns(bool) +func (_SequencerRegistry *SequencerRegistrySession) IsEligibleSigner(_proposer common.Address) (bool, error) { + return _SequencerRegistry.Contract.IsEligibleSigner(&_SequencerRegistry.CallOpts, _proposer) +} + +// IsEligibleSigner is a free data retrieval call binding the contract method 0x1872ae94. +// +// Solidity: function isEligibleSigner(address _proposer) view returns(bool) +func (_SequencerRegistry *SequencerRegistryCallerSession) IsEligibleSigner(_proposer common.Address) (bool, error) { + return _SequencerRegistry.Contract.IsEligibleSigner(&_SequencerRegistry.CallOpts, _proposer) +} + +// LastUnpausedAt is a free data retrieval call binding the contract method 0xe07baba6. +// +// Solidity: function lastUnpausedAt() view returns(uint64) +func (_SequencerRegistry *SequencerRegistryCaller) LastUnpausedAt(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _SequencerRegistry.contract.Call(opts, &out, "lastUnpausedAt") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// LastUnpausedAt is a free data retrieval call binding the contract method 0xe07baba6. +// +// Solidity: function lastUnpausedAt() view returns(uint64) +func (_SequencerRegistry *SequencerRegistrySession) LastUnpausedAt() (uint64, error) { + return _SequencerRegistry.Contract.LastUnpausedAt(&_SequencerRegistry.CallOpts) +} + +// LastUnpausedAt is a free data retrieval call binding the contract method 0xe07baba6. +// +// Solidity: function lastUnpausedAt() view returns(uint64) +func (_SequencerRegistry *SequencerRegistryCallerSession) LastUnpausedAt() (uint64, error) { + return _SequencerRegistry.Contract.LastUnpausedAt(&_SequencerRegistry.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_SequencerRegistry *SequencerRegistryCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _SequencerRegistry.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_SequencerRegistry *SequencerRegistrySession) Owner() (common.Address, error) { + return _SequencerRegistry.Contract.Owner(&_SequencerRegistry.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_SequencerRegistry *SequencerRegistryCallerSession) Owner() (common.Address, error) { + return _SequencerRegistry.Contract.Owner(&_SequencerRegistry.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_SequencerRegistry *SequencerRegistryCaller) Paused(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _SequencerRegistry.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_SequencerRegistry *SequencerRegistrySession) Paused() (bool, error) { + return _SequencerRegistry.Contract.Paused(&_SequencerRegistry.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_SequencerRegistry *SequencerRegistryCallerSession) Paused() (bool, error) { + return _SequencerRegistry.Contract.Paused(&_SequencerRegistry.CallOpts) +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_SequencerRegistry *SequencerRegistryCaller) PendingOwner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _SequencerRegistry.contract.Call(opts, &out, "pendingOwner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_SequencerRegistry *SequencerRegistrySession) PendingOwner() (common.Address, error) { + return _SequencerRegistry.Contract.PendingOwner(&_SequencerRegistry.CallOpts) +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_SequencerRegistry *SequencerRegistryCallerSession) PendingOwner() (common.Address, error) { + return _SequencerRegistry.Contract.PendingOwner(&_SequencerRegistry.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_SequencerRegistry *SequencerRegistryCaller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _SequencerRegistry.contract.Call(opts, &out, "proxiableUUID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_SequencerRegistry *SequencerRegistrySession) ProxiableUUID() ([32]byte, error) { + return _SequencerRegistry.Contract.ProxiableUUID(&_SequencerRegistry.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_SequencerRegistry *SequencerRegistryCallerSession) ProxiableUUID() ([32]byte, error) { + return _SequencerRegistry.Contract.ProxiableUUID(&_SequencerRegistry.CallOpts) +} + +// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf. +// +// Solidity: function resolve(uint64 _chainId, bytes32 _name, bool _allowZeroAddress) view returns(address) +func (_SequencerRegistry *SequencerRegistryCaller) Resolve(opts *bind.CallOpts, _chainId uint64, _name [32]byte, _allowZeroAddress bool) (common.Address, error) { + var out []interface{} + err := _SequencerRegistry.contract.Call(opts, &out, "resolve", _chainId, _name, _allowZeroAddress) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf. +// +// Solidity: function resolve(uint64 _chainId, bytes32 _name, bool _allowZeroAddress) view returns(address) +func (_SequencerRegistry *SequencerRegistrySession) Resolve(_chainId uint64, _name [32]byte, _allowZeroAddress bool) (common.Address, error) { + return _SequencerRegistry.Contract.Resolve(&_SequencerRegistry.CallOpts, _chainId, _name, _allowZeroAddress) +} + +// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf. +// +// Solidity: function resolve(uint64 _chainId, bytes32 _name, bool _allowZeroAddress) view returns(address) +func (_SequencerRegistry *SequencerRegistryCallerSession) Resolve(_chainId uint64, _name [32]byte, _allowZeroAddress bool) (common.Address, error) { + return _SequencerRegistry.Contract.Resolve(&_SequencerRegistry.CallOpts, _chainId, _name, _allowZeroAddress) +} + +// Resolve0 is a free data retrieval call binding the contract method 0xa86f9d9e. +// +// Solidity: function resolve(bytes32 _name, bool _allowZeroAddress) view returns(address) +func (_SequencerRegistry *SequencerRegistryCaller) Resolve0(opts *bind.CallOpts, _name [32]byte, _allowZeroAddress bool) (common.Address, error) { + var out []interface{} + err := _SequencerRegistry.contract.Call(opts, &out, "resolve0", _name, _allowZeroAddress) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Resolve0 is a free data retrieval call binding the contract method 0xa86f9d9e. +// +// Solidity: function resolve(bytes32 _name, bool _allowZeroAddress) view returns(address) +func (_SequencerRegistry *SequencerRegistrySession) Resolve0(_name [32]byte, _allowZeroAddress bool) (common.Address, error) { + return _SequencerRegistry.Contract.Resolve0(&_SequencerRegistry.CallOpts, _name, _allowZeroAddress) +} + +// Resolve0 is a free data retrieval call binding the contract method 0xa86f9d9e. +// +// Solidity: function resolve(bytes32 _name, bool _allowZeroAddress) view returns(address) +func (_SequencerRegistry *SequencerRegistryCallerSession) Resolve0(_name [32]byte, _allowZeroAddress bool) (common.Address, error) { + return _SequencerRegistry.Contract.Resolve0(&_SequencerRegistry.CallOpts, _name, _allowZeroAddress) +} + +// Sequencers is a free data retrieval call binding the contract method 0x1c7a07ee. +// +// Solidity: function sequencers(address sequencer) view returns(bool enabled) +func (_SequencerRegistry *SequencerRegistryCaller) Sequencers(opts *bind.CallOpts, sequencer common.Address) (bool, error) { + var out []interface{} + err := _SequencerRegistry.contract.Call(opts, &out, "sequencers", sequencer) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Sequencers is a free data retrieval call binding the contract method 0x1c7a07ee. +// +// Solidity: function sequencers(address sequencer) view returns(bool enabled) +func (_SequencerRegistry *SequencerRegistrySession) Sequencers(sequencer common.Address) (bool, error) { + return _SequencerRegistry.Contract.Sequencers(&_SequencerRegistry.CallOpts, sequencer) +} + +// Sequencers is a free data retrieval call binding the contract method 0x1c7a07ee. +// +// Solidity: function sequencers(address sequencer) view returns(bool enabled) +func (_SequencerRegistry *SequencerRegistryCallerSession) Sequencers(sequencer common.Address) (bool, error) { + return _SequencerRegistry.Contract.Sequencers(&_SequencerRegistry.CallOpts, sequencer) +} + +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_SequencerRegistry *SequencerRegistryTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SequencerRegistry.contract.Transact(opts, "acceptOwnership") +} + +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_SequencerRegistry *SequencerRegistrySession) AcceptOwnership() (*types.Transaction, error) { + return _SequencerRegistry.Contract.AcceptOwnership(&_SequencerRegistry.TransactOpts) +} + +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_SequencerRegistry *SequencerRegistryTransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _SequencerRegistry.Contract.AcceptOwnership(&_SequencerRegistry.TransactOpts) +} + +// Init is a paid mutator transaction binding the contract method 0x19ab453c. +// +// Solidity: function init(address _owner) returns() +func (_SequencerRegistry *SequencerRegistryTransactor) Init(opts *bind.TransactOpts, _owner common.Address) (*types.Transaction, error) { + return _SequencerRegistry.contract.Transact(opts, "init", _owner) +} + +// Init is a paid mutator transaction binding the contract method 0x19ab453c. +// +// Solidity: function init(address _owner) returns() +func (_SequencerRegistry *SequencerRegistrySession) Init(_owner common.Address) (*types.Transaction, error) { + return _SequencerRegistry.Contract.Init(&_SequencerRegistry.TransactOpts, _owner) +} + +// Init is a paid mutator transaction binding the contract method 0x19ab453c. +// +// Solidity: function init(address _owner) returns() +func (_SequencerRegistry *SequencerRegistryTransactorSession) Init(_owner common.Address) (*types.Transaction, error) { + return _SequencerRegistry.Contract.Init(&_SequencerRegistry.TransactOpts, _owner) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_SequencerRegistry *SequencerRegistryTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SequencerRegistry.contract.Transact(opts, "pause") +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_SequencerRegistry *SequencerRegistrySession) Pause() (*types.Transaction, error) { + return _SequencerRegistry.Contract.Pause(&_SequencerRegistry.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_SequencerRegistry *SequencerRegistryTransactorSession) Pause() (*types.Transaction, error) { + return _SequencerRegistry.Contract.Pause(&_SequencerRegistry.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_SequencerRegistry *SequencerRegistryTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SequencerRegistry.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_SequencerRegistry *SequencerRegistrySession) RenounceOwnership() (*types.Transaction, error) { + return _SequencerRegistry.Contract.RenounceOwnership(&_SequencerRegistry.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_SequencerRegistry *SequencerRegistryTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _SequencerRegistry.Contract.RenounceOwnership(&_SequencerRegistry.TransactOpts) +} + +// SetSequencers is a paid mutator transaction binding the contract method 0xfd9531b9. +// +// Solidity: function setSequencers(address[] _sequencers, bool[] _enabled) returns() +func (_SequencerRegistry *SequencerRegistryTransactor) SetSequencers(opts *bind.TransactOpts, _sequencers []common.Address, _enabled []bool) (*types.Transaction, error) { + return _SequencerRegistry.contract.Transact(opts, "setSequencers", _sequencers, _enabled) +} + +// SetSequencers is a paid mutator transaction binding the contract method 0xfd9531b9. +// +// Solidity: function setSequencers(address[] _sequencers, bool[] _enabled) returns() +func (_SequencerRegistry *SequencerRegistrySession) SetSequencers(_sequencers []common.Address, _enabled []bool) (*types.Transaction, error) { + return _SequencerRegistry.Contract.SetSequencers(&_SequencerRegistry.TransactOpts, _sequencers, _enabled) +} + +// SetSequencers is a paid mutator transaction binding the contract method 0xfd9531b9. +// +// Solidity: function setSequencers(address[] _sequencers, bool[] _enabled) returns() +func (_SequencerRegistry *SequencerRegistryTransactorSession) SetSequencers(_sequencers []common.Address, _enabled []bool) (*types.Transaction, error) { + return _SequencerRegistry.Contract.SetSequencers(&_SequencerRegistry.TransactOpts, _sequencers, _enabled) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_SequencerRegistry *SequencerRegistryTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _SequencerRegistry.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_SequencerRegistry *SequencerRegistrySession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _SequencerRegistry.Contract.TransferOwnership(&_SequencerRegistry.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_SequencerRegistry *SequencerRegistryTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _SequencerRegistry.Contract.TransferOwnership(&_SequencerRegistry.TransactOpts, newOwner) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_SequencerRegistry *SequencerRegistryTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SequencerRegistry.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_SequencerRegistry *SequencerRegistrySession) Unpause() (*types.Transaction, error) { + return _SequencerRegistry.Contract.Unpause(&_SequencerRegistry.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_SequencerRegistry *SequencerRegistryTransactorSession) Unpause() (*types.Transaction, error) { + return _SequencerRegistry.Contract.Unpause(&_SequencerRegistry.TransactOpts) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_SequencerRegistry *SequencerRegistryTransactor) UpgradeTo(opts *bind.TransactOpts, newImplementation common.Address) (*types.Transaction, error) { + return _SequencerRegistry.contract.Transact(opts, "upgradeTo", newImplementation) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_SequencerRegistry *SequencerRegistrySession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) { + return _SequencerRegistry.Contract.UpgradeTo(&_SequencerRegistry.TransactOpts, newImplementation) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_SequencerRegistry *SequencerRegistryTransactorSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) { + return _SequencerRegistry.Contract.UpgradeTo(&_SequencerRegistry.TransactOpts, newImplementation) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_SequencerRegistry *SequencerRegistryTransactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _SequencerRegistry.contract.Transact(opts, "upgradeToAndCall", newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_SequencerRegistry *SequencerRegistrySession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _SequencerRegistry.Contract.UpgradeToAndCall(&_SequencerRegistry.TransactOpts, newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_SequencerRegistry *SequencerRegistryTransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _SequencerRegistry.Contract.UpgradeToAndCall(&_SequencerRegistry.TransactOpts, newImplementation, data) +} + +// SequencerRegistryAdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the SequencerRegistry contract. +type SequencerRegistryAdminChangedIterator struct { + Event *SequencerRegistryAdminChanged // 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 *SequencerRegistryAdminChangedIterator) 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(SequencerRegistryAdminChanged) + 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(SequencerRegistryAdminChanged) + 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 *SequencerRegistryAdminChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SequencerRegistryAdminChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SequencerRegistryAdminChanged represents a AdminChanged event raised by the SequencerRegistry contract. +type SequencerRegistryAdminChanged struct { + PreviousAdmin common.Address + NewAdmin common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAdminChanged is a free log retrieval operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_SequencerRegistry *SequencerRegistryFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*SequencerRegistryAdminChangedIterator, error) { + + logs, sub, err := _SequencerRegistry.contract.FilterLogs(opts, "AdminChanged") + if err != nil { + return nil, err + } + return &SequencerRegistryAdminChangedIterator{contract: _SequencerRegistry.contract, event: "AdminChanged", logs: logs, sub: sub}, nil +} + +// WatchAdminChanged is a free log subscription operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_SequencerRegistry *SequencerRegistryFilterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *SequencerRegistryAdminChanged) (event.Subscription, error) { + + logs, sub, err := _SequencerRegistry.contract.WatchLogs(opts, "AdminChanged") + 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(SequencerRegistryAdminChanged) + if err := _SequencerRegistry.contract.UnpackLog(event, "AdminChanged", 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 +} + +// ParseAdminChanged is a log parse operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_SequencerRegistry *SequencerRegistryFilterer) ParseAdminChanged(log types.Log) (*SequencerRegistryAdminChanged, error) { + event := new(SequencerRegistryAdminChanged) + if err := _SequencerRegistry.contract.UnpackLog(event, "AdminChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SequencerRegistryBeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the SequencerRegistry contract. +type SequencerRegistryBeaconUpgradedIterator struct { + Event *SequencerRegistryBeaconUpgraded // 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 *SequencerRegistryBeaconUpgradedIterator) 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(SequencerRegistryBeaconUpgraded) + 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(SequencerRegistryBeaconUpgraded) + 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 *SequencerRegistryBeaconUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SequencerRegistryBeaconUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SequencerRegistryBeaconUpgraded represents a BeaconUpgraded event raised by the SequencerRegistry contract. +type SequencerRegistryBeaconUpgraded struct { + Beacon common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBeaconUpgraded is a free log retrieval operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_SequencerRegistry *SequencerRegistryFilterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*SequencerRegistryBeaconUpgradedIterator, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _SequencerRegistry.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule) + if err != nil { + return nil, err + } + return &SequencerRegistryBeaconUpgradedIterator{contract: _SequencerRegistry.contract, event: "BeaconUpgraded", logs: logs, sub: sub}, nil +} + +// WatchBeaconUpgraded is a free log subscription operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_SequencerRegistry *SequencerRegistryFilterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *SequencerRegistryBeaconUpgraded, beacon []common.Address) (event.Subscription, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _SequencerRegistry.contract.WatchLogs(opts, "BeaconUpgraded", beaconRule) + 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(SequencerRegistryBeaconUpgraded) + if err := _SequencerRegistry.contract.UnpackLog(event, "BeaconUpgraded", 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 +} + +// ParseBeaconUpgraded is a log parse operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_SequencerRegistry *SequencerRegistryFilterer) ParseBeaconUpgraded(log types.Log) (*SequencerRegistryBeaconUpgraded, error) { + event := new(SequencerRegistryBeaconUpgraded) + if err := _SequencerRegistry.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SequencerRegistryInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the SequencerRegistry contract. +type SequencerRegistryInitializedIterator struct { + Event *SequencerRegistryInitialized // 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 *SequencerRegistryInitializedIterator) 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(SequencerRegistryInitialized) + 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(SequencerRegistryInitialized) + 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 *SequencerRegistryInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SequencerRegistryInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SequencerRegistryInitialized represents a Initialized event raised by the SequencerRegistry contract. +type SequencerRegistryInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_SequencerRegistry *SequencerRegistryFilterer) FilterInitialized(opts *bind.FilterOpts) (*SequencerRegistryInitializedIterator, error) { + + logs, sub, err := _SequencerRegistry.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &SequencerRegistryInitializedIterator{contract: _SequencerRegistry.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_SequencerRegistry *SequencerRegistryFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *SequencerRegistryInitialized) (event.Subscription, error) { + + logs, sub, err := _SequencerRegistry.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SequencerRegistryInitialized) + if err := _SequencerRegistry.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_SequencerRegistry *SequencerRegistryFilterer) ParseInitialized(log types.Log) (*SequencerRegistryInitialized, error) { + event := new(SequencerRegistryInitialized) + if err := _SequencerRegistry.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SequencerRegistryOwnershipTransferStartedIterator is returned from FilterOwnershipTransferStarted and is used to iterate over the raw logs and unpacked data for OwnershipTransferStarted events raised by the SequencerRegistry contract. +type SequencerRegistryOwnershipTransferStartedIterator struct { + Event *SequencerRegistryOwnershipTransferStarted // 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 *SequencerRegistryOwnershipTransferStartedIterator) 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(SequencerRegistryOwnershipTransferStarted) + 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(SequencerRegistryOwnershipTransferStarted) + 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 *SequencerRegistryOwnershipTransferStartedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SequencerRegistryOwnershipTransferStartedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SequencerRegistryOwnershipTransferStarted represents a OwnershipTransferStarted event raised by the SequencerRegistry contract. +type SequencerRegistryOwnershipTransferStarted struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferStarted is a free log retrieval operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// +// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) +func (_SequencerRegistry *SequencerRegistryFilterer) FilterOwnershipTransferStarted(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*SequencerRegistryOwnershipTransferStartedIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _SequencerRegistry.contract.FilterLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &SequencerRegistryOwnershipTransferStartedIterator{contract: _SequencerRegistry.contract, event: "OwnershipTransferStarted", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferStarted is a free log subscription operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// +// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) +func (_SequencerRegistry *SequencerRegistryFilterer) WatchOwnershipTransferStarted(opts *bind.WatchOpts, sink chan<- *SequencerRegistryOwnershipTransferStarted, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _SequencerRegistry.contract.WatchLogs(opts, "OwnershipTransferStarted", 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(SequencerRegistryOwnershipTransferStarted) + if err := _SequencerRegistry.contract.UnpackLog(event, "OwnershipTransferStarted", 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 +} + +// ParseOwnershipTransferStarted is a log parse operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// +// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) +func (_SequencerRegistry *SequencerRegistryFilterer) ParseOwnershipTransferStarted(log types.Log) (*SequencerRegistryOwnershipTransferStarted, error) { + event := new(SequencerRegistryOwnershipTransferStarted) + if err := _SequencerRegistry.contract.UnpackLog(event, "OwnershipTransferStarted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SequencerRegistryOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the SequencerRegistry contract. +type SequencerRegistryOwnershipTransferredIterator struct { + Event *SequencerRegistryOwnershipTransferred // 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 *SequencerRegistryOwnershipTransferredIterator) 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(SequencerRegistryOwnershipTransferred) + 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(SequencerRegistryOwnershipTransferred) + 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 *SequencerRegistryOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SequencerRegistryOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SequencerRegistryOwnershipTransferred represents a OwnershipTransferred event raised by the SequencerRegistry contract. +type SequencerRegistryOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_SequencerRegistry *SequencerRegistryFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*SequencerRegistryOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _SequencerRegistry.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &SequencerRegistryOwnershipTransferredIterator{contract: _SequencerRegistry.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_SequencerRegistry *SequencerRegistryFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *SequencerRegistryOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _SequencerRegistry.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SequencerRegistryOwnershipTransferred) + if err := _SequencerRegistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_SequencerRegistry *SequencerRegistryFilterer) ParseOwnershipTransferred(log types.Log) (*SequencerRegistryOwnershipTransferred, error) { + event := new(SequencerRegistryOwnershipTransferred) + if err := _SequencerRegistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SequencerRegistryPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the SequencerRegistry contract. +type SequencerRegistryPausedIterator struct { + Event *SequencerRegistryPaused // 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 *SequencerRegistryPausedIterator) 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(SequencerRegistryPaused) + 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(SequencerRegistryPaused) + 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 *SequencerRegistryPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SequencerRegistryPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SequencerRegistryPaused represents a Paused event raised by the SequencerRegistry contract. +type SequencerRegistryPaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_SequencerRegistry *SequencerRegistryFilterer) FilterPaused(opts *bind.FilterOpts) (*SequencerRegistryPausedIterator, error) { + + logs, sub, err := _SequencerRegistry.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &SequencerRegistryPausedIterator{contract: _SequencerRegistry.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_SequencerRegistry *SequencerRegistryFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *SequencerRegistryPaused) (event.Subscription, error) { + + logs, sub, err := _SequencerRegistry.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SequencerRegistryPaused) + if err := _SequencerRegistry.contract.UnpackLog(event, "Paused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_SequencerRegistry *SequencerRegistryFilterer) ParsePaused(log types.Log) (*SequencerRegistryPaused, error) { + event := new(SequencerRegistryPaused) + if err := _SequencerRegistry.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SequencerRegistrySequencerUpdatedIterator is returned from FilterSequencerUpdated and is used to iterate over the raw logs and unpacked data for SequencerUpdated events raised by the SequencerRegistry contract. +type SequencerRegistrySequencerUpdatedIterator struct { + Event *SequencerRegistrySequencerUpdated // 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 *SequencerRegistrySequencerUpdatedIterator) 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(SequencerRegistrySequencerUpdated) + 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(SequencerRegistrySequencerUpdated) + 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 *SequencerRegistrySequencerUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SequencerRegistrySequencerUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SequencerRegistrySequencerUpdated represents a SequencerUpdated event raised by the SequencerRegistry contract. +type SequencerRegistrySequencerUpdated struct { + Sequencer common.Address + Enabled bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSequencerUpdated is a free log retrieval operation binding the contract event 0x523de897ac29dfd3280af48d1f26b7222ffeb76627593665a907495621512e5e. +// +// Solidity: event SequencerUpdated(address indexed sequencer, bool enabled) +func (_SequencerRegistry *SequencerRegistryFilterer) FilterSequencerUpdated(opts *bind.FilterOpts, sequencer []common.Address) (*SequencerRegistrySequencerUpdatedIterator, error) { + + var sequencerRule []interface{} + for _, sequencerItem := range sequencer { + sequencerRule = append(sequencerRule, sequencerItem) + } + + logs, sub, err := _SequencerRegistry.contract.FilterLogs(opts, "SequencerUpdated", sequencerRule) + if err != nil { + return nil, err + } + return &SequencerRegistrySequencerUpdatedIterator{contract: _SequencerRegistry.contract, event: "SequencerUpdated", logs: logs, sub: sub}, nil +} + +// WatchSequencerUpdated is a free log subscription operation binding the contract event 0x523de897ac29dfd3280af48d1f26b7222ffeb76627593665a907495621512e5e. +// +// Solidity: event SequencerUpdated(address indexed sequencer, bool enabled) +func (_SequencerRegistry *SequencerRegistryFilterer) WatchSequencerUpdated(opts *bind.WatchOpts, sink chan<- *SequencerRegistrySequencerUpdated, sequencer []common.Address) (event.Subscription, error) { + + var sequencerRule []interface{} + for _, sequencerItem := range sequencer { + sequencerRule = append(sequencerRule, sequencerItem) + } + + logs, sub, err := _SequencerRegistry.contract.WatchLogs(opts, "SequencerUpdated", sequencerRule) + 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(SequencerRegistrySequencerUpdated) + if err := _SequencerRegistry.contract.UnpackLog(event, "SequencerUpdated", 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 +} + +// ParseSequencerUpdated is a log parse operation binding the contract event 0x523de897ac29dfd3280af48d1f26b7222ffeb76627593665a907495621512e5e. +// +// Solidity: event SequencerUpdated(address indexed sequencer, bool enabled) +func (_SequencerRegistry *SequencerRegistryFilterer) ParseSequencerUpdated(log types.Log) (*SequencerRegistrySequencerUpdated, error) { + event := new(SequencerRegistrySequencerUpdated) + if err := _SequencerRegistry.contract.UnpackLog(event, "SequencerUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SequencerRegistryUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the SequencerRegistry contract. +type SequencerRegistryUnpausedIterator struct { + Event *SequencerRegistryUnpaused // 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 *SequencerRegistryUnpausedIterator) 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(SequencerRegistryUnpaused) + 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(SequencerRegistryUnpaused) + 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 *SequencerRegistryUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SequencerRegistryUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SequencerRegistryUnpaused represents a Unpaused event raised by the SequencerRegistry contract. +type SequencerRegistryUnpaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_SequencerRegistry *SequencerRegistryFilterer) FilterUnpaused(opts *bind.FilterOpts) (*SequencerRegistryUnpausedIterator, error) { + + logs, sub, err := _SequencerRegistry.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &SequencerRegistryUnpausedIterator{contract: _SequencerRegistry.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_SequencerRegistry *SequencerRegistryFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *SequencerRegistryUnpaused) (event.Subscription, error) { + + logs, sub, err := _SequencerRegistry.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SequencerRegistryUnpaused) + if err := _SequencerRegistry.contract.UnpackLog(event, "Unpaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_SequencerRegistry *SequencerRegistryFilterer) ParseUnpaused(log types.Log) (*SequencerRegistryUnpaused, error) { + event := new(SequencerRegistryUnpaused) + if err := _SequencerRegistry.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SequencerRegistryUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the SequencerRegistry contract. +type SequencerRegistryUpgradedIterator struct { + Event *SequencerRegistryUpgraded // 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 *SequencerRegistryUpgradedIterator) 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(SequencerRegistryUpgraded) + 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(SequencerRegistryUpgraded) + 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 *SequencerRegistryUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SequencerRegistryUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SequencerRegistryUpgraded represents a Upgraded event raised by the SequencerRegistry contract. +type SequencerRegistryUpgraded struct { + Implementation common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_SequencerRegistry *SequencerRegistryFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*SequencerRegistryUpgradedIterator, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _SequencerRegistry.contract.FilterLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return &SequencerRegistryUpgradedIterator{contract: _SequencerRegistry.contract, event: "Upgraded", logs: logs, sub: sub}, nil +} + +// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_SequencerRegistry *SequencerRegistryFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *SequencerRegistryUpgraded, implementation []common.Address) (event.Subscription, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _SequencerRegistry.contract.WatchLogs(opts, "Upgraded", implementationRule) + 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(SequencerRegistryUpgraded) + if err := _SequencerRegistry.contract.UnpackLog(event, "Upgraded", 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 +} + +// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_SequencerRegistry *SequencerRegistryFilterer) ParseUpgraded(log types.Log) (*SequencerRegistryUpgraded, error) { + event := new(SequencerRegistryUpgraded) + if err := _SequencerRegistry.contract.UnpackLog(event, "Upgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/packages/taiko-client/bindings/gen_sgx_verifier.go b/packages/taiko-client/bindings/gen_sgx_verifier.go index f3ff321993..3abaa7cd10 100644 --- a/packages/taiko-client/bindings/gen_sgx_verifier.go +++ b/packages/taiko-client/bindings/gen_sgx_verifier.go @@ -29,22 +29,7 @@ var ( _ = abi.ConvertType ) -// IVerifierContext is an auto generated low-level Go binding around an user-defined struct. -type IVerifierContext struct { - MetaHash [32]byte - BlobHash [32]byte - Prover common.Address - BlockId uint64 - IsContesting bool - BlobUsed bool - MsgSender common.Address -} - -// TaikoDataTierProof is an auto generated low-level Go binding around an user-defined struct. -type TaikoDataTierProof struct { - Tier uint16 - Data []byte -} + // V3StructCertificationData is an auto generated low-level Go binding around an user-defined struct. type V3StructCertificationData struct { diff --git a/packages/taiko-client/bindings/gen_taiko_l1.go b/packages/taiko-client/bindings/gen_taiko_l1.go index ab667d0570..e7232056f8 100644 --- a/packages/taiko-client/bindings/gen_taiko_l1.go +++ b/packages/taiko-client/bindings/gen_taiko_l1.go @@ -39,24 +39,8 @@ type TaikoDataBlock struct { ProposedIn uint64 NextTransitionId uint32 VerifiedTransitionId uint32 -} - -// TaikoDataBlockMetadata is an auto generated low-level Go binding around an user-defined struct. -type TaikoDataBlockMetadata struct { - L1Hash [32]byte - Difficulty [32]byte - BlobHash [32]byte - ExtraData [32]byte - DepositsHash [32]byte - Coinbase common.Address - Id uint64 - GasLimit uint32 - Timestamp uint64 - L1Height uint64 - MinTier uint16 - BlobUsed bool - ParentMetaHash [32]byte - Sender common.Address + Timestamp uint64 + L1StateBlockNumber uint32 } // TaikoDataConfig is an auto generated low-level Go binding around an user-defined struct. @@ -121,7 +105,7 @@ type TaikoDataTransitionState struct { // TaikoL1ClientMetaData contains all meta data concerning the TaikoL1Client contract. var TaikoL1ClientMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addressManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBlock\",\"inputs\":[{\"name\":\"_blockId\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"blk_\",\"type\":\"tuple\",\"internalType\":\"structTaikoData.Block\",\"components\":[{\"name\":\"metaHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"assignedProver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"livenessBond\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"blockId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"proposedAt\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"proposedIn\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"nextTransitionId\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"verifiedTransitionId\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getConfig\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structTaikoData.Config\",\"components\":[{\"name\":\"chainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"blockMaxProposals\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"blockRingBufferSize\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"maxBlocksToVerify\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"blockMaxGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"livenessBond\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"stateRootSyncInternal\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"checkEOAForCalldataDA\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getLastSyncedBlock\",\"inputs\":[],\"outputs\":[{\"name\":\"blockId_\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"blockHash_\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stateRoot_\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getLastVerifiedBlock\",\"inputs\":[],\"outputs\":[{\"name\":\"blockId_\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"blockHash_\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stateRoot_\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStateVariables\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structTaikoData.SlotA\",\"components\":[{\"name\":\"genesisHeight\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"genesisTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"lastSyncedBlockId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"lastSynecdAt\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structTaikoData.SlotB\",\"components\":[{\"name\":\"numBlocks\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"provingPaused\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"__reservedB1\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"__reservedB2\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"__reservedB3\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"lastUnpausedAt\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTransition\",\"inputs\":[{\"name\":\"_blockId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_tid\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structTaikoData.TransitionState\",\"components\":[{\"name\":\"key\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blockHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stateRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"prover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"validityBond\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"contester\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"contestBond\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"tier\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"__reserved1\",\"type\":\"uint8\",\"internalType\":\"uint8\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTransition\",\"inputs\":[{\"name\":\"_blockId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_parentHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structTaikoData.TransitionState\",\"components\":[{\"name\":\"key\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blockHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stateRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"prover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"validityBond\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"contester\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"contestBond\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"tier\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"__reserved1\",\"type\":\"uint8\",\"internalType\":\"uint8\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"impl\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"inNonReentrant\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"init\",\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_addressManager\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_genesisBlockHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_toPause\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"init2\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"lastUnpausedAt\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseProving\",\"inputs\":[{\"name\":\"_pause\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proposeBlock\",\"inputs\":[{\"name\":\"_params\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"_txList\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"meta_\",\"type\":\"tuple\",\"internalType\":\"structTaikoData.BlockMetadata\",\"components\":[{\"name\":\"l1Hash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"difficulty\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blobHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"extraData\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"depositsHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"coinbase\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"gasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"l1Height\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"minTier\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"blobUsed\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"parentMetaHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"name\":\"deposits_\",\"type\":\"tuple[]\",\"internalType\":\"structTaikoData.EthDeposit[]\",\"components\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"id\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"proveBlock\",\"inputs\":[{\"name\":\"_blockId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_input\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"proxiableUUID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"resolve\",\"inputs\":[{\"name\":\"_chainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_name\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_allowZeroAddress\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"addresspayable\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"resolve\",\"inputs\":[{\"name\":\"_name\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_allowZeroAddress\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"addresspayable\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"state\",\"inputs\":[],\"outputs\":[{\"name\":\"__reserve1\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"slotA\",\"type\":\"tuple\",\"internalType\":\"structTaikoData.SlotA\",\"components\":[{\"name\":\"genesisHeight\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"genesisTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"lastSyncedBlockId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"lastSynecdAt\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"slotB\",\"type\":\"tuple\",\"internalType\":\"structTaikoData.SlotB\",\"components\":[{\"name\":\"numBlocks\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"provingPaused\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"__reservedB1\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"__reservedB2\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"__reservedB3\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"lastUnpausedAt\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"upgradeTo\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"upgradeToAndCall\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"verifyBlocks\",\"inputs\":[{\"name\":\"_maxBlocksToVerify\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"AdminChanged\",\"inputs\":[{\"name\":\"previousAdmin\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"newAdmin\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BeaconUpgraded\",\"inputs\":[{\"name\":\"beacon\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BlockProposed\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"assignedProver\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"livenessBond\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"},{\"name\":\"meta\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"components\":[{\"name\":\"l1Hash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"difficulty\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blobHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"extraData\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"depositsHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"coinbase\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"gasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"l1Height\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"minTier\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"blobUsed\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"parentMetaHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"name\":\"depositsProcessed\",\"type\":\"tuple[]\",\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit[]\",\"components\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"id\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BlockProposed\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"assignedProver\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"livenessBond\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"},{\"name\":\"meta\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"components\":[{\"name\":\"l1Hash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"difficulty\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blobHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"extraData\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"depositsHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"coinbase\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"gasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"l1Height\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"minTier\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"blobUsed\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"parentMetaHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"name\":\"depositsProcessed\",\"type\":\"tuple[]\",\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit[]\",\"components\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"id\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BlockVerified\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"prover\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"blockHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"stateRoot\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"tier\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BlockVerified\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"prover\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"blockHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"stateRoot\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"tier\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"CalldataTxList\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"txList\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"CalldataTxList\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"txList\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProvingPaused\",\"inputs\":[{\"name\":\"paused\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProvingPaused\",\"inputs\":[{\"name\":\"paused\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StateVariablesUpdated\",\"inputs\":[{\"name\":\"slotB\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structTaikoData.SlotB\",\"components\":[{\"name\":\"numBlocks\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"provingPaused\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"__reservedB1\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"__reservedB2\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"__reservedB3\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"lastUnpausedAt\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TransitionContested\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"tran\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structTaikoData.Transition\",\"components\":[{\"name\":\"parentHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blockHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stateRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"graffiti\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"contester\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"contestBond\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"},{\"name\":\"tier\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TransitionContested\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"tran\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structTaikoData.Transition\",\"components\":[{\"name\":\"parentHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blockHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stateRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"graffiti\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"contester\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"contestBond\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"},{\"name\":\"tier\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TransitionProved\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"tran\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structTaikoData.Transition\",\"components\":[{\"name\":\"parentHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blockHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stateRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"graffiti\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"prover\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"validityBond\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"},{\"name\":\"tier\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TransitionProved\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"tran\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structTaikoData.Transition\",\"components\":[{\"name\":\"parentHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blockHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stateRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"graffiti\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"prover\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"validityBond\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"},{\"name\":\"tier\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ETH_TRANSFER_FAILED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FUNC_NOT_IMPLEMENTED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"INVALID_PAUSE_STATUS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_ALREADY_CONTESTED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_ALREADY_CONTESTED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_ALREADY_PROVED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_ALREADY_PROVED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_BATCH_TRANSFER_FAILED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_BATCH_TRANSFER_FAILED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_BLOB_NOT_AVAILABLE\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_BLOB_NOT_AVAILABLE\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_BLOB_NOT_FOUND\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_BLOB_NOT_FOUND\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_BLOCK_MISMATCH\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_BLOCK_MISMATCH\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_BLOCK_MISMATCH\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_CANNOT_CONTEST\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_CANNOT_CONTEST\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_BLOCK_ID\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_BLOCK_ID\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_BLOCK_ID\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_CONFIG\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_GENESIS_HASH\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_GENESIS_HASH\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_PARAM\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_PAUSE_STATUS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_PAUSE_STATUS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_SIG\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_SIG\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_TIER\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_TIER\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_TRANSITION\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_TRANSITION\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_LIVENESS_BOND_NOT_RECEIVED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_NOT_ASSIGNED_PROVER\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_NOT_ASSIGNED_PROVER\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_NO_HOOKS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_PROVING_PAUSED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_RECEIVE_DISABLED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_TOO_LATE\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_TOO_MANY_BLOCKS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_TOO_MANY_BLOCKS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_TRANSITION_ID_ZERO\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_TRANSITION_ID_ZERO\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_TRANSITION_NOT_FOUND\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_TRANSITION_NOT_FOUND\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_UNEXPECTED_PARENT\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_UNEXPECTED_PARENT\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_UNEXPECTED_TRANSITION_ID\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_UNEXPECTED_TRANSITION_ID\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"REENTRANT_CALL\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RESOLVER_DENIED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RESOLVER_INVALID_MANAGER\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RESOLVER_UNEXPECTED_CHAINID\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RESOLVER_ZERO_ADDR\",\"inputs\":[{\"name\":\"chainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"name\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"ZERO_ADDRESS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ZERO_VALUE\",\"inputs\":[]}]", + ABI: "[{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addressManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBlock\",\"inputs\":[{\"name\":\"_blockId\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"blk_\",\"type\":\"tuple\",\"internalType\":\"structTaikoData.Block\",\"components\":[{\"name\":\"metaHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"assignedProver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"livenessBond\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"blockId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"proposedAt\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"proposedIn\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"nextTransitionId\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"verifiedTransitionId\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"l1StateBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getConfig\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structTaikoData.Config\",\"components\":[{\"name\":\"chainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"blockMaxProposals\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"blockRingBufferSize\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"maxBlocksToVerify\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"blockMaxGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"livenessBond\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"stateRootSyncInternal\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"checkEOAForCalldataDA\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getLastSyncedBlock\",\"inputs\":[],\"outputs\":[{\"name\":\"blockId_\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"blockHash_\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stateRoot_\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getLastVerifiedBlock\",\"inputs\":[],\"outputs\":[{\"name\":\"blockId_\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"blockHash_\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stateRoot_\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStateVariables\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structTaikoData.SlotA\",\"components\":[{\"name\":\"genesisHeight\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"genesisTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"lastSyncedBlockId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"lastSynecdAt\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structTaikoData.SlotB\",\"components\":[{\"name\":\"numBlocks\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"provingPaused\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"__reservedB1\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"__reservedB2\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"__reservedB3\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"lastUnpausedAt\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTransition\",\"inputs\":[{\"name\":\"_blockId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_tid\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structTaikoData.TransitionState\",\"components\":[{\"name\":\"key\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blockHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stateRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"prover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"validityBond\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"contester\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"contestBond\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"tier\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"__reserved1\",\"type\":\"uint8\",\"internalType\":\"uint8\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTransition\",\"inputs\":[{\"name\":\"_blockId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_parentHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structTaikoData.TransitionState\",\"components\":[{\"name\":\"key\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blockHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stateRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"prover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"validityBond\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"contester\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"contestBond\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"tier\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"__reserved1\",\"type\":\"uint8\",\"internalType\":\"uint8\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"impl\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"inNonReentrant\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"init\",\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_addressManager\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_genesisBlockHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_toPause\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"init2\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"lastUnpausedAt\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseProving\",\"inputs\":[{\"name\":\"_pause\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proposeBlock\",\"inputs\":[{\"name\":\"_params\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"_txList\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"meta_\",\"type\":\"tuple\",\"internalType\":\"structTaikoData.BlockMetadata\",\"components\":[{\"name\":\"l1Hash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"difficulty\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blobHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"extraData\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"depositsHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"coinbase\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"gasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"l1Height\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"minTier\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"blobUsed\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"parentMetaHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"name\":\"deposits_\",\"type\":\"tuple[]\",\"internalType\":\"structTaikoData.EthDeposit[]\",\"components\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"id\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"proveBlock\",\"inputs\":[{\"name\":\"_blockId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_input\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"proxiableUUID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"resolve\",\"inputs\":[{\"name\":\"_chainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_name\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_allowZeroAddress\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"addresspayable\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"resolve\",\"inputs\":[{\"name\":\"_name\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_allowZeroAddress\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"addresspayable\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"state\",\"inputs\":[],\"outputs\":[{\"name\":\"__reserve1\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"slotA\",\"type\":\"tuple\",\"internalType\":\"structTaikoData.SlotA\",\"components\":[{\"name\":\"genesisHeight\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"genesisTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"lastSyncedBlockId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"lastSynecdAt\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"slotB\",\"type\":\"tuple\",\"internalType\":\"structTaikoData.SlotB\",\"components\":[{\"name\":\"numBlocks\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"provingPaused\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"__reservedB1\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"__reservedB2\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"__reservedB3\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"lastUnpausedAt\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"upgradeTo\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"upgradeToAndCall\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"verifyBlocks\",\"inputs\":[{\"name\":\"_maxBlocksToVerify\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"AdminChanged\",\"inputs\":[{\"name\":\"previousAdmin\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"newAdmin\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BeaconUpgraded\",\"inputs\":[{\"name\":\"beacon\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BlockProposed\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"assignedProver\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"livenessBond\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"},{\"name\":\"meta\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"components\":[{\"name\":\"l1Hash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"difficulty\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blobHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"extraData\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"depositsHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"coinbase\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"gasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"l1Height\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"minTier\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"blobUsed\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"parentMetaHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"name\":\"depositsProcessed\",\"type\":\"tuple[]\",\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit[]\",\"components\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"id\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BlockProposed\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"assignedProver\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"livenessBond\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"},{\"name\":\"meta\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"components\":[{\"name\":\"l1Hash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"difficulty\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blobHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"extraData\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"depositsHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"coinbase\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"gasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"l1Height\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"minTier\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"blobUsed\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"parentMetaHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"name\":\"depositsProcessed\",\"type\":\"tuple[]\",\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit[]\",\"components\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"id\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BlockVerified\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"prover\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"blockHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"stateRoot\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"tier\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BlockVerified\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"prover\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"blockHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"stateRoot\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"tier\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"CalldataTxList\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"txList\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"CalldataTxList\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"txList\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProvingPaused\",\"inputs\":[{\"name\":\"paused\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProvingPaused\",\"inputs\":[{\"name\":\"paused\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StateVariablesUpdated\",\"inputs\":[{\"name\":\"slotB\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structTaikoData.SlotB\",\"components\":[{\"name\":\"numBlocks\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"provingPaused\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"__reservedB1\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"__reservedB2\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"__reservedB3\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"lastUnpausedAt\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TransitionContested\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"tran\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structTaikoData.Transition\",\"components\":[{\"name\":\"parentHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blockHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stateRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"graffiti\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"contester\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"contestBond\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"},{\"name\":\"tier\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TransitionContested\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"tran\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structTaikoData.Transition\",\"components\":[{\"name\":\"parentHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blockHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stateRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"graffiti\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"contester\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"contestBond\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"},{\"name\":\"tier\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TransitionProved\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"tran\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structTaikoData.Transition\",\"components\":[{\"name\":\"parentHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blockHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stateRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"graffiti\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"prover\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"validityBond\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"},{\"name\":\"tier\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TransitionProved\",\"inputs\":[{\"name\":\"blockId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"tran\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structTaikoData.Transition\",\"components\":[{\"name\":\"parentHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blockHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stateRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"graffiti\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"prover\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"validityBond\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"},{\"name\":\"tier\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ETH_TRANSFER_FAILED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FUNC_NOT_IMPLEMENTED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"INVALID_PAUSE_STATUS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_ALREADY_CONTESTED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_ALREADY_CONTESTED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_ALREADY_PROVED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_ALREADY_PROVED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_BATCH_TRANSFER_FAILED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_BATCH_TRANSFER_FAILED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_BLOB_NOT_AVAILABLE\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_BLOB_NOT_FOUND\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_BLOB_NOT_FOUND\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_BLOCK_MISMATCH\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_BLOCK_MISMATCH\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_BLOCK_MISMATCH\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_CANNOT_CONTEST\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_CANNOT_CONTEST\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_BLOCK_ID\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_BLOCK_ID\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_BLOCK_ID\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_CONFIG\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_GENESIS_HASH\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_GENESIS_HASH\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_L1_STATE_BLOCK\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_PARAM\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_PAUSE_STATUS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_PAUSE_STATUS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_PROPOSER\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_SIG\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_TIER\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_TIER\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_TIMESTAMP\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_TRANSITION\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_INVALID_TRANSITION\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_LIVENESS_BOND_NOT_RECEIVED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_NOT_ASSIGNED_PROVER\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_NOT_ASSIGNED_PROVER\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_NO_HOOKS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_PROVING_PAUSED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_RECEIVE_DISABLED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_TOO_LATE\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_TOO_MANY_BLOCKS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_TOO_MANY_BLOCKS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_TRANSITION_ID_ZERO\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_TRANSITION_ID_ZERO\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_TRANSITION_NOT_FOUND\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_TRANSITION_NOT_FOUND\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_UNEXPECTED_PARENT\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_UNEXPECTED_PARENT\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_UNEXPECTED_TRANSITION_ID\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1_UNEXPECTED_TRANSITION_ID\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"REENTRANT_CALL\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RESOLVER_DENIED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RESOLVER_INVALID_MANAGER\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RESOLVER_UNEXPECTED_CHAINID\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RESOLVER_ZERO_ADDR\",\"inputs\":[{\"name\":\"chainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"name\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"ZERO_ADDRESS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ZERO_VALUE\",\"inputs\":[]}]", } // TaikoL1ClientABI is the input ABI used to generate the binding from. @@ -303,7 +287,7 @@ func (_TaikoL1Client *TaikoL1ClientCallerSession) AddressManager() (common.Addre // GetBlock is a free data retrieval call binding the contract method 0x5fa15e79. // -// Solidity: function getBlock(uint64 _blockId) view returns((bytes32,address,uint96,uint64,uint64,uint64,uint32,uint32) blk_) +// Solidity: function getBlock(uint64 _blockId) view returns((bytes32,address,uint96,uint64,uint64,uint64,uint32,uint32,uint64,uint32) blk_) func (_TaikoL1Client *TaikoL1ClientCaller) GetBlock(opts *bind.CallOpts, _blockId uint64) (TaikoDataBlock, error) { var out []interface{} err := _TaikoL1Client.contract.Call(opts, &out, "getBlock", _blockId) @@ -320,14 +304,14 @@ func (_TaikoL1Client *TaikoL1ClientCaller) GetBlock(opts *bind.CallOpts, _blockI // GetBlock is a free data retrieval call binding the contract method 0x5fa15e79. // -// Solidity: function getBlock(uint64 _blockId) view returns((bytes32,address,uint96,uint64,uint64,uint64,uint32,uint32) blk_) +// Solidity: function getBlock(uint64 _blockId) view returns((bytes32,address,uint96,uint64,uint64,uint64,uint32,uint32,uint64,uint32) blk_) func (_TaikoL1Client *TaikoL1ClientSession) GetBlock(_blockId uint64) (TaikoDataBlock, error) { return _TaikoL1Client.Contract.GetBlock(&_TaikoL1Client.CallOpts, _blockId) } // GetBlock is a free data retrieval call binding the contract method 0x5fa15e79. // -// Solidity: function getBlock(uint64 _blockId) view returns((bytes32,address,uint96,uint64,uint64,uint64,uint32,uint32) blk_) +// Solidity: function getBlock(uint64 _blockId) view returns((bytes32,address,uint96,uint64,uint64,uint64,uint32,uint32,uint64,uint32) blk_) func (_TaikoL1Client *TaikoL1ClientCallerSession) GetBlock(_blockId uint64) (TaikoDataBlock, error) { return _TaikoL1Client.Contract.GetBlock(&_TaikoL1Client.CallOpts, _blockId) } diff --git a/packages/taiko-client/cmd/flags/common.go b/packages/taiko-client/cmd/flags/common.go index da6c424712..a6720c9688 100644 --- a/packages/taiko-client/cmd/flags/common.go +++ b/packages/taiko-client/cmd/flags/common.go @@ -10,13 +10,14 @@ import ( ) var ( - commonCategory = "COMMON" - metricsCategory = "METRICS" - loggingCategory = "LOGGING" - driverCategory = "DRIVER" - proposerCategory = "PROPOSER" - proverCategory = "PROVER" - txmgrCategory = "TX_MANAGER" + commonCategory = "COMMON" + metricsCategory = "METRICS" + loggingCategory = "LOGGING" + driverCategory = "DRIVER" + proposerCategory = "PROPOSER" + proverCategory = "PROVER" + txmgrCategory = "TX_MANAGER" + preconfAPICategory = "PRECONF_API" ) // Required flags used by all client software. diff --git a/packages/taiko-client/cmd/flags/preconfapi.go b/packages/taiko-client/cmd/flags/preconfapi.go new file mode 100644 index 0000000000..36d71bb5ba --- /dev/null +++ b/packages/taiko-client/cmd/flags/preconfapi.go @@ -0,0 +1,24 @@ +package flags + +import ( + "github.com/urfave/cli/v2" +) + +// Required flags used by preconfirmations api. +var ( + PreconfAPIHTTPServerPort = &cli.Uint64Flag{ + Name: "preconfapi.port", + Usage: "Port to expose for http server", + Category: preconfAPICategory, + Value: 9871, + EnvVars: []string{"PRECONFAPI_PORT"}, + } +) + +// PreconfAPIFlags contains all preconfirmations API flags +var PreconfAPIFlags = []cli.Flag{ + TaikoL1Address, + TxGasLimit, + PreconfAPIHTTPServerPort, + BlobAllowed, +} diff --git a/packages/taiko-client/cmd/flags/proposer.go b/packages/taiko-client/cmd/flags/proposer.go index c1bb98dc31..33d530f1cc 100644 --- a/packages/taiko-client/cmd/flags/proposer.go +++ b/packages/taiko-client/cmd/flags/proposer.go @@ -139,6 +139,13 @@ var ( Category: proposerCategory, EnvVars: []string{"L1_BLOCK_BUILDER_TIP"}, } + // Pre-confirmation related. + PreconfirmationRPC = &cli.StringFlag{ + Name: "preconfirmation.rpc", + Usage: "The rpc endpoint of L1 preconfer", + Category: proposerCategory, + EnvVars: []string{"PRECONFIRMATION_RPC"}, + } ) // ProposerFlags All proposer flags. @@ -165,4 +172,5 @@ var ProposerFlags = MergeFlags(CommonFlags, []cli.Flag{ ProposeBlockIncludeParentMetaHash, BlobAllowed, L1BlockBuilderTip, + PreconfirmationRPC, }, TxmgrFlags) diff --git a/packages/taiko-client/cmd/main.go b/packages/taiko-client/cmd/main.go index cfba0443e0..f27b00990d 100644 --- a/packages/taiko-client/cmd/main.go +++ b/packages/taiko-client/cmd/main.go @@ -10,6 +10,7 @@ import ( "github.com/taikoxyz/taiko-mono/packages/taiko-client/cmd/utils" "github.com/taikoxyz/taiko-mono/packages/taiko-client/driver" "github.com/taikoxyz/taiko-mono/packages/taiko-client/internal/version" + "github.com/taikoxyz/taiko-mono/packages/taiko-client/preconfapi" "github.com/taikoxyz/taiko-mono/packages/taiko-client/proposer" "github.com/taikoxyz/taiko-mono/packages/taiko-client/prover" ) @@ -48,6 +49,13 @@ func main() { Description: "Taiko prover software", Action: utils.SubcommandAction(new(prover.Prover)), }, + { + Name: "preconfapi", + Flags: flags.PreconfAPIFlags, + Usage: "Starts the preconfirmation API software", + Description: "Taiko preconfirmation API software", + Action: utils.SubcommandAction(new(preconfapi.PreconfAPI)), + }, } if err := app.Run(os.Args); err != nil { diff --git a/packages/taiko-client/driver/chain_syncer/blob/syncer.go b/packages/taiko-client/driver/chain_syncer/blob/syncer.go index 9cfea3c5a6..8d8678f05c 100644 --- a/packages/taiko-client/driver/chain_syncer/blob/syncer.go +++ b/packages/taiko-client/driver/chain_syncer/blob/syncer.go @@ -248,16 +248,57 @@ func (s *Syncer) onBlockProposed( return fmt.Errorf("failed to fetch original TaikoL1.proposeBlock transaction: %w", err) } - // Decode transactions list. - var txListFetcher txlistFetcher.TxListFetcher - if event.Meta.BlobUsed { - txListFetcher = txlistFetcher.NewBlobTxListFetcher(s.rpc.L1Beacon, s.blobDatasource) - } else { - txListFetcher = new(txlistFetcher.CalldataFetcher) - } - txListBytes, err := txListFetcher.Fetch(ctx, tx, &event.Meta) + // first see if we have a CalldataTxList event in the same transaction + // Get the transaction receipt + receipt, err := s.rpc.L1.TransactionReceipt(ctx, tx.Hash()) if err != nil { - return fmt.Errorf("failed to fetch tx list: %w", err) + return fmt.Errorf("failed to get transaction receipt: %w", err) + } + + var txListBytes []byte + calldataTxListFound := false + + // first lets try to see if we can find a matching CalldataTxList event + // with the same blockID, to see if a contract sent this event via calldata. + // because in this case, the txList will not be available in the transactions + // arguments for decoding. + for _, vLog := range receipt.Logs { + // Use the generated binding's method to parse the log + calldataEvent, err := s.rpc.TaikoL1.ParseCalldataTxList(*vLog) + if err == nil { + log.Info("CalldataTxList event found", "blockID", calldataEvent.BlockId.String()) + if calldataEvent.BlockId.Cmp(event.BlockId) != 0 { + log.Warn("CalldataTxList event blockID doesnt match", + "wantBlockID", event.BlockId.String(), + "eventBlockID", calldataEvent.BlockId.String(), + ) + continue + } + txListBytes = calldataEvent.TxList + calldataTxListFound = true + break + } + } + + // if not, then we want to fetch it from the tx args. + if !calldataTxListFound { + // Decode transactions list. + var txListFetcher txlistFetcher.TxListFetcher + if event.Meta.BlobUsed { + txListFetcher = txlistFetcher.NewBlobTxListFetcher(s.rpc.L1Beacon, s.blobDatasource) + } else { + txListFetcher = new(txlistFetcher.CalldataFetcher) + } + + header, err := s.rpc.L1.HeaderByNumber(ctx, new(big.Int).SetUint64(event.Raw.BlockNumber)) + if err != nil { + return fmt.Errorf("failed to get header by number: %w", err) + } + + txListBytes, err = txListFetcher.Fetch(ctx, tx, &event.Meta, event.Raw.BlockNumber, header.Time) + if err != nil { + return fmt.Errorf("failed to fetch tx list: %w", err) + } } // Decompress the transactions list and try to insert a new head block to L2 EE. diff --git a/packages/taiko-client/driver/driver.go b/packages/taiko-client/driver/driver.go index 49f4340d11..e4e2dd04d6 100644 --- a/packages/taiko-client/driver/driver.go +++ b/packages/taiko-client/driver/driver.go @@ -57,10 +57,12 @@ func (d *Driver) InitFromConfig(ctx context.Context, cfg *Config) (err error) { d.Config = cfg if d.rpc, err = rpc.NewClient(d.ctx, cfg.ClientConfig); err != nil { + log.Error("error initializing rpc.NewClient", "error", err) return err } if d.state, err = state.New(d.ctx, d.rpc); err != nil { + log.Error("error initializing state.New", "error", err) return err } diff --git a/packages/taiko-client/driver/txlist_fetcher/blob.go b/packages/taiko-client/driver/txlist_fetcher/blob.go index ecabd59b6c..5c74d691d7 100644 --- a/packages/taiko-client/driver/txlist_fetcher/blob.go +++ b/packages/taiko-client/driver/txlist_fetcher/blob.go @@ -31,18 +31,20 @@ func (d *BlobFetcher) Fetch( ctx context.Context, _ *types.Transaction, meta *bindings.TaikoDataBlockMetadata, + emittedInBlockID uint64, + blockProposedEventEmittedInTimestamp uint64, ) ([]byte, error) { if !meta.BlobUsed { return nil, pkg.ErrBlobUsed } // Fetch the L1 block sidecars. - sidecars, err := d.ds.GetBlobs(ctx, meta) + sidecars, err := d.ds.GetBlobs(ctx, meta, blockProposedEventEmittedInTimestamp) if err != nil { return nil, err } - log.Info("Fetch sidecars", "blockNumber", meta.L1Height+1, "sidecars", len(sidecars)) + log.Info("Fetch sidecars", "blockNumber", emittedInBlockID, "sidecars", len(sidecars)) // Compare the blob hash with the sidecar's kzg commitment. for i, sidecar := range sidecars { diff --git a/packages/taiko-client/driver/txlist_fetcher/calldata.go b/packages/taiko-client/driver/txlist_fetcher/calldata.go index 4cd7f4c661..3b482ba84b 100644 --- a/packages/taiko-client/driver/txlist_fetcher/calldata.go +++ b/packages/taiko-client/driver/txlist_fetcher/calldata.go @@ -18,6 +18,8 @@ func (d *CalldataFetcher) Fetch( _ context.Context, tx *types.Transaction, meta *bindings.TaikoDataBlockMetadata, + _ uint64, + _ uint64, ) ([]byte, error) { if meta.BlobUsed { return nil, pkg.ErrBlobUsed diff --git a/packages/taiko-client/driver/txlist_fetcher/interface.go b/packages/taiko-client/driver/txlist_fetcher/interface.go index 7d412ec880..d30eb0cb70 100644 --- a/packages/taiko-client/driver/txlist_fetcher/interface.go +++ b/packages/taiko-client/driver/txlist_fetcher/interface.go @@ -10,5 +10,11 @@ import ( // TxListFetcher is responsible for fetching the L2 txList bytes from L1 type TxListFetcher interface { - Fetch(ctx context.Context, tx *types.Transaction, meta *bindings.TaikoDataBlockMetadata) ([]byte, error) + Fetch( + ctx context.Context, + _ *types.Transaction, + meta *bindings.TaikoDataBlockMetadata, + emittedInBlockID uint64, + blockProposedEventEmittedInTimestamp uint64, + ) ([]byte, error) } diff --git a/packages/taiko-client/integration_test/entrypoint.sh b/packages/taiko-client/integration_test/entrypoint.sh index 769a80004b..6750e8013e 100755 --- a/packages/taiko-client/integration_test/entrypoint.sh +++ b/packages/taiko-client/integration_test/entrypoint.sh @@ -33,6 +33,7 @@ check_env "TIMELOCK_CONTROLLER" check_env "ROLLUP_ADDRESS_MANAGER_CONTRACT_ADDRESS" check_env "GUARDIAN_PROVER_CONTRACT_ADDRESS" check_env "GUARDIAN_PROVER_MINORITY_ADDRESS" +check_env "SEQUENCER_REGISTRY_ADDRESS" check_env "L1_CONTRACT_OWNER_PRIVATE_KEY" check_env "L1_SECURITY_COUNCIL_PRIVATE_KEY" check_env "L1_PROPOSER_PRIVATE_KEY" diff --git a/packages/taiko-client/integration_test/test_env.sh b/packages/taiko-client/integration_test/test_env.sh index a612c27998..76e83656a8 100755 --- a/packages/taiko-client/integration_test/test_env.sh +++ b/packages/taiko-client/integration_test/test_env.sh @@ -12,6 +12,7 @@ export TIMELOCK_CONTROLLER=$(echo "$DEPLOYMENT_JSON" | jq '.timelock_controller' export ROLLUP_ADDRESS_MANAGER_CONTRACT_ADDRESS=$(echo "$DEPLOYMENT_JSON" | jq '.rollup_address_manager' | sed 's/\"//g') export GUARDIAN_PROVER_CONTRACT_ADDRESS=$(echo "$DEPLOYMENT_JSON" | jq '.guardian_prover' | sed 's/\"//g') export GUARDIAN_PROVER_MINORITY_ADDRESS=$(echo "$DEPLOYMENT_JSON" | jq '.guardian_prover_minority' | sed 's/\"//g') +export SEQUENCER_REGISTRY_ADDRESS=$(echo "$DEPLOYMENT_JSON" | jq '.sequencer_registry' | sed 's/\"//g') export L1_CONTRACT_OWNER_PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 export L1_SECURITY_COUNCIL_PRIVATE_KEY=0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97 export L1_PROPOSER_PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 @@ -32,6 +33,7 @@ L2_EXECUTION_ENGINE_AUTH_ENDPOINT=$L2_EXECUTION_ENGINE_AUTH_ENDPOINT TAIKO_L1_ADDRESS=$TAIKO_L1_ADDRESS TAIKO_L2_ADDRESS=$TAIKO_L2_ADDRESS TAIKO_TOKEN_ADDRESS=$TAIKO_TOKEN_ADDRESS +SEQUENCER_REGISTRY_ADDRESS=$SEQUENCER_REGISTRY_ADDRESS TIMELOCK_CONTROLLER=$TIMELOCK_CONTROLLER ROLLUP_ADDRESS_MANAGER_CONTRACT_ADDRESS=$ROLLUP_ADDRESS_MANAGER_CONTRACT_ADDRESS GUARDIAN_PROVER_CONTRACT_ADDRESS=$GUARDIAN_PROVER_CONTRACT_ADDRESS diff --git a/packages/taiko-client/internal/testutils/suite.go b/packages/taiko-client/internal/testutils/suite.go index fbc9976e24..73250b4d12 100644 --- a/packages/taiko-client/internal/testutils/suite.go +++ b/packages/taiko-client/internal/testutils/suite.go @@ -118,6 +118,42 @@ func (s *ClientTestSuite) SetupTest() { // Increase allowance for AssignmentHook and TaikoL1 s.setAllowance(l1ProverPrivKey) s.setAllowance(ownerPrivKey) + + t, err := txmgr.NewSimpleTxManager( + "register", + log.Root(), + new(metrics.NoopTxMetrics), + txmgr.CLIConfig{ + L1RPCURL: os.Getenv("L1_NODE_WS_ENDPOINT"), + NumConfirmations: 0, + SafeAbortNonceTooLowCount: txmgr.DefaultBatcherFlagValues.SafeAbortNonceTooLowCount, + PrivateKey: common.Bytes2Hex(crypto.FromECDSA(ownerPrivKey)), + FeeLimitMultiplier: txmgr.DefaultBatcherFlagValues.FeeLimitMultiplier, + FeeLimitThresholdGwei: txmgr.DefaultBatcherFlagValues.FeeLimitThresholdGwei, + MinBaseFeeGwei: txmgr.DefaultBatcherFlagValues.MinBaseFeeGwei, + MinTipCapGwei: txmgr.DefaultBatcherFlagValues.MinTipCapGwei, + ResubmissionTimeout: txmgr.DefaultBatcherFlagValues.ResubmissionTimeout, + ReceiptQueryInterval: 1 * time.Second, + NetworkTimeout: txmgr.DefaultBatcherFlagValues.NetworkTimeout, + TxSendTimeout: txmgr.DefaultBatcherFlagValues.TxSendTimeout, + TxNotInMempoolTimeout: txmgr.DefaultBatcherFlagValues.TxNotInMempoolTimeout, + }, + ) + s.Nil(err) + + // Set sequencers + sequencerRegistryAddress := common.HexToAddress(os.Getenv("SEQUENCER_REGISTRY_ADDRESS")) + sequencers := []common.Address{ + crypto.PubkeyToAddress(testAddrPrivKey.PublicKey), + } + enabled := []bool{true} + data, err := encoding.SequencerRegistryABI.Pack("setSequencers", sequencers, enabled) + s.Nil(err) + _, err = t.Send(context.Background(), txmgr.TxCandidate{ + TxData: data, + To: &sequencerRegistryAddress, + }) + s.Nil(err) } s.testnetL1SnapshotID = s.SetL1Snapshot() diff --git a/packages/taiko-client/pkg/rpc/blob_datasource.go b/packages/taiko-client/pkg/rpc/blob_datasource.go index ed6e98bedb..c996ecb6d7 100644 --- a/packages/taiko-client/pkg/rpc/blob_datasource.go +++ b/packages/taiko-client/pkg/rpc/blob_datasource.go @@ -76,6 +76,7 @@ func (p *BlobServerResponse) UnmarshalJSON(data []byte) error { func (ds *BlobDataSource) GetBlobs( ctx context.Context, meta *bindings.TaikoDataBlockMetadata, + emittedInTimestamp uint64, ) ([]*blob.Sidecar, error) { if !meta.BlobUsed { return nil, pkg.ErrBlobUnused @@ -88,7 +89,7 @@ func (ds *BlobDataSource) GetBlobs( if ds.client.L1Beacon == nil { sidecars, err = nil, pkg.ErrBeaconNotFound } else { - sidecars, err = ds.client.L1Beacon.GetBlobs(ctx, meta.Timestamp) + sidecars, err = ds.client.L1Beacon.GetBlobs(ctx, emittedInTimestamp) } if err != nil { log.Info("Failed to get blobs from beacon, try to use blob server.", "error", err.Error()) diff --git a/packages/taiko-client/pkg/rpc/blob_datasource_test.go b/packages/taiko-client/pkg/rpc/blob_datasource_test.go index 3f2f78873d..c836d25764 100644 --- a/packages/taiko-client/pkg/rpc/blob_datasource_test.go +++ b/packages/taiko-client/pkg/rpc/blob_datasource_test.go @@ -27,6 +27,7 @@ func TestGetBlobsFromBlobScan(t *testing.T) { BlobHash: common.HexToHash("0x0145185449c57dee4e6c921b702e5d572fbeb026f96c220a6a17b79d157d921b"), BlobUsed: true, }, + 0, ) require.Nil(t, err) require.NotNil(t, sidecars) diff --git a/packages/taiko-client/pkg/rpc/methods.go b/packages/taiko-client/pkg/rpc/methods.go index c15a59ba4e..74af4a6ae0 100644 --- a/packages/taiko-client/pkg/rpc/methods.go +++ b/packages/taiko-client/pkg/rpc/methods.go @@ -38,6 +38,7 @@ func (c *Client) ensureGenesisMatched(ctx context.Context) error { stateVars, err := c.GetProtocolStateVariables(&bind.CallOpts{Context: ctxWithTimeout}) if err != nil { + log.Error("error getting protocol state variables", "error", err) return err } @@ -48,12 +49,14 @@ func (c *Client) ensureGenesisMatched(ctx context.Context) error { nil, ) if err != nil { + log.Error("error getting c.TaikoL1.FilterBlockVerified", "error", err) return err } // Fetch the node's genesis block. nodeGenesis, err := c.L2.HeaderByNumber(ctxWithTimeout, common.Big0) if err != nil { + log.Error("error getting node genesis block", "error", err) return err } @@ -559,16 +562,6 @@ func (c *Client) checkSyncedL1SnippetFromAnchor( return false, err } - if l1HeightInAnchor+1 != l1Height { - log.Info( - "Reorg detected due to L1 height mismatch", - "blockID", blockID, - "l1HeightInAnchor", l1HeightInAnchor, - "l1Height", l1Height, - ) - return true, nil - } - if parentGasUsed != uint32(parent.GasUsed()) { log.Info( "Reorg detected due to parent gas used mismatch", diff --git a/packages/taiko-client/preconfapi/builder/blob.go b/packages/taiko-client/preconfapi/builder/blob.go new file mode 100644 index 0000000000..fee3e55978 --- /dev/null +++ b/packages/taiko-client/preconfapi/builder/blob.go @@ -0,0 +1,87 @@ +package builder + +import ( + "context" + + "github.com/ethereum-optimism/optimism/op-service/eth" + "github.com/ethereum-optimism/optimism/op-service/txmgr" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + + "github.com/taikoxyz/taiko-mono/packages/taiko-client/bindings/encoding" + "github.com/taikoxyz/taiko-mono/packages/taiko-client/internal/utils" +) + +// BlobTransactionBuilder is responsible for building a TaikoL1.proposeBlock transaction with txList +// bytes saved in blob. +type BlobTransactionBuilder struct { + taikoL1Address common.Address + gasLimit uint64 +} + +// NewBlobTransactionBuilder creates a new BlobTransactionBuilder instance based on giving configurations. +func NewBlobTransactionBuilder( + taikoL1Address common.Address, + gasLimit uint64, +) *BlobTransactionBuilder { + return &BlobTransactionBuilder{ + taikoL1Address, + gasLimit, + } +} + +// BuildUnsigned implements the ProposeBlockTransactionBuilder interface to +// return an unsigned transaction, intended for preconfirmations. +func (b *BlobTransactionBuilder) BuildUnsigned( + _ context.Context, + txListBytes []byte, + l1StateBlockNumber uint32, + timestamp uint64, + coinbase common.Address, + extraData [32]byte, +) (*types.Transaction, error) { + compressedTxListBytes, err := utils.Compress(txListBytes) + if err != nil { + return nil, err + } + + var blob = ð.Blob{} + if err := blob.FromData(compressedTxListBytes); err != nil { + return nil, err + } + + // ABI encode the TaikoL1.proposeBlock parameters. + encodedParams, err := encoding.EncodeBlockParams(&encoding.BlockParams{ + ExtraData: extraData, + Coinbase: coinbase, + Signature: []byte{}, // no longer checked + L1StateBlockNumber: l1StateBlockNumber, + Timestamp: timestamp, + }) + if err != nil { + return nil, err + } + + data, err := encoding.TaikoL1ABI.Pack("proposeBlock", encodedParams, []byte{}) + if err != nil { + return nil, err + } + + sidecar, blobHashes, err := txmgr.MakeSidecar([]*eth.Blob{blob}) + if err != nil { + return nil, err + } + + blobTx := &types.BlobTx{ + To: b.taikoL1Address, + Value: nil, // maxFee / prover selecting no longer happens + Gas: b.gasLimit, + Data: data, + Sidecar: sidecar, + BlobHashes: blobHashes, + } + + tx := types.NewTx(blobTx) + + return tx, nil +} diff --git a/packages/taiko-client/preconfapi/builder/calldata.go b/packages/taiko-client/preconfapi/builder/calldata.go new file mode 100644 index 0000000000..c62dc19664 --- /dev/null +++ b/packages/taiko-client/preconfapi/builder/calldata.go @@ -0,0 +1,74 @@ +package builder + +import ( + "context" + "math/big" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/taikoxyz/taiko-mono/packages/taiko-client/bindings/encoding" + "github.com/taikoxyz/taiko-mono/packages/taiko-client/internal/utils" +) + +// CalldataTransactionBuilder is responsible for building a TaikoL1.proposeBlock transaction with txList +// bytes saved in blob. +type CalldataTransactionBuilder struct { + taikoL1Address common.Address + gasLimit uint64 +} + +// NewCalldataTransactionBuilder creates a new CalldataTransactionBuilder instance based on giving configurations. +func NewCalldataTransactionBuilder( + taikoL1Address common.Address, + gasLimit uint64, +) *CalldataTransactionBuilder { + return &CalldataTransactionBuilder{ + taikoL1Address, + gasLimit, + } +} + +// BuildUnsigned implements the ProposeBlockTransactionBuilder interface to +// return an unsigned transaction, intended for preconfirmations. +func (b *CalldataTransactionBuilder) BuildUnsigned( + _ context.Context, + txListBytes []byte, + l1StateBlockNumber uint32, + timestamp uint64, + coinbase common.Address, + extraData [32]byte, +) (*types.Transaction, error) { + compressedTxListBytes, err := utils.Compress(txListBytes) + if err != nil { + return nil, err + } + + // ABI encode the TaikoL1.proposeBlock parameters. + encodedParams, err := encoding.EncodeBlockParams(&encoding.BlockParams{ + ExtraData: extraData, + Coinbase: coinbase, + Signature: []byte{}, // no longer checked + L1StateBlockNumber: l1StateBlockNumber, + Timestamp: timestamp, + }) + if err != nil { + return nil, err + } + + data, err := encoding.TaikoL1ABI.Pack("proposeBlock", encodedParams, compressedTxListBytes) + if err != nil { + return nil, err + } + + // Create the transaction + tx := types.NewTransaction( + 0, + b.taikoL1Address, + nil, + b.gasLimit, + big.NewInt(0), + data, + ) + + return tx, nil +} diff --git a/packages/taiko-client/preconfapi/builder/interface.go b/packages/taiko-client/preconfapi/builder/interface.go new file mode 100644 index 0000000000..62a1d91cbb --- /dev/null +++ b/packages/taiko-client/preconfapi/builder/interface.go @@ -0,0 +1,19 @@ +package builder + +import ( + "context" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" +) + +type TxBuilder interface { + BuildUnsigned( + ctx context.Context, + txListBytes []byte, + l1StateBlockNumber uint32, + timestamp uint64, + coinbase common.Address, + extraData [32]byte, + ) (*types.Transaction, error) +} diff --git a/packages/taiko-client/preconfapi/config.go b/packages/taiko-client/preconfapi/config.go new file mode 100644 index 0000000000..71b7699666 --- /dev/null +++ b/packages/taiko-client/preconfapi/config.go @@ -0,0 +1,26 @@ +package preconfapi + +import ( + "github.com/ethereum/go-ethereum/common" + "github.com/urfave/cli/v2" + + "github.com/taikoxyz/taiko-mono/packages/taiko-client/cmd/flags" +) + +type Config struct { + TaikoL1Address common.Address + BlobAllowed bool + HTTPPort uint64 + ProposeBlockTxGasLimit uint64 +} + +// NewConfigFromCliContext initializes a Config instance from +// command line flags. +func NewConfigFromCliContext(c *cli.Context) (*Config, error) { + return &Config{ + TaikoL1Address: common.HexToAddress(c.String(flags.TaikoL1Address.Name)), + BlobAllowed: c.Bool(flags.BlobAllowed.Name), + HTTPPort: c.Uint64(flags.PreconfAPIHTTPServerPort.Name), + ProposeBlockTxGasLimit: c.Uint64(flags.TxGasLimit.Name), + }, nil +} diff --git a/packages/taiko-client/preconfapi/preconfapi.go b/packages/taiko-client/preconfapi/preconfapi.go new file mode 100644 index 0000000000..7edafa5c30 --- /dev/null +++ b/packages/taiko-client/preconfapi/preconfapi.go @@ -0,0 +1,72 @@ +package preconfapi + +import ( + "context" + "errors" + "fmt" + "net/http" + + "github.com/ethereum/go-ethereum/log" + "github.com/urfave/cli/v2" + + "github.com/taikoxyz/taiko-mono/packages/taiko-client/preconfapi/builder" + "github.com/taikoxyz/taiko-mono/packages/taiko-client/preconfapi/server" +) + +type PreconfAPI struct { + cfg *Config + server *server.PreconfAPIServer +} + +// InitFromCli New initializes the given proposer instance based on the command line flags. +func (p *PreconfAPI) InitFromCli(ctx context.Context, c *cli.Context) error { + cfg, err := NewConfigFromCliContext(c) + if err != nil { + return err + } + + return p.InitFromConfig(ctx, cfg) +} + +func (p *PreconfAPI) InitFromConfig(_ context.Context, cfg *Config) (err error) { + txBuilders := make(map[string]builder.TxBuilder) + txBuilders["blob"] = builder.NewBlobTransactionBuilder( + cfg.TaikoL1Address, + cfg.ProposeBlockTxGasLimit, + ) + + txBuilders["calldata"] = builder.NewCalldataTransactionBuilder( + cfg.TaikoL1Address, + cfg.ProposeBlockTxGasLimit, + ) + + if p.server, err = server.New(&server.NewPreconfAPIServerOpts{ + TxBuilders: txBuilders, + }); err != nil { + return err + } + + p.cfg = cfg + + return nil +} + +func (p *PreconfAPI) Start() error { + go func() { + if err := p.server.Start(fmt.Sprintf(":%v", p.cfg.HTTPPort)); !errors.Is(err, http.ErrServerClosed) { + log.Crit("Failed to start http server", "error", err) + } + }() + return nil +} + +// Close closes the proposer instance. +func (p *PreconfAPI) Close(ctx context.Context) { + if err := p.server.Shutdown(ctx); err != nil { + log.Error("Failed to shut down prover server", "error", err) + } +} + +func (p *PreconfAPI) Name() string { + return "preconfapi" +} diff --git a/packages/taiko-client/preconfapi/server/api.go b/packages/taiko-client/preconfapi/server/api.go new file mode 100644 index 0000000000..fb86a74e5a --- /dev/null +++ b/packages/taiko-client/preconfapi/server/api.go @@ -0,0 +1,116 @@ +package server + +import ( + "bytes" + "encoding/hex" + "log" + "net/http" + "strings" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/rlp" + "github.com/labstack/echo/v4" + + "github.com/taikoxyz/taiko-mono/packages/taiko-client/pkg/rpc" +) + +// @title Taiko Proposer Server API +// @version 1.0 +// @termsOfService http://swagger.io/terms/ + +// @contact.name API Support +// @contact.url https://community.taiko.xyz/ +// @contact.email info@taiko.xyz + +// @license.name MIT +// @license.url https://github.com/taikoxyz/taiko-mono/packages/taiko-client/blob/main/LICENSE.md + +type buildBlockRequest struct { + L1StateBlockNumber uint32 `json:"l1StateBlockNumber"` + Timestamp uint64 `json:"timestamp"` + SignedTransactions []string `json:"signedTransactions"` + Coinbase string `json:"coinbase"` + ExtraData string `json:"extraData"` + CalldataOrBlob string `json:"calldataOrBlob"` +} + +type buildBlockResponse struct { + RLPEncodedTx string `json:"rlpEncodedTx"` +} + +// BuildBlock handles a query to build a block according to our protocol, given the inputs, +// and returns an unsigned transaction to `taikol1.ProposeBlock`. +// +// @Summary Build a block and return an unsigned `taikol1.ProposeBlock` transaction +// @ID build +// @Accept json +// @Produce json +// @Success 200 {object} BuildBlockResponse +// @Router /block/build [get] +func (s *PreconfAPIServer) BuildBlock(c echo.Context) error { + req := &buildBlockRequest{} + if err := c.Bind(req); err != nil { + return c.JSON(http.StatusUnprocessableEntity, err) + } + + txListBytes, err := signedTransactionsToTxListBytes(req.SignedTransactions) + if err != nil { + return c.JSON(http.StatusUnprocessableEntity, err) + } + + // default to blob + t := req.CalldataOrBlob + if t == "" { + t = "blob" + } + + tx, err := s.txBuilders[t].BuildUnsigned( + c.Request().Context(), + txListBytes, + req.L1StateBlockNumber, + req.Timestamp, + common.HexToAddress(req.Coinbase), + rpc.StringToBytes32(req.ExtraData), + ) + if err != nil { + return c.JSON(http.StatusInternalServerError, err) + } + + // RLP encode the transaction + var rlpEncodedTx bytes.Buffer + if err := rlp.Encode(&rlpEncodedTx, tx); err != nil { + return c.JSON(http.StatusInternalServerError, err) + } + + hexEncodedTx := hex.EncodeToString(rlpEncodedTx.Bytes()) + + return c.JSON(http.StatusOK, buildBlockResponse{RLPEncodedTx: hexEncodedTx}) +} + +func signedTransactionsToTxListBytes(txs []string) ([]byte, error) { + var transactions types.Transactions + + for _, signedTxHex := range txs { + signedTxHex = strings.TrimPrefix(signedTxHex, "0x") + + rlpEncodedBytes, err := hex.DecodeString(signedTxHex) + if err != nil { + return nil, err + } + + var tx types.Transaction + if err := rlp.DecodeBytes(rlpEncodedBytes, &tx); err != nil { + return nil, err + } + + transactions = append(transactions, &tx) + } + + txListBytes, err := rlp.EncodeToBytes(transactions) + if err != nil { + log.Fatalf("Failed to RLP encode transactions: %v", err) + } + + return txListBytes, nil +} diff --git a/packages/taiko-client/preconfapi/server/server.go b/packages/taiko-client/preconfapi/server/server.go new file mode 100644 index 0000000000..875f06cfe5 --- /dev/null +++ b/packages/taiko-client/preconfapi/server/server.go @@ -0,0 +1,93 @@ +package server + +import ( + "context" + "net/http" + "os" + + "github.com/labstack/echo/v4" + "github.com/labstack/echo/v4/middleware" + + "github.com/taikoxyz/taiko-mono/packages/taiko-client/preconfapi/builder" +) + +// @title Taiko Proposer Server API +// @version 1.0 +// @termsOfService http://swagger.io/terms/ + +// @contact.name API Support +// @contact.url https://community.taiko.xyz/ +// @contact.email info@taiko.xyz + +// @license.name MIT +// @license.url https://github.com/taikoxyz/taiko-mono/blob/main/LICENSE.md +// PreconfAPIServer represents a proposer server instance. +type PreconfAPIServer struct { + echo *echo.Echo + txBuilders map[string]builder.TxBuilder // calldata or blob map to txbuilder type +} + +// NewPreconfAPIServerOpts contains all configurations for creating a prover server instance. +type NewPreconfAPIServerOpts struct { + TxBuilders map[string]builder.TxBuilder +} + +// New creates a new prover server instance. +func New(opts *NewPreconfAPIServerOpts) (*PreconfAPIServer, error) { + srv := &PreconfAPIServer{ + echo: echo.New(), + txBuilders: opts.TxBuilders, + } + + srv.echo.HideBanner = true + srv.configureMiddleware() + srv.configureRoutes() + + return srv, nil +} + +// Start starts the HTTP server. +func (s *PreconfAPIServer) Start(address string) error { + return s.echo.Start(address) +} + +// Shutdown shuts down the HTTP server. +func (s *PreconfAPIServer) Shutdown(ctx context.Context) error { + return s.echo.Shutdown(ctx) +} + +// Health endpoints for probes. +func (s *PreconfAPIServer) Health(c echo.Context) error { + return c.NoContent(http.StatusOK) +} + +// LogSkipper implements the `middleware.Skipper` interface. +func LogSkipper(c echo.Context) bool { + switch c.Request().URL.Path { + case "/healthz": + return true + default: + return true + } +} + +// configureMiddleware configures the server middlewares. +func (s *PreconfAPIServer) configureMiddleware() { + s.echo.Use(middleware.RequestID()) + + s.echo.Use(middleware.LoggerWithConfig(middleware.LoggerConfig{ + Skipper: LogSkipper, + Format: `{"time":"${time_rfc3339_nano}","level":"INFO","message":{"id":"${id}","remote_ip":"${remote_ip}",` + + `"host":"${host}","method":"${method}","uri":"${uri}","user_agent":"${user_agent}",` + + `"response_status":${status},"error":"${error}","latency":${latency},"latency_human":"${latency_human}",` + + `"bytes_in":${bytes_in},"bytes_out":${bytes_out}}}` + "\n", + Output: os.Stdout, + })) +} + +// configureRoutes contains all routes which will be used by prover server. +func (s *PreconfAPIServer) configureRoutes() { + s.echo.GET("/", s.Health) + s.echo.GET("/healthz", s.Health) + s.echo.POST("/block/build", s.BuildBlock) +} diff --git a/packages/taiko-client/preconfapi/server/server_test.go b/packages/taiko-client/preconfapi/server/server_test.go new file mode 100644 index 0000000000..e7e14c00c1 --- /dev/null +++ b/packages/taiko-client/preconfapi/server/server_test.go @@ -0,0 +1,88 @@ +package server + +import ( + "context" + "fmt" + "net/http" + "net/http/httptest" + "net/url" + "testing" + + "github.com/cenkalti/backoff/v4" + "github.com/ethereum/go-ethereum/log" + "github.com/go-resty/resty/v2" + "github.com/phayes/freeport" + "github.com/stretchr/testify/suite" +) + +type PreconfAPIServerTestSuite struct { + suite.Suite + s *PreconfAPIServer + testServer *httptest.Server +} + +func (s *PreconfAPIServerTestSuite) SetupTest() { + p, err := New(&NewPreconfAPIServerOpts{}) + s.Nil(err) + + p.echo.HideBanner = true + p.configureMiddleware() + p.configureRoutes() + s.s = p + s.testServer = httptest.NewServer(p.echo) +} + +func (s *PreconfAPIServerTestSuite) TestHealth() { + resp := s.sendReq("/healthz") + defer resp.Body.Close() + s.Equal(http.StatusOK, resp.StatusCode) +} + +func (s *PreconfAPIServerTestSuite) TestRoot() { + resp := s.sendReq("/") + defer resp.Body.Close() + s.Equal(http.StatusOK, resp.StatusCode) +} + +func (s *PreconfAPIServerTestSuite) TestStartShutdown() { + port, err := freeport.GetFreePort() + s.Nil(err) + + url, err := url.Parse(fmt.Sprintf("http://localhost:%v", port)) + s.Nil(err) + + go func() { + if err := s.s.Start(fmt.Sprintf(":%v", port)); err != nil { + log.Error("Failed to start prover server", "error", err) + } + }() + + // Wait till the server fully started. + s.Nil(backoff.Retry(func() error { + res, err := resty.New().R().Get(url.String() + "/healthz") + if err != nil { + return err + } + if !res.IsSuccess() { + return fmt.Errorf("invalid response status code: %d", res.StatusCode()) + } + + return nil + }, backoff.NewExponentialBackOff())) + + s.Nil(s.s.Shutdown(context.Background())) +} + +func (s *PreconfAPIServerTestSuite) TearDownTest() { + s.testServer.Close() +} + +func TestPreconfAPIServerTestSuite(t *testing.T) { + suite.Run(t, new(PreconfAPIServerTestSuite)) +} + +func (s *PreconfAPIServerTestSuite) sendReq(path string) *http.Response { + res, err := http.Get(s.testServer.URL + path) + s.Nil(err) + return res +} diff --git a/packages/taiko-client/proposer/config.go b/packages/taiko-client/proposer/config.go index 3c61fa4aa6..f2fb4c94af 100644 --- a/packages/taiko-client/proposer/config.go +++ b/packages/taiko-client/proposer/config.go @@ -44,6 +44,7 @@ type Config struct { BlobAllowed bool TxmgrConfigs *txmgr.CLIConfig L1BlockBuilderTip *big.Int + PreconfirmationRPC string } // NewConfigFromCliContext initializes a Config instance from @@ -93,6 +94,12 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) { return nil, err } + l1RPCUrl := c.String(flags.L1WSEndpoint.Name) + preconfirmationRPC := c.String(flags.PreconfirmationRPC.Name) + if len(preconfirmationRPC) > 0 { + l1RPCUrl = preconfirmationRPC + } + return &Config{ ClientConfig: &rpc.ClientConfig{ L1Endpoint: c.String(flags.L1WSEndpoint.Name), @@ -125,7 +132,7 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) { BlobAllowed: c.Bool(flags.BlobAllowed.Name), L1BlockBuilderTip: new(big.Int).SetUint64(c.Uint64(flags.L1BlockBuilderTip.Name)), TxmgrConfigs: pkgFlags.InitTxmgrConfigsFromCli( - c.String(flags.L1WSEndpoint.Name), + l1RPCUrl, l1ProposerPrivKey, c, ), diff --git a/packages/taiko-client/proposer/proposer.go b/packages/taiko-client/proposer/proposer.go index 0469ba4b1d..fe219b61e3 100644 --- a/packages/taiko-client/proposer/proposer.go +++ b/packages/taiko-client/proposer/proposer.go @@ -4,6 +4,7 @@ import ( "bytes" "context" "fmt" + "math/big" "math/rand" "sync" "time" @@ -136,6 +137,7 @@ func (p *Proposer) InitFromConfig(ctx context.Context, cfg *Config, txMgr *txmgr cfg.L2SuggestedFeeRecipient, cfg.ProposeBlockTxGasLimit, cfg.ExtraData, + len(cfg.PreconfirmationRPC) > 0, ) } else { p.txBuilder = builder.NewCalldataTransactionBuilder( @@ -148,6 +150,7 @@ func (p *Proposer) InitFromConfig(ctx context.Context, cfg *Config, txMgr *txmgr cfg.ProverSetAddress, cfg.ProposeBlockTxGasLimit, cfg.ExtraData, + len(cfg.PreconfirmationRPC) > 0, ) } @@ -158,6 +161,7 @@ func (p *Proposer) InitFromConfig(ctx context.Context, cfg *Config, txMgr *txmgr func (p *Proposer) Start() error { p.wg.Add(1) go p.eventLoop() + return nil } @@ -339,11 +343,28 @@ func (p *Proposer) ProposeTxList( return err } + var ( + l1StateBlockNumber = uint32(0) + timestamp = uint64(0) + parentMetaHash = [32]byte{} + ) + + parent, err := p.getParentOfLatestProposedBlock(ctx, p.rpc) + if err != nil { + return err + } + + if p.IncludeParentMetaHash { + parentMetaHash = parent.MetaHash + } + txCandidate, err := p.txBuilder.Build( ctx, p.tierFees, - p.IncludeParentMetaHash, compressedTxListBytes, + l1StateBlockNumber, + timestamp, + parentMetaHash, ) if err != nil { log.Warn("Failed to build TaikoL1.proposeBlock transaction", "error", encoding.TryParsingCustomError(err)) @@ -421,3 +442,21 @@ func (p *Proposer) initTierFees() error { return nil } + +// getParentOfLatestProposedBlock returns the parent block of the latest proposed block in protocol +func (p *Proposer) getParentOfLatestProposedBlock( + ctx context.Context, + rpc *rpc.Client, +) (*bindings.TaikoDataBlock, error) { + state, err := rpc.TaikoL1.State(&bind.CallOpts{Context: ctx}) + if err != nil { + return nil, err + } + + parent, err := rpc.GetL2BlockInfo(ctx, new(big.Int).SetUint64(state.SlotB.NumBlocks-1)) + if err != nil { + return nil, err + } + + return &parent, nil +} diff --git a/packages/taiko-client/proposer/proposer_test.go b/packages/taiko-client/proposer/proposer_test.go index 7feebcda4b..54b0dc9e9d 100644 --- a/packages/taiko-client/proposer/proposer_test.go +++ b/packages/taiko-client/proposer/proposer_test.go @@ -122,6 +122,7 @@ func (s *ProposerTestSuite) TestProposeTxLists() { cfg.L2SuggestedFeeRecipient, cfg.ProposeBlockTxGasLimit, cfg.ExtraData, + len(cfg.PreconfirmationRPC) > 0, ) emptyTxListBytes, err := rlp.EncodeToBytes(types.Transactions{}) @@ -138,8 +139,10 @@ func (s *ProposerTestSuite) TestProposeTxLists() { candidate, err := txBuilder.Build( p.ctx, p.tierFees, - p.IncludeParentMetaHash, compressedTxListBytes, + 0, + 0, + [32]byte{}, ) if err != nil { log.Warn("Failed to build TaikoL1.proposeBlock transaction", "error", err) @@ -272,6 +275,77 @@ func (s *ProposerTestSuite) TestUpdateProposingTicker() { s.NotPanics(s.p.updateProposingTicker) } +func (s *ProposerTestSuite) TestProposePreconfirmationBlock() { + p := new(Proposer) + s.Nil(p.InitFromConfig(context.Background(), &Config{ + ClientConfig: &rpc.ClientConfig{ + L1Endpoint: os.Getenv("L1_NODE_WS_ENDPOINT"), + L2Endpoint: os.Getenv("L2_EXECUTION_ENGINE_HTTP_ENDPOINT"), + L2EngineEndpoint: os.Getenv("L2_EXECUTION_ENGINE_AUTH_ENDPOINT"), + JwtSecret: s.p.JwtSecret, + TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")), + TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")), + TaikoTokenAddress: common.HexToAddress(os.Getenv("TAIKO_TOKEN_ADDRESS")), + }, + L1ProposerPrivKey: s.p.L1ProposerPrivKey, + L2SuggestedFeeRecipient: common.HexToAddress(os.Getenv("L2_SUGGESTED_FEE_RECIPIENT")), + MinProposingInternal: 0, + ProposeInterval: 1024 * time.Hour, + MaxProposedTxListsPerEpoch: 1, + ProverEndpoints: s.ProverEndpoints, + OptimisticTierFee: common.Big256, + SgxTierFee: common.Big256, + TierFeePriceBump: common.Big2, + MaxTierFeePriceBumps: 3, + ExtraData: "test", + L1BlockBuilderTip: common.Big0, + ProposeBlockTxGasLimit: 10_000_000, + PreconfirmationRPC: os.Getenv("L1_NODE_WS_ENDPOINT"), + TxmgrConfigs: &txmgr.CLIConfig{ + L1RPCURL: os.Getenv("L1_NODE_WS_ENDPOINT"), + NumConfirmations: 0, + SafeAbortNonceTooLowCount: txmgr.DefaultBatcherFlagValues.SafeAbortNonceTooLowCount, + PrivateKey: common.Bytes2Hex(crypto.FromECDSA(s.p.L1ProposerPrivKey)), + FeeLimitMultiplier: txmgr.DefaultBatcherFlagValues.FeeLimitMultiplier, + FeeLimitThresholdGwei: txmgr.DefaultBatcherFlagValues.FeeLimitThresholdGwei, + MinBaseFeeGwei: txmgr.DefaultBatcherFlagValues.MinBaseFeeGwei, + MinTipCapGwei: txmgr.DefaultBatcherFlagValues.MinTipCapGwei, + ResubmissionTimeout: txmgr.DefaultBatcherFlagValues.ResubmissionTimeout, + ReceiptQueryInterval: 1 * time.Second, + NetworkTimeout: txmgr.DefaultBatcherFlagValues.NetworkTimeout, + TxSendTimeout: txmgr.DefaultBatcherFlagValues.TxSendTimeout, + TxNotInMempoolTimeout: txmgr.DefaultBatcherFlagValues.TxNotInMempoolTimeout, + }, + }, nil)) + + sink := make(chan *bindings.TaikoL1ClientBlockProposed) + + sub, err := p.rpc.TaikoL1.WatchBlockProposed(nil, sink, nil, nil) + s.Nil(err) + defer func() { + sub.Unsubscribe() + close(sink) + }() + + to := common.BytesToAddress(testutils.RandomBytes(32)) + _, err = testutils.SendDynamicFeeTx(p.rpc.L2, s.TestAddrPrivKey, &to, common.Big1, nil) + s.Nil(err) + + s.Nil(p.ProposeOp(context.Background())) + + event := <-sink + + s.Equal(event.Meta.Coinbase, p.L2SuggestedFeeRecipient) + + _, isPending, err := p.rpc.L1.TransactionByHash(context.Background(), event.Raw.TxHash) + s.Nil(err) + s.False(isPending) + + receipt, err := p.rpc.L1.TransactionReceipt(context.Background(), event.Raw.TxHash) + s.Nil(err) + s.Equal(types.ReceiptStatusSuccessful, receipt.Status) +} + func (s *ProposerTestSuite) TestStartClose() { s.Nil(s.p.Start()) s.cancel() diff --git a/packages/taiko-client/proposer/transaction_builder/blob.go b/packages/taiko-client/proposer/transaction_builder/blob.go index 2dda18194d..fe39634ebd 100644 --- a/packages/taiko-client/proposer/transaction_builder/blob.go +++ b/packages/taiko-client/proposer/transaction_builder/blob.go @@ -29,6 +29,7 @@ type BlobTransactionBuilder struct { l2SuggestedFeeRecipient common.Address gasLimit uint64 extraData string + enabledPreconfirmation bool } // NewBlobTransactionBuilder creates a new BlobTransactionBuilder instance based on giving configurations. @@ -42,6 +43,7 @@ func NewBlobTransactionBuilder( l2SuggestedFeeRecipient common.Address, gasLimit uint64, extraData string, + enabledPreconfirmation bool, ) *BlobTransactionBuilder { return &BlobTransactionBuilder{ rpc, @@ -53,6 +55,7 @@ func NewBlobTransactionBuilder( l2SuggestedFeeRecipient, gasLimit, extraData, + enabledPreconfirmation, } } @@ -60,8 +63,10 @@ func NewBlobTransactionBuilder( func (b *BlobTransactionBuilder) Build( ctx context.Context, tierFees []encoding.TierFee, - includeParentMetaHash bool, txListBytes []byte, + l1StateBlockNumber uint32, + timestamp uint64, + parentMetaHash [32]byte, ) (*txmgr.TxCandidate, error) { var blob = ð.Blob{} if err := blob.FromData(txListBytes); err != nil { @@ -77,14 +82,6 @@ func (b *BlobTransactionBuilder) Build( return nil, err } - // If the current proposer wants to include the parent meta hash, then fetch it from the protocol. - var parentMetaHash = [32]byte{} - if includeParentMetaHash { - if parentMetaHash, err = getParentMetaHash(ctx, b.rpc); err != nil { - return nil, err - } - } - commitment, err := blob.ComputeKZGCommitment() if err != nil { return nil, err @@ -95,6 +92,7 @@ func (b *BlobTransactionBuilder) Build( if err != nil { return nil, err } + signature[64] = uint8(uint(signature[64])) + 27 var ( @@ -107,10 +105,12 @@ func (b *BlobTransactionBuilder) Build( // ABI encode the TaikoL1.proposeBlock parameters. encodedParams, err := encoding.EncodeBlockParams(&encoding.BlockParams{ - ExtraData: rpc.StringToBytes32(b.extraData), - Coinbase: b.l2SuggestedFeeRecipient, - ParentMetaHash: parentMetaHash, - Signature: signature, + ExtraData: rpc.StringToBytes32(b.extraData), + Coinbase: b.l2SuggestedFeeRecipient, + ParentMetaHash: parentMetaHash, + Signature: signature, + L1StateBlockNumber: l1StateBlockNumber, + Timestamp: timestamp, }) if err != nil { return nil, err diff --git a/packages/taiko-client/proposer/transaction_builder/calldata.go b/packages/taiko-client/proposer/transaction_builder/calldata.go index 5fef780f53..23fdf5ea0a 100644 --- a/packages/taiko-client/proposer/transaction_builder/calldata.go +++ b/packages/taiko-client/proposer/transaction_builder/calldata.go @@ -26,6 +26,7 @@ type CalldataTransactionBuilder struct { proverSetAddress common.Address gasLimit uint64 extraData string + enabledPreconfirmation bool } // NewCalldataTransactionBuilder creates a new CalldataTransactionBuilder instance based on giving configurations. @@ -39,6 +40,7 @@ func NewCalldataTransactionBuilder( proverSetAddress common.Address, gasLimit uint64, extraData string, + enabledPreconfirmation bool, ) *CalldataTransactionBuilder { return &CalldataTransactionBuilder{ rpc, @@ -50,6 +52,7 @@ func NewCalldataTransactionBuilder( proverSetAddress, gasLimit, extraData, + enabledPreconfirmation, } } @@ -57,8 +60,10 @@ func NewCalldataTransactionBuilder( func (b *CalldataTransactionBuilder) Build( ctx context.Context, tierFees []encoding.TierFee, - includeParentMetaHash bool, txListBytes []byte, + l1StateBlockNumber uint32, + timestamp uint64, + parentMetaHash [32]byte, ) (*txmgr.TxCandidate, error) { // Try to assign a prover. maxFee, err := b.proverSelector.AssignProver( @@ -69,14 +74,6 @@ func (b *CalldataTransactionBuilder) Build( return nil, err } - // If the current proposer wants to include the parent meta hash, then fetch it from the protocol. - var parentMetaHash = [32]byte{} - if includeParentMetaHash { - if parentMetaHash, err = getParentMetaHash(ctx, b.rpc); err != nil { - return nil, err - } - } - signature, err := crypto.Sign(crypto.Keccak256(txListBytes), b.proposerPrivateKey) if err != nil { return nil, err @@ -93,10 +90,12 @@ func (b *CalldataTransactionBuilder) Build( // ABI encode the TaikoL1.proposeBlock / ProverSet.proposeBlock parameters. encodedParams, err := encoding.EncodeBlockParams(&encoding.BlockParams{ - Coinbase: b.l2SuggestedFeeRecipient, - ExtraData: rpc.StringToBytes32(b.extraData), - ParentMetaHash: parentMetaHash, - Signature: signature, + Coinbase: b.l2SuggestedFeeRecipient, + ExtraData: rpc.StringToBytes32(b.extraData), + ParentMetaHash: parentMetaHash, + Signature: signature, + L1StateBlockNumber: l1StateBlockNumber, + Timestamp: timestamp, }) if err != nil { return nil, err diff --git a/packages/taiko-client/proposer/transaction_builder/calldata_test.go b/packages/taiko-client/proposer/transaction_builder/calldata_test.go index b2f280b846..106e190315 100644 --- a/packages/taiko-client/proposer/transaction_builder/calldata_test.go +++ b/packages/taiko-client/proposer/transaction_builder/calldata_test.go @@ -13,7 +13,7 @@ func (s *TransactionBuilderTestSuite) TestBuildCalldata() { {Tier: encoding.TierOptimisticID, Fee: common.Big256}, {Tier: encoding.TierSgxID, Fee: common.Big256}, {Tier: encoding.TierSgxAndZkVMID, Fee: common.Big257}, - }, false, []byte{1}) + }, []byte{1}, 0, 0, [32]byte{}) s.Nil(err) s.Nil(tx.Blobs) } diff --git a/packages/taiko-client/proposer/transaction_builder/common.go b/packages/taiko-client/proposer/transaction_builder/common.go deleted file mode 100644 index e3898d1100..0000000000 --- a/packages/taiko-client/proposer/transaction_builder/common.go +++ /dev/null @@ -1,26 +0,0 @@ -package builder - -import ( - "context" - "math/big" - - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - - "github.com/taikoxyz/taiko-mono/packages/taiko-client/pkg/rpc" -) - -// getParentMetaHash returns the meta hash of the parent block of the latest proposed block in protocol. -func getParentMetaHash(ctx context.Context, rpc *rpc.Client) (common.Hash, error) { - state, err := rpc.TaikoL1.State(&bind.CallOpts{Context: ctx}) - if err != nil { - return common.Hash{}, err - } - - parent, err := rpc.GetL2BlockInfo(ctx, new(big.Int).SetUint64(state.SlotB.NumBlocks-1)) - if err != nil { - return common.Hash{}, err - } - - return parent.MetaHash, nil -} diff --git a/packages/taiko-client/proposer/transaction_builder/common_test.go b/packages/taiko-client/proposer/transaction_builder/common_test.go index 6a8d7de486..a51c0c52b1 100644 --- a/packages/taiko-client/proposer/transaction_builder/common_test.go +++ b/packages/taiko-client/proposer/transaction_builder/common_test.go @@ -1,7 +1,6 @@ package builder import ( - "context" "net/url" "os" "testing" @@ -52,6 +51,7 @@ func (s *TransactionBuilderTestSuite) SetupTest() { common.Address{}, 0, "test", + false, ) s.blobTxBuiler = NewBlobTransactionBuilder( s.RPCClient, @@ -63,15 +63,10 @@ func (s *TransactionBuilderTestSuite) SetupTest() { common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")), 10_000_000, "test", + false, ) } -func (s *TransactionBuilderTestSuite) TestGetParentMetaHash() { - metahash, err := getParentMetaHash(context.Background(), s.RPCClient) - s.Nil(err) - s.NotEmpty(metahash) -} - func TestTransactionBuilderTestSuite(t *testing.T) { suite.Run(t, new(TransactionBuilderTestSuite)) } diff --git a/packages/taiko-client/proposer/transaction_builder/interface.go b/packages/taiko-client/proposer/transaction_builder/interface.go index c1cac45aa6..6d7badbf4f 100644 --- a/packages/taiko-client/proposer/transaction_builder/interface.go +++ b/packages/taiko-client/proposer/transaction_builder/interface.go @@ -13,7 +13,9 @@ type ProposeBlockTransactionBuilder interface { Build( ctx context.Context, tierFees []encoding.TierFee, - includeParentMetaHash bool, txListBytes []byte, + l1StateBlockNumber uint32, + timestamp uint64, + parentMetaHash [32]byte, ) (*txmgr.TxCandidate, error) } diff --git a/packages/taiko-client/scripts/gen_bindings.sh b/packages/taiko-client/scripts/gen_bindings.sh index 23063df5d7..b7c17b6df6 100755 --- a/packages/taiko-client/scripts/gen_bindings.sh +++ b/packages/taiko-client/scripts/gen_bindings.sh @@ -74,6 +74,10 @@ cat ../protocol/out/SgxVerifier.sol/SgxVerifier.json | jq .abi | ${ABIGEN_BIN} --abi - --type SgxVerifier --pkg bindings --out $DIR/../bindings/gen_sgx_verifier.go +cat ../protocol/out/SequencerRegistry.sol/SequencerRegistry.json | + jq .abi | + ${ABIGEN_BIN} --abi - --type SequencerRegistry --pkg bindings --out $DIR/../bindings/gen_sequencer_registry.go + git -C ../../ log --format="%H" -n 1 >./bindings/.githead echo "🍻 Go contract bindings generated!"