diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9e6063d86..6926c34aa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,7 +45,7 @@ jobs: with: repository: taikoxyz/taiko-mono path: ${{ env.TAIKO_MONO_DIR }} - ref: contestable-zkrollup + ref: bridgable_app - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 diff --git a/bindings/.githead b/bindings/.githead index 256160956..a1d77f4d1 100644 --- a/bindings/.githead +++ b/bindings/.githead @@ -1 +1 @@ -cb43010d59dd532e495167cc51046c2f1073d1c3 +0f41cb6d94caf3c0e04f4b63e1cea83024c20869 diff --git a/bindings/encoding/input.go b/bindings/encoding/input.go index 48687778b..caa3b9be4 100644 --- a/bindings/encoding/input.go +++ b/bindings/encoding/input.go @@ -12,11 +12,57 @@ import ( // ABI arguments marshaling components. var ( - evidenceComponents = []abi.ArgumentMarshaling{ + blockMetadataComponents = []abi.ArgumentMarshaling{ { - Name: "metaHash", + Name: "l1Hash", Type: "bytes32", }, + { + Name: "difficulty", + Type: "bytes32", + }, + { + Name: "blobHash", + Type: "bytes32", + }, + { + Name: "extraData", + Type: "bytes32", + }, + { + Name: "depositsHash", + Type: "bytes32", + }, + { + Name: "coinbase", + Type: "address", + }, + { + Name: "id", + Type: "uint64", + }, + { + Name: "gasLimit", + Type: "uint32", + }, + { + Name: "timestamp", + Type: "uint64", + }, + { + Name: "l1Height", + Type: "uint64", + }, + { + Name: "minTier", + Type: "uint16", + }, + { + Name: "blobUsed", + Type: "bool", + }, + } + transitionComponents = []abi.ArgumentMarshaling{ { Name: "parentHash", Type: "bytes32", @@ -33,15 +79,28 @@ var ( Name: "graffiti", Type: "bytes32", }, + } + tierProofComponents = []abi.ArgumentMarshaling{ { Name: "tier", Type: "uint16", }, { - Name: "proof", + Name: "data", Type: "bytes", }, } + blockParamsComponents = []abi.ArgumentMarshaling{ + { + Name: "assignment", + Type: "tuple", + Components: proverAssignmentComponents, + }, + { + Name: "extraData", + Type: "bytes32", + }, + } proverAssignmentComponents = []abi.ArgumentMarshaling{ { Name: "prover", @@ -61,7 +120,7 @@ var ( }, { Name: "fee", - Type: "uint256", + Type: "uint128", }, }, }, @@ -77,12 +136,9 @@ var ( ) var ( - // Evidence - evidenceType, _ = abi.NewType("tuple", "TaikoData.BlockEvidence", evidenceComponents) - evidenceArgs = abi.Arguments{{Name: "Evidence", Type: evidenceType}} - // ProverAssignment - proverAssignmentType, _ = abi.NewType("tuple", "ProverAssignment", proverAssignmentComponents) - proverAssignmentArgs = abi.Arguments{{Name: "ProverAssignment", Type: proverAssignmentType}} + // BlockParams + blockParamsComponentsType, _ = abi.NewType("tuple", "TaikoData.BlockParams", blockParamsComponents) + blockParamsComponentsArgs = abi.Arguments{{Name: "TaikoData.BlockParams", Type: blockParamsComponentsType}} // ProverAssignmentPayload stringType, _ = abi.NewType("string", "", nil) bytes32Type, _ = abi.NewType("bytes32", "", nil) @@ -98,17 +154,25 @@ var ( }, { Name: "fee", - Type: "uint256", + Type: "uint128", }, }, ) proverAssignmentPayloadArgs = abi.Arguments{ {Name: "PROVER_ASSIGNMENT", Type: stringType}, - {Name: "txListHash", Type: bytes32Type}, + {Name: "blobHash", Type: bytes32Type}, {Name: "assignment.feeToken", Type: addressType}, {Name: "assignment.expiry", Type: uint64Type}, {Name: "assignment.tierFees", Type: tierFeesType}, } + blockMetadataComponentsType, _ = abi.NewType("tuple", "TaikoData.BlockMetadata", blockMetadataComponents) + transitionComponentsType, _ = abi.NewType("tuple", "TaikoData.Transition", transitionComponents) + tierProofComponentsType, _ = abi.NewType("tuple", "TaikoData.TierProof", tierProofComponents) + proveBlockInputArgs = abi.Arguments{ + {Name: "TaikoData.BlockMetadata", Type: blockMetadataComponentsType}, + {Name: "TaikoData.Transition", Type: transitionComponentsType}, + {Name: "TaikoData.TierProof", Type: tierProofComponentsType}, + } ) // Contract ABIs. @@ -129,20 +193,11 @@ func init() { } } -// EncodeProverAssignment performs the solidity `abi.encode` for the given proverAssignment. -func EncodeProverAssignment(assignment *ProverAssignment) ([]byte, error) { - b, err := proverAssignmentArgs.Pack(assignment) - if err != nil { - return nil, fmt.Errorf("failed to abi.encode prover assignment, %w", err) - } - return b, nil -} - -// EncodeEvidence performs the solidity `abi.encode` for the given evidence. -func EncodeEvidence(e *BlockEvidence) ([]byte, error) { - b, err := evidenceArgs.Pack(e) +// EncodeBlockParams performs the solidity `abi.encode` for the given blockParams. +func EncodeBlockParams(params *BlockParams) ([]byte, error) { + b, err := blockParamsComponentsArgs.Pack(params) if err != nil { - return nil, fmt.Errorf("failed to abi.encode evidence, %w", err) + return nil, fmt.Errorf("failed to abi.encode block params, %w", err) } return b, nil } @@ -161,6 +216,19 @@ func EncodeProverAssignmentPayload( return b, nil } +// EncodeProveBlockInput performs the solidity `abi.encode` for the given TaikoL1.proveBlock input. +func EncodeProveBlockInput( + meta *bindings.TaikoDataBlockMetadata, + transition *bindings.TaikoDataTransition, + tierProof *bindings.TaikoDataTierProof, +) ([]byte, error) { + b, err := proveBlockInputArgs.Pack(meta, transition, tierProof) + if err != nil { + return nil, fmt.Errorf("failed to abi.encode TakoL1.proveBlock input, %w", err) + } + return b, nil +} + // UnpackTxListBytes unpacks the input data of a TaikoL1.proposeBlock transaction, and returns the txList bytes. func UnpackTxListBytes(txData []byte) ([]byte, error) { method, err := TaikoL1ABI.MethodById(txData) diff --git a/bindings/encoding/input_test.go b/bindings/encoding/input_test.go index 89939267f..d006fd78f 100644 --- a/bindings/encoding/input_test.go +++ b/bindings/encoding/input_test.go @@ -2,13 +2,12 @@ package encoding import ( "context" - "math/big" - "math/rand" "os" "testing" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethclient" @@ -16,38 +15,6 @@ import ( "github.com/taikoxyz/taiko-client/bindings" ) -func TestEncodeEvidence(t *testing.T) { - evidence := &BlockEvidence{ - MetaHash: randomHash(), - BlockHash: randomHash(), - ParentHash: randomHash(), - SignalRoot: randomHash(), - Graffiti: randomHash(), - Tier: uint16(rand.Uint64()), - Proof: randomHash().Big().Bytes(), - } - - b, err := EncodeEvidence(evidence) - - require.Nil(t, err) - require.NotEmpty(t, b) -} - -func TestEncodeProverAssignment(t *testing.T) { - encoded, err := EncodeProverAssignment( - &ProverAssignment{ - Prover: common.BigToAddress(new(big.Int).SetUint64(rand.Uint64())), - FeeToken: common.Address{}, - TierFees: []TierFee{{Tier: 0, Fee: common.Big1}}, - Signature: randomHash().Big().Bytes(), - Expiry: 1024, - }, - ) - - require.Nil(t, err) - require.NotNil(t, encoded) -} - func TestEncodeProverAssignmentPayload(t *testing.T) { encoded, err := EncodeProverAssignmentPayload( common.BytesToHash(randomBytes(32)), @@ -97,9 +64,7 @@ func TestUnpackTxListBytes(t *testing.T) { tx, err := taikoL1.ProposeBlock( opts, - randomHash(), - [32]byte(randomHash().Bytes()), - randomBytes(32), + randomBytes(1024), txListBytes, ) require.Nil(t, err) diff --git a/bindings/encoding/struct.go b/bindings/encoding/struct.go index b69717e04..527757f6b 100644 --- a/bindings/encoding/struct.go +++ b/bindings/encoding/struct.go @@ -38,15 +38,10 @@ type BlockHeader struct { BaseFeePerGas *big.Int } -// BlockEvidence should be same with TaikoData.BlockEvidence. -type BlockEvidence struct { - MetaHash [32]byte - ParentHash [32]byte - BlockHash [32]byte - SignalRoot [32]byte - Graffiti [32]byte - Tier uint16 - Proof []byte +// BlockParams should be same with TaikoData.BlockParams. +type BlockParams struct { + Assignment *ProverAssignment + ExtraData [32]byte } // TierFee should be same with TaikoData.TierFee. diff --git a/bindings/gen_address_manager.go b/bindings/gen_address_manager.go index d2d9af2d2..a20d614f3 100644 --- a/bindings/gen_address_manager.go +++ b/bindings/gen_address_manager.go @@ -31,7 +31,7 @@ var ( // AddressManagerMetaData contains all meta data concerning the AddressManager contract. var AddressManagerMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"domain\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAddress\",\"type\":\"address\"}],\"name\":\"AddressSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"domain\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"getAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"domain\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"setAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAddress\",\"type\":\"address\"}],\"name\":\"AddressSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"getAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"setAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } // AddressManagerABI is the input ABI used to generate the binding from. @@ -180,12 +180,12 @@ func (_AddressManager *AddressManagerTransactorRaw) Transact(opts *bind.Transact return _AddressManager.Contract.contract.Transact(opts, method, params...) } -// GetAddress is a free data retrieval call binding the contract method 0x656b06a4. +// GetAddress is a free data retrieval call binding the contract method 0x28f713cc. // -// Solidity: function getAddress(uint256 domain, bytes32 name) view returns(address) -func (_AddressManager *AddressManagerCaller) GetAddress(opts *bind.CallOpts, domain *big.Int, name [32]byte) (common.Address, error) { +// Solidity: function getAddress(uint64 chainId, bytes32 name) view returns(address) +func (_AddressManager *AddressManagerCaller) GetAddress(opts *bind.CallOpts, chainId uint64, name [32]byte) (common.Address, error) { var out []interface{} - err := _AddressManager.contract.Call(opts, &out, "getAddress", domain, name) + err := _AddressManager.contract.Call(opts, &out, "getAddress", chainId, name) if err != nil { return *new(common.Address), err @@ -197,18 +197,18 @@ func (_AddressManager *AddressManagerCaller) GetAddress(opts *bind.CallOpts, dom } -// GetAddress is a free data retrieval call binding the contract method 0x656b06a4. +// GetAddress is a free data retrieval call binding the contract method 0x28f713cc. // -// Solidity: function getAddress(uint256 domain, bytes32 name) view returns(address) -func (_AddressManager *AddressManagerSession) GetAddress(domain *big.Int, name [32]byte) (common.Address, error) { - return _AddressManager.Contract.GetAddress(&_AddressManager.CallOpts, domain, name) +// Solidity: function getAddress(uint64 chainId, bytes32 name) view returns(address) +func (_AddressManager *AddressManagerSession) GetAddress(chainId uint64, name [32]byte) (common.Address, error) { + return _AddressManager.Contract.GetAddress(&_AddressManager.CallOpts, chainId, name) } -// GetAddress is a free data retrieval call binding the contract method 0x656b06a4. +// GetAddress is a free data retrieval call binding the contract method 0x28f713cc. // -// Solidity: function getAddress(uint256 domain, bytes32 name) view returns(address) -func (_AddressManager *AddressManagerCallerSession) GetAddress(domain *big.Int, name [32]byte) (common.Address, error) { - return _AddressManager.Contract.GetAddress(&_AddressManager.CallOpts, domain, name) +// Solidity: function getAddress(uint64 chainId, bytes32 name) view returns(address) +func (_AddressManager *AddressManagerCallerSession) GetAddress(chainId uint64, name [32]byte) (common.Address, error) { + return _AddressManager.Contract.GetAddress(&_AddressManager.CallOpts, chainId, name) } // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. @@ -242,6 +242,58 @@ func (_AddressManager *AddressManagerCallerSession) Owner() (common.Address, err return _AddressManager.Contract.Owner(&_AddressManager.CallOpts) } +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_AddressManager *AddressManagerCaller) PendingOwner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _AddressManager.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 (_AddressManager *AddressManagerSession) PendingOwner() (common.Address, error) { + return _AddressManager.Contract.PendingOwner(&_AddressManager.CallOpts) +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_AddressManager *AddressManagerCallerSession) PendingOwner() (common.Address, error) { + return _AddressManager.Contract.PendingOwner(&_AddressManager.CallOpts) +} + +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_AddressManager *AddressManagerTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _AddressManager.contract.Transact(opts, "acceptOwnership") +} + +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_AddressManager *AddressManagerSession) AcceptOwnership() (*types.Transaction, error) { + return _AddressManager.Contract.AcceptOwnership(&_AddressManager.TransactOpts) +} + +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_AddressManager *AddressManagerTransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _AddressManager.Contract.AcceptOwnership(&_AddressManager.TransactOpts) +} + // Init is a paid mutator transaction binding the contract method 0xe1c7392a. // // Solidity: function init() returns() @@ -284,25 +336,25 @@ func (_AddressManager *AddressManagerTransactorSession) RenounceOwnership() (*ty return _AddressManager.Contract.RenounceOwnership(&_AddressManager.TransactOpts) } -// SetAddress is a paid mutator transaction binding the contract method 0xdecd8e39. +// SetAddress is a paid mutator transaction binding the contract method 0xd8f4648f. // -// Solidity: function setAddress(uint256 domain, bytes32 name, address newAddress) returns() -func (_AddressManager *AddressManagerTransactor) SetAddress(opts *bind.TransactOpts, domain *big.Int, name [32]byte, newAddress common.Address) (*types.Transaction, error) { - return _AddressManager.contract.Transact(opts, "setAddress", domain, name, newAddress) +// Solidity: function setAddress(uint64 chainId, bytes32 name, address newAddress) returns() +func (_AddressManager *AddressManagerTransactor) SetAddress(opts *bind.TransactOpts, chainId uint64, name [32]byte, newAddress common.Address) (*types.Transaction, error) { + return _AddressManager.contract.Transact(opts, "setAddress", chainId, name, newAddress) } -// SetAddress is a paid mutator transaction binding the contract method 0xdecd8e39. +// SetAddress is a paid mutator transaction binding the contract method 0xd8f4648f. // -// Solidity: function setAddress(uint256 domain, bytes32 name, address newAddress) returns() -func (_AddressManager *AddressManagerSession) SetAddress(domain *big.Int, name [32]byte, newAddress common.Address) (*types.Transaction, error) { - return _AddressManager.Contract.SetAddress(&_AddressManager.TransactOpts, domain, name, newAddress) +// Solidity: function setAddress(uint64 chainId, bytes32 name, address newAddress) returns() +func (_AddressManager *AddressManagerSession) SetAddress(chainId uint64, name [32]byte, newAddress common.Address) (*types.Transaction, error) { + return _AddressManager.Contract.SetAddress(&_AddressManager.TransactOpts, chainId, name, newAddress) } -// SetAddress is a paid mutator transaction binding the contract method 0xdecd8e39. +// SetAddress is a paid mutator transaction binding the contract method 0xd8f4648f. // -// Solidity: function setAddress(uint256 domain, bytes32 name, address newAddress) returns() -func (_AddressManager *AddressManagerTransactorSession) SetAddress(domain *big.Int, name [32]byte, newAddress common.Address) (*types.Transaction, error) { - return _AddressManager.Contract.SetAddress(&_AddressManager.TransactOpts, domain, name, newAddress) +// Solidity: function setAddress(uint64 chainId, bytes32 name, address newAddress) returns() +func (_AddressManager *AddressManagerTransactorSession) SetAddress(chainId uint64, name [32]byte, newAddress common.Address) (*types.Transaction, error) { + return _AddressManager.Contract.SetAddress(&_AddressManager.TransactOpts, chainId, name, newAddress) } // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. @@ -395,49 +447,49 @@ func (it *AddressManagerAddressSetIterator) Close() error { // AddressManagerAddressSet represents a AddressSet event raised by the AddressManager contract. type AddressManagerAddressSet struct { - Domain *big.Int + ChainId uint64 Name [32]byte NewAddress common.Address OldAddress common.Address Raw types.Log // Blockchain specific contextual infos } -// FilterAddressSet is a free log retrieval operation binding the contract event 0xe41a6e8584d6e19a0dfc5f9331be4ebe61b5f025d45da164c9ca6ee9b837cea9. +// FilterAddressSet is a free log retrieval operation binding the contract event 0x500dcd607a98daece9bccc2511bf6032471252929de73caf507aae0e082f8453. // -// Solidity: event AddressSet(uint256 indexed domain, bytes32 indexed name, address newAddress, address oldAddress) -func (_AddressManager *AddressManagerFilterer) FilterAddressSet(opts *bind.FilterOpts, domain []*big.Int, name [][32]byte) (*AddressManagerAddressSetIterator, error) { +// Solidity: event AddressSet(uint64 indexed chainId, bytes32 indexed name, address newAddress, address oldAddress) +func (_AddressManager *AddressManagerFilterer) FilterAddressSet(opts *bind.FilterOpts, chainId []uint64, name [][32]byte) (*AddressManagerAddressSetIterator, error) { - var domainRule []interface{} - for _, domainItem := range domain { - domainRule = append(domainRule, domainItem) + var chainIdRule []interface{} + for _, chainIdItem := range chainId { + chainIdRule = append(chainIdRule, chainIdItem) } var nameRule []interface{} for _, nameItem := range name { nameRule = append(nameRule, nameItem) } - logs, sub, err := _AddressManager.contract.FilterLogs(opts, "AddressSet", domainRule, nameRule) + logs, sub, err := _AddressManager.contract.FilterLogs(opts, "AddressSet", chainIdRule, nameRule) if err != nil { return nil, err } return &AddressManagerAddressSetIterator{contract: _AddressManager.contract, event: "AddressSet", logs: logs, sub: sub}, nil } -// WatchAddressSet is a free log subscription operation binding the contract event 0xe41a6e8584d6e19a0dfc5f9331be4ebe61b5f025d45da164c9ca6ee9b837cea9. +// WatchAddressSet is a free log subscription operation binding the contract event 0x500dcd607a98daece9bccc2511bf6032471252929de73caf507aae0e082f8453. // -// Solidity: event AddressSet(uint256 indexed domain, bytes32 indexed name, address newAddress, address oldAddress) -func (_AddressManager *AddressManagerFilterer) WatchAddressSet(opts *bind.WatchOpts, sink chan<- *AddressManagerAddressSet, domain []*big.Int, name [][32]byte) (event.Subscription, error) { +// Solidity: event AddressSet(uint64 indexed chainId, bytes32 indexed name, address newAddress, address oldAddress) +func (_AddressManager *AddressManagerFilterer) WatchAddressSet(opts *bind.WatchOpts, sink chan<- *AddressManagerAddressSet, chainId []uint64, name [][32]byte) (event.Subscription, error) { - var domainRule []interface{} - for _, domainItem := range domain { - domainRule = append(domainRule, domainItem) + var chainIdRule []interface{} + for _, chainIdItem := range chainId { + chainIdRule = append(chainIdRule, chainIdItem) } var nameRule []interface{} for _, nameItem := range name { nameRule = append(nameRule, nameItem) } - logs, sub, err := _AddressManager.contract.WatchLogs(opts, "AddressSet", domainRule, nameRule) + logs, sub, err := _AddressManager.contract.WatchLogs(opts, "AddressSet", chainIdRule, nameRule) if err != nil { return nil, err } @@ -469,9 +521,9 @@ func (_AddressManager *AddressManagerFilterer) WatchAddressSet(opts *bind.WatchO }), nil } -// ParseAddressSet is a log parse operation binding the contract event 0xe41a6e8584d6e19a0dfc5f9331be4ebe61b5f025d45da164c9ca6ee9b837cea9. +// ParseAddressSet is a log parse operation binding the contract event 0x500dcd607a98daece9bccc2511bf6032471252929de73caf507aae0e082f8453. // -// Solidity: event AddressSet(uint256 indexed domain, bytes32 indexed name, address newAddress, address oldAddress) +// Solidity: event AddressSet(uint64 indexed chainId, bytes32 indexed name, address newAddress, address oldAddress) func (_AddressManager *AddressManagerFilterer) ParseAddressSet(log types.Log) (*AddressManagerAddressSet, error) { event := new(AddressManagerAddressSet) if err := _AddressManager.contract.UnpackLog(event, "AddressSet", log); err != nil { @@ -615,6 +667,159 @@ func (_AddressManager *AddressManagerFilterer) ParseInitialized(log types.Log) ( return event, nil } +// AddressManagerOwnershipTransferStartedIterator is returned from FilterOwnershipTransferStarted and is used to iterate over the raw logs and unpacked data for OwnershipTransferStarted events raised by the AddressManager contract. +type AddressManagerOwnershipTransferStartedIterator struct { + Event *AddressManagerOwnershipTransferStarted // 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 *AddressManagerOwnershipTransferStartedIterator) 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(AddressManagerOwnershipTransferStarted) + 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(AddressManagerOwnershipTransferStarted) + 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 *AddressManagerOwnershipTransferStartedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *AddressManagerOwnershipTransferStartedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// AddressManagerOwnershipTransferStarted represents a OwnershipTransferStarted event raised by the AddressManager contract. +type AddressManagerOwnershipTransferStarted 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 (_AddressManager *AddressManagerFilterer) FilterOwnershipTransferStarted(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*AddressManagerOwnershipTransferStartedIterator, 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 := _AddressManager.contract.FilterLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &AddressManagerOwnershipTransferStartedIterator{contract: _AddressManager.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 (_AddressManager *AddressManagerFilterer) WatchOwnershipTransferStarted(opts *bind.WatchOpts, sink chan<- *AddressManagerOwnershipTransferStarted, 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 := _AddressManager.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(AddressManagerOwnershipTransferStarted) + if err := _AddressManager.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 (_AddressManager *AddressManagerFilterer) ParseOwnershipTransferStarted(log types.Log) (*AddressManagerOwnershipTransferStarted, error) { + event := new(AddressManagerOwnershipTransferStarted) + if err := _AddressManager.contract.UnpackLog(event, "OwnershipTransferStarted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // AddressManagerOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the AddressManager contract. type AddressManagerOwnershipTransferredIterator struct { Event *AddressManagerOwnershipTransferred // Event containing the contract specifics and raw log diff --git a/bindings/gen_guardian_prover.go b/bindings/gen_guardian_prover.go index cf17b1eb6..f64bfae4b 100644 --- a/bindings/gen_guardian_prover.go +++ b/bindings/gen_guardian_prover.go @@ -29,20 +29,15 @@ var ( _ = abi.ConvertType ) -// TaikoDataBlockEvidence is an auto generated low-level Go binding around an user-defined struct. -type TaikoDataBlockEvidence struct { - MetaHash [32]byte - ParentHash [32]byte - BlockHash [32]byte - SignalRoot [32]byte - Graffiti [32]byte - Tier uint16 - Proof []byte +// 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: "[{\"inputs\":[],\"name\":\"INVALID_GUARDIAN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"INVALID_GUARDIAN_SET\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"INVALID_PAUSE_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PROVING_FAILED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"REENTRANT_CALL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_MANAGER\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"metaHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"graffiti\",\"type\":\"bytes32\"},{\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockEvidence\",\"name\":\"evidence\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"approvalBits\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"proofSubmitted\",\"type\":\"bool\"}],\"name\":\"Approved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[5]\",\"name\":\"\",\"type\":\"address[5]\"}],\"name\":\"GuardiansUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"NUM_GUARDIANS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REQUIRED_GUARDIANS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"approvals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"approvalBits\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"metaHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"graffiti\",\"type\":\"bytes32\"},{\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"internalType\":\"structTaikoData.BlockEvidence\",\"name\":\"evidence\",\"type\":\"tuple\"}],\"name\":\"approveEvidence\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"guardianIds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"guardians\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[5]\",\"name\":\"_guardians\",\"type\":\"address[5]\"}],\"name\":\"setGuardians\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + ABI: "[{\"inputs\":[],\"name\":\"INVALID_GUARDIAN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"INVALID_GUARDIAN_SET\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"INVALID_PAUSE_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PROVING_FAILED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"REENTRANT_CALL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_MANAGER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_UNEXPECTED_CHAINID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"approvalBits\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"proofSubmitted\",\"type\":\"bool\"}],\"name\":\"Approved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[5]\",\"name\":\"\",\"type\":\"address[5]\"}],\"name\":\"GuardiansUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"NUM_GUARDIANS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REQUIRED_GUARDIANS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"approvals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"approvalBits\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"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\":\"address\",\"name\":\"coinbase\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"minTier\",\"type\":\"uint16\"},{\"internalType\":\"bool\",\"name\":\"blobUsed\",\"type\":\"bool\"}],\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"graffiti\",\"type\":\"bytes32\"}],\"internalType\":\"structTaikoData.Transition\",\"name\":\"tran\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structTaikoData.TierProof\",\"name\":\"proof\",\"type\":\"tuple\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"guardianIds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"guardians\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[5]\",\"name\":\"_guardians\",\"type\":\"address[5]\"}],\"name\":\"setGuardians\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } // GuardianProverABI is the input ABI used to generate the binding from. @@ -439,10 +434,41 @@ func (_GuardianProver *GuardianProverCallerSession) Paused() (bool, error) { return _GuardianProver.Contract.Paused(&_GuardianProver.CallOpts) } -// Resolve is a free data retrieval call binding the contract method 0x6c6563f6. +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. // -// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr) -func (_GuardianProver *GuardianProverCaller) Resolve(opts *bind.CallOpts, chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) { +// Solidity: function pendingOwner() view returns(address) +func (_GuardianProver *GuardianProverCaller) PendingOwner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _GuardianProver.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 (_GuardianProver *GuardianProverSession) PendingOwner() (common.Address, error) { + return _GuardianProver.Contract.PendingOwner(&_GuardianProver.CallOpts) +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_GuardianProver *GuardianProverCallerSession) PendingOwner() (common.Address, error) { + return _GuardianProver.Contract.PendingOwner(&_GuardianProver.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 addr) +func (_GuardianProver *GuardianProverCaller) Resolve(opts *bind.CallOpts, chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) { var out []interface{} err := _GuardianProver.contract.Call(opts, &out, "resolve", chainId, name, allowZeroAddress) @@ -456,17 +482,17 @@ func (_GuardianProver *GuardianProverCaller) Resolve(opts *bind.CallOpts, chainI } -// Resolve is a free data retrieval call binding the contract method 0x6c6563f6. +// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf. // -// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr) -func (_GuardianProver *GuardianProverSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) { +// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr) +func (_GuardianProver *GuardianProverSession) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) { return _GuardianProver.Contract.Resolve(&_GuardianProver.CallOpts, chainId, name, allowZeroAddress) } -// Resolve is a free data retrieval call binding the contract method 0x6c6563f6. +// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf. // -// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr) -func (_GuardianProver *GuardianProverCallerSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) { +// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr) +func (_GuardianProver *GuardianProverCallerSession) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) { return _GuardianProver.Contract.Resolve(&_GuardianProver.CallOpts, chainId, name, allowZeroAddress) } @@ -501,25 +527,46 @@ func (_GuardianProver *GuardianProverCallerSession) Resolve0(name [32]byte, allo return _GuardianProver.Contract.Resolve0(&_GuardianProver.CallOpts, name, allowZeroAddress) } -// ApproveEvidence is a paid mutator transaction binding the contract method 0x601fdeb2. +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_GuardianProver *GuardianProverTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GuardianProver.contract.Transact(opts, "acceptOwnership") +} + +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_GuardianProver *GuardianProverSession) AcceptOwnership() (*types.Transaction, error) { + return _GuardianProver.Contract.AcceptOwnership(&_GuardianProver.TransactOpts) +} + +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. // -// Solidity: function approveEvidence(uint64 blockId, (bytes32,bytes32,bytes32,bytes32,bytes32,uint16,bytes) evidence) returns() -func (_GuardianProver *GuardianProverTransactor) ApproveEvidence(opts *bind.TransactOpts, blockId uint64, evidence TaikoDataBlockEvidence) (*types.Transaction, error) { - return _GuardianProver.contract.Transact(opts, "approveEvidence", blockId, evidence) +// Solidity: function acceptOwnership() returns() +func (_GuardianProver *GuardianProverTransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _GuardianProver.Contract.AcceptOwnership(&_GuardianProver.TransactOpts) } -// ApproveEvidence is a paid mutator transaction binding the contract method 0x601fdeb2. +// Approve is a paid mutator transaction binding the contract method 0x0bba05b8. // -// Solidity: function approveEvidence(uint64 blockId, (bytes32,bytes32,bytes32,bytes32,bytes32,uint16,bytes) evidence) returns() -func (_GuardianProver *GuardianProverSession) ApproveEvidence(blockId uint64, evidence TaikoDataBlockEvidence) (*types.Transaction, error) { - return _GuardianProver.Contract.ApproveEvidence(&_GuardianProver.TransactOpts, blockId, evidence) +// Solidity: function approve((bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint16,bool) meta, (bytes32,bytes32,bytes32,bytes32) tran, (uint16,bytes) proof) returns() +func (_GuardianProver *GuardianProverTransactor) Approve(opts *bind.TransactOpts, meta TaikoDataBlockMetadata, tran TaikoDataTransition, proof TaikoDataTierProof) (*types.Transaction, error) { + return _GuardianProver.contract.Transact(opts, "approve", meta, tran, proof) } -// ApproveEvidence is a paid mutator transaction binding the contract method 0x601fdeb2. +// Approve is a paid mutator transaction binding the contract method 0x0bba05b8. // -// Solidity: function approveEvidence(uint64 blockId, (bytes32,bytes32,bytes32,bytes32,bytes32,uint16,bytes) evidence) returns() -func (_GuardianProver *GuardianProverTransactorSession) ApproveEvidence(blockId uint64, evidence TaikoDataBlockEvidence) (*types.Transaction, error) { - return _GuardianProver.Contract.ApproveEvidence(&_GuardianProver.TransactOpts, blockId, evidence) +// Solidity: function approve((bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint16,bool) meta, (bytes32,bytes32,bytes32,bytes32) tran, (uint16,bytes) proof) returns() +func (_GuardianProver *GuardianProverSession) Approve(meta TaikoDataBlockMetadata, tran TaikoDataTransition, proof TaikoDataTierProof) (*types.Transaction, error) { + return _GuardianProver.Contract.Approve(&_GuardianProver.TransactOpts, meta, tran, proof) +} + +// Approve is a paid mutator transaction binding the contract method 0x0bba05b8. +// +// Solidity: function approve((bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint16,bool) meta, (bytes32,bytes32,bytes32,bytes32) tran, (uint16,bytes) proof) returns() +func (_GuardianProver *GuardianProverTransactorSession) Approve(meta TaikoDataBlockMetadata, tran TaikoDataTransition, proof TaikoDataTierProof) (*types.Transaction, error) { + return _GuardianProver.Contract.Approve(&_GuardianProver.TransactOpts, meta, tran, proof) } // Init is a paid mutator transaction binding the contract method 0x19ab453c. @@ -718,30 +765,39 @@ func (it *GuardianProverApprovedIterator) Close() error { // GuardianProverApproved represents a Approved event raised by the GuardianProver contract. type GuardianProverApproved struct { BlockId uint64 - Evidence TaikoDataBlockEvidence ApprovalBits *big.Int ProofSubmitted bool Raw types.Log // Blockchain specific contextual infos } -// FilterApproved is a free log retrieval operation binding the contract event 0xfc25b9541d5b04f14930e5713bbf962093ce63ad1cc1cbea8850bfe7e1feef97. +// FilterApproved is a free log retrieval operation binding the contract event 0x491ef33230925e6876158c5f7551d4f58c2c7d04e41546850b1009678c20816a. // -// Solidity: event Approved(uint64 blockId, (bytes32,bytes32,bytes32,bytes32,bytes32,uint16,bytes) evidence, uint256 approvalBits, bool proofSubmitted) -func (_GuardianProver *GuardianProverFilterer) FilterApproved(opts *bind.FilterOpts) (*GuardianProverApprovedIterator, error) { +// Solidity: event Approved(uint64 indexed blockId, uint256 approvalBits, bool proofSubmitted) +func (_GuardianProver *GuardianProverFilterer) FilterApproved(opts *bind.FilterOpts, blockId []uint64) (*GuardianProverApprovedIterator, error) { + + var blockIdRule []interface{} + for _, blockIdItem := range blockId { + blockIdRule = append(blockIdRule, blockIdItem) + } - logs, sub, err := _GuardianProver.contract.FilterLogs(opts, "Approved") + logs, sub, err := _GuardianProver.contract.FilterLogs(opts, "Approved", blockIdRule) if err != nil { return nil, err } return &GuardianProverApprovedIterator{contract: _GuardianProver.contract, event: "Approved", logs: logs, sub: sub}, nil } -// WatchApproved is a free log subscription operation binding the contract event 0xfc25b9541d5b04f14930e5713bbf962093ce63ad1cc1cbea8850bfe7e1feef97. +// WatchApproved is a free log subscription operation binding the contract event 0x491ef33230925e6876158c5f7551d4f58c2c7d04e41546850b1009678c20816a. // -// Solidity: event Approved(uint64 blockId, (bytes32,bytes32,bytes32,bytes32,bytes32,uint16,bytes) evidence, uint256 approvalBits, bool proofSubmitted) -func (_GuardianProver *GuardianProverFilterer) WatchApproved(opts *bind.WatchOpts, sink chan<- *GuardianProverApproved) (event.Subscription, error) { +// Solidity: event Approved(uint64 indexed blockId, uint256 approvalBits, bool proofSubmitted) +func (_GuardianProver *GuardianProverFilterer) WatchApproved(opts *bind.WatchOpts, sink chan<- *GuardianProverApproved, blockId []uint64) (event.Subscription, error) { - logs, sub, err := _GuardianProver.contract.WatchLogs(opts, "Approved") + var blockIdRule []interface{} + for _, blockIdItem := range blockId { + blockIdRule = append(blockIdRule, blockIdItem) + } + + logs, sub, err := _GuardianProver.contract.WatchLogs(opts, "Approved", blockIdRule) if err != nil { return nil, err } @@ -773,9 +829,9 @@ func (_GuardianProver *GuardianProverFilterer) WatchApproved(opts *bind.WatchOpt }), nil } -// ParseApproved is a log parse operation binding the contract event 0xfc25b9541d5b04f14930e5713bbf962093ce63ad1cc1cbea8850bfe7e1feef97. +// ParseApproved is a log parse operation binding the contract event 0x491ef33230925e6876158c5f7551d4f58c2c7d04e41546850b1009678c20816a. // -// Solidity: event Approved(uint64 blockId, (bytes32,bytes32,bytes32,bytes32,bytes32,uint16,bytes) evidence, uint256 approvalBits, bool proofSubmitted) +// Solidity: event Approved(uint64 indexed blockId, uint256 approvalBits, bool proofSubmitted) func (_GuardianProver *GuardianProverFilterer) ParseApproved(log types.Log) (*GuardianProverApproved, error) { event := new(GuardianProverApproved) if err := _GuardianProver.contract.UnpackLog(event, "Approved", log); err != nil { @@ -1053,6 +1109,159 @@ func (_GuardianProver *GuardianProverFilterer) ParseInitialized(log types.Log) ( return event, nil } +// GuardianProverOwnershipTransferStartedIterator is returned from FilterOwnershipTransferStarted and is used to iterate over the raw logs and unpacked data for OwnershipTransferStarted events raised by the GuardianProver contract. +type GuardianProverOwnershipTransferStartedIterator struct { + Event *GuardianProverOwnershipTransferStarted // 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 *GuardianProverOwnershipTransferStartedIterator) 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(GuardianProverOwnershipTransferStarted) + 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(GuardianProverOwnershipTransferStarted) + 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 *GuardianProverOwnershipTransferStartedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GuardianProverOwnershipTransferStartedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GuardianProverOwnershipTransferStarted represents a OwnershipTransferStarted event raised by the GuardianProver contract. +type GuardianProverOwnershipTransferStarted 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 (_GuardianProver *GuardianProverFilterer) FilterOwnershipTransferStarted(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*GuardianProverOwnershipTransferStartedIterator, 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 := _GuardianProver.contract.FilterLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &GuardianProverOwnershipTransferStartedIterator{contract: _GuardianProver.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 (_GuardianProver *GuardianProverFilterer) WatchOwnershipTransferStarted(opts *bind.WatchOpts, sink chan<- *GuardianProverOwnershipTransferStarted, 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 := _GuardianProver.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(GuardianProverOwnershipTransferStarted) + if err := _GuardianProver.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 (_GuardianProver *GuardianProverFilterer) ParseOwnershipTransferStarted(log types.Log) (*GuardianProverOwnershipTransferStarted, error) { + event := new(GuardianProverOwnershipTransferStarted) + if err := _GuardianProver.contract.UnpackLog(event, "OwnershipTransferStarted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // GuardianProverOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the GuardianProver contract. type GuardianProverOwnershipTransferredIterator struct { Event *GuardianProverOwnershipTransferred // Event containing the contract specifics and raw log diff --git a/bindings/gen_taiko_l1.go b/bindings/gen_taiko_l1.go index f28bb0283..8cc90711d 100644 --- a/bindings/gen_taiko_l1.go +++ b/bindings/gen_taiko_l1.go @@ -54,27 +54,28 @@ type TaikoDataBlock struct { ProposedAt uint64 NextTransitionId uint32 VerifiedTransitionId uint32 - MinTier uint16 Reserved [7][32]byte } // TaikoDataBlockMetadata is an auto generated low-level Go binding around an user-defined struct. type TaikoDataBlockMetadata struct { - L1Hash [32]byte - Difficulty [32]byte - TxListHash [32]byte - ExtraData [32]byte - Id uint64 - Timestamp uint64 - L1Height uint64 - GasLimit uint32 - Coinbase common.Address - DepositsProcessed []TaikoDataEthDeposit + 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 } // TaikoDataConfig is an auto generated low-level Go binding around an user-defined struct. type TaikoDataConfig struct { - ChainId *big.Int + ChainId uint64 BlockMaxProposals uint64 BlockRingBufferSize uint64 MaxBlocksToVerifyPerProposal uint64 @@ -88,6 +89,7 @@ type TaikoDataConfig struct { EthDepositMaxAmount *big.Int EthDepositGas *big.Int EthDepositMaxFee *big.Int + AllowUsingBlobForDA bool } // TaikoDataEthDeposit is an auto generated low-level Go binding around an user-defined struct. @@ -110,6 +112,7 @@ type TaikoDataSlotB struct { NumBlocks uint64 NextEthDepositToProcess uint64 LastVerifiedBlockId uint64 + ProvingPaused bool } // TaikoDataStateVariables is an auto generated low-level Go binding around an user-defined struct. @@ -124,6 +127,14 @@ type TaikoDataStateVariables struct { // TaikoDataTransition is an auto generated low-level Go binding around an user-defined struct. type TaikoDataTransition struct { + ParentHash [32]byte + BlockHash [32]byte + SignalRoot [32]byte + Graffiti [32]byte +} + +// TaikoDataTransitionState is an auto generated low-level Go binding around an user-defined struct. +type TaikoDataTransitionState struct { Key [32]byte BlockHash [32]byte SignalRoot [32]byte @@ -138,7 +149,7 @@ type TaikoDataTransition struct { // TaikoL1ClientMetaData contains all meta data concerning the TaikoL1Client contract. var TaikoL1ClientMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"name\":\"ETH_TRANSFER_FAILED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"INVALID_PAUSE_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_CONTESTED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_CONTESTED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_PROVED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_PROVED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ASSIGNED_PROVER_NOT_ALLOWED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ASSIGNED_PROVER_NOT_ALLOWED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ASSIGNMENT_EXPIRED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ASSIGNMENT_EXPIRED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ASSIGNMENT_INSUFFICIENT_FEE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ASSIGNMENT_INSUFFICIENT_FEE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ASSIGNMENT_INVALID_PARAMS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ASSIGNMENT_INVALID_PARAMS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ASSIGNMENT_INVALID_SIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ASSIGNMENT_INVALID_SIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ADDRESS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_AMOUNT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_AMOUNT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_TIER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_TIER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_ASSIGNED_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_ASSIGNED_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TIER_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TIER_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TRANSITION_ID_ZERO\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TRANSITION_ID_ZERO\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TRANSITION_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TRANSITION_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TXLIST_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TXLIST_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TXLIST_TOO_LARGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TXLIST_TOO_LARGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNEXPECTED_TRANSITION_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNEXPECTED_TRANSITION_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNEXPECTED_TRANSITION_TIER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNEXPECTED_TRANSITION_TIER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"REENTRANT_CALL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_MANAGER\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assignedProver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"livenessBond\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"proverFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"minTier\",\"type\":\"uint16\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"difficulty\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"extraData\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"coinbase\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assignedProver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"livenessBond\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"proverFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"minTier\",\"type\":\"uint16\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"difficulty\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"extraData\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"coinbase\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assignedProver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assignedProver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"srcHeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"srcHeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenCredited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenCredited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDebited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDebited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"contester\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"contestBond\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"}],\"name\":\"TransitionContested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"contester\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"contestBond\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"}],\"name\":\"TransitionContested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"validityBond\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"}],\"name\":\"TransitionProved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"validityBond\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"}],\"name\":\"TransitionProved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"canDepositEthToL2\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"depositEtherToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"depositTaikoToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"metaHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"assignedProver\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"livenessBond\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"proposedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nextTransitionId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"verifiedTransitionId\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"minTier\",\"type\":\"uint16\"},{\"internalType\":\"bytes32[7]\",\"name\":\"__reserved\",\"type\":\"bytes32[7]\"}],\"internalType\":\"structTaikoData.Block\",\"name\":\"blk\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxProposals\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockRingBufferSize\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxBlocksToVerifyPerProposal\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"blockMaxGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"blockMaxTxListBytes\",\"type\":\"uint24\"},{\"internalType\":\"uint96\",\"name\":\"livenessBond\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMinCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMaxCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMinAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMaxAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositMaxFee\",\"type\":\"uint256\"}],\"internalType\":\"structTaikoData.Config\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"rand\",\"type\":\"uint256\"}],\"name\":\"getMinTier\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStateVariables\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.StateVariables\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getSyncedSnippet\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"internalType\":\"structICrossChainSync.Snippet\",\"name\":\"data\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getTaikoTokenBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"tierId\",\"type\":\"uint16\"}],\"name\":\"getTier\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"verifierName\",\"type\":\"bytes32\"},{\"internalType\":\"uint96\",\"name\":\"validityBond\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"contestBond\",\"type\":\"uint96\"},{\"internalType\":\"uint24\",\"name\":\"cooldownWindow\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"provingWindow\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"maxBlocksToVerify\",\"type\":\"uint8\"}],\"internalType\":\"structITierProvider.Tier\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTierIds\",\"outputs\":[{\"internalType\":\"uint16[]\",\"name\":\"\",\"type\":\"uint16[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"}],\"name\":\"getTransition\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"validityBond\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"contester\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"contestBond\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"},{\"internalType\":\"bytes32[4]\",\"name\":\"__reserved\",\"type\":\"bytes32[4]\"}],\"internalType\":\"structTaikoData.Transition\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_genesisBlockHash\",\"type\":\"bytes32\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isConfigValid\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"extraData\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"assignment\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"txList\",\"type\":\"bytes\"}],\"name\":\"proposeBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"difficulty\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"extraData\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"coinbase\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"proveBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"state\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.SlotA\",\"name\":\"slotA\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.SlotB\",\"name\":\"slotB\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"maxBlocksToVerify\",\"type\":\"uint64\"}],\"name\":\"verifyBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTaikoToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + ABI: "[{\"inputs\":[],\"name\":\"ETH_TRANSFER_FAILED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"INVALID_PAUSE_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_CONTESTED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_CONTESTED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_PROVED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_PROVED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ASSIGNED_PROVER_NOT_ALLOWED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ASSIGNED_PROVER_NOT_ALLOWED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ASSIGNMENT_EXPIRED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ASSIGNMENT_EXPIRED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ASSIGNMENT_INSUFFICIENT_FEE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ASSIGNMENT_INSUFFICIENT_FEE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ASSIGNMENT_INVALID_PARAMS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ASSIGNMENT_INVALID_PARAMS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ASSIGNMENT_INVALID_SIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ASSIGNMENT_INVALID_SIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOB_FOR_DA_DISABLED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOB_FOR_DA_DISABLED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ADDRESS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_AMOUNT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_AMOUNT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PAUSE_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PAUSE_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_TIER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_TIER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_TRANSITION\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_TRANSITION\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_ASSIGNED_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_ASSIGNED_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NO_BLOB_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NO_BLOB_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_PROPOSER_NOT_EOA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_PROPOSER_NOT_EOA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_PROVING_PAUSED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_PROVING_PAUSED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TIER_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TIER_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TRANSITION_ID_ZERO\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TRANSITION_ID_ZERO\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TRANSITION_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TRANSITION_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TXLIST_TOO_LARGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TXLIST_TOO_LARGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNEXPECTED_TRANSITION_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNEXPECTED_TRANSITION_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNEXPECTED_TRANSITION_TIER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNEXPECTED_TRANSITION_TIER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"REENTRANT_CALL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_MANAGER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_UNEXPECTED_CHAINID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assignedProver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"livenessBond\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"proverFee\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"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\":\"address\",\"name\":\"coinbase\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"minTier\",\"type\":\"uint16\"},{\"internalType\":\"bool\",\"name\":\"blobUsed\",\"type\":\"bool\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assignedProver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"livenessBond\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"proverFee\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"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\":\"address\",\"name\":\"coinbase\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"minTier\",\"type\":\"uint16\"},{\"internalType\":\"bool\",\"name\":\"blobUsed\",\"type\":\"bool\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assignedProver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assignedProver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"srcHeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"srcHeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"ProvingPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"ProvingPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenCredited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenCredited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDebited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDebited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"graffiti\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structTaikoData.Transition\",\"name\":\"tran\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"contester\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"contestBond\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"}],\"name\":\"TransitionContested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"graffiti\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structTaikoData.Transition\",\"name\":\"tran\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"contester\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"contestBond\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"}],\"name\":\"TransitionContested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"graffiti\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structTaikoData.Transition\",\"name\":\"tran\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"validityBond\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"}],\"name\":\"TransitionProved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"graffiti\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structTaikoData.Transition\",\"name\":\"tran\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"validityBond\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"}],\"name\":\"TransitionProved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"canDepositEthToL2\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"depositEtherToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"depositTaikoToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"metaHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"assignedProver\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"livenessBond\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"proposedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nextTransitionId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"verifiedTransitionId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32[7]\",\"name\":\"__reserved\",\"type\":\"bytes32[7]\"}],\"internalType\":\"structTaikoData.Block\",\"name\":\"blk\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxProposals\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockRingBufferSize\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxBlocksToVerifyPerProposal\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"blockMaxGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"blockMaxTxListBytes\",\"type\":\"uint24\"},{\"internalType\":\"uint96\",\"name\":\"livenessBond\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMinCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMaxCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMinAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMaxAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositMaxFee\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"allowUsingBlobForDA\",\"type\":\"bool\"}],\"internalType\":\"structTaikoData.Config\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"rand\",\"type\":\"uint256\"}],\"name\":\"getMinTier\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStateVariables\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.StateVariables\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getSyncedSnippet\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"internalType\":\"structICrossChainSync.Snippet\",\"name\":\"data\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getTaikoTokenBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"tierId\",\"type\":\"uint16\"}],\"name\":\"getTier\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"verifierName\",\"type\":\"bytes32\"},{\"internalType\":\"uint96\",\"name\":\"validityBond\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"contestBond\",\"type\":\"uint96\"},{\"internalType\":\"uint24\",\"name\":\"cooldownWindow\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"provingWindow\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"maxBlocksToVerify\",\"type\":\"uint8\"}],\"internalType\":\"structITierProvider.Tier\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTierIds\",\"outputs\":[{\"internalType\":\"uint16[]\",\"name\":\"\",\"type\":\"uint16[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"}],\"name\":\"getTransition\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"validityBond\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"contester\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"contestBond\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"},{\"internalType\":\"bytes32[4]\",\"name\":\"__reserved\",\"type\":\"bytes32[4]\"}],\"internalType\":\"structTaikoData.TransitionState\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_genesisBlockHash\",\"type\":\"bytes32\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isConfigValid\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"pause\",\"type\":\"bool\"}],\"name\":\"pauseProving\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"params\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"txList\",\"type\":\"bytes\"}],\"name\":\"proposeBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"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\":\"address\",\"name\":\"coinbase\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"minTier\",\"type\":\"uint16\"},{\"internalType\":\"bool\",\"name\":\"blobUsed\",\"type\":\"bool\"}],\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"proveBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"state\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.SlotA\",\"name\":\"slotA\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"provingPaused\",\"type\":\"bool\"}],\"internalType\":\"structTaikoData.SlotB\",\"name\":\"slotB\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"maxBlocksToVerify\",\"type\":\"uint64\"}],\"name\":\"verifyBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTaikoToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", } // TaikoL1ClientABI is the input ABI used to generate the binding from. @@ -351,7 +362,7 @@ func (_TaikoL1Client *TaikoL1ClientCallerSession) CanDepositEthToL2(amount *big. // GetBlock is a free data retrieval call binding the contract method 0x5fa15e79. // -// Solidity: function getBlock(uint64 blockId) view returns((bytes32,address,uint96,uint64,uint64,uint32,uint32,uint16,bytes32[7]) blk) +// Solidity: function getBlock(uint64 blockId) view returns((bytes32,address,uint96,uint64,uint64,uint32,uint32,bytes32[7]) blk) func (_TaikoL1Client *TaikoL1ClientCaller) GetBlock(opts *bind.CallOpts, blockId uint64) (TaikoDataBlock, error) { var out []interface{} err := _TaikoL1Client.contract.Call(opts, &out, "getBlock", blockId) @@ -368,21 +379,21 @@ func (_TaikoL1Client *TaikoL1ClientCaller) GetBlock(opts *bind.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,uint32,uint32,uint16,bytes32[7]) blk) +// Solidity: function getBlock(uint64 blockId) view returns((bytes32,address,uint96,uint64,uint64,uint32,uint32,bytes32[7]) 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,uint32,uint32,uint16,bytes32[7]) blk) +// Solidity: function getBlock(uint64 blockId) view returns((bytes32,address,uint96,uint64,uint64,uint32,uint32,bytes32[7]) blk) func (_TaikoL1Client *TaikoL1ClientCallerSession) GetBlock(blockId uint64) (TaikoDataBlock, error) { return _TaikoL1Client.Contract.GetBlock(&_TaikoL1Client.CallOpts, blockId) } // GetConfig is a free data retrieval call binding the contract method 0xc3f909d4. // -// Solidity: function getConfig() pure returns((uint256,uint64,uint64,uint64,uint32,uint24,uint96,uint256,uint64,uint64,uint96,uint96,uint256,uint256)) +// Solidity: function getConfig() view returns((uint64,uint64,uint64,uint64,uint32,uint24,uint96,uint256,uint64,uint64,uint96,uint96,uint256,uint256,bool)) func (_TaikoL1Client *TaikoL1ClientCaller) GetConfig(opts *bind.CallOpts) (TaikoDataConfig, error) { var out []interface{} err := _TaikoL1Client.contract.Call(opts, &out, "getConfig") @@ -399,14 +410,14 @@ func (_TaikoL1Client *TaikoL1ClientCaller) GetConfig(opts *bind.CallOpts) (Taiko // GetConfig is a free data retrieval call binding the contract method 0xc3f909d4. // -// Solidity: function getConfig() pure returns((uint256,uint64,uint64,uint64,uint32,uint24,uint96,uint256,uint64,uint64,uint96,uint96,uint256,uint256)) +// Solidity: function getConfig() view returns((uint64,uint64,uint64,uint64,uint32,uint24,uint96,uint256,uint64,uint64,uint96,uint96,uint256,uint256,bool)) func (_TaikoL1Client *TaikoL1ClientSession) GetConfig() (TaikoDataConfig, error) { return _TaikoL1Client.Contract.GetConfig(&_TaikoL1Client.CallOpts) } // GetConfig is a free data retrieval call binding the contract method 0xc3f909d4. // -// Solidity: function getConfig() pure returns((uint256,uint64,uint64,uint64,uint32,uint24,uint96,uint256,uint64,uint64,uint96,uint96,uint256,uint256)) +// Solidity: function getConfig() view returns((uint64,uint64,uint64,uint64,uint32,uint24,uint96,uint256,uint64,uint64,uint96,uint96,uint256,uint256,bool)) func (_TaikoL1Client *TaikoL1ClientCallerSession) GetConfig() (TaikoDataConfig, error) { return _TaikoL1Client.Contract.GetConfig(&_TaikoL1Client.CallOpts) } @@ -600,15 +611,15 @@ func (_TaikoL1Client *TaikoL1ClientCallerSession) GetTierIds() ([]uint16, error) // GetTransition is a free data retrieval call binding the contract method 0xfd257e29. // // Solidity: function getTransition(uint64 blockId, bytes32 parentHash) view returns((bytes32,bytes32,bytes32,address,uint96,address,uint96,uint64,uint16,bytes32[4])) -func (_TaikoL1Client *TaikoL1ClientCaller) GetTransition(opts *bind.CallOpts, blockId uint64, parentHash [32]byte) (TaikoDataTransition, error) { +func (_TaikoL1Client *TaikoL1ClientCaller) GetTransition(opts *bind.CallOpts, blockId uint64, parentHash [32]byte) (TaikoDataTransitionState, error) { var out []interface{} err := _TaikoL1Client.contract.Call(opts, &out, "getTransition", blockId, parentHash) if err != nil { - return *new(TaikoDataTransition), err + return *new(TaikoDataTransitionState), err } - out0 := *abi.ConvertType(out[0], new(TaikoDataTransition)).(*TaikoDataTransition) + out0 := *abi.ConvertType(out[0], new(TaikoDataTransitionState)).(*TaikoDataTransitionState) return out0, err @@ -617,20 +628,20 @@ func (_TaikoL1Client *TaikoL1ClientCaller) GetTransition(opts *bind.CallOpts, bl // GetTransition is a free data retrieval call binding the contract method 0xfd257e29. // // Solidity: function getTransition(uint64 blockId, bytes32 parentHash) view returns((bytes32,bytes32,bytes32,address,uint96,address,uint96,uint64,uint16,bytes32[4])) -func (_TaikoL1Client *TaikoL1ClientSession) GetTransition(blockId uint64, parentHash [32]byte) (TaikoDataTransition, error) { +func (_TaikoL1Client *TaikoL1ClientSession) GetTransition(blockId uint64, parentHash [32]byte) (TaikoDataTransitionState, error) { return _TaikoL1Client.Contract.GetTransition(&_TaikoL1Client.CallOpts, blockId, parentHash) } // GetTransition is a free data retrieval call binding the contract method 0xfd257e29. // // Solidity: function getTransition(uint64 blockId, bytes32 parentHash) view returns((bytes32,bytes32,bytes32,address,uint96,address,uint96,uint64,uint16,bytes32[4])) -func (_TaikoL1Client *TaikoL1ClientCallerSession) GetTransition(blockId uint64, parentHash [32]byte) (TaikoDataTransition, error) { +func (_TaikoL1Client *TaikoL1ClientCallerSession) GetTransition(blockId uint64, parentHash [32]byte) (TaikoDataTransitionState, error) { return _TaikoL1Client.Contract.GetTransition(&_TaikoL1Client.CallOpts, blockId, parentHash) } // IsConfigValid is a free data retrieval call binding the contract method 0xe3f1bdc5. // -// Solidity: function isConfigValid() pure returns(bool) +// Solidity: function isConfigValid() view returns(bool) func (_TaikoL1Client *TaikoL1ClientCaller) IsConfigValid(opts *bind.CallOpts) (bool, error) { var out []interface{} err := _TaikoL1Client.contract.Call(opts, &out, "isConfigValid") @@ -647,14 +658,14 @@ func (_TaikoL1Client *TaikoL1ClientCaller) IsConfigValid(opts *bind.CallOpts) (b // IsConfigValid is a free data retrieval call binding the contract method 0xe3f1bdc5. // -// Solidity: function isConfigValid() pure returns(bool) +// Solidity: function isConfigValid() view returns(bool) func (_TaikoL1Client *TaikoL1ClientSession) IsConfigValid() (bool, error) { return _TaikoL1Client.Contract.IsConfigValid(&_TaikoL1Client.CallOpts) } // IsConfigValid is a free data retrieval call binding the contract method 0xe3f1bdc5. // -// Solidity: function isConfigValid() pure returns(bool) +// Solidity: function isConfigValid() view returns(bool) func (_TaikoL1Client *TaikoL1ClientCallerSession) IsConfigValid() (bool, error) { return _TaikoL1Client.Contract.IsConfigValid(&_TaikoL1Client.CallOpts) } @@ -721,10 +732,41 @@ func (_TaikoL1Client *TaikoL1ClientCallerSession) Paused() (bool, error) { return _TaikoL1Client.Contract.Paused(&_TaikoL1Client.CallOpts) } -// Resolve is a free data retrieval call binding the contract method 0x6c6563f6. +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_TaikoL1Client *TaikoL1ClientCaller) PendingOwner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TaikoL1Client.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 (_TaikoL1Client *TaikoL1ClientSession) PendingOwner() (common.Address, error) { + return _TaikoL1Client.Contract.PendingOwner(&_TaikoL1Client.CallOpts) +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_TaikoL1Client *TaikoL1ClientCallerSession) PendingOwner() (common.Address, error) { + return _TaikoL1Client.Contract.PendingOwner(&_TaikoL1Client.CallOpts) +} + +// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf. // -// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr) -func (_TaikoL1Client *TaikoL1ClientCaller) Resolve(opts *bind.CallOpts, chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) { +// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr) +func (_TaikoL1Client *TaikoL1ClientCaller) Resolve(opts *bind.CallOpts, chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) { var out []interface{} err := _TaikoL1Client.contract.Call(opts, &out, "resolve", chainId, name, allowZeroAddress) @@ -738,17 +780,17 @@ func (_TaikoL1Client *TaikoL1ClientCaller) Resolve(opts *bind.CallOpts, chainId } -// Resolve is a free data retrieval call binding the contract method 0x6c6563f6. +// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf. // -// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr) -func (_TaikoL1Client *TaikoL1ClientSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) { +// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr) +func (_TaikoL1Client *TaikoL1ClientSession) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) { return _TaikoL1Client.Contract.Resolve(&_TaikoL1Client.CallOpts, chainId, name, allowZeroAddress) } -// Resolve is a free data retrieval call binding the contract method 0x6c6563f6. +// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf. // -// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr) -func (_TaikoL1Client *TaikoL1ClientCallerSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) { +// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr) +func (_TaikoL1Client *TaikoL1ClientCallerSession) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) { return _TaikoL1Client.Contract.Resolve(&_TaikoL1Client.CallOpts, chainId, name, allowZeroAddress) } @@ -785,7 +827,7 @@ func (_TaikoL1Client *TaikoL1ClientCallerSession) Resolve0(name [32]byte, allowZ // State is a free data retrieval call binding the contract method 0xc19d93fb. // -// Solidity: function state() view returns((uint64,uint64,uint64,uint64) slotA, (uint64,uint64,uint64) slotB) +// Solidity: function state() view returns((uint64,uint64,uint64,uint64) slotA, (uint64,uint64,uint64,bool) slotB) func (_TaikoL1Client *TaikoL1ClientCaller) State(opts *bind.CallOpts) (struct { SlotA TaikoDataSlotA SlotB TaikoDataSlotB @@ -810,7 +852,7 @@ func (_TaikoL1Client *TaikoL1ClientCaller) State(opts *bind.CallOpts) (struct { // State is a free data retrieval call binding the contract method 0xc19d93fb. // -// Solidity: function state() view returns((uint64,uint64,uint64,uint64) slotA, (uint64,uint64,uint64) slotB) +// Solidity: function state() view returns((uint64,uint64,uint64,uint64) slotA, (uint64,uint64,uint64,bool) slotB) func (_TaikoL1Client *TaikoL1ClientSession) State() (struct { SlotA TaikoDataSlotA SlotB TaikoDataSlotB @@ -820,7 +862,7 @@ func (_TaikoL1Client *TaikoL1ClientSession) State() (struct { // State is a free data retrieval call binding the contract method 0xc19d93fb. // -// Solidity: function state() view returns((uint64,uint64,uint64,uint64) slotA, (uint64,uint64,uint64) slotB) +// Solidity: function state() view returns((uint64,uint64,uint64,uint64) slotA, (uint64,uint64,uint64,bool) slotB) func (_TaikoL1Client *TaikoL1ClientCallerSession) State() (struct { SlotA TaikoDataSlotA SlotB TaikoDataSlotB @@ -828,6 +870,27 @@ func (_TaikoL1Client *TaikoL1ClientCallerSession) State() (struct { return _TaikoL1Client.Contract.State(&_TaikoL1Client.CallOpts) } +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_TaikoL1Client *TaikoL1ClientTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TaikoL1Client.contract.Transact(opts, "acceptOwnership") +} + +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_TaikoL1Client *TaikoL1ClientSession) AcceptOwnership() (*types.Transaction, error) { + return _TaikoL1Client.Contract.AcceptOwnership(&_TaikoL1Client.TransactOpts) +} + +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_TaikoL1Client *TaikoL1ClientTransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _TaikoL1Client.Contract.AcceptOwnership(&_TaikoL1Client.TransactOpts) +} + // DepositEtherToL2 is a paid mutator transaction binding the contract method 0x047a289d. // // Solidity: function depositEtherToL2(address recipient) payable returns() @@ -912,25 +975,46 @@ func (_TaikoL1Client *TaikoL1ClientTransactorSession) Pause() (*types.Transactio return _TaikoL1Client.Contract.Pause(&_TaikoL1Client.TransactOpts) } -// ProposeBlock is a paid mutator transaction binding the contract method 0x04dc4c8b. +// PauseProving is a paid mutator transaction binding the contract method 0xff00c391. +// +// Solidity: function pauseProving(bool pause) returns() +func (_TaikoL1Client *TaikoL1ClientTransactor) PauseProving(opts *bind.TransactOpts, pause bool) (*types.Transaction, error) { + return _TaikoL1Client.contract.Transact(opts, "pauseProving", pause) +} + +// PauseProving is a paid mutator transaction binding the contract method 0xff00c391. // -// Solidity: function proposeBlock(bytes32 txListHash, bytes32 extraData, bytes assignment, bytes txList) payable returns((bytes32,bytes32,bytes32,bytes32,uint64,uint64,uint64,uint32,address,(address,uint96,uint64)[]) meta) -func (_TaikoL1Client *TaikoL1ClientTransactor) ProposeBlock(opts *bind.TransactOpts, txListHash [32]byte, extraData [32]byte, assignment []byte, txList []byte) (*types.Transaction, error) { - return _TaikoL1Client.contract.Transact(opts, "proposeBlock", txListHash, extraData, assignment, txList) +// Solidity: function pauseProving(bool pause) returns() +func (_TaikoL1Client *TaikoL1ClientSession) PauseProving(pause bool) (*types.Transaction, error) { + return _TaikoL1Client.Contract.PauseProving(&_TaikoL1Client.TransactOpts, pause) } -// ProposeBlock is a paid mutator transaction binding the contract method 0x04dc4c8b. +// PauseProving is a paid mutator transaction binding the contract method 0xff00c391. // -// Solidity: function proposeBlock(bytes32 txListHash, bytes32 extraData, bytes assignment, bytes txList) payable returns((bytes32,bytes32,bytes32,bytes32,uint64,uint64,uint64,uint32,address,(address,uint96,uint64)[]) meta) -func (_TaikoL1Client *TaikoL1ClientSession) ProposeBlock(txListHash [32]byte, extraData [32]byte, assignment []byte, txList []byte) (*types.Transaction, error) { - return _TaikoL1Client.Contract.ProposeBlock(&_TaikoL1Client.TransactOpts, txListHash, extraData, assignment, txList) +// Solidity: function pauseProving(bool pause) returns() +func (_TaikoL1Client *TaikoL1ClientTransactorSession) PauseProving(pause bool) (*types.Transaction, error) { + return _TaikoL1Client.Contract.PauseProving(&_TaikoL1Client.TransactOpts, pause) } -// ProposeBlock is a paid mutator transaction binding the contract method 0x04dc4c8b. +// ProposeBlock is a paid mutator transaction binding the contract method 0xef16e845. // -// Solidity: function proposeBlock(bytes32 txListHash, bytes32 extraData, bytes assignment, bytes txList) payable returns((bytes32,bytes32,bytes32,bytes32,uint64,uint64,uint64,uint32,address,(address,uint96,uint64)[]) meta) -func (_TaikoL1Client *TaikoL1ClientTransactorSession) ProposeBlock(txListHash [32]byte, extraData [32]byte, assignment []byte, txList []byte) (*types.Transaction, error) { - return _TaikoL1Client.Contract.ProposeBlock(&_TaikoL1Client.TransactOpts, txListHash, extraData, assignment, txList) +// Solidity: function proposeBlock(bytes params, bytes txList) payable returns((bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint16,bool) meta, (address,uint96,uint64)[] depositsProcessed) +func (_TaikoL1Client *TaikoL1ClientTransactor) ProposeBlock(opts *bind.TransactOpts, params []byte, txList []byte) (*types.Transaction, error) { + return _TaikoL1Client.contract.Transact(opts, "proposeBlock", params, txList) +} + +// ProposeBlock is a paid mutator transaction binding the contract method 0xef16e845. +// +// Solidity: function proposeBlock(bytes params, bytes txList) payable returns((bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint16,bool) meta, (address,uint96,uint64)[] depositsProcessed) +func (_TaikoL1Client *TaikoL1ClientSession) ProposeBlock(params []byte, txList []byte) (*types.Transaction, error) { + return _TaikoL1Client.Contract.ProposeBlock(&_TaikoL1Client.TransactOpts, params, txList) +} + +// ProposeBlock is a paid mutator transaction binding the contract method 0xef16e845. +// +// Solidity: function proposeBlock(bytes params, bytes txList) payable returns((bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint16,bool) meta, (address,uint96,uint64)[] depositsProcessed) +func (_TaikoL1Client *TaikoL1ClientTransactorSession) ProposeBlock(params []byte, txList []byte) (*types.Transaction, error) { + return _TaikoL1Client.Contract.ProposeBlock(&_TaikoL1Client.TransactOpts, params, txList) } // ProveBlock is a paid mutator transaction binding the contract method 0x10d008bd. @@ -1149,18 +1233,18 @@ func (it *TaikoL1ClientBlockProposedIterator) Close() error { // TaikoL1ClientBlockProposed represents a BlockProposed event raised by the TaikoL1Client contract. type TaikoL1ClientBlockProposed struct { - BlockId *big.Int - AssignedProver common.Address - LivenessBond *big.Int - ProverFee *big.Int - MinTier uint16 - Meta TaikoDataBlockMetadata - Raw types.Log // Blockchain specific contextual infos + BlockId *big.Int + AssignedProver common.Address + LivenessBond *big.Int + ProverFee *big.Int + Meta TaikoDataBlockMetadata + DepositsProcessed []TaikoDataEthDeposit + Raw types.Log // Blockchain specific contextual infos } -// FilterBlockProposed is a free log retrieval operation binding the contract event 0xc857f5d042c0ceb165ef70eab0812ba2e6b15a03ce07638b58efc04dbb175ef6. +// FilterBlockProposed is a free log retrieval operation binding the contract event 0x9a159f8587f84fe979f8e47ee02f2cb3cf051ba2ae05af945e929d959b7d7810. // -// Solidity: event BlockProposed(uint256 indexed blockId, address indexed assignedProver, uint96 livenessBond, uint256 proverFee, uint16 minTier, (bytes32,bytes32,bytes32,bytes32,uint64,uint64,uint64,uint32,address,(address,uint96,uint64)[]) meta) +// Solidity: event BlockProposed(uint256 indexed blockId, address indexed assignedProver, uint96 livenessBond, uint256 proverFee, (bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint16,bool) meta, (address,uint96,uint64)[] depositsProcessed) func (_TaikoL1Client *TaikoL1ClientFilterer) FilterBlockProposed(opts *bind.FilterOpts, blockId []*big.Int, assignedProver []common.Address) (*TaikoL1ClientBlockProposedIterator, error) { var blockIdRule []interface{} @@ -1179,9 +1263,9 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) FilterBlockProposed(opts *bind.Filt return &TaikoL1ClientBlockProposedIterator{contract: _TaikoL1Client.contract, event: "BlockProposed", logs: logs, sub: sub}, nil } -// WatchBlockProposed is a free log subscription operation binding the contract event 0xc857f5d042c0ceb165ef70eab0812ba2e6b15a03ce07638b58efc04dbb175ef6. +// WatchBlockProposed is a free log subscription operation binding the contract event 0x9a159f8587f84fe979f8e47ee02f2cb3cf051ba2ae05af945e929d959b7d7810. // -// Solidity: event BlockProposed(uint256 indexed blockId, address indexed assignedProver, uint96 livenessBond, uint256 proverFee, uint16 minTier, (bytes32,bytes32,bytes32,bytes32,uint64,uint64,uint64,uint32,address,(address,uint96,uint64)[]) meta) +// Solidity: event BlockProposed(uint256 indexed blockId, address indexed assignedProver, uint96 livenessBond, uint256 proverFee, (bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint16,bool) meta, (address,uint96,uint64)[] depositsProcessed) func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockProposed(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientBlockProposed, blockId []*big.Int, assignedProver []common.Address) (event.Subscription, error) { var blockIdRule []interface{} @@ -1225,9 +1309,9 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockProposed(opts *bind.Watch }), nil } -// ParseBlockProposed is a log parse operation binding the contract event 0xc857f5d042c0ceb165ef70eab0812ba2e6b15a03ce07638b58efc04dbb175ef6. +// ParseBlockProposed is a log parse operation binding the contract event 0x9a159f8587f84fe979f8e47ee02f2cb3cf051ba2ae05af945e929d959b7d7810. // -// Solidity: event BlockProposed(uint256 indexed blockId, address indexed assignedProver, uint96 livenessBond, uint256 proverFee, uint16 minTier, (bytes32,bytes32,bytes32,bytes32,uint64,uint64,uint64,uint32,address,(address,uint96,uint64)[]) meta) +// Solidity: event BlockProposed(uint256 indexed blockId, address indexed assignedProver, uint96 livenessBond, uint256 proverFee, (bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint16,bool) meta, (address,uint96,uint64)[] depositsProcessed) func (_TaikoL1Client *TaikoL1ClientFilterer) ParseBlockProposed(log types.Log) (*TaikoL1ClientBlockProposed, error) { event := new(TaikoL1ClientBlockProposed) if err := _TaikoL1Client.contract.UnpackLog(event, "BlockProposed", log); err != nil { @@ -1306,18 +1390,18 @@ func (it *TaikoL1ClientBlockProposed0Iterator) Close() error { // TaikoL1ClientBlockProposed0 represents a BlockProposed0 event raised by the TaikoL1Client contract. type TaikoL1ClientBlockProposed0 struct { - BlockId *big.Int - AssignedProver common.Address - LivenessBond *big.Int - ProverFee *big.Int - MinTier uint16 - Meta TaikoDataBlockMetadata - Raw types.Log // Blockchain specific contextual infos + BlockId *big.Int + AssignedProver common.Address + LivenessBond *big.Int + ProverFee *big.Int + Meta TaikoDataBlockMetadata + DepositsProcessed []TaikoDataEthDeposit + Raw types.Log // Blockchain specific contextual infos } -// FilterBlockProposed0 is a free log retrieval operation binding the contract event 0xc857f5d042c0ceb165ef70eab0812ba2e6b15a03ce07638b58efc04dbb175ef6. +// FilterBlockProposed0 is a free log retrieval operation binding the contract event 0x9a159f8587f84fe979f8e47ee02f2cb3cf051ba2ae05af945e929d959b7d7810. // -// Solidity: event BlockProposed(uint256 indexed blockId, address indexed assignedProver, uint96 livenessBond, uint256 proverFee, uint16 minTier, (bytes32,bytes32,bytes32,bytes32,uint64,uint64,uint64,uint32,address,(address,uint96,uint64)[]) meta) +// Solidity: event BlockProposed(uint256 indexed blockId, address indexed assignedProver, uint96 livenessBond, uint256 proverFee, (bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint16,bool) meta, (address,uint96,uint64)[] depositsProcessed) func (_TaikoL1Client *TaikoL1ClientFilterer) FilterBlockProposed0(opts *bind.FilterOpts, blockId []*big.Int, assignedProver []common.Address) (*TaikoL1ClientBlockProposed0Iterator, error) { var blockIdRule []interface{} @@ -1336,9 +1420,9 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) FilterBlockProposed0(opts *bind.Fil return &TaikoL1ClientBlockProposed0Iterator{contract: _TaikoL1Client.contract, event: "BlockProposed0", logs: logs, sub: sub}, nil } -// WatchBlockProposed0 is a free log subscription operation binding the contract event 0xc857f5d042c0ceb165ef70eab0812ba2e6b15a03ce07638b58efc04dbb175ef6. +// WatchBlockProposed0 is a free log subscription operation binding the contract event 0x9a159f8587f84fe979f8e47ee02f2cb3cf051ba2ae05af945e929d959b7d7810. // -// Solidity: event BlockProposed(uint256 indexed blockId, address indexed assignedProver, uint96 livenessBond, uint256 proverFee, uint16 minTier, (bytes32,bytes32,bytes32,bytes32,uint64,uint64,uint64,uint32,address,(address,uint96,uint64)[]) meta) +// Solidity: event BlockProposed(uint256 indexed blockId, address indexed assignedProver, uint96 livenessBond, uint256 proverFee, (bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint16,bool) meta, (address,uint96,uint64)[] depositsProcessed) func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockProposed0(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientBlockProposed0, blockId []*big.Int, assignedProver []common.Address) (event.Subscription, error) { var blockIdRule []interface{} @@ -1382,9 +1466,9 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) WatchBlockProposed0(opts *bind.Watc }), nil } -// ParseBlockProposed0 is a log parse operation binding the contract event 0xc857f5d042c0ceb165ef70eab0812ba2e6b15a03ce07638b58efc04dbb175ef6. +// ParseBlockProposed0 is a log parse operation binding the contract event 0x9a159f8587f84fe979f8e47ee02f2cb3cf051ba2ae05af945e929d959b7d7810. // -// Solidity: event BlockProposed(uint256 indexed blockId, address indexed assignedProver, uint96 livenessBond, uint256 proverFee, uint16 minTier, (bytes32,bytes32,bytes32,bytes32,uint64,uint64,uint64,uint32,address,(address,uint96,uint64)[]) meta) +// Solidity: event BlockProposed(uint256 indexed blockId, address indexed assignedProver, uint96 livenessBond, uint256 proverFee, (bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint16,bool) meta, (address,uint96,uint64)[] depositsProcessed) func (_TaikoL1Client *TaikoL1ClientFilterer) ParseBlockProposed0(log types.Log) (*TaikoL1ClientBlockProposed0, error) { event := new(TaikoL1ClientBlockProposed0) if err := _TaikoL1Client.contract.UnpackLog(event, "BlockProposed0", log); err != nil { @@ -2416,6 +2500,159 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) ParseInitialized(log types.Log) (*T return event, nil } +// TaikoL1ClientOwnershipTransferStartedIterator is returned from FilterOwnershipTransferStarted and is used to iterate over the raw logs and unpacked data for OwnershipTransferStarted events raised by the TaikoL1Client contract. +type TaikoL1ClientOwnershipTransferStartedIterator struct { + Event *TaikoL1ClientOwnershipTransferStarted // 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 *TaikoL1ClientOwnershipTransferStartedIterator) 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(TaikoL1ClientOwnershipTransferStarted) + 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(TaikoL1ClientOwnershipTransferStarted) + 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 *TaikoL1ClientOwnershipTransferStartedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoL1ClientOwnershipTransferStartedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoL1ClientOwnershipTransferStarted represents a OwnershipTransferStarted event raised by the TaikoL1Client contract. +type TaikoL1ClientOwnershipTransferStarted 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 (_TaikoL1Client *TaikoL1ClientFilterer) FilterOwnershipTransferStarted(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*TaikoL1ClientOwnershipTransferStartedIterator, 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 := _TaikoL1Client.contract.FilterLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &TaikoL1ClientOwnershipTransferStartedIterator{contract: _TaikoL1Client.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 (_TaikoL1Client *TaikoL1ClientFilterer) WatchOwnershipTransferStarted(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientOwnershipTransferStarted, 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 := _TaikoL1Client.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(TaikoL1ClientOwnershipTransferStarted) + if err := _TaikoL1Client.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 (_TaikoL1Client *TaikoL1ClientFilterer) ParseOwnershipTransferStarted(log types.Log) (*TaikoL1ClientOwnershipTransferStarted, error) { + event := new(TaikoL1ClientOwnershipTransferStarted) + if err := _TaikoL1Client.contract.UnpackLog(event, "OwnershipTransferStarted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // TaikoL1ClientOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the TaikoL1Client contract. type TaikoL1ClientOwnershipTransferredIterator struct { Event *TaikoL1ClientOwnershipTransferred // Event containing the contract specifics and raw log @@ -2703,6 +2940,274 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) ParsePaused(log types.Log) (*TaikoL return event, nil } +// TaikoL1ClientProvingPausedIterator is returned from FilterProvingPaused and is used to iterate over the raw logs and unpacked data for ProvingPaused events raised by the TaikoL1Client contract. +type TaikoL1ClientProvingPausedIterator struct { + Event *TaikoL1ClientProvingPaused // 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 *TaikoL1ClientProvingPausedIterator) 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(TaikoL1ClientProvingPaused) + 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(TaikoL1ClientProvingPaused) + 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 *TaikoL1ClientProvingPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoL1ClientProvingPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoL1ClientProvingPaused represents a ProvingPaused event raised by the TaikoL1Client contract. +type TaikoL1ClientProvingPaused struct { + Paused bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterProvingPaused is a free log retrieval operation binding the contract event 0xed64db85835d07c3c990b8ebdd55e32d64e5ed53143b6ef2179e7bfaf17ddc3b. +// +// Solidity: event ProvingPaused(bool paused) +func (_TaikoL1Client *TaikoL1ClientFilterer) FilterProvingPaused(opts *bind.FilterOpts) (*TaikoL1ClientProvingPausedIterator, error) { + + logs, sub, err := _TaikoL1Client.contract.FilterLogs(opts, "ProvingPaused") + if err != nil { + return nil, err + } + return &TaikoL1ClientProvingPausedIterator{contract: _TaikoL1Client.contract, event: "ProvingPaused", logs: logs, sub: sub}, nil +} + +// WatchProvingPaused is a free log subscription operation binding the contract event 0xed64db85835d07c3c990b8ebdd55e32d64e5ed53143b6ef2179e7bfaf17ddc3b. +// +// Solidity: event ProvingPaused(bool paused) +func (_TaikoL1Client *TaikoL1ClientFilterer) WatchProvingPaused(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientProvingPaused) (event.Subscription, error) { + + logs, sub, err := _TaikoL1Client.contract.WatchLogs(opts, "ProvingPaused") + 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(TaikoL1ClientProvingPaused) + if err := _TaikoL1Client.contract.UnpackLog(event, "ProvingPaused", 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 +} + +// ParseProvingPaused is a log parse operation binding the contract event 0xed64db85835d07c3c990b8ebdd55e32d64e5ed53143b6ef2179e7bfaf17ddc3b. +// +// Solidity: event ProvingPaused(bool paused) +func (_TaikoL1Client *TaikoL1ClientFilterer) ParseProvingPaused(log types.Log) (*TaikoL1ClientProvingPaused, error) { + event := new(TaikoL1ClientProvingPaused) + if err := _TaikoL1Client.contract.UnpackLog(event, "ProvingPaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoL1ClientProvingPaused0Iterator is returned from FilterProvingPaused0 and is used to iterate over the raw logs and unpacked data for ProvingPaused0 events raised by the TaikoL1Client contract. +type TaikoL1ClientProvingPaused0Iterator struct { + Event *TaikoL1ClientProvingPaused0 // 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 *TaikoL1ClientProvingPaused0Iterator) 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(TaikoL1ClientProvingPaused0) + 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(TaikoL1ClientProvingPaused0) + 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 *TaikoL1ClientProvingPaused0Iterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoL1ClientProvingPaused0Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoL1ClientProvingPaused0 represents a ProvingPaused0 event raised by the TaikoL1Client contract. +type TaikoL1ClientProvingPaused0 struct { + Paused bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterProvingPaused0 is a free log retrieval operation binding the contract event 0xed64db85835d07c3c990b8ebdd55e32d64e5ed53143b6ef2179e7bfaf17ddc3b. +// +// Solidity: event ProvingPaused(bool paused) +func (_TaikoL1Client *TaikoL1ClientFilterer) FilterProvingPaused0(opts *bind.FilterOpts) (*TaikoL1ClientProvingPaused0Iterator, error) { + + logs, sub, err := _TaikoL1Client.contract.FilterLogs(opts, "ProvingPaused0") + if err != nil { + return nil, err + } + return &TaikoL1ClientProvingPaused0Iterator{contract: _TaikoL1Client.contract, event: "ProvingPaused0", logs: logs, sub: sub}, nil +} + +// WatchProvingPaused0 is a free log subscription operation binding the contract event 0xed64db85835d07c3c990b8ebdd55e32d64e5ed53143b6ef2179e7bfaf17ddc3b. +// +// Solidity: event ProvingPaused(bool paused) +func (_TaikoL1Client *TaikoL1ClientFilterer) WatchProvingPaused0(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientProvingPaused0) (event.Subscription, error) { + + logs, sub, err := _TaikoL1Client.contract.WatchLogs(opts, "ProvingPaused0") + 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(TaikoL1ClientProvingPaused0) + if err := _TaikoL1Client.contract.UnpackLog(event, "ProvingPaused0", 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 +} + +// ParseProvingPaused0 is a log parse operation binding the contract event 0xed64db85835d07c3c990b8ebdd55e32d64e5ed53143b6ef2179e7bfaf17ddc3b. +// +// Solidity: event ProvingPaused(bool paused) +func (_TaikoL1Client *TaikoL1ClientFilterer) ParseProvingPaused0(log types.Log) (*TaikoL1ClientProvingPaused0, error) { + event := new(TaikoL1ClientProvingPaused0) + if err := _TaikoL1Client.contract.UnpackLog(event, "ProvingPaused0", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // TaikoL1ClientTokenCreditedIterator is returned from FilterTokenCredited and is used to iterate over the raw logs and unpacked data for TokenCredited events raised by the TaikoL1Client contract. type TaikoL1ClientTokenCreditedIterator struct { Event *TaikoL1ClientTokenCredited // Event containing the contract specifics and raw log @@ -3849,18 +4354,16 @@ func (it *TaikoL1ClientTransitionContestedIterator) Close() error { // TaikoL1ClientTransitionContested represents a TransitionContested event raised by the TaikoL1Client contract. type TaikoL1ClientTransitionContested struct { BlockId *big.Int - ParentHash [32]byte - BlockHash [32]byte - SignalRoot [32]byte + Tran TaikoDataTransition Contester common.Address ContestBond *big.Int Tier uint16 Raw types.Log // Blockchain specific contextual infos } -// FilterTransitionContested is a free log retrieval operation binding the contract event 0x135961061f7c7cad9a389080483d14014ba6fe9ebcf6d3d826185c69dd71ce75. +// FilterTransitionContested is a free log retrieval operation binding the contract event 0xb4c0a86c1ff239277697775b1e91d3375fd3a5ef6b345aa4e2f6001c890558f6. // -// Solidity: event TransitionContested(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address contester, uint96 contestBond, uint16 tier) +// Solidity: event TransitionContested(uint256 indexed blockId, (bytes32,bytes32,bytes32,bytes32) tran, address contester, uint96 contestBond, uint16 tier) func (_TaikoL1Client *TaikoL1ClientFilterer) FilterTransitionContested(opts *bind.FilterOpts, blockId []*big.Int) (*TaikoL1ClientTransitionContestedIterator, error) { var blockIdRule []interface{} @@ -3875,9 +4378,9 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) FilterTransitionContested(opts *bin return &TaikoL1ClientTransitionContestedIterator{contract: _TaikoL1Client.contract, event: "TransitionContested", logs: logs, sub: sub}, nil } -// WatchTransitionContested is a free log subscription operation binding the contract event 0x135961061f7c7cad9a389080483d14014ba6fe9ebcf6d3d826185c69dd71ce75. +// WatchTransitionContested is a free log subscription operation binding the contract event 0xb4c0a86c1ff239277697775b1e91d3375fd3a5ef6b345aa4e2f6001c890558f6. // -// Solidity: event TransitionContested(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address contester, uint96 contestBond, uint16 tier) +// Solidity: event TransitionContested(uint256 indexed blockId, (bytes32,bytes32,bytes32,bytes32) tran, address contester, uint96 contestBond, uint16 tier) func (_TaikoL1Client *TaikoL1ClientFilterer) WatchTransitionContested(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientTransitionContested, blockId []*big.Int) (event.Subscription, error) { var blockIdRule []interface{} @@ -3917,9 +4420,9 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) WatchTransitionContested(opts *bind }), nil } -// ParseTransitionContested is a log parse operation binding the contract event 0x135961061f7c7cad9a389080483d14014ba6fe9ebcf6d3d826185c69dd71ce75. +// ParseTransitionContested is a log parse operation binding the contract event 0xb4c0a86c1ff239277697775b1e91d3375fd3a5ef6b345aa4e2f6001c890558f6. // -// Solidity: event TransitionContested(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address contester, uint96 contestBond, uint16 tier) +// Solidity: event TransitionContested(uint256 indexed blockId, (bytes32,bytes32,bytes32,bytes32) tran, address contester, uint96 contestBond, uint16 tier) func (_TaikoL1Client *TaikoL1ClientFilterer) ParseTransitionContested(log types.Log) (*TaikoL1ClientTransitionContested, error) { event := new(TaikoL1ClientTransitionContested) if err := _TaikoL1Client.contract.UnpackLog(event, "TransitionContested", log); err != nil { @@ -3999,18 +4502,16 @@ func (it *TaikoL1ClientTransitionContested0Iterator) Close() error { // TaikoL1ClientTransitionContested0 represents a TransitionContested0 event raised by the TaikoL1Client contract. type TaikoL1ClientTransitionContested0 struct { BlockId *big.Int - ParentHash [32]byte - BlockHash [32]byte - SignalRoot [32]byte + Tran TaikoDataTransition Contester common.Address ContestBond *big.Int Tier uint16 Raw types.Log // Blockchain specific contextual infos } -// FilterTransitionContested0 is a free log retrieval operation binding the contract event 0x135961061f7c7cad9a389080483d14014ba6fe9ebcf6d3d826185c69dd71ce75. +// FilterTransitionContested0 is a free log retrieval operation binding the contract event 0xb4c0a86c1ff239277697775b1e91d3375fd3a5ef6b345aa4e2f6001c890558f6. // -// Solidity: event TransitionContested(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address contester, uint96 contestBond, uint16 tier) +// Solidity: event TransitionContested(uint256 indexed blockId, (bytes32,bytes32,bytes32,bytes32) tran, address contester, uint96 contestBond, uint16 tier) func (_TaikoL1Client *TaikoL1ClientFilterer) FilterTransitionContested0(opts *bind.FilterOpts, blockId []*big.Int) (*TaikoL1ClientTransitionContested0Iterator, error) { var blockIdRule []interface{} @@ -4025,9 +4526,9 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) FilterTransitionContested0(opts *bi return &TaikoL1ClientTransitionContested0Iterator{contract: _TaikoL1Client.contract, event: "TransitionContested0", logs: logs, sub: sub}, nil } -// WatchTransitionContested0 is a free log subscription operation binding the contract event 0x135961061f7c7cad9a389080483d14014ba6fe9ebcf6d3d826185c69dd71ce75. +// WatchTransitionContested0 is a free log subscription operation binding the contract event 0xb4c0a86c1ff239277697775b1e91d3375fd3a5ef6b345aa4e2f6001c890558f6. // -// Solidity: event TransitionContested(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address contester, uint96 contestBond, uint16 tier) +// Solidity: event TransitionContested(uint256 indexed blockId, (bytes32,bytes32,bytes32,bytes32) tran, address contester, uint96 contestBond, uint16 tier) func (_TaikoL1Client *TaikoL1ClientFilterer) WatchTransitionContested0(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientTransitionContested0, blockId []*big.Int) (event.Subscription, error) { var blockIdRule []interface{} @@ -4067,9 +4568,9 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) WatchTransitionContested0(opts *bin }), nil } -// ParseTransitionContested0 is a log parse operation binding the contract event 0x135961061f7c7cad9a389080483d14014ba6fe9ebcf6d3d826185c69dd71ce75. +// ParseTransitionContested0 is a log parse operation binding the contract event 0xb4c0a86c1ff239277697775b1e91d3375fd3a5ef6b345aa4e2f6001c890558f6. // -// Solidity: event TransitionContested(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address contester, uint96 contestBond, uint16 tier) +// Solidity: event TransitionContested(uint256 indexed blockId, (bytes32,bytes32,bytes32,bytes32) tran, address contester, uint96 contestBond, uint16 tier) func (_TaikoL1Client *TaikoL1ClientFilterer) ParseTransitionContested0(log types.Log) (*TaikoL1ClientTransitionContested0, error) { event := new(TaikoL1ClientTransitionContested0) if err := _TaikoL1Client.contract.UnpackLog(event, "TransitionContested0", log); err != nil { @@ -4149,18 +4650,16 @@ func (it *TaikoL1ClientTransitionProvedIterator) Close() error { // TaikoL1ClientTransitionProved represents a TransitionProved event raised by the TaikoL1Client contract. type TaikoL1ClientTransitionProved struct { BlockId *big.Int - ParentHash [32]byte - BlockHash [32]byte - SignalRoot [32]byte + Tran TaikoDataTransition Prover common.Address ValidityBond *big.Int Tier uint16 Raw types.Log // Blockchain specific contextual infos } -// FilterTransitionProved is a free log retrieval operation binding the contract event 0x9eaac66787b7d7e72981c31449ddd9bde78ffdb8cb3e6543ba2b9a4bb653b5e3. +// FilterTransitionProved is a free log retrieval operation binding the contract event 0xc195e4be3b936845492b8be4b1cf604db687a4d79ad84d979499c136f8e6701f. // -// Solidity: event TransitionProved(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover, uint96 validityBond, uint16 tier) +// Solidity: event TransitionProved(uint256 indexed blockId, (bytes32,bytes32,bytes32,bytes32) tran, address prover, uint96 validityBond, uint16 tier) func (_TaikoL1Client *TaikoL1ClientFilterer) FilterTransitionProved(opts *bind.FilterOpts, blockId []*big.Int) (*TaikoL1ClientTransitionProvedIterator, error) { var blockIdRule []interface{} @@ -4175,9 +4674,9 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) FilterTransitionProved(opts *bind.F return &TaikoL1ClientTransitionProvedIterator{contract: _TaikoL1Client.contract, event: "TransitionProved", logs: logs, sub: sub}, nil } -// WatchTransitionProved is a free log subscription operation binding the contract event 0x9eaac66787b7d7e72981c31449ddd9bde78ffdb8cb3e6543ba2b9a4bb653b5e3. +// WatchTransitionProved is a free log subscription operation binding the contract event 0xc195e4be3b936845492b8be4b1cf604db687a4d79ad84d979499c136f8e6701f. // -// Solidity: event TransitionProved(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover, uint96 validityBond, uint16 tier) +// Solidity: event TransitionProved(uint256 indexed blockId, (bytes32,bytes32,bytes32,bytes32) tran, address prover, uint96 validityBond, uint16 tier) func (_TaikoL1Client *TaikoL1ClientFilterer) WatchTransitionProved(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientTransitionProved, blockId []*big.Int) (event.Subscription, error) { var blockIdRule []interface{} @@ -4217,9 +4716,9 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) WatchTransitionProved(opts *bind.Wa }), nil } -// ParseTransitionProved is a log parse operation binding the contract event 0x9eaac66787b7d7e72981c31449ddd9bde78ffdb8cb3e6543ba2b9a4bb653b5e3. +// ParseTransitionProved is a log parse operation binding the contract event 0xc195e4be3b936845492b8be4b1cf604db687a4d79ad84d979499c136f8e6701f. // -// Solidity: event TransitionProved(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover, uint96 validityBond, uint16 tier) +// Solidity: event TransitionProved(uint256 indexed blockId, (bytes32,bytes32,bytes32,bytes32) tran, address prover, uint96 validityBond, uint16 tier) func (_TaikoL1Client *TaikoL1ClientFilterer) ParseTransitionProved(log types.Log) (*TaikoL1ClientTransitionProved, error) { event := new(TaikoL1ClientTransitionProved) if err := _TaikoL1Client.contract.UnpackLog(event, "TransitionProved", log); err != nil { @@ -4299,18 +4798,16 @@ func (it *TaikoL1ClientTransitionProved0Iterator) Close() error { // TaikoL1ClientTransitionProved0 represents a TransitionProved0 event raised by the TaikoL1Client contract. type TaikoL1ClientTransitionProved0 struct { BlockId *big.Int - ParentHash [32]byte - BlockHash [32]byte - SignalRoot [32]byte + Tran TaikoDataTransition Prover common.Address ValidityBond *big.Int Tier uint16 Raw types.Log // Blockchain specific contextual infos } -// FilterTransitionProved0 is a free log retrieval operation binding the contract event 0x9eaac66787b7d7e72981c31449ddd9bde78ffdb8cb3e6543ba2b9a4bb653b5e3. +// FilterTransitionProved0 is a free log retrieval operation binding the contract event 0xc195e4be3b936845492b8be4b1cf604db687a4d79ad84d979499c136f8e6701f. // -// Solidity: event TransitionProved(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover, uint96 validityBond, uint16 tier) +// Solidity: event TransitionProved(uint256 indexed blockId, (bytes32,bytes32,bytes32,bytes32) tran, address prover, uint96 validityBond, uint16 tier) func (_TaikoL1Client *TaikoL1ClientFilterer) FilterTransitionProved0(opts *bind.FilterOpts, blockId []*big.Int) (*TaikoL1ClientTransitionProved0Iterator, error) { var blockIdRule []interface{} @@ -4325,9 +4822,9 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) FilterTransitionProved0(opts *bind. return &TaikoL1ClientTransitionProved0Iterator{contract: _TaikoL1Client.contract, event: "TransitionProved0", logs: logs, sub: sub}, nil } -// WatchTransitionProved0 is a free log subscription operation binding the contract event 0x9eaac66787b7d7e72981c31449ddd9bde78ffdb8cb3e6543ba2b9a4bb653b5e3. +// WatchTransitionProved0 is a free log subscription operation binding the contract event 0xc195e4be3b936845492b8be4b1cf604db687a4d79ad84d979499c136f8e6701f. // -// Solidity: event TransitionProved(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover, uint96 validityBond, uint16 tier) +// Solidity: event TransitionProved(uint256 indexed blockId, (bytes32,bytes32,bytes32,bytes32) tran, address prover, uint96 validityBond, uint16 tier) func (_TaikoL1Client *TaikoL1ClientFilterer) WatchTransitionProved0(opts *bind.WatchOpts, sink chan<- *TaikoL1ClientTransitionProved0, blockId []*big.Int) (event.Subscription, error) { var blockIdRule []interface{} @@ -4367,9 +4864,9 @@ func (_TaikoL1Client *TaikoL1ClientFilterer) WatchTransitionProved0(opts *bind.W }), nil } -// ParseTransitionProved0 is a log parse operation binding the contract event 0x9eaac66787b7d7e72981c31449ddd9bde78ffdb8cb3e6543ba2b9a4bb653b5e3. +// ParseTransitionProved0 is a log parse operation binding the contract event 0xc195e4be3b936845492b8be4b1cf604db687a4d79ad84d979499c136f8e6701f. // -// Solidity: event TransitionProved(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover, uint96 validityBond, uint16 tier) +// Solidity: event TransitionProved(uint256 indexed blockId, (bytes32,bytes32,bytes32,bytes32) tran, address prover, uint96 validityBond, uint16 tier) func (_TaikoL1Client *TaikoL1ClientFilterer) ParseTransitionProved0(log types.Log) (*TaikoL1ClientTransitionProved0, error) { event := new(TaikoL1ClientTransitionProved0) if err := _TaikoL1Client.contract.UnpackLog(event, "TransitionProved0", log); err != nil { diff --git a/bindings/gen_taiko_l2.go b/bindings/gen_taiko_l2.go index 1ca89f76a..036e861d9 100644 --- a/bindings/gen_taiko_l2.go +++ b/bindings/gen_taiko_l2.go @@ -31,13 +31,13 @@ var ( // TaikoL2Config is an auto generated low-level Go binding around an user-defined struct. type TaikoL2Config struct { - GasTargetPerL1Block uint64 - BasefeeAdjustmentQuotient *big.Int + GasTargetPerL1Block uint32 + BasefeeAdjustmentQuotient uint8 } // TaikoL2ClientMetaData contains all meta data concerning the TaikoL2Client contract. var TaikoL2ClientMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"name\":\"EIP1559_INVALID_PARAMS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"INVALID_PAUSE_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_BASEFEE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_INVALID_CHAIN_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_INVALID_GOLDEN_TOUCH_K\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_INVALID_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_INVALID_SENDER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_PUBLIC_INPUT_HASH_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_TOO_LATE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Overflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"REENTRANT_CALL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_MANAGER\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"gasExcess\",\"type\":\"uint128\"}],\"name\":\"Anchored\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"srcHeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"GOLDEN_TOUCH_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOLDEN_TOUCH_PRIVATEKEY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"l1BlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"l1SignalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"anchor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gasExcess\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"getBasefee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"basefee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"gasTargetPerL1Block\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"basefeeAdjustmentQuotient\",\"type\":\"uint256\"}],\"internalType\":\"structTaikoL2.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getSyncedSnippet\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"internalType\":\"structICrossChainSync.Snippet\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"_gasExcess\",\"type\":\"uint128\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"l2Hashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestSyncedL1Height\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"publicInputHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"digest\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"k\",\"type\":\"uint8\"}],\"name\":\"signAnchor\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"r\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"s\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"skipFeeCheck\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"l1height\",\"type\":\"uint256\"}],\"name\":\"snippets\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + ABI: "[{\"inputs\":[],\"name\":\"EIP1559_INVALID_PARAMS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_BASEFEE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_INVALID_CHAIN_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_INVALID_GOLDEN_TOUCH_K\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_INVALID_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_INVALID_SENDER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_PUBLIC_INPUT_HASH_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_TOO_LATE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Overflow\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"gasExcess\",\"type\":\"uint64\"}],\"name\":\"Anchored\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"srcHeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"GOLDEN_TOUCH_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOLDEN_TOUCH_PRIVATEKEY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"l1BlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"l1SignalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"anchor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gasExcess\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"getBasefee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"basefee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"gasTargetPerL1Block\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"basefeeAdjustmentQuotient\",\"type\":\"uint8\"}],\"internalType\":\"structTaikoL2.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getSyncedSnippet\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"internalType\":\"structICrossChainSync.Snippet\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_signalService\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_gasExcess\",\"type\":\"uint64\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"l2Hashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestSyncedL1Height\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"publicInputHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"digest\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"k\",\"type\":\"uint8\"}],\"name\":\"signAnchor\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"r\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"s\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"signalService\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"skipFeeCheck\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"l1height\",\"type\":\"uint256\"}],\"name\":\"snippets\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } // TaikoL2ClientABI is the input ABI used to generate the binding from. @@ -248,49 +248,18 @@ func (_TaikoL2Client *TaikoL2ClientCallerSession) GOLDENTOUCHPRIVATEKEY() (*big. return _TaikoL2Client.Contract.GOLDENTOUCHPRIVATEKEY(&_TaikoL2Client.CallOpts) } -// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f. -// -// Solidity: function addressManager() view returns(address) -func (_TaikoL2Client *TaikoL2ClientCaller) AddressManager(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _TaikoL2Client.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 (_TaikoL2Client *TaikoL2ClientSession) AddressManager() (common.Address, error) { - return _TaikoL2Client.Contract.AddressManager(&_TaikoL2Client.CallOpts) -} - -// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f. -// -// Solidity: function addressManager() view returns(address) -func (_TaikoL2Client *TaikoL2ClientCallerSession) AddressManager() (common.Address, error) { - return _TaikoL2Client.Contract.AddressManager(&_TaikoL2Client.CallOpts) -} - // GasExcess is a free data retrieval call binding the contract method 0xf535bd56. // -// Solidity: function gasExcess() view returns(uint128) -func (_TaikoL2Client *TaikoL2ClientCaller) GasExcess(opts *bind.CallOpts) (*big.Int, error) { +// Solidity: function gasExcess() view returns(uint64) +func (_TaikoL2Client *TaikoL2ClientCaller) GasExcess(opts *bind.CallOpts) (uint64, error) { var out []interface{} err := _TaikoL2Client.contract.Call(opts, &out, "gasExcess") if err != nil { - return *new(*big.Int), err + return *new(uint64), err } - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) return out0, err @@ -298,15 +267,15 @@ func (_TaikoL2Client *TaikoL2ClientCaller) GasExcess(opts *bind.CallOpts) (*big. // GasExcess is a free data retrieval call binding the contract method 0xf535bd56. // -// Solidity: function gasExcess() view returns(uint128) -func (_TaikoL2Client *TaikoL2ClientSession) GasExcess() (*big.Int, error) { +// Solidity: function gasExcess() view returns(uint64) +func (_TaikoL2Client *TaikoL2ClientSession) GasExcess() (uint64, error) { return _TaikoL2Client.Contract.GasExcess(&_TaikoL2Client.CallOpts) } // GasExcess is a free data retrieval call binding the contract method 0xf535bd56. // -// Solidity: function gasExcess() view returns(uint128) -func (_TaikoL2Client *TaikoL2ClientCallerSession) GasExcess() (*big.Int, error) { +// Solidity: function gasExcess() view returns(uint64) +func (_TaikoL2Client *TaikoL2ClientCallerSession) GasExcess() (uint64, error) { return _TaikoL2Client.Contract.GasExcess(&_TaikoL2Client.CallOpts) } @@ -374,7 +343,7 @@ func (_TaikoL2Client *TaikoL2ClientCallerSession) GetBlockHash(blockId uint64) ( // GetConfig is a free data retrieval call binding the contract method 0xc3f909d4. // -// Solidity: function getConfig() pure returns((uint64,uint256) config) +// Solidity: function getConfig() view returns((uint32,uint8) config) func (_TaikoL2Client *TaikoL2ClientCaller) GetConfig(opts *bind.CallOpts) (TaikoL2Config, error) { var out []interface{} err := _TaikoL2Client.contract.Call(opts, &out, "getConfig") @@ -391,14 +360,14 @@ func (_TaikoL2Client *TaikoL2ClientCaller) GetConfig(opts *bind.CallOpts) (Taiko // GetConfig is a free data retrieval call binding the contract method 0xc3f909d4. // -// Solidity: function getConfig() pure returns((uint64,uint256) config) +// Solidity: function getConfig() view returns((uint32,uint8) config) func (_TaikoL2Client *TaikoL2ClientSession) GetConfig() (TaikoL2Config, error) { return _TaikoL2Client.Contract.GetConfig(&_TaikoL2Client.CallOpts) } // GetConfig is a free data retrieval call binding the contract method 0xc3f909d4. // -// Solidity: function getConfig() pure returns((uint64,uint256) config) +// Solidity: function getConfig() view returns((uint32,uint8) config) func (_TaikoL2Client *TaikoL2ClientCallerSession) GetConfig() (TaikoL2Config, error) { return _TaikoL2Client.Contract.GetConfig(&_TaikoL2Client.CallOpts) } @@ -527,35 +496,35 @@ func (_TaikoL2Client *TaikoL2ClientCallerSession) Owner() (common.Address, error return _TaikoL2Client.Contract.Owner(&_TaikoL2Client.CallOpts) } -// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. // -// Solidity: function paused() view returns(bool) -func (_TaikoL2Client *TaikoL2ClientCaller) Paused(opts *bind.CallOpts) (bool, error) { +// Solidity: function pendingOwner() view returns(address) +func (_TaikoL2Client *TaikoL2ClientCaller) PendingOwner(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _TaikoL2Client.contract.Call(opts, &out, "paused") + err := _TaikoL2Client.contract.Call(opts, &out, "pendingOwner") if err != nil { - return *new(bool), err + return *new(common.Address), err } - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) return out0, err } -// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. // -// Solidity: function paused() view returns(bool) -func (_TaikoL2Client *TaikoL2ClientSession) Paused() (bool, error) { - return _TaikoL2Client.Contract.Paused(&_TaikoL2Client.CallOpts) +// Solidity: function pendingOwner() view returns(address) +func (_TaikoL2Client *TaikoL2ClientSession) PendingOwner() (common.Address, error) { + return _TaikoL2Client.Contract.PendingOwner(&_TaikoL2Client.CallOpts) } -// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. // -// Solidity: function paused() view returns(bool) -func (_TaikoL2Client *TaikoL2ClientCallerSession) Paused() (bool, error) { - return _TaikoL2Client.Contract.Paused(&_TaikoL2Client.CallOpts) +// Solidity: function pendingOwner() view returns(address) +func (_TaikoL2Client *TaikoL2ClientCallerSession) PendingOwner() (common.Address, error) { + return _TaikoL2Client.Contract.PendingOwner(&_TaikoL2Client.CallOpts) } // PublicInputHash is a free data retrieval call binding the contract method 0xdac5df78. @@ -589,68 +558,6 @@ func (_TaikoL2Client *TaikoL2ClientCallerSession) PublicInputHash() ([32]byte, e return _TaikoL2Client.Contract.PublicInputHash(&_TaikoL2Client.CallOpts) } -// Resolve is a free data retrieval call binding the contract method 0x6c6563f6. -// -// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr) -func (_TaikoL2Client *TaikoL2ClientCaller) Resolve(opts *bind.CallOpts, chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) { - var out []interface{} - err := _TaikoL2Client.contract.Call(opts, &out, "resolve", chainId, name, allowZeroAddress) - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Resolve is a free data retrieval call binding the contract method 0x6c6563f6. -// -// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr) -func (_TaikoL2Client *TaikoL2ClientSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) { - return _TaikoL2Client.Contract.Resolve(&_TaikoL2Client.CallOpts, chainId, name, allowZeroAddress) -} - -// Resolve is a free data retrieval call binding the contract method 0x6c6563f6. -// -// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr) -func (_TaikoL2Client *TaikoL2ClientCallerSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) { - return _TaikoL2Client.Contract.Resolve(&_TaikoL2Client.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 addr) -func (_TaikoL2Client *TaikoL2ClientCaller) Resolve0(opts *bind.CallOpts, name [32]byte, allowZeroAddress bool) (common.Address, error) { - var out []interface{} - err := _TaikoL2Client.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 addr) -func (_TaikoL2Client *TaikoL2ClientSession) Resolve0(name [32]byte, allowZeroAddress bool) (common.Address, error) { - return _TaikoL2Client.Contract.Resolve0(&_TaikoL2Client.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 addr) -func (_TaikoL2Client *TaikoL2ClientCallerSession) Resolve0(name [32]byte, allowZeroAddress bool) (common.Address, error) { - return _TaikoL2Client.Contract.Resolve0(&_TaikoL2Client.CallOpts, name, allowZeroAddress) -} - // SignAnchor is a free data retrieval call binding the contract method 0x591aad8a. // // Solidity: function signAnchor(bytes32 digest, uint8 k) view returns(uint8 v, uint256 r, uint256 s) @@ -701,6 +608,37 @@ func (_TaikoL2Client *TaikoL2ClientCallerSession) SignAnchor(digest [32]byte, k return _TaikoL2Client.Contract.SignAnchor(&_TaikoL2Client.CallOpts, digest, k) } +// SignalService is a free data retrieval call binding the contract method 0x62d09453. +// +// Solidity: function signalService() view returns(address) +func (_TaikoL2Client *TaikoL2ClientCaller) SignalService(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TaikoL2Client.contract.Call(opts, &out, "signalService") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// SignalService is a free data retrieval call binding the contract method 0x62d09453. +// +// Solidity: function signalService() view returns(address) +func (_TaikoL2Client *TaikoL2ClientSession) SignalService() (common.Address, error) { + return _TaikoL2Client.Contract.SignalService(&_TaikoL2Client.CallOpts) +} + +// SignalService is a free data retrieval call binding the contract method 0x62d09453. +// +// Solidity: function signalService() view returns(address) +func (_TaikoL2Client *TaikoL2ClientCallerSession) SignalService() (common.Address, error) { + return _TaikoL2Client.Contract.SignalService(&_TaikoL2Client.CallOpts) +} + // SkipFeeCheck is a free data retrieval call binding the contract method 0x2f980473. // // Solidity: function skipFeeCheck() pure returns(bool) @@ -777,6 +715,27 @@ func (_TaikoL2Client *TaikoL2ClientCallerSession) Snippets(l1height *big.Int) (s return _TaikoL2Client.Contract.Snippets(&_TaikoL2Client.CallOpts, l1height) } +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_TaikoL2Client *TaikoL2ClientTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TaikoL2Client.contract.Transact(opts, "acceptOwnership") +} + +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_TaikoL2Client *TaikoL2ClientSession) AcceptOwnership() (*types.Transaction, error) { + return _TaikoL2Client.Contract.AcceptOwnership(&_TaikoL2Client.TransactOpts) +} + +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_TaikoL2Client *TaikoL2ClientTransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _TaikoL2Client.Contract.AcceptOwnership(&_TaikoL2Client.TransactOpts) +} + // Anchor is a paid mutator transaction binding the contract method 0xda69d3db. // // Solidity: function anchor(bytes32 l1BlockHash, bytes32 l1SignalRoot, uint64 l1Height, uint32 parentGasUsed) returns() @@ -798,46 +757,25 @@ func (_TaikoL2Client *TaikoL2ClientTransactorSession) Anchor(l1BlockHash [32]byt return _TaikoL2Client.Contract.Anchor(&_TaikoL2Client.TransactOpts, l1BlockHash, l1SignalRoot, l1Height, parentGasUsed) } -// Init is a paid mutator transaction binding the contract method 0xcce03bf3. +// Init is a paid mutator transaction binding the contract method 0xb259f48b. // -// Solidity: function init(address _addressManager, uint128 _gasExcess) returns() -func (_TaikoL2Client *TaikoL2ClientTransactor) Init(opts *bind.TransactOpts, _addressManager common.Address, _gasExcess *big.Int) (*types.Transaction, error) { - return _TaikoL2Client.contract.Transact(opts, "init", _addressManager, _gasExcess) +// Solidity: function init(address _signalService, uint64 _gasExcess) returns() +func (_TaikoL2Client *TaikoL2ClientTransactor) Init(opts *bind.TransactOpts, _signalService common.Address, _gasExcess uint64) (*types.Transaction, error) { + return _TaikoL2Client.contract.Transact(opts, "init", _signalService, _gasExcess) } -// Init is a paid mutator transaction binding the contract method 0xcce03bf3. +// Init is a paid mutator transaction binding the contract method 0xb259f48b. // -// Solidity: function init(address _addressManager, uint128 _gasExcess) returns() -func (_TaikoL2Client *TaikoL2ClientSession) Init(_addressManager common.Address, _gasExcess *big.Int) (*types.Transaction, error) { - return _TaikoL2Client.Contract.Init(&_TaikoL2Client.TransactOpts, _addressManager, _gasExcess) +// Solidity: function init(address _signalService, uint64 _gasExcess) returns() +func (_TaikoL2Client *TaikoL2ClientSession) Init(_signalService common.Address, _gasExcess uint64) (*types.Transaction, error) { + return _TaikoL2Client.Contract.Init(&_TaikoL2Client.TransactOpts, _signalService, _gasExcess) } -// Init is a paid mutator transaction binding the contract method 0xcce03bf3. +// Init is a paid mutator transaction binding the contract method 0xb259f48b. // -// Solidity: function init(address _addressManager, uint128 _gasExcess) returns() -func (_TaikoL2Client *TaikoL2ClientTransactorSession) Init(_addressManager common.Address, _gasExcess *big.Int) (*types.Transaction, error) { - return _TaikoL2Client.Contract.Init(&_TaikoL2Client.TransactOpts, _addressManager, _gasExcess) -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns() -func (_TaikoL2Client *TaikoL2ClientTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _TaikoL2Client.contract.Transact(opts, "pause") -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns() -func (_TaikoL2Client *TaikoL2ClientSession) Pause() (*types.Transaction, error) { - return _TaikoL2Client.Contract.Pause(&_TaikoL2Client.TransactOpts) -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns() -func (_TaikoL2Client *TaikoL2ClientTransactorSession) Pause() (*types.Transaction, error) { - return _TaikoL2Client.Contract.Pause(&_TaikoL2Client.TransactOpts) +// Solidity: function init(address _signalService, uint64 _gasExcess) returns() +func (_TaikoL2Client *TaikoL2ClientTransactorSession) Init(_signalService common.Address, _gasExcess uint64) (*types.Transaction, error) { + return _TaikoL2Client.Contract.Init(&_TaikoL2Client.TransactOpts, _signalService, _gasExcess) } // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. @@ -882,27 +820,6 @@ func (_TaikoL2Client *TaikoL2ClientTransactorSession) TransferOwnership(newOwner return _TaikoL2Client.Contract.TransferOwnership(&_TaikoL2Client.TransactOpts, newOwner) } -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns() -func (_TaikoL2Client *TaikoL2ClientTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _TaikoL2Client.contract.Transact(opts, "unpause") -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns() -func (_TaikoL2Client *TaikoL2ClientSession) Unpause() (*types.Transaction, error) { - return _TaikoL2Client.Contract.Unpause(&_TaikoL2Client.TransactOpts) -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns() -func (_TaikoL2Client *TaikoL2ClientTransactorSession) Unpause() (*types.Transaction, error) { - return _TaikoL2Client.Contract.Unpause(&_TaikoL2Client.TransactOpts) -} - // TaikoL2ClientAnchoredIterator is returned from FilterAnchored and is used to iterate over the raw logs and unpacked data for Anchored events raised by the TaikoL2Client contract. type TaikoL2ClientAnchoredIterator struct { Event *TaikoL2ClientAnchored // Event containing the contract specifics and raw log @@ -973,13 +890,13 @@ func (it *TaikoL2ClientAnchoredIterator) Close() error { // TaikoL2ClientAnchored represents a Anchored event raised by the TaikoL2Client contract. type TaikoL2ClientAnchored struct { ParentHash [32]byte - GasExcess *big.Int + GasExcess uint64 Raw types.Log // Blockchain specific contextual infos } -// FilterAnchored is a free log retrieval operation binding the contract event 0xb01a20e23471fa4d881340e2b742c2f84cb2f7a714b34ba370b815478ae4aae0. +// FilterAnchored is a free log retrieval operation binding the contract event 0x41c3f410f5c8ac36bb46b1dccef0de0f964087c9e688795fa02ecfa2c20b3fe4. // -// Solidity: event Anchored(bytes32 parentHash, uint128 gasExcess) +// Solidity: event Anchored(bytes32 parentHash, uint64 gasExcess) func (_TaikoL2Client *TaikoL2ClientFilterer) FilterAnchored(opts *bind.FilterOpts) (*TaikoL2ClientAnchoredIterator, error) { logs, sub, err := _TaikoL2Client.contract.FilterLogs(opts, "Anchored") @@ -989,9 +906,9 @@ func (_TaikoL2Client *TaikoL2ClientFilterer) FilterAnchored(opts *bind.FilterOpt return &TaikoL2ClientAnchoredIterator{contract: _TaikoL2Client.contract, event: "Anchored", logs: logs, sub: sub}, nil } -// WatchAnchored is a free log subscription operation binding the contract event 0xb01a20e23471fa4d881340e2b742c2f84cb2f7a714b34ba370b815478ae4aae0. +// WatchAnchored is a free log subscription operation binding the contract event 0x41c3f410f5c8ac36bb46b1dccef0de0f964087c9e688795fa02ecfa2c20b3fe4. // -// Solidity: event Anchored(bytes32 parentHash, uint128 gasExcess) +// Solidity: event Anchored(bytes32 parentHash, uint64 gasExcess) func (_TaikoL2Client *TaikoL2ClientFilterer) WatchAnchored(opts *bind.WatchOpts, sink chan<- *TaikoL2ClientAnchored) (event.Subscription, error) { logs, sub, err := _TaikoL2Client.contract.WatchLogs(opts, "Anchored") @@ -1026,9 +943,9 @@ func (_TaikoL2Client *TaikoL2ClientFilterer) WatchAnchored(opts *bind.WatchOpts, }), nil } -// ParseAnchored is a log parse operation binding the contract event 0xb01a20e23471fa4d881340e2b742c2f84cb2f7a714b34ba370b815478ae4aae0. +// ParseAnchored is a log parse operation binding the contract event 0x41c3f410f5c8ac36bb46b1dccef0de0f964087c9e688795fa02ecfa2c20b3fe4. // -// Solidity: event Anchored(bytes32 parentHash, uint128 gasExcess) +// Solidity: event Anchored(bytes32 parentHash, uint64 gasExcess) func (_TaikoL2Client *TaikoL2ClientFilterer) ParseAnchored(log types.Log) (*TaikoL2ClientAnchored, error) { event := new(TaikoL2ClientAnchored) if err := _TaikoL2Client.contract.UnpackLog(event, "Anchored", log); err != nil { @@ -1318,9 +1235,9 @@ func (_TaikoL2Client *TaikoL2ClientFilterer) ParseInitialized(log types.Log) (*T return event, nil } -// TaikoL2ClientOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the TaikoL2Client contract. -type TaikoL2ClientOwnershipTransferredIterator struct { - Event *TaikoL2ClientOwnershipTransferred // Event containing the contract specifics and raw log +// TaikoL2ClientOwnershipTransferStartedIterator is returned from FilterOwnershipTransferStarted and is used to iterate over the raw logs and unpacked data for OwnershipTransferStarted events raised by the TaikoL2Client contract. +type TaikoL2ClientOwnershipTransferStartedIterator struct { + Event *TaikoL2ClientOwnershipTransferStarted // 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 @@ -1334,7 +1251,7 @@ type TaikoL2ClientOwnershipTransferredIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *TaikoL2ClientOwnershipTransferredIterator) Next() bool { +func (it *TaikoL2ClientOwnershipTransferStartedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1343,7 +1260,7 @@ func (it *TaikoL2ClientOwnershipTransferredIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(TaikoL2ClientOwnershipTransferred) + it.Event = new(TaikoL2ClientOwnershipTransferStarted) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1358,7 +1275,7 @@ func (it *TaikoL2ClientOwnershipTransferredIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(TaikoL2ClientOwnershipTransferred) + it.Event = new(TaikoL2ClientOwnershipTransferStarted) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1374,28 +1291,28 @@ func (it *TaikoL2ClientOwnershipTransferredIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoL2ClientOwnershipTransferredIterator) Error() error { +func (it *TaikoL2ClientOwnershipTransferStartedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *TaikoL2ClientOwnershipTransferredIterator) Close() error { +func (it *TaikoL2ClientOwnershipTransferStartedIterator) Close() error { it.sub.Unsubscribe() return nil } -// TaikoL2ClientOwnershipTransferred represents a OwnershipTransferred event raised by the TaikoL2Client contract. -type TaikoL2ClientOwnershipTransferred struct { +// TaikoL2ClientOwnershipTransferStarted represents a OwnershipTransferStarted event raised by the TaikoL2Client contract. +type TaikoL2ClientOwnershipTransferStarted 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. +// FilterOwnershipTransferStarted is a free log retrieval operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. // -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_TaikoL2Client *TaikoL2ClientFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*TaikoL2ClientOwnershipTransferredIterator, error) { +// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) +func (_TaikoL2Client *TaikoL2ClientFilterer) FilterOwnershipTransferStarted(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*TaikoL2ClientOwnershipTransferStartedIterator, error) { var previousOwnerRule []interface{} for _, previousOwnerItem := range previousOwner { @@ -1406,17 +1323,17 @@ func (_TaikoL2Client *TaikoL2ClientFilterer) FilterOwnershipTransferred(opts *bi newOwnerRule = append(newOwnerRule, newOwnerItem) } - logs, sub, err := _TaikoL2Client.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + logs, sub, err := _TaikoL2Client.contract.FilterLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule) if err != nil { return nil, err } - return &TaikoL2ClientOwnershipTransferredIterator{contract: _TaikoL2Client.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil + return &TaikoL2ClientOwnershipTransferStartedIterator{contract: _TaikoL2Client.contract, event: "OwnershipTransferStarted", logs: logs, sub: sub}, nil } -// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// WatchOwnershipTransferStarted is a free log subscription operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. // -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_TaikoL2Client *TaikoL2ClientFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *TaikoL2ClientOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { +// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) +func (_TaikoL2Client *TaikoL2ClientFilterer) WatchOwnershipTransferStarted(opts *bind.WatchOpts, sink chan<- *TaikoL2ClientOwnershipTransferStarted, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { var previousOwnerRule []interface{} for _, previousOwnerItem := range previousOwner { @@ -1427,7 +1344,7 @@ func (_TaikoL2Client *TaikoL2ClientFilterer) WatchOwnershipTransferred(opts *bin newOwnerRule = append(newOwnerRule, newOwnerItem) } - logs, sub, err := _TaikoL2Client.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + logs, sub, err := _TaikoL2Client.contract.WatchLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule) if err != nil { return nil, err } @@ -1437,8 +1354,8 @@ func (_TaikoL2Client *TaikoL2ClientFilterer) WatchOwnershipTransferred(opts *bin select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(TaikoL2ClientOwnershipTransferred) - if err := _TaikoL2Client.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + event := new(TaikoL2ClientOwnershipTransferStarted) + if err := _TaikoL2Client.contract.UnpackLog(event, "OwnershipTransferStarted", log); err != nil { return err } event.Raw = log @@ -1459,21 +1376,21 @@ func (_TaikoL2Client *TaikoL2ClientFilterer) WatchOwnershipTransferred(opts *bin }), nil } -// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// ParseOwnershipTransferStarted is a log parse operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. // -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_TaikoL2Client *TaikoL2ClientFilterer) ParseOwnershipTransferred(log types.Log) (*TaikoL2ClientOwnershipTransferred, error) { - event := new(TaikoL2ClientOwnershipTransferred) - if err := _TaikoL2Client.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { +// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) +func (_TaikoL2Client *TaikoL2ClientFilterer) ParseOwnershipTransferStarted(log types.Log) (*TaikoL2ClientOwnershipTransferStarted, error) { + event := new(TaikoL2ClientOwnershipTransferStarted) + if err := _TaikoL2Client.contract.UnpackLog(event, "OwnershipTransferStarted", log); err != nil { return nil, err } event.Raw = log return event, nil } -// TaikoL2ClientPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the TaikoL2Client contract. -type TaikoL2ClientPausedIterator struct { - Event *TaikoL2ClientPaused // Event containing the contract specifics and raw log +// TaikoL2ClientOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the TaikoL2Client contract. +type TaikoL2ClientOwnershipTransferredIterator struct { + Event *TaikoL2ClientOwnershipTransferred // 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 @@ -1487,7 +1404,7 @@ type TaikoL2ClientPausedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *TaikoL2ClientPausedIterator) Next() bool { +func (it *TaikoL2ClientOwnershipTransferredIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1496,7 +1413,7 @@ func (it *TaikoL2ClientPausedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(TaikoL2ClientPaused) + it.Event = new(TaikoL2ClientOwnershipTransferred) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1511,7 +1428,7 @@ func (it *TaikoL2ClientPausedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(TaikoL2ClientPaused) + it.Event = new(TaikoL2ClientOwnershipTransferred) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1527,175 +1444,60 @@ func (it *TaikoL2ClientPausedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoL2ClientPausedIterator) Error() error { +func (it *TaikoL2ClientOwnershipTransferredIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *TaikoL2ClientPausedIterator) Close() error { +func (it *TaikoL2ClientOwnershipTransferredIterator) Close() error { it.sub.Unsubscribe() return nil } -// TaikoL2ClientPaused represents a Paused event raised by the TaikoL2Client contract. -type TaikoL2ClientPaused struct { - Account common.Address - Raw types.Log // Blockchain specific contextual infos +// TaikoL2ClientOwnershipTransferred represents a OwnershipTransferred event raised by the TaikoL2Client contract. +type TaikoL2ClientOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos } -// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. // -// Solidity: event Paused(address account) -func (_TaikoL2Client *TaikoL2ClientFilterer) FilterPaused(opts *bind.FilterOpts) (*TaikoL2ClientPausedIterator, error) { +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_TaikoL2Client *TaikoL2ClientFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*TaikoL2ClientOwnershipTransferredIterator, error) { - logs, sub, err := _TaikoL2Client.contract.FilterLogs(opts, "Paused") - if err != nil { - return nil, err + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) } - return &TaikoL2ClientPausedIterator{contract: _TaikoL2Client.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 (_TaikoL2Client *TaikoL2ClientFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *TaikoL2ClientPaused) (event.Subscription, error) { - logs, sub, err := _TaikoL2Client.contract.WatchLogs(opts, "Paused") + logs, sub, err := _TaikoL2Client.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) if err != nil { return nil, err } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(TaikoL2ClientPaused) - if err := _TaikoL2Client.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 + return &TaikoL2ClientOwnershipTransferredIterator{contract: _TaikoL2Client.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil } -// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. // -// Solidity: event Paused(address account) -func (_TaikoL2Client *TaikoL2ClientFilterer) ParsePaused(log types.Log) (*TaikoL2ClientPaused, error) { - event := new(TaikoL2ClientPaused) - if err := _TaikoL2Client.contract.UnpackLog(event, "Paused", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// TaikoL2ClientUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the TaikoL2Client contract. -type TaikoL2ClientUnpausedIterator struct { - Event *TaikoL2ClientUnpaused // 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 *TaikoL2ClientUnpausedIterator) 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(TaikoL2ClientUnpaused) - 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(TaikoL2ClientUnpaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_TaikoL2Client *TaikoL2ClientFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *TaikoL2ClientOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoL2ClientUnpausedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *TaikoL2ClientUnpausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// TaikoL2ClientUnpaused represents a Unpaused event raised by the TaikoL2Client contract. -type TaikoL2ClientUnpaused 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 (_TaikoL2Client *TaikoL2ClientFilterer) FilterUnpaused(opts *bind.FilterOpts) (*TaikoL2ClientUnpausedIterator, error) { - - logs, sub, err := _TaikoL2Client.contract.FilterLogs(opts, "Unpaused") - if err != nil { - return nil, err + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) } - return &TaikoL2ClientUnpausedIterator{contract: _TaikoL2Client.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 (_TaikoL2Client *TaikoL2ClientFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *TaikoL2ClientUnpaused) (event.Subscription, error) { - logs, sub, err := _TaikoL2Client.contract.WatchLogs(opts, "Unpaused") + logs, sub, err := _TaikoL2Client.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) if err != nil { return nil, err } @@ -1705,8 +1507,8 @@ func (_TaikoL2Client *TaikoL2ClientFilterer) WatchUnpaused(opts *bind.WatchOpts, select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(TaikoL2ClientUnpaused) - if err := _TaikoL2Client.contract.UnpackLog(event, "Unpaused", log); err != nil { + event := new(TaikoL2ClientOwnershipTransferred) + if err := _TaikoL2Client.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { return err } event.Raw = log @@ -1727,12 +1529,12 @@ func (_TaikoL2Client *TaikoL2ClientFilterer) WatchUnpaused(opts *bind.WatchOpts, }), nil } -// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. // -// Solidity: event Unpaused(address account) -func (_TaikoL2Client *TaikoL2ClientFilterer) ParseUnpaused(log types.Log) (*TaikoL2ClientUnpaused, error) { - event := new(TaikoL2ClientUnpaused) - if err := _TaikoL2Client.contract.UnpackLog(event, "Unpaused", log); err != nil { +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_TaikoL2Client *TaikoL2ClientFilterer) ParseOwnershipTransferred(log types.Log) (*TaikoL2ClientOwnershipTransferred, error) { + event := new(TaikoL2ClientOwnershipTransferred) + if err := _TaikoL2Client.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { return nil, err } event.Raw = log diff --git a/bindings/gen_taiko_token.go b/bindings/gen_taiko_token.go index 938c05425..2f7d14dfb 100644 --- a/bindings/gen_taiko_token.go +++ b/bindings/gen_taiko_token.go @@ -37,7 +37,7 @@ type ERC20VotesUpgradeableCheckpoint struct { // TaikoTokenMetaData contains all meta data concerning the TaikoToken contract. var TaikoTokenMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"name\":\"INVALID_PAUSE_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"REENTRANT_CALL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_MANAGER\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TKO_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TKO_INVALID_PREMINT_PARAMS\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromDelegate\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toDelegate\",\"type\":\"address\"}],\"name\":\"DelegateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"DelegateVotesChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"Snapshot\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"snapshotId\",\"type\":\"uint256\"}],\"name\":\"balanceOfAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"pos\",\"type\":\"uint32\"}],\"name\":\"checkpoints\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fromBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint224\",\"name\":\"votes\",\"type\":\"uint224\"}],\"internalType\":\"structERC20VotesUpgradeable.Checkpoint\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"delegateBySig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPastTotalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPastVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"numCheckpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"snapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"snapshotId\",\"type\":\"uint256\"}],\"name\":\"totalSupplyAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + ABI: "[{\"inputs\":[],\"name\":\"INVALID_PAUSE_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"REENTRANT_CALL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_MANAGER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_UNEXPECTED_CHAINID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TKO_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TKO_INVALID_PREMINT_PARAMS\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromDelegate\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toDelegate\",\"type\":\"address\"}],\"name\":\"DelegateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"DelegateVotesChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"Snapshot\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"snapshotId\",\"type\":\"uint256\"}],\"name\":\"balanceOfAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"pos\",\"type\":\"uint32\"}],\"name\":\"checkpoints\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fromBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint224\",\"name\":\"votes\",\"type\":\"uint224\"}],\"internalType\":\"structERC20VotesUpgradeable.Checkpoint\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"delegateBySig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPastTotalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPastVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"numCheckpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"snapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"snapshotId\",\"type\":\"uint256\"}],\"name\":\"totalSupplyAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } // TaikoTokenABI is the input ABI used to generate the binding from. @@ -682,10 +682,41 @@ func (_TaikoToken *TaikoTokenCallerSession) Paused() (bool, error) { return _TaikoToken.Contract.Paused(&_TaikoToken.CallOpts) } -// Resolve is a free data retrieval call binding the contract method 0x6c6563f6. +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. // -// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr) -func (_TaikoToken *TaikoTokenCaller) Resolve(opts *bind.CallOpts, chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) { +// Solidity: function pendingOwner() view returns(address) +func (_TaikoToken *TaikoTokenCaller) PendingOwner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TaikoToken.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 (_TaikoToken *TaikoTokenSession) PendingOwner() (common.Address, error) { + return _TaikoToken.Contract.PendingOwner(&_TaikoToken.CallOpts) +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_TaikoToken *TaikoTokenCallerSession) PendingOwner() (common.Address, error) { + return _TaikoToken.Contract.PendingOwner(&_TaikoToken.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 addr) +func (_TaikoToken *TaikoTokenCaller) Resolve(opts *bind.CallOpts, chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) { var out []interface{} err := _TaikoToken.contract.Call(opts, &out, "resolve", chainId, name, allowZeroAddress) @@ -699,17 +730,17 @@ func (_TaikoToken *TaikoTokenCaller) Resolve(opts *bind.CallOpts, chainId *big.I } -// Resolve is a free data retrieval call binding the contract method 0x6c6563f6. +// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf. // -// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr) -func (_TaikoToken *TaikoTokenSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) { +// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr) +func (_TaikoToken *TaikoTokenSession) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) { return _TaikoToken.Contract.Resolve(&_TaikoToken.CallOpts, chainId, name, allowZeroAddress) } -// Resolve is a free data retrieval call binding the contract method 0x6c6563f6. +// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf. // -// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr) -func (_TaikoToken *TaikoTokenCallerSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) { +// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr) +func (_TaikoToken *TaikoTokenCallerSession) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) { return _TaikoToken.Contract.Resolve(&_TaikoToken.CallOpts, chainId, name, allowZeroAddress) } @@ -837,6 +868,27 @@ func (_TaikoToken *TaikoTokenCallerSession) TotalSupplyAt(snapshotId *big.Int) ( return _TaikoToken.Contract.TotalSupplyAt(&_TaikoToken.CallOpts, snapshotId) } +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_TaikoToken *TaikoTokenTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TaikoToken.contract.Transact(opts, "acceptOwnership") +} + +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_TaikoToken *TaikoTokenSession) AcceptOwnership() (*types.Transaction, error) { + return _TaikoToken.Contract.AcceptOwnership(&_TaikoToken.TransactOpts) +} + +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_TaikoToken *TaikoTokenTransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _TaikoToken.Contract.AcceptOwnership(&_TaikoToken.TransactOpts) +} + // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 amount) returns(bool) @@ -1727,6 +1779,159 @@ func (_TaikoToken *TaikoTokenFilterer) ParseInitialized(log types.Log) (*TaikoTo return event, nil } +// TaikoTokenOwnershipTransferStartedIterator is returned from FilterOwnershipTransferStarted and is used to iterate over the raw logs and unpacked data for OwnershipTransferStarted events raised by the TaikoToken contract. +type TaikoTokenOwnershipTransferStartedIterator struct { + Event *TaikoTokenOwnershipTransferStarted // 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 *TaikoTokenOwnershipTransferStartedIterator) 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(TaikoTokenOwnershipTransferStarted) + 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(TaikoTokenOwnershipTransferStarted) + 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 *TaikoTokenOwnershipTransferStartedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoTokenOwnershipTransferStartedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoTokenOwnershipTransferStarted represents a OwnershipTransferStarted event raised by the TaikoToken contract. +type TaikoTokenOwnershipTransferStarted 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 (_TaikoToken *TaikoTokenFilterer) FilterOwnershipTransferStarted(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*TaikoTokenOwnershipTransferStartedIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _TaikoToken.contract.FilterLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &TaikoTokenOwnershipTransferStartedIterator{contract: _TaikoToken.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 (_TaikoToken *TaikoTokenFilterer) WatchOwnershipTransferStarted(opts *bind.WatchOpts, sink chan<- *TaikoTokenOwnershipTransferStarted, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _TaikoToken.contract.WatchLogs(opts, "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(TaikoTokenOwnershipTransferStarted) + if err := _TaikoToken.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 (_TaikoToken *TaikoTokenFilterer) ParseOwnershipTransferStarted(log types.Log) (*TaikoTokenOwnershipTransferStarted, error) { + event := new(TaikoTokenOwnershipTransferStarted) + if err := _TaikoToken.contract.UnpackLog(event, "OwnershipTransferStarted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // TaikoTokenOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the TaikoToken contract. type TaikoTokenOwnershipTransferredIterator struct { Event *TaikoTokenOwnershipTransferred // Event containing the contract specifics and raw log diff --git a/driver/chain_syncer/calldata/syncer.go b/driver/chain_syncer/calldata/syncer.go index 592865932..62ec16efb 100644 --- a/driver/chain_syncer/calldata/syncer.go +++ b/driver/chain_syncer/calldata/syncer.go @@ -349,8 +349,8 @@ func (s *Syncer) insertNewHead( ) // Get withdrawals - withdrawals := make(types.Withdrawals, len(event.Meta.DepositsProcessed)) - for i, d := range event.Meta.DepositsProcessed { + withdrawals := make(types.Withdrawals, len(event.DepositsProcessed)) + for i, d := range event.DepositsProcessed { withdrawals[i] = &types.Withdrawal{Address: d.Recipient, Amount: d.Amount.Uint64(), Index: d.Id} } diff --git a/driver/chain_syncer/calldata/syncer_test.go b/driver/chain_syncer/calldata/syncer_test.go index f91985ccd..858f44f48 100644 --- a/driver/chain_syncer/calldata/syncer_test.go +++ b/driver/chain_syncer/calldata/syncer_test.go @@ -122,7 +122,7 @@ func (s *CalldataSyncerTestSuite) TestInsertNewHead() { L1Height: l1Head.NumberU64(), L1Hash: l1Head.Hash(), Coinbase: common.BytesToAddress(testutils.RandomBytes(1024)), - TxListHash: testutils.RandomHash(), + BlobHash: testutils.RandomHash(), Difficulty: testutils.RandomHash(), GasLimit: rand.Uint32(), Timestamp: uint64(time.Now().Unix()), diff --git a/driver/driver_test.go b/driver/driver_test.go index 4ae933e72..f22cc4fa7 100644 --- a/driver/driver_test.go +++ b/driver/driver_test.go @@ -132,6 +132,7 @@ func (s *DriverTestSuite) TestCheckL1ReorgToHigherFork() { // Propose two L2 blocks testutils.ProposeAndInsertValidBlock(&s.ClientTestSuite, s.p, s.d.ChainSyncer().CalldataSyncer()) + testutils.ProposeAndInsertValidBlock(&s.ClientTestSuite, s.p, s.d.ChainSyncer().CalldataSyncer()) l1Head2, err := s.d.rpc.L1.HeaderByNumber(context.Background(), nil) diff --git a/driver/state/state.go b/driver/state/state.go index d563f6e1f..c2257388b 100644 --- a/driver/state/state.go +++ b/driver/state/state.go @@ -159,9 +159,9 @@ func (s *State) startSubscriptions(ctx context.Context) { log.Info( "✅ Transition proven", "blockID", e.BlockId, - "parentHash", common.Hash(e.ParentHash), - "hash", common.Hash(e.BlockHash), - "signalRoot", common.Hash(e.SignalRoot), + "parentHash", common.Hash(e.Tran.ParentHash), + "hash", common.Hash(e.Tran.BlockHash), + "signalRoot", common.Hash(e.Tran.SignalRoot), "prover", e.Prover, ) case e := <-s.blockVerifiedCh: diff --git a/integration_test/entrypoint.sh b/integration_test/entrypoint.sh index 5532dab9b..d9eb26ecb 100755 --- a/integration_test/entrypoint.sh +++ b/integration_test/entrypoint.sh @@ -28,7 +28,7 @@ TAIKO_L1_CONTRACT_ADDRESS=$(echo $DEPLOYMENT_JSON | jq '.taiko' | sed 's/\"//g') L1_SIGNAL_SERVICE_CONTRACT_ADDRESS=$(echo $DEPLOYMENT_JSON | jq '.signal_service' | sed 's/\"//g') TAIKO_TOKEN_CONTRACT_ADDRESS=$(echo $DEPLOYMENT_JSON | jq '.taiko_token' | sed 's/\"//g') ADDRESS_MANAGER_CONTRACT_ADDRESS=$(echo $DEPLOYMENT_JSON | jq '.address_manager' | sed 's/\"//g') -GUARDIAN_PROVER_CONTRACT_ADDRESS=$(echo $DEPLOYMENT_JSON | jq '.guardian' | sed 's/\"//g') +GUARDIAN_PROVER_CONTRACT_ADDRESS=$(echo $DEPLOYMENT_JSON | jq '.guardian_prover' | sed 's/\"//g') trap "docker compose -f $TESTNET_CONFIG down -v" EXIT INT KILL ERR @@ -47,7 +47,7 @@ if [ "$RUN_TESTS" == "true" ]; then L2_EXECUTION_ENGINE_WS_ENDPOINT=ws://localhost:28546 \ L2_EXECUTION_ENGINE_AUTH_ENDPOINT=http://localhost:28551 \ TAIKO_L1_ADDRESS=$TAIKO_L1_CONTRACT_ADDRESS \ - TAIKO_L2_ADDRESS=0x1000777700000000000000000000000000000001 \ + TAIKO_L2_ADDRESS=0x1670010000000000000000000000000000010001 \ TAIKO_TOKEN_ADDRESS=$TAIKO_TOKEN_CONTRACT_ADDRESS \ ADDRESS_MANAGER_CONTRACT_ADDRESS=$ADDRESS_MANAGER_CONTRACT_ADDRESS \ GUARDIAN_PROVER_CONTRACT_ADDRESS=$GUARDIAN_PROVER_CONTRACT_ADDRESS \ diff --git a/integration_test/nodes/init.sh b/integration_test/nodes/init.sh index 79bacd385..b09b1bfa4 100755 --- a/integration_test/nodes/init.sh +++ b/integration_test/nodes/init.sh @@ -37,8 +37,10 @@ cd $TAIKO_MONO_DIR/packages/protocol && OWNER=0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC \ TAIKO_L2_ADDRESS=0x1000777700000000000000000000000000000001 \ L2_SIGNAL_SERVICE=0x1000777700000000000000000000000000000007 \ - SHARED_SIGNAL_SERVICE=0x0000000000000000000000000000000000000000 \ + SINGLETON_SIGNAL_SERVICE=0x0000000000000000000000000000000000000000 \ + SINGLETON_BRIDGE=0x0000000000000000000000000000000000000000 \ PROPOSER=0x0000000000000000000000000000000000000000 \ + PROPOSER_ONE=0x0000000000000000000000000000000000000000 \ TAIKO_TOKEN_PREMINT_RECIPIENT=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 \ TIER_PROVIDER=0x0 \ L2_GENESIS_HASH=$L2_GENESIS_HASH \ diff --git a/proposer/proposer.go b/proposer/proposer.go index dc328c535..d83f9501b 100644 --- a/proposer/proposer.go +++ b/proposer/proposer.go @@ -340,7 +340,7 @@ func (p *Proposer) sendProposeBlockTx( ctx context.Context, txListBytes []byte, nonce *uint64, - signedAssignment []byte, + assignment *encoding.ProverAssignment, maxFee *big.Int, isReplacement bool, ) (*types.Transaction, error) { @@ -368,11 +368,17 @@ func (p *Proposer) sendProposeBlockTx( } } + encodedParams, err := encoding.EncodeBlockParams(&encoding.BlockParams{ + Assignment: assignment, + ExtraData: rpc.StringToBytes32(p.cfg.ExtraData), + }) + if err != nil { + return nil, err + } + proposeTx, err := p.rpc.TaikoL1.ProposeBlock( opts, - crypto.Keccak256Hash(txListBytes), - rpc.StringToBytes32(p.cfg.ExtraData), - signedAssignment, + encodedParams, txListBytes, ) if err != nil { @@ -389,7 +395,7 @@ func (p *Proposer) ProposeTxList( txNum uint, nonce *uint64, ) error { - signedAssignment, maxFee, err := p.proverSelector.AssignProver( + assignment, maxFee, err := p.proverSelector.AssignProver( ctx, p.tierFees, crypto.Keccak256Hash(txListBytes), @@ -411,7 +417,7 @@ func (p *Proposer) ProposeTxList( ctx, txListBytes, nonce, - signedAssignment, + assignment, maxFee, isReplacement, ); err != nil { @@ -460,7 +466,11 @@ func (p *Proposer) ProposeTxList( // ProposeEmptyBlockOp performs a proposing one empty block operation. func (p *Proposer) ProposeEmptyBlockOp(ctx context.Context) error { - return p.ProposeTxList(ctx, []byte{}, 0, nil) + emptyTxListBytes, err := rlp.EncodeToBytes(types.Transactions{}) + if err != nil { + return err + } + return p.ProposeTxList(ctx, emptyTxListBytes, 0, nil) } // updateProposingTicker updates the internal proposing timer. diff --git a/proposer/prover_selector/eth_fee_eoa_selector.go b/proposer/prover_selector/eth_fee_eoa_selector.go index aa42982f8..590c87ab4 100644 --- a/proposer/prover_selector/eth_fee_eoa_selector.go +++ b/proposer/prover_selector/eth_fee_eoa_selector.go @@ -84,7 +84,7 @@ func (s *ETHFeeEOASelector) AssignProver( ctx context.Context, tierFees []encoding.TierFee, txListHash common.Hash, -) ([]byte, *big.Int, error) { +) (*encoding.ProverAssignment, *big.Int, error) { guardianProverAddress, err := s.rpc.TaikoL1.Resolve0( &bind.CallOpts{Context: ctx}, rpc.StringToBytes32("guardian"), @@ -172,7 +172,7 @@ func assignProver( txListHash common.Hash, timeout time.Duration, guardianProverAddress common.Address, -) ([]byte, common.Address, error) { +) (*encoding.ProverAssignment, common.Address, error) { log.Info( "Attempting to assign prover", "endpoint", endpoint, @@ -233,20 +233,6 @@ func assignProver( ) } - // Convert signature to one solidity can recover by adding 27 to 65th byte - result.SignedPayload[64] = uint8(uint(result.SignedPayload[64])) + 27 - - encoded, err := encoding.EncodeProverAssignment(&encoding.ProverAssignment{ - Prover: result.Prover, - FeeToken: common.Address{}, - TierFees: tierFees, - Expiry: reqBody.Expiry, - Signature: result.SignedPayload, - }) - if err != nil { - return nil, common.Address{}, err - } - log.Info( "Prover assigned", "address", result.Prover, @@ -255,5 +241,14 @@ func assignProver( "expiry", expiry, ) - return encoded, result.Prover, nil + // Convert signature to one solidity can recover by adding 27 to 65th byte + result.SignedPayload[64] = uint8(uint(result.SignedPayload[64])) + 27 + + return &encoding.ProverAssignment{ + Prover: result.Prover, + FeeToken: common.Address{}, + TierFees: tierFees, + Expiry: reqBody.Expiry, + Signature: result.SignedPayload, + }, result.Prover, nil } diff --git a/proposer/prover_selector/interface.go b/proposer/prover_selector/interface.go index 60a765074..e33c71fd1 100644 --- a/proposer/prover_selector/interface.go +++ b/proposer/prover_selector/interface.go @@ -14,6 +14,6 @@ type ProverSelector interface { ctx context.Context, tierFees []encoding.TierFee, txListHash common.Hash, - ) (signedPayload []byte, fee *big.Int, err error) + ) (assignment *encoding.ProverAssignment, fee *big.Int, err error) ProverEndpoints() []*url.URL } diff --git a/prover/proof_submitter/evidence/builder.go b/prover/proof_submitter/evidence/builder.go deleted file mode 100644 index eec53ca0a..000000000 --- a/prover/proof_submitter/evidence/builder.go +++ /dev/null @@ -1,128 +0,0 @@ -package evidence - -import ( - "context" - "encoding/binary" - "fmt" - - "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/log" - "github.com/taikoxyz/taiko-client/bindings" - "github.com/taikoxyz/taiko-client/bindings/encoding" - "github.com/taikoxyz/taiko-client/pkg/rpc" - anchorTxValidator "github.com/taikoxyz/taiko-client/prover/anchor_tx_validator" - proofProducer "github.com/taikoxyz/taiko-client/prover/proof_producer" -) - -// Builder is responsible for building evidence for the given L2 block proof. -type Builder struct { - rpc *rpc.Client - anchorTxValidator *anchorTxValidator.AnchorTxValidator - graffiti [32]byte -} - -// NewBuilder creates a new Builder instance. -func NewBuilder(cli *rpc.Client, anchorTxValidator *anchorTxValidator.AnchorTxValidator, graffiti string) *Builder { - return &Builder{ - rpc: cli, - anchorTxValidator: anchorTxValidator, - graffiti: rpc.StringToBytes32(graffiti), - } -} - -// ForSubmission creates the evidence for the given L2 block proof. -func (b *Builder) ForSubmission( - ctx context.Context, - proofWithHeader *proofProducer.ProofWithHeader, -) (*encoding.BlockEvidence, error) { - var ( - blockID = proofWithHeader.BlockID - header = proofWithHeader.Header - proof = proofWithHeader.Proof - ) - - log.Info( - "Create new evidence", - "blockID", blockID, - "parentHash", proofWithHeader.Header.ParentHash, - "hash", proofWithHeader.Header.Hash(), - "signalRoot", proofWithHeader.Opts.SignalRoot, - "tier", proofWithHeader.Tier, - ) - - // Get the corresponding L2 block. - block, err := b.rpc.L2.BlockByHash(ctx, header.Hash()) - if err != nil { - return nil, fmt.Errorf("failed to get L2 block with given hash %s: %w", header.Hash(), err) - } - - if block.Transactions().Len() == 0 { - return nil, fmt.Errorf("invalid block without anchor transaction, blockID %s", blockID) - } - - // Validate TaikoL2.anchor transaction inside the L2 block. - anchorTx := block.Transactions()[0] - if err := b.anchorTxValidator.ValidateAnchorTx(ctx, anchorTx); err != nil { - return nil, fmt.Errorf("invalid anchor transaction: %w", err) - } - - // Get and validate this anchor transaction's receipt. - if _, err = b.anchorTxValidator.GetAndValidateAnchorTxReceipt(ctx, anchorTx); err != nil { - return nil, fmt.Errorf("failed to fetch anchor transaction receipt: %w", err) - } - - evidence := &encoding.BlockEvidence{ - MetaHash: proofWithHeader.Opts.MetaHash, - ParentHash: proofWithHeader.Opts.ParentHash, - BlockHash: proofWithHeader.Opts.BlockHash, - SignalRoot: proofWithHeader.Opts.SignalRoot, - Graffiti: b.graffiti, - Tier: proofWithHeader.Tier, - Proof: proof, - } - - if proofWithHeader.Tier == encoding.TierSgxAndPseZkevmID { - circuitsIdx, err := proofProducer.DegreeToCircuitsIdx(proofWithHeader.Degree) - if err != nil { - return nil, err - } - evidence.Proof = append(uint16ToBytes(circuitsIdx), evidence.Proof...) - } - - return evidence, nil -} - -// ForContest creates the evidence for contesting a L2 transition. -func (b *Builder) ForContest( - ctx context.Context, - header *types.Header, - l2SignalService common.Address, - event *bindings.TaikoL1ClientTransitionProved, -) (*encoding.BlockEvidence, error) { - signalRoot, err := b.rpc.GetStorageRoot(ctx, b.rpc.L2GethClient, l2SignalService, event.BlockId) - if err != nil { - return nil, fmt.Errorf("failed to get L2 signal service storage root: %w", err) - } - blockInfo, err := b.rpc.TaikoL1.GetBlock(&bind.CallOpts{Context: ctx}, event.BlockId.Uint64()) - if err != nil { - return nil, err - } - - return &encoding.BlockEvidence{ - MetaHash: blockInfo.MetaHash, - ParentHash: event.ParentHash, - BlockHash: header.Hash(), - SignalRoot: signalRoot, - Tier: event.Tier, - Proof: []byte{}, - }, nil -} - -// uint16ToBytes converts an uint16 to bytes. -func uint16ToBytes(i uint16) []byte { - b := make([]byte, 2) - binary.BigEndian.PutUint16(b, i) - return b -} diff --git a/prover/proof_submitter/proof_contester.go b/prover/proof_submitter/proof_contester.go index e72e1989c..14163cbd0 100644 --- a/prover/proof_submitter/proof_contester.go +++ b/prover/proof_submitter/proof_contester.go @@ -16,7 +16,6 @@ import ( "github.com/taikoxyz/taiko-client/bindings/encoding" "github.com/taikoxyz/taiko-client/pkg/rpc" proofProducer "github.com/taikoxyz/taiko-client/prover/proof_producer" - "github.com/taikoxyz/taiko-client/prover/proof_submitter/evidence" "github.com/taikoxyz/taiko-client/prover/proof_submitter/transaction" ) @@ -25,7 +24,6 @@ var _ Contester = (*ProofContester)(nil) // ProofContester is responsible for contesting wrong L2 transitions. type ProofContester struct { rpc *rpc.Client - evidenceBuilder *evidence.Builder txBuilder *transaction.ProveBlockTxBuilder txSender *transaction.Sender l2SignalService common.Address @@ -44,7 +42,7 @@ func NewProofContester( waitReceiptTimeout time.Duration, graffiti string, ) (*ProofContester, error) { - l2SignalService, err := rpcClient.TaikoL2.Resolve0(nil, rpc.StringToBytes32("signal_service"), false) + l2SignalService, err := rpcClient.TaikoL2.SignalService(nil) if err != nil { return nil, err } @@ -55,8 +53,7 @@ func NewProofContester( } return &ProofContester{ - rpc: rpcClient, - evidenceBuilder: evidence.NewBuilder(rpcClient, nil, graffiti), + rpc: rpcClient, txBuilder: transaction.NewProveBlockTxBuilder( rpcClient, proverPrivKey, @@ -80,14 +77,14 @@ func (c *ProofContester) SubmitContest( transition, err := c.rpc.TaikoL1.GetTransition( &bind.CallOpts{Context: ctx}, transitionProvedEvent.BlockId.Uint64(), - transitionProvedEvent.ParentHash, + transitionProvedEvent.Tran.ParentHash, ) if err != nil { if !strings.Contains(encoding.TryParsingCustomError(err).Error(), "L1_") { log.Warn( "Failed to get transition", "blockID", transitionProvedEvent.BlockId, - "parentHash", transitionProvedEvent.ParentHash, + "parentHash", transitionProvedEvent.Tran.ParentHash, "error", encoding.TryParsingCustomError(err), ) return nil @@ -98,7 +95,7 @@ func (c *ProofContester) SubmitContest( log.Info( "Transaction has already been contested", "blockID", transitionProvedEvent.BlockId, - "parentHash", transitionProvedEvent.ParentHash, + "parentHash", transitionProvedEvent.Tran.ParentHash, "contester", transition.Contester, ) return nil @@ -109,14 +106,9 @@ func (c *ProofContester) SubmitContest( return err } - // Generate an evidence for contest. - evidence, err := c.evidenceBuilder.ForContest(ctx, header, c.l2SignalService, transitionProvedEvent) + signalRoot, err := c.rpc.GetStorageRoot(ctx, c.rpc.L2GethClient, c.l2SignalService, transitionProvedEvent.BlockId) if err != nil { - return err - } - input, err := encoding.EncodeEvidence(evidence) - if err != nil { - return fmt.Errorf("failed to encode TaikoL1.proveBlock inputs: %w", err) + return fmt.Errorf("failed to get L2 signal service storage root: %w", err) } if err := c.txSender.Send( @@ -128,11 +120,26 @@ func (c *ProofContester) SubmitContest( Proof: []byte{}, Opts: &proofProducer.ProofRequestOptions{ EventL1Hash: blockProposedEvent.Raw.BlockHash, - SignalRoot: evidence.SignalRoot, + SignalRoot: signalRoot, }, Tier: transitionProvedEvent.Tier, }, - c.txBuilder.BuildForNormalProofSubmission(ctx, transitionProvedEvent.BlockId, input), + c.txBuilder.Build( + ctx, + transitionProvedEvent.BlockId, + &blockProposedEvent.Meta, + &bindings.TaikoDataTransition{ + ParentHash: header.ParentHash, + BlockHash: header.Hash(), + SignalRoot: signalRoot, + Graffiti: c.graffiti, + }, + &bindings.TaikoDataTierProof{ + Tier: transition.Tier, + Data: []byte{}, + }, + false, + ), ); err != nil { if errors.Is(err, transaction.ErrUnretryable) { return nil diff --git a/prover/proof_submitter/proof_contester_test.go b/prover/proof_submitter/proof_contester_test.go index d4a042e2b..2d0661bdf 100644 --- a/prover/proof_submitter/proof_contester_test.go +++ b/prover/proof_submitter/proof_contester_test.go @@ -14,8 +14,10 @@ func (s *ProofSubmitterTestSuite) TestSubmitContestNoTransition() { context.Background(), &bindings.TaikoL1ClientBlockProposed{}, &bindings.TaikoL1ClientTransitionProved{ - BlockId: common.Big256, - ParentHash: testutils.RandomHash(), + BlockId: common.Big256, + Tran: bindings.TaikoDataTransition{ + ParentHash: testutils.RandomHash(), + }, }, ), ) diff --git a/prover/proof_submitter/proof_submitter.go b/prover/proof_submitter/proof_submitter.go index 9bd9e73b1..415be26d4 100644 --- a/prover/proof_submitter/proof_submitter.go +++ b/prover/proof_submitter/proof_submitter.go @@ -18,7 +18,6 @@ import ( "github.com/taikoxyz/taiko-client/pkg/rpc" anchorTxValidator "github.com/taikoxyz/taiko-client/prover/anchor_tx_validator" proofProducer "github.com/taikoxyz/taiko-client/prover/proof_producer" - "github.com/taikoxyz/taiko-client/prover/proof_submitter/evidence" "github.com/taikoxyz/taiko-client/prover/proof_submitter/transaction" ) @@ -30,7 +29,7 @@ type ProofSubmitter struct { rpc *rpc.Client proofProducer proofProducer.ProofProducer resultCh chan *proofProducer.ProofWithHeader - evidenceBuilder *evidence.Builder + anchorValidator *anchorTxValidator.AnchorTxValidator txBuilder *transaction.ProveBlockTxBuilder txSender *transaction.Sender proverAddress common.Address @@ -65,7 +64,7 @@ func New( return nil, err } - l2SignalService, err := rpcClient.TaikoL2.Resolve0(nil, rpc.StringToBytes32("signal_service"), false) + l2SignalService, err := rpcClient.TaikoL2.SignalService(nil) if err != nil { return nil, err } @@ -85,7 +84,7 @@ func New( rpc: rpcClient, proofProducer: proofProducer, resultCh: resultCh, - evidenceBuilder: evidence.NewBuilder(rpcClient, anchorValidator, graffiti), + anchorValidator: anchorValidator, txBuilder: transaction.NewProveBlockTxBuilder( rpcClient, proverPrivKey, @@ -185,27 +184,45 @@ func (s *ProofSubmitter) SubmitProof( metrics.ProverReceivedProofCounter.Inc(1) - evidence, err := s.evidenceBuilder.ForSubmission(ctx, proofWithHeader) + // Validate anchor transaction + // Get the corresponding L2 block. + block, err := s.rpc.L2.BlockByHash(ctx, proofWithHeader.Header.Hash()) if err != nil { - return fmt.Errorf("failed to create evidence: %w", err) + return fmt.Errorf("failed to get L2 block with given hash %s: %w", proofWithHeader.Header.Hash(), err) } - input, err := encoding.EncodeEvidence(evidence) - if err != nil { - return fmt.Errorf("failed to encode TaikoL1.proveBlock inputs: %w", err) + if block.Transactions().Len() == 0 { + return fmt.Errorf("invalid block without anchor transaction, blockID %s", proofWithHeader.BlockID) + } + + // Validate TaikoL2.anchor transaction inside the L2 block. + anchorTx := block.Transactions()[0] + if err := s.anchorValidator.ValidateAnchorTx(ctx, anchorTx); err != nil { + return fmt.Errorf("invalid anchor transaction: %w", err) } - var txBuilder transaction.TxBuilder - if proofWithHeader.Tier == encoding.TierGuardianID { - txBuilder = s.txBuilder.BuildForGuardianProofSubmission( - ctx, - proofWithHeader.BlockID, - (*bindings.TaikoDataBlockEvidence)(evidence), - ) - } else { - txBuilder = s.txBuilder.BuildForNormalProofSubmission(ctx, proofWithHeader.BlockID, input) + // Get and validate this anchor transaction's receipt. + if _, err = s.anchorValidator.GetAndValidateAnchorTxReceipt(ctx, anchorTx); err != nil { + return fmt.Errorf("failed to fetch anchor transaction receipt: %w", err) } + txBuilder := s.txBuilder.Build( + ctx, + proofWithHeader.BlockID, + proofWithHeader.Meta, + &bindings.TaikoDataTransition{ + ParentHash: proofWithHeader.Header.ParentHash, + BlockHash: proofWithHeader.Opts.BlockHash, + SignalRoot: proofWithHeader.Opts.SignalRoot, + Graffiti: s.graffiti, + }, + &bindings.TaikoDataTierProof{ + Tier: proofWithHeader.Tier, + Data: proofWithHeader.Proof, + }, + proofWithHeader.Tier == encoding.TierGuardianID, + ) + if err := s.txSender.Send(ctx, proofWithHeader, txBuilder); err != nil { if errors.Is(err, transaction.ErrUnretryable) { return nil diff --git a/prover/proof_submitter/transaction/builder.go b/prover/proof_submitter/transaction/builder.go index 543f574f7..20f93480d 100644 --- a/prover/proof_submitter/transaction/builder.go +++ b/prover/proof_submitter/transaction/builder.go @@ -12,6 +12,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" "github.com/taikoxyz/taiko-client/bindings" + "github.com/taikoxyz/taiko-client/bindings/encoding" "github.com/taikoxyz/taiko-client/pkg/rpc" ) @@ -48,11 +49,14 @@ func NewProveBlockTxBuilder( } } -// BuildForNormalProofSubmission creates a new TaikoL1.ProveBlock transaction with the given nonce. -func (a *ProveBlockTxBuilder) BuildForNormalProofSubmission( +// Build creates a new TaikoL1.ProveBlock transaction with the given nonce. +func (a *ProveBlockTxBuilder) Build( ctx context.Context, blockID *big.Int, - input []byte, + meta *bindings.TaikoDataBlockMetadata, + transition *bindings.TaikoDataTransition, + tierProof *bindings.TaikoDataTierProof, + guardian bool, ) TxBuilder { return func(nonce *big.Int) (*types.Transaction, error) { a.mutex.Lock() @@ -89,56 +93,18 @@ func (a *ProveBlockTxBuilder) BuildForNormalProofSubmission( "nonce", txOpts.Nonce, "gasTipCap", txOpts.GasTipCap, "gasFeeCap", txOpts.GasFeeCap, + "guardian", guardian, ) - return a.rpc.TaikoL1.ProveBlock(txOpts, blockID.Uint64(), input) - } -} - -// BuildForGuardianProofSubmission creates a new GuardianProver.approveEvidence transaction with the given nonce. -func (a *ProveBlockTxBuilder) BuildForGuardianProofSubmission( - ctx context.Context, - blockID *big.Int, - evidence *bindings.TaikoDataBlockEvidence, -) TxBuilder { - return func(nonce *big.Int) (*types.Transaction, error) { - a.mutex.Lock() - defer a.mutex.Unlock() - - txOpts, err := getProveBlocksTxOpts(ctx, a.rpc.L1, a.rpc.L1ChainID, a.proverPrivateKey) - if err != nil { - return nil, err - } - - if a.gasLimit != nil { - txOpts.GasLimit = a.gasLimit.Uint64() - } - - if nonce != nil { - txOpts.Nonce = nonce - - if txOpts, err = rpc.IncreaseGasTipCap( - ctx, - a.rpc, - txOpts, - a.proverAddress, - a.gasTipMultiplier, - a.gasTipCap, - ); err != nil { + if !guardian { + input, err := encoding.EncodeProveBlockInput(meta, transition, tierProof) + if err != nil { return nil, err } + return a.rpc.TaikoL1.ProveBlock(txOpts, blockID.Uint64(), input) } - log.Info( - "Build guardian proof submission transaction", - "blockID", blockID, - "gasLimit", txOpts.GasLimit, - "nonce", txOpts.Nonce, - "gasTipCap", txOpts.GasTipCap, - "gasFeeCap", txOpts.GasFeeCap, - ) - - return a.rpc.GuardianProver.ApproveEvidence(txOpts, blockID.Uint64(), *evidence) + return a.rpc.GuardianProver.Approve(txOpts, *meta, *transition, *tierProof) } } diff --git a/prover/proof_submitter/transaction/builder_test.go b/prover/proof_submitter/transaction/builder_test.go index 1070648fb..55023536b 100644 --- a/prover/proof_submitter/transaction/builder_test.go +++ b/prover/proof_submitter/transaction/builder_test.go @@ -5,7 +5,6 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/taikoxyz/taiko-client/bindings" - "github.com/taikoxyz/taiko-client/testutils" ) func (s *TransactionTestSuite) TestGetProveBlocksTxOpts() { @@ -19,15 +18,23 @@ func (s *TransactionTestSuite) TestGetProveBlocksTxOpts() { } func (s *TransactionTestSuite) TestBuildTxs() { - _, err := s.builder.BuildForNormalProofSubmission( - context.Background(), common.Big256, testutils.RandomBytes(1024), + _, err := s.builder.Build( + context.Background(), + common.Big256, + &bindings.TaikoDataBlockMetadata{}, + &bindings.TaikoDataTransition{}, + &bindings.TaikoDataTierProof{}, + false, )(common.Big256) s.NotNil(err) - _, err = s.builder.BuildForGuardianProofSubmission( + _, err = s.builder.Build( context.Background(), common.Big256, - &bindings.TaikoDataBlockEvidence{}, + &bindings.TaikoDataBlockMetadata{}, + &bindings.TaikoDataTransition{}, + &bindings.TaikoDataTierProof{}, + true, )(common.Big256) s.NotNil(err) } diff --git a/prover/prover.go b/prover/prover.go index eb0feeda0..c5bfb81e3 100644 --- a/prover/prover.go +++ b/prover/prover.go @@ -476,7 +476,7 @@ func (p *Prover) onBlockProposed( "Proposed block information", "blockID", event.BlockId, "assignedProver", event.AssignedProver, - "minTier", event.MinTier, + "minTier", event.Meta.MinTier, ) provingWindow, err := p.getProvingWindow(event) @@ -552,7 +552,7 @@ func (p *Prover) onBlockProposed( "blockID", event.BlockId, "prover", event.AssignedProver, "expiresAt", provingWindowExpiresAt, - "minTier", event.MinTier, + "minTier", event.Meta.MinTier, ) metrics.ProverProofsAssigned.Inc(1) @@ -562,7 +562,7 @@ func (p *Prover) onBlockProposed( return err } - if proofSubmitter := p.selectSubmitter(event.MinTier); proofSubmitter != nil { + if proofSubmitter := p.selectSubmitter(event.Meta.MinTier); proofSubmitter != nil { return proofSubmitter.RequestProof(ctx, event) } @@ -588,7 +588,7 @@ func (p *Prover) onBlockProposed( "Failed to handle BlockProposed event", "error", err, "blockID", event.BlockId, - "minTier", event.MinTier, + "minTier", event.Meta.MinTier, "maxRetrys", p.cfg.BackOffMaxRetrys, ) return err @@ -640,9 +640,9 @@ func (p *Prover) onTransitionContested(ctx context.Context, e *bindings.TaikoL1C log.Info( "🗡 Transition contested", "blockID", e.BlockId, - "parentHash", common.Bytes2Hex(e.ParentHash[:]), - "hash", common.Bytes2Hex(e.BlockHash[:]), - "signalRoot", common.BytesToHash(e.SignalRoot[:]), + "parentHash", common.Bytes2Hex(e.Tran.ParentHash[:]), + "hash", common.Bytes2Hex(e.Tran.BlockHash[:]), + "signalRoot", common.BytesToHash(e.Tran.SignalRoot[:]), "contester", e.Contester, "bond", e.ContestBond, ) @@ -652,13 +652,22 @@ func (p *Prover) onTransitionContested(ctx context.Context, e *bindings.TaikoL1C return nil } + contestedTransition, err := p.rpc.TaikoL1.GetTransition( + &bind.CallOpts{Context: ctx}, + e.BlockId.Uint64(), + e.Tran.ParentHash, + ) + if err != nil { + return err + } + // Compare the contested transition to the block in local L2 canonical chain. isValidProof, err := p.isValidProof( ctx, e.BlockId, - e.ParentHash, - e.BlockHash, - e.SignalRoot, + e.Tran.ParentHash, + contestedTransition.BlockHash, + contestedTransition.SignalRoot, ) if err != nil { return err @@ -667,9 +676,9 @@ func (p *Prover) onTransitionContested(ctx context.Context, e *bindings.TaikoL1C log.Info( "Contested transition is valid to local canonical chain, ignore the contest", "blockID", e.BlockId, - "parentHash", common.Bytes2Hex(e.ParentHash[:]), - "hash", common.Bytes2Hex(e.BlockHash[:]), - "signalRoot", common.BytesToHash(e.SignalRoot[:]), + "parentHash", common.Bytes2Hex(e.Tran.ParentHash[:]), + "hash", common.Bytes2Hex(contestedTransition.BlockHash[:]), + "signalRoot", common.BytesToHash(contestedTransition.SignalRoot[:]), "contester", e.Contester, "bond", e.ContestBond, ) @@ -727,9 +736,9 @@ func (p *Prover) onTransitionProved(ctx context.Context, event *bindings.TaikoL1 isValidProof, err := p.isValidProof( ctx, event.BlockId, - event.ParentHash, - event.BlockHash, - event.SignalRoot, + event.Tran.ParentHash, + event.Tran.BlockHash, + event.Tran.SignalRoot, ) if err != nil { return err @@ -748,9 +757,9 @@ func (p *Prover) onTransitionProved(ctx context.Context, event *bindings.TaikoL1 "blockID", event.BlockId, "l1Height", l1Height, "tier", event.Tier, - "parentHash", common.Bytes2Hex(event.ParentHash[:]), - "blockHash", common.Bytes2Hex(event.BlockHash[:]), - "signalRoot", common.Bytes2Hex(event.SignalRoot[:]), + "parentHash", common.Bytes2Hex(event.Tran.ParentHash[:]), + "blockHash", common.Bytes2Hex(event.Tran.BlockHash[:]), + "signalRoot", common.Bytes2Hex(event.Tran.SignalRoot[:]), ) return p.requestProofByBlockID(event.BlockId, new(big.Int).SetUint64(l1Height+1), event.Tier, event) @@ -855,10 +864,8 @@ func (p *Prover) isValidProof( return false, err } - l2SignalService, err := p.rpc.TaikoL2.Resolve0( + l2SignalService, err := p.rpc.TaikoL2.SignalService( &bind.CallOpts{Context: ctx, BlockNumber: blockID}, - rpc.StringToBytes32("signal_service"), - false, ) if err != nil { return false, err @@ -983,7 +990,7 @@ func (p *Prover) onProvingWindowExpired(ctx context.Context, e *bindings.TaikoL1 "Block proving window is expired", "blockID", e.BlockId, "assignedProver", e.AssignedProver, - "minTier", e.MinTier, + "minTier", e.Meta.MinTier, ) // If proving window is expired, then the assigned prover can not submit new proofs for it anymore. if p.proverAddress == e.AssignedProver { @@ -998,13 +1005,13 @@ func (p *Prover) onProvingWindowExpired(ctx context.Context, e *bindings.TaikoL1 return nil } - return p.requestProofByBlockID(e.BlockId, new(big.Int).SetUint64(e.Raw.BlockNumber), e.MinTier, nil) + return p.requestProofByBlockID(e.BlockId, new(big.Int).SetUint64(e.Raw.BlockNumber), e.Meta.MinTier, nil) } // getProvingWindow returns the provingWindow of the given proposed block. func (p *Prover) getProvingWindow(e *bindings.TaikoL1ClientBlockProposed) (time.Duration, error) { for _, t := range p.tiers { - if e.MinTier == t.ID { + if e.Meta.MinTier == t.ID { return time.Duration(t.ProvingWindow) * time.Second, nil } } diff --git a/prover/prover_test.go b/prover/prover_test.go index d6c144604..1a772f20b 100644 --- a/prover/prover_test.go +++ b/prover/prover_test.go @@ -155,7 +155,7 @@ func (s *ProverTestSuite) TestOnBlockProposed() { // Valid block e := testutils.ProposeAndInsertValidBlock(&s.ClientTestSuite, s.proposer, s.d.ChainSyncer().CalldataSyncer()) s.Nil(s.p.onBlockProposed(context.Background(), e, func() {})) - s.Nil(s.p.selectSubmitter(e.MinTier).SubmitProof(context.Background(), <-s.p.proofGenerationCh)) + s.Nil(s.p.selectSubmitter(e.Meta.MinTier).SubmitProof(context.Background(), <-s.p.proofGenerationCh)) // Empty blocks for _, e = range testutils.ProposeAndInsertEmptyBlocks( @@ -165,7 +165,7 @@ func (s *ProverTestSuite) TestOnBlockProposed() { ) { s.Nil(s.p.onBlockProposed(context.Background(), e, func() {})) - s.Nil(s.p.selectSubmitter(e.MinTier).SubmitProof(context.Background(), <-s.p.proofGenerationCh)) + s.Nil(s.p.selectSubmitter(e.Meta.MinTier).SubmitProof(context.Background(), <-s.p.proofGenerationCh)) } } @@ -216,7 +216,7 @@ func (s *ProverTestSuite) TestContestWrongBlocks() { e := testutils.ProposeAndInsertValidBlock(&s.ClientTestSuite, s.proposer, s.d.ChainSyncer().CalldataSyncer()) s.Nil(s.p.onTransitionProved(context.Background(), &bindings.TaikoL1ClientTransitionProved{ BlockId: e.BlockId, - Tier: e.MinTier, + Tier: e.Meta.MinTier, })) s.p.cfg.ContesterMode = true @@ -235,13 +235,13 @@ func (s *ProverTestSuite) TestContestWrongBlocks() { s.Nil(s.p.proveOp()) proofWithHeader := <-s.p.proofGenerationCh proofWithHeader.Opts.BlockHash = testutils.RandomHash() - s.Nil(s.p.selectSubmitter(e.MinTier).SubmitProof(context.Background(), proofWithHeader)) + s.Nil(s.p.selectSubmitter(e.Meta.MinTier).SubmitProof(context.Background(), proofWithHeader)) event := <-sink s.Equal(header.Number.Uint64(), event.BlockId.Uint64()) - s.Equal(common.BytesToHash(proofWithHeader.Opts.BlockHash[:]), common.BytesToHash(event.BlockHash[:])) - s.NotEqual(header.Hash(), common.BytesToHash(event.BlockHash[:])) - s.Equal(header.ParentHash, common.BytesToHash(event.ParentHash[:])) + s.Equal(common.BytesToHash(proofWithHeader.Opts.BlockHash[:]), common.BytesToHash(event.Tran.BlockHash[:])) + s.NotEqual(header.Hash(), common.BytesToHash(event.Tran.BlockHash[:])) + s.Equal(header.ParentHash, common.BytesToHash(event.Tran.ParentHash[:])) // Contest the transition. contestedSink := make(chan *bindings.TaikoL1ClientTransitionContested) @@ -257,16 +257,16 @@ func (s *ProverTestSuite) TestContestWrongBlocks() { contestedEvent := <-contestedSink s.Equal(header.Number.Uint64(), contestedEvent.BlockId.Uint64()) - s.Equal(common.BytesToHash(proofWithHeader.Opts.BlockHash[:]), common.BytesToHash(contestedEvent.BlockHash[:])) - s.Equal(header.ParentHash, common.BytesToHash(contestedEvent.ParentHash[:])) + s.Equal(header.Hash(), common.BytesToHash(contestedEvent.Tran.BlockHash[:])) + s.Equal(header.ParentHash, common.BytesToHash(contestedEvent.Tran.ParentHash[:])) s.Nil(s.p.onTransitionContested(context.Background(), contestedEvent)) s.Nil(s.p.selectSubmitter(contestedEvent.Tier+1).SubmitProof(context.Background(), <-s.p.proofGenerationCh)) provenEvent := <-sink s.Equal(header.Number.Uint64(), provenEvent.BlockId.Uint64()) - s.Equal(header.Hash(), common.BytesToHash(provenEvent.BlockHash[:])) - s.Equal(header.ParentHash, common.BytesToHash(provenEvent.ParentHash[:])) + s.Equal(header.Hash(), common.BytesToHash(provenEvent.Tran.BlockHash[:])) + s.Equal(header.ParentHash, common.BytesToHash(provenEvent.Tran.ParentHash[:])) s.Greater(provenEvent.Tier, contestedEvent.Tier) } @@ -286,12 +286,12 @@ func (s *ProverTestSuite) TestProveExpiredUnassignedBlock() { e.AssignedProver = common.Address(testutils.RandomHash().Bytes()) s.Nil(s.p.onProvingWindowExpired(context.Background(), e)) - s.Nil(s.p.selectSubmitter(e.MinTier).SubmitProof(context.Background(), <-s.p.proofGenerationCh)) + s.Nil(s.p.selectSubmitter(e.Meta.MinTier).SubmitProof(context.Background(), <-s.p.proofGenerationCh)) event := <-sink s.Equal(header.Number.Uint64(), event.BlockId.Uint64()) - s.Equal(header.Hash(), common.BytesToHash(event.BlockHash[:])) - s.Equal(header.ParentHash, common.BytesToHash(event.ParentHash[:])) + s.Equal(header.Hash(), common.BytesToHash(event.Tran.BlockHash[:])) + s.Equal(header.ParentHash, common.BytesToHash(event.Tran.ParentHash[:])) } func (s *ProverTestSuite) TestSelectSubmitter() { @@ -313,7 +313,11 @@ func (s *ProverTestSuite) TestGetSubmitterByTier() { } func (s *ProverTestSuite) TestGetProvingWindowNotFound() { - _, err := s.p.getProvingWindow(&bindings.TaikoL1ClientBlockProposed{MinTier: encoding.TierGuardianID + 1}) + _, err := s.p.getProvingWindow(&bindings.TaikoL1ClientBlockProposed{ + Meta: bindings.TaikoDataBlockMetadata{ + MinTier: encoding.TierGuardianID + 1, + }, + }) s.ErrorIs(err, errTierNotFound) } @@ -345,12 +349,12 @@ func (s *ProverTestSuite) TestProveOp() { }() s.Nil(s.p.proveOp()) - s.Nil(s.p.selectSubmitter(e.MinTier).SubmitProof(context.Background(), <-s.p.proofGenerationCh)) + s.Nil(s.p.selectSubmitter(e.Meta.MinTier).SubmitProof(context.Background(), <-s.p.proofGenerationCh)) event := <-sink s.Equal(header.Number.Uint64(), event.BlockId.Uint64()) - s.Equal(header.Hash(), common.BytesToHash(event.BlockHash[:])) - s.Equal(header.ParentHash, common.BytesToHash(event.ParentHash[:])) + s.Equal(header.Hash(), common.BytesToHash(event.Tran.BlockHash[:])) + s.Equal(header.ParentHash, common.BytesToHash(event.Tran.ParentHash[:])) } func (s *ProverTestSuite) TestReleaseOneCapacity() { diff --git a/testutils/helper.go b/testutils/helper.go index d6b741633..1204bb1ed 100644 --- a/testutils/helper.go +++ b/testutils/helper.go @@ -59,7 +59,7 @@ func ProposeAndInsertEmptyBlocks( ProposeInvalidTxListBytes(s, proposer) - // Zero byte txList + // Random bytes txList s.Nil(proposer.ProposeEmptyBlockOp(context.Background())) events = append(events, []*bindings.TaikoL1ClientBlockProposed{<-sink, <-sink, <-sink}...) diff --git a/testutils/suite.go b/testutils/suite.go index 209d220ff..83f6dd2d0 100644 --- a/testutils/suite.go +++ b/testutils/suite.go @@ -99,12 +99,17 @@ func (s *ClientTestSuite) SetupTest() { opts, err := bind.NewKeyedTransactorWithChainID(ownerPrivKey, rpcCli.L1ChainID) s.Nil(err) - tx, err := addressManager.SetAddress(opts, chainID, rpc.StringToBytes32("tier_pse_zkevm"), common.Address{}) + tx, err := addressManager.SetAddress( + opts, + chainID.Uint64(), + rpc.StringToBytes32("tier_pse_zkevm"), + common.Address{}, + ) s.Nil(err) _, err = rpc.WaitReceipt(context.Background(), rpcCli.L1, tx) s.Nil(err) - tx, err = addressManager.SetAddress(opts, chainID, rpc.StringToBytes32("tier_sgx"), common.Address{}) + tx, err = addressManager.SetAddress(opts, chainID.Uint64(), rpc.StringToBytes32("tier_sgx"), common.Address{}) s.Nil(err) _, err = rpc.WaitReceipt(context.Background(), rpcCli.L1, tx) s.Nil(err)