diff --git a/op-chain-ops/Makefile b/op-chain-ops/Makefile index 1808807c7..20e50a5c6 100644 --- a/op-chain-ops/Makefile +++ b/op-chain-ops/Makefile @@ -15,6 +15,9 @@ receipt-reference-builder: op-upgrade: go build -o ./bin/op-upgrade ./cmd/op-upgrade/main.go +opbnb-upgrade: + go build -o ./bin/opbnb-upgrade ./cmd/opbnb-upgrade/main.go + test: go test ./... diff --git a/op-chain-ops/cmd/opbnb-upgrade/README.md b/op-chain-ops/cmd/opbnb-upgrade/README.md new file mode 100644 index 000000000..542a52d98 --- /dev/null +++ b/op-chain-ops/cmd/opbnb-upgrade/README.md @@ -0,0 +1,113 @@ +# opbnb-upgrade + +This document introduces how to use multiple scripts and cli tools to upgrade the opbnb contracts. + +### Upgrade Steps + +#### Deploy new contracts + +``` +cd ~/opbnb/packages/contracts-bedrock + +export IMPL_SALT=$(openssl rand -hex 32) +export DEPLOY_CONFIG_PATH=~/opbnb/packages/contracts-bedrock/deployconfig/devnetL1-template.json (just for compatible, no use config) +export DEPLOY_PRIVATE_KEY= +export L1_RPC_URL= +export VERIFIER_URL= +export API_KEY= + +forge script scripts/DeployUpgrades.s.sol:Deploy --private-key $DEPLOY_PRIVATE_KEY --broadcast --rpc-url $L1_RPC_URL --slow --verify --verifier-url $VERIFIER_URL --etherscan-api-key $API_KEY +``` +This will output $ChainId-deploy.json file in opbnb/packages/contracts-bedrock/deployments directory. The file contains new contracts addresses. + +#### Check old contracts + +``` +cd ~/opbnb/op-chain-ops + +make opbnb-upgrade + +./bin/opbnb-upgrade \ + --l1-rpc-url \ + --old_contracts_check=true \ + --outfile +``` + +This will output old contracts information in outfile. The chainid will be obtained based on the l1-rpc-url and the corresponding old network contracts information will be output. + +#### Generate tx builder json file + +``` +./bin/opbnb-upgrade \ +--l1-rpc-url \ +--outfile +``` + +This will output upgrade tx builder json file. + +#### Simulate upgrade + +##### generate tx calldata from tx builder json file + +``` +cd opbnb/packages/contracts-bedrock + +// $tx_builder.json is upgrade tx builder which output in previous step. The json file need to be located in fs_permissions path in foundry.toml. +// The sender is one of multisign wallet signers +forge script ./scripts/BuildDataFromJson.s.sol --sig "rawInputData(string memory _path)" $tx_builder.json --via-ir --sender $sender +``` + +##### forking network + +``` +anvil --fork-url +``` + +##### set safe wallet storage + +``` +cast rpc anvil_setStorageAt $SAFE_WALLET 0x0000000000000000000000000000000000000000000000000000000000000004 0x0000000000000000000000000000000000000000000000000000000000000001 +``` + +##### impersonateAccount + +``` +// params: one of multisign wallet signers address +cast rpc anvil_impersonateAccount $SIGNER +``` + +##### simulate upgrade tx + +``` +// params: safe wallet + one of signers + calldata (calldata from tx builder json) +cast send $SAFE_WALLET --unlocked --from $SIGNER $CALLDATA +``` + +#### Check new contracts + +``` +cd ~/opbnb/op-chain-ops + +make opbnb-upgrade + +./bin/opbnb-upgrade \ + --l1-rpc-url \ + --new_contracts_check=true \ + --outfile +``` + +This will output new contracts information in outfile. The chainid will be obtained based on the l1-rpc-url and the corresponding new network contracts information will be output. + +#### Compare contracts + +``` +cd ~/opbnb/op-chain-ops + +make opbnb-upgrade +./bin/opbnb-upgrade \ +--l1-rpc-url \ +--compare_contracts=true \ +--old_contracts_file +--new_contracts_file +``` + diff --git a/op-chain-ops/cmd/opbnb-upgrade/main.go b/op-chain-ops/cmd/opbnb-upgrade/main.go new file mode 100644 index 000000000..4924c3422 --- /dev/null +++ b/op-chain-ops/cmd/opbnb-upgrade/main.go @@ -0,0 +1,261 @@ +package main + +import ( + "encoding/json" + "errors" + "fmt" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/ethclient" + "github.com/ethereum/go-ethereum/log" + "github.com/mattn/go-isatty" + "github.com/urfave/cli/v2" + "os" + "time" + + "github.com/ethereum-optimism/optimism/op-chain-ops/opbnb-upgrades" + oldBindings "github.com/ethereum-optimism/optimism/op-chain-ops/opbnb-upgrades/old-contracts/bindings" + "github.com/ethereum-optimism/optimism/op-chain-ops/safe" + "github.com/ethereum-optimism/optimism/op-service/jsonutil" + oplog "github.com/ethereum-optimism/optimism/op-service/log" +) + +func main() { + color := isatty.IsTerminal(os.Stderr.Fd()) + oplog.SetGlobalLogHandler(log.NewTerminalHandler(os.Stderr, color)) + + app := &cli.App{ + Name: "opbnb-upgrade", + Usage: "Build transactions useful for upgrading the opBNB", + Flags: []cli.Flag{ + &cli.StringFlag{ + Name: "l1-rpc-url", + Value: "http://127.0.0.1:8545", + Usage: "L1 RPC URL, the chain ID will be used to determine the opBNB", + EnvVars: []string{"L1_RPC_URL"}, + }, + &cli.PathFlag{ + Name: "outfile", + Usage: "The file to write the output to. If not specified, output is written to stdout", + EnvVars: []string{"OUTFILE"}, + }, + &cli.StringFlag{ + Name: "transfer_owner", + Usage: "Transfer proxyAdmin contract owner to the address", + EnvVars: []string{"TRANSFER_OWNER"}, + }, + &cli.StringFlag{ + Name: "private_key", + Usage: "Owner private key to transfer new owner", + EnvVars: []string{"PRIVATE_KEY"}, + }, + &cli.BoolFlag{ + Name: "qa_net", + Usage: "set network is qanet", + EnvVars: []string{"QA_NET"}, + }, + &cli.BoolFlag{ + Name: "old_contracts_check", + Usage: "check old contracts and output info", + EnvVars: []string{"OLD_CONTRACTS_CHECK"}, + }, + &cli.BoolFlag{ + Name: "new_contracts_check", + Usage: "check new contracts and output info", + EnvVars: []string{"NEW_CONTRACTS_CHECK"}, + }, + &cli.BoolFlag{ + Name: "compare_contracts", + Usage: "compare old contracts and new contracts", + EnvVars: []string{"COMPARE_CONTRACTS"}, + }, + &cli.PathFlag{ + Name: "old_contracts_file", + Usage: "The old contracts file ", + EnvVars: []string{"OLD_CONTRACTS_FILE"}, + }, + &cli.PathFlag{ + Name: "new_contracts_file", + Usage: "The new contracts file ", + EnvVars: []string{"NEW_CONTRACTS_FILE"}, + }, + }, + Action: entrypoint, + } + + if err := app.Run(os.Args); err != nil { + log.Crit("error opBNB-upgrade", "err", err) + } +} + +// entrypoint contains the main logic of the script +func entrypoint(ctx *cli.Context) error { + client, err := ethclient.Dial(ctx.String("l1-rpc-url")) + if err != nil { + return err + } + + // Fetch the L1 chain ID to determine the superchain name + l1ChainID, err := client.ChainID(ctx.Context) + if err != nil { + return err + } + + proxyAddresses := opbnb_upgrades.BscQAnetProxyContracts + implAddresses := opbnb_upgrades.BscQAnetImplContracts + batchInboxAddr := opbnb_upgrades.BscQAnetBatcherInbox + if l1ChainID.Uint64() == opbnb_upgrades.BscTestnet && !ctx.Bool("qa_net") { + proxyAddresses = opbnb_upgrades.BscTestnetProxyContracts + implAddresses = opbnb_upgrades.BscTestnetImplContracts + batchInboxAddr = opbnb_upgrades.BscTestnetBatcherInbox + fmt.Println("using bscTestnet") + } else if l1ChainID.Uint64() == opbnb_upgrades.BscMainnet { + proxyAddresses = opbnb_upgrades.BscMainnetProxyContracts + implAddresses = opbnb_upgrades.BscMainnetImplContracts + batchInboxAddr = opbnb_upgrades.BscMainnetBatcherInbox + fmt.Println("using bscMainnet") + } else { + fmt.Println("using bscQAnet") + } + + if ctx.IsSet("transfer_owner") { + if !ctx.IsSet("private_key") { + return errors.New("must set private key") + } + proxyAdmin, err := oldBindings.NewProxyAdmin(implAddresses["ProxyAdmin"], client) + if err != nil { + return err + } + owner, err := proxyAdmin.Owner(&bind.CallOpts{}) + if err != nil { + return err + } + fmt.Printf("old proxyAdmin owner is %s\n", owner.String()) + transferOwner := ctx.String("transfer_owner") + privateKeyHex := ctx.String("private_key") + privateKey, err := crypto.HexToECDSA(privateKeyHex) + if err != nil { + return err + } + txOpts, err := bind.NewKeyedTransactorWithChainID(privateKey, l1ChainID) + if err != nil { + return err + } + tx, err := proxyAdmin.TransferOwnership(txOpts, common.HexToAddress(transferOwner)) + if err != nil { + return err + } + fmt.Printf("TransferOwnership tx hash is %s\n", tx.Hash()) + _, err = client.TransactionReceipt(ctx.Context, tx.Hash()) + for err != nil { + fmt.Println("wait tx confirmed...") + time.Sleep(5 * time.Second) + _, err = client.TransactionReceipt(ctx.Context, tx.Hash()) + } + owner, err = proxyAdmin.Owner(&bind.CallOpts{}) + if err != nil { + return err + } + fmt.Printf("new proxyAdmin owner is %s\n", owner.String()) + return nil + } + + if ctx.Bool("old_contracts_check") { + data, err := opbnb_upgrades.CheckOldContracts(proxyAddresses, client) + if err != nil { + return err + } + if outfile := ctx.Path("outfile"); outfile != "" { + if err := jsonutil.WriteJSON(outfile, data, 0o666); err != nil { + return err + } + } else { + data, err := json.MarshalIndent(data, "", " ") + if err != nil { + return err + } + fmt.Println(string(data)) + } + return nil + } + + if ctx.Bool("new_contracts_check") { + data, err := opbnb_upgrades.CheckNewContracts(proxyAddresses, client) + if err != nil { + return err + } + if outfile := ctx.Path("outfile"); outfile != "" { + if err := jsonutil.WriteJSON(outfile, data, 0o666); err != nil { + return err + } + } else { + data, err := json.MarshalIndent(data, "", " ") + if err != nil { + return err + } + fmt.Println(string(data)) + } + return nil + } + + if ctx.Bool("compare_contracts") { + oldContractsFile := ctx.Path("old_contracts_file") + if oldContractsFile == "" { + return errors.New("must set old_contracts_file") + } + newContractsFile := ctx.Path("new_contracts_file") + if newContractsFile == "" { + return errors.New("must set new_contracts_file") + } + err := opbnb_upgrades.CompareContracts(oldContractsFile, newContractsFile, proxyAddresses, batchInboxAddr) + if err != nil { + return err + } + fmt.Println("compare contracts successfully") + return nil + } + + versions, err := opbnb_upgrades.GetProxyContractVersions(ctx.Context, proxyAddresses, client) + log.Info("current contract versions") + log.Info("L1CrossDomainMessenger", "version", versions.L1CrossDomainMessenger, "address", proxyAddresses["L1CrossDomainMessengerProxy"]) + log.Info("L1ERC721Bridge", "version", versions.L1ERC721Bridge, "address", proxyAddresses["L1ERC721BridgeProxy"]) + log.Info("L1StandardBridge", "version", versions.L1StandardBridge, "address", proxyAddresses["L1StandardBridgeProxy"]) + log.Info("L2OutputOracle", "version", versions.L2OutputOracle, "address", proxyAddresses["L2OutputOracleProxy"]) + log.Info("OptimismMintableERC20Factory", "version", versions.OptimismMintableERC20Factory, "address", proxyAddresses["OptimismMintableERC20FactoryProxy"]) + log.Info("OptimismPortal", "version", versions.OptimismPortal, "address", proxyAddresses["OptimismPortalProxy"]) + log.Info("SystemConfig", "version", versions.SystemConfig, "address", proxyAddresses["SystemConfigProxy"]) + + versions, err = opbnb_upgrades.GetImplContractVersions(ctx.Context, implAddresses, client) + log.Info("Upgrading to the following versions") + log.Info("L1CrossDomainMessenger", "version", versions.L1CrossDomainMessenger, "address", proxyAddresses["L1CrossDomainMessengerProxy"]) + log.Info("L1ERC721Bridge", "version", versions.L1ERC721Bridge, "address", proxyAddresses["L1ERC721BridgeProxy"]) + log.Info("L1StandardBridge", "version", versions.L1StandardBridge, "address", proxyAddresses["L1StandardBridgeProxy"]) + log.Info("L2OutputOracle", "version", versions.L2OutputOracle, "address", proxyAddresses["L2OutputOracleProxy"]) + log.Info("OptimismMintableERC20Factory", "version", versions.OptimismMintableERC20Factory, "address", proxyAddresses["OptimismMintableERC20FactoryProxy"]) + log.Info("OptimismPortal", "version", versions.OptimismPortal, "address", proxyAddresses["OptimismPortalProxy"]) + log.Info("SystemConfig", "version", versions.SystemConfig, "address", proxyAddresses["SystemConfigProxy"]) + + // Create a batch of transactions + batch := safe.Batch{} + + // Build the batch + if err := opbnb_upgrades.L1(&batch, proxyAddresses, implAddresses, client, l1ChainID); err != nil { + return err + } + + // Write the batch to disk or stdout + if outfile := ctx.Path("outfile"); outfile != "" { + if err := jsonutil.WriteJSON(outfile, batch, 0o666); err != nil { + return err + } + } else { + data, err := json.MarshalIndent(batch, "", " ") + if err != nil { + return err + } + fmt.Println(string(data)) + } + return nil + +} diff --git a/op-chain-ops/opbnb-upgrades/abi.go b/op-chain-ops/opbnb-upgrades/abi.go new file mode 100644 index 000000000..a6a241de6 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/abi.go @@ -0,0 +1,21 @@ +package opbnb_upgrades + +//go:generate ./abigen --abi old-contracts/L1CrossDomainMessenger.json --pkg L1CrossDomainMessenger --out old-contracts/bindings/L1CrossDomainMessenger.go +//go:generate ./abigen --abi old-contracts/L1ERC721Bridge.json --pkg L1ERC721Bridge --out old-contracts/bindings/L1ERC721Bridge.go +//go:generate ./abigen --abi old-contracts/L1StandardBridge.json --pkg L1StandardBridge --out old-contracts/bindings/L1StandardBridge.go +//go:generate ./abigen --abi old-contracts/L2OutputOracle.json --pkg L2OutputOracle --out old-contracts/bindings/L2OutputOracle.go +//go:generate ./abigen --abi old-contracts/OptimismMintableERC20Factory.json --pkg OptimismMintableERC20Factory --out old-contracts/bindings/OptimismMintableERC20Factory.go +//go:generate ./abigen --abi old-contracts/OptimismPortal.json --pkg OptimismPortal --out old-contracts/bindings/OptimismPortal.go +//go:generate ./abigen --abi old-contracts/SystemConfig.json --pkg SystemConfig --out old-contracts/bindings/SystemConfig.go +//go:generate ./abigen --abi old-contracts/Semver.json --pkg Semver --out old-contracts/bindings/Semver.go +//go:generate ./abigen --abi old-contracts/ProxyAdmin.json --pkg ProxyAdmin --out old-contracts/bindings/ProxyAdmin.go + +//go:generate ./abigen --abi new-contracts/SuperChainConfig.json --pkg SuperChainConfig --out new-contracts/bindings/SuperChainConfig.go +//go:generate ./abigen --abi new-contracts/StorageSetter.json --pkg StorageSetter --out new-contracts/bindings/StorageSetter.go +//go:generate ./abigen --abi new-contracts/L1CrossDomainMessenger.json --pkg L1CrossDomainMessenger --out new-contracts/bindings/L1CrossDomainMessenger.go +//go:generate ./abigen --abi new-contracts/L1ERC721Bridge.json --pkg L1ERC721Bridge --out new-contracts/bindings/L1ERC721Bridge.go +//go:generate ./abigen --abi new-contracts/L1StandardBridge.json --pkg L1StandardBridge --out new-contracts/bindings/L1StandardBridge.go +//go:generate ./abigen --abi new-contracts/L2OutputOracle.json --pkg L2OutputOracle --out new-contracts/bindings/L2OutputOracle.go +//go:generate ./abigen --abi new-contracts/OptimismMintableERC20Factory.json --pkg OptimismMintableERC20Factory --out new-contracts/bindings/OptimismMintableERC20Factory.go +//go:generate ./abigen --abi new-contracts/OptimismPortal.json --pkg OptimismPortal --out new-contracts/bindings/OptimismPortal.go +//go:generate ./abigen --abi new-contracts/SystemConfig.json --pkg SystemConfig --out new-contracts/bindings/SystemConfig.go diff --git a/op-chain-ops/opbnb-upgrades/abigen b/op-chain-ops/opbnb-upgrades/abigen new file mode 100755 index 000000000..c6387a2e6 Binary files /dev/null and b/op-chain-ops/opbnb-upgrades/abigen differ diff --git a/op-chain-ops/opbnb-upgrades/check.go b/op-chain-ops/opbnb-upgrades/check.go new file mode 100644 index 000000000..085620fa1 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/check.go @@ -0,0 +1,999 @@ +package opbnb_upgrades + +import ( + "context" + "encoding/hex" + "encoding/json" + "fmt" + newBindings "github.com/ethereum-optimism/optimism/op-chain-ops/opbnb-upgrades/new-contracts/bindings" + oldBindings "github.com/ethereum-optimism/optimism/op-chain-ops/opbnb-upgrades/old-contracts/bindings" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/ethclient" + "io" + "os" + "strconv" +) + +type ContractVersions struct { + L1CrossDomainMessenger string `yaml:"l1_cross_domain_messenger"` + L1ERC721Bridge string `yaml:"l1_erc721_bridge"` + L1StandardBridge string `yaml:"l1_standard_bridge"` + L2OutputOracle string `yaml:"l2_output_oracle,omitempty"` + OptimismMintableERC20Factory string `yaml:"optimism_mintable_erc20_factory"` + OptimismPortal string `yaml:"optimism_portal"` + SystemConfig string `yaml:"system_config"` + // Superchain-wide contracts: + ProtocolVersions string `yaml:"protocol_versions"` + SuperchainConfig string `yaml:"superchain_config,omitempty"` +} + +type L1CrossDomainMessengerInfo struct { + L1CrossDomainMessengerInfo string `yaml:"l1_cross_domain_messenger_info"` + Name string `yaml:"name"` + Address string `yaml:"address"` + Version string `yaml:"version"` + OtherMessenger string `yaml:"other_messenger"` + Portal string `yaml:"portal"` + SuperChainConfig string `yaml:"super_chain_config"` + SystemConfig string `yaml:"system_config"` +} + +type L1ERC721BridgeInfo struct { + L1ERC721BridgeInfo string `yaml:"l1_erc721_bridge_info"` + Name string `yaml:"name"` + Address string `yaml:"address"` + Version string `yaml:"version"` + OtherMessenger string `yaml:"other_messenger"` + OtherBridge string `yaml:"other_bridge"` + SuperChainConfig string `yaml:"super_chain_config"` +} + +type L1StandardBridgeInfo struct { + L1StandardBridgeInfo string `yaml:"l1_standard_bridge_info"` + Name string `yaml:"name"` + Address string `yaml:"address"` + Version string `yaml:"version"` + OtherMessenger string `yaml:"other_messenger"` + OtherBridge string `yaml:"other_bridge"` + SuperChainConfig string `yaml:"super_chain_config"` + SystemConfig string `yaml:"system_config"` +} + +type L2OutputOracleInfo struct { + L2OutputOracleInfo string `yaml:"l2_output_oracle_info"` + Name string `yaml:"name"` + Address string `yaml:"address"` + Version string `yaml:"version"` + SubmissionInterval string `yaml:"submission_interval"` + L2BlockTime string `yaml:"l2_block_time"` + Challenger string `yaml:"challenger"` + Proposer string `yaml:"proposer"` + FinalizationPeriodSeconds string `yaml:"finalization_period_seconds"` + StartingBlockNumber string `yaml:"starting_block_number"` + StartingTimestamp string `yaml:"starting_time_stamp"` +} + +type OptimismMintableERC20FactoryInfo struct { + OptimismMintableERC20FactoryInfo string `yaml:"optimism_mintable_erc20_factory_info"` + Name string `yaml:"name"` + Address string `yaml:"address"` + Version string `yaml:"version"` + Bridge string `yaml:"bridge"` +} + +type OptimismPortalInfo struct { + OptimismPortalInfo string `yaml:"optimism_portal_info"` + Name string `yaml:"name"` + Address string `yaml:"address"` + Version string `yaml:"version"` + L2Oracle string `yaml:"l2_oracle"` + L2Sender string `yaml:"l2_sender"` + SystemConfig string `yaml:"system_config"` + Guardian string `yaml:"guardian"` + SuperChainConfig string `yaml:"super_chain_config"` + Balance string `yaml:"balance"` +} + +type SystemConfigInfo struct { + SystemConfigInfo string `yaml:"system_config_info"` + Name string `yaml:"name"` + Address string `yaml:"address"` + Version string `yaml:"version"` + Owner string `yaml:"owner"` + UnsafeBlockSigner string `yaml:"unsafe_block_signer"` + Overhead string `yaml:"overhead"` + Scalar string `yaml:"scalar"` + BatcherHash string `yaml:"batcher_hash"` + GasLimit string `yaml:"gas_limit"` + ResourceConfig ResourceMeteringResourceConfig `yaml:"resource_config"` + StartBlock string `yaml:"start_block"` + BaseFeeScalar string `yaml:"base_fee_scalar"` + BlobBaseFeeScalar string `yaml:"blob_base_fee_scalar"` + BatcherInbox string `yaml:"batcher_inbox"` + L1CrossDomainMessengerAddress string `yaml:"l1_cross_domain_messenger_address"` + L1ERC721BridgeAddress string `yaml:"l1_erc_721_bridge_address"` + L1StandardBridgeAddress string `yaml:"l1_standard_bridge_address"` + DisputeGameFactoryAddress string `yaml:"dispute_game_factory_address"` + OptimismPortalAddress string `yaml:"optimism_portal_address"` + OptimismMintableERC20FactoryAddress string `yaml:"optimism_mintable_erc20_factory_address"` + GasPayingTokenAddress string `yaml:"gas_paying_token_address"` +} + +// ResourceMeteringResourceConfig is an auto generated low-level Go binding around an user-defined struct. +type ResourceMeteringResourceConfig struct { + MaxResourceLimit uint32 + ElasticityMultiplier uint8 + BaseFeeMaxChangeDenominator uint8 + MinimumBaseFee uint32 + SystemTxMaxGas uint32 + MaximumBaseFee string +} + +func CheckOldContracts(proxyAddresses map[string]common.Address, backend *ethclient.Client) ([]interface{}, error) { + l1CrossDomainMessenger, err := oldBindings.NewL1CrossDomainMessengerCaller(proxyAddresses["L1CrossDomainMessengerProxy"], backend) + version, err := l1CrossDomainMessenger.Version(&bind.CallOpts{}) + if err != nil { + return nil, err + } + otherMessenger, err := l1CrossDomainMessenger.OTHERMESSENGER(&bind.CallOpts{}) + if err != nil { + return nil, err + } + portal, err := l1CrossDomainMessenger.PORTAL(&bind.CallOpts{}) + if err != nil { + return nil, err + } + oldL1CrossDomainMessenger := L1CrossDomainMessengerInfo{ + Name: "L1CrossDomainMessenger", + Address: proxyAddresses["L1CrossDomainMessengerProxy"].String(), + Version: version, + OtherMessenger: otherMessenger.String(), + Portal: portal.String(), + } + l1ERC721Bridge, err := oldBindings.NewL1ERC721BridgeCaller(proxyAddresses["L1ERC721BridgeProxy"], backend) + version, err = l1ERC721Bridge.Version(&bind.CallOpts{}) + if err != nil { + return nil, err + } + otherMessenger, err = l1ERC721Bridge.MESSENGER(&bind.CallOpts{}) + if err != nil { + return nil, err + } + otherBridge, err := l1ERC721Bridge.OtherBridge(&bind.CallOpts{}) + if err != nil { + return nil, err + } + oldL1ERC721Bridge := L1ERC721BridgeInfo{ + Name: "L1ERC721Bridge", + Address: proxyAddresses["L1ERC721BridgeProxy"].String(), + Version: version, + OtherMessenger: otherMessenger.String(), + OtherBridge: otherBridge.String(), + } + l1StandardBridge, err := oldBindings.NewL1StandardBridgeCaller(proxyAddresses["L1StandardBridgeProxy"], backend) + version, err = l1StandardBridge.Version(&bind.CallOpts{}) + if err != nil { + return nil, err + } + otherMessenger, err = l1StandardBridge.MESSENGER(&bind.CallOpts{}) + if err != nil { + return nil, err + } + otherBridge, err = l1StandardBridge.OTHERBRIDGE(&bind.CallOpts{}) + if err != nil { + return nil, err + } + oldL1StandardBridge := L1StandardBridgeInfo{ + Name: "L1StandardBridge", + Address: proxyAddresses["L1StandardBridgeProxy"].String(), + Version: version, + OtherMessenger: otherMessenger.String(), + OtherBridge: otherBridge.String(), + } + l2OutputOracle, err := oldBindings.NewL2OutputOracleCaller(proxyAddresses["L2OutputOracleProxy"], backend) + version, err = l2OutputOracle.Version(&bind.CallOpts{}) + if err != nil { + return nil, err + } + submissionInterval, err := l2OutputOracle.SUBMISSIONINTERVAL(&bind.CallOpts{}) + if err != nil { + return nil, err + } + l2blockTime, err := l2OutputOracle.L2BLOCKTIME(&bind.CallOpts{}) + if err != nil { + return nil, err + } + challenger, err := l2OutputOracle.CHALLENGER(&bind.CallOpts{}) + if err != nil { + return nil, err + } + proposer, err := l2OutputOracle.PROPOSER(&bind.CallOpts{}) + if err != nil { + return nil, err + } + finalizationPeriodSeconds, err := l2OutputOracle.FINALIZATIONPERIODSECONDS(&bind.CallOpts{}) + if err != nil { + return nil, err + } + startingBlockNumber, err := l2OutputOracle.StartingBlockNumber(&bind.CallOpts{}) + if err != nil { + return nil, err + } + startingTimestamp, err := l2OutputOracle.StartingTimestamp(&bind.CallOpts{}) + if err != nil { + return nil, err + } + oldL2OutputOracle := L2OutputOracleInfo{ + Name: "L2OutputOracle", + Address: proxyAddresses["L2OutputOracleProxy"].String(), + Version: version, + SubmissionInterval: submissionInterval.String(), + L2BlockTime: l2blockTime.String(), + Challenger: challenger.String(), + Proposer: proposer.String(), + FinalizationPeriodSeconds: finalizationPeriodSeconds.String(), + StartingBlockNumber: startingBlockNumber.String(), + StartingTimestamp: startingTimestamp.String(), + } + optimismMintableERC20Factory, err := oldBindings.NewOptimismMintableERC20FactoryCaller(proxyAddresses["OptimismMintableERC20FactoryProxy"], backend) + version, err = optimismMintableERC20Factory.Version(&bind.CallOpts{}) + if err != nil { + return nil, err + } + bridge, err := optimismMintableERC20Factory.BRIDGE(&bind.CallOpts{}) + oldOptimismMintableERC20Factory := OptimismMintableERC20FactoryInfo{ + Name: "OptimismMintableERC20Factory", + Version: version, + Bridge: bridge.String(), + } + optimismPortal, err := oldBindings.NewOptimismPortalCaller(proxyAddresses["OptimismPortalProxy"], backend) + version, err = optimismPortal.Version(&bind.CallOpts{}) + if err != nil { + return nil, err + } + l2oracle, err := optimismPortal.L2ORACLE(&bind.CallOpts{}) + if err != nil { + return nil, err + } + l2Sender, err := optimismPortal.L2Sender(&bind.CallOpts{}) + if err != nil { + return nil, err + } + systemConfigAddr, err := optimismPortal.SYSTEMCONFIG(&bind.CallOpts{}) + if err != nil { + return nil, err + } + guardian, err := optimismPortal.GUARDIAN(&bind.CallOpts{}) + if err != nil { + return nil, err + } + balance, err := backend.BalanceAt(context.Background(), proxyAddresses["OptimismPortalProxy"], nil) + if err != nil { + return nil, err + } + oldOptimismPortal := OptimismPortalInfo{ + Name: "OptimismPortal", + Address: proxyAddresses["OptimismPortalProxy"].String(), + Version: version, + L2Oracle: l2oracle.String(), + L2Sender: l2Sender.String(), + SystemConfig: systemConfigAddr.String(), + Guardian: guardian.String(), + Balance: balance.String(), + } + systemConfig, err := oldBindings.NewSystemConfigCaller(proxyAddresses["SystemConfigProxy"], backend) + version, err = systemConfig.Version(&bind.CallOpts{}) + if err != nil { + return nil, err + } + owner, err := systemConfig.Owner(&bind.CallOpts{}) + if err != nil { + return nil, err + } + unsafeBlockSigner, err := systemConfig.UnsafeBlockSigner(&bind.CallOpts{}) + if err != nil { + return nil, err + } + overhead, err := systemConfig.Overhead(&bind.CallOpts{}) + if err != nil { + return nil, err + } + scalar, err := systemConfig.Scalar(&bind.CallOpts{}) + if err != nil { + return nil, err + } + batcherHash, err := systemConfig.BatcherHash(&bind.CallOpts{}) + if err != nil { + return nil, err + } + gasLimit, err := systemConfig.GasLimit(&bind.CallOpts{}) + if err != nil { + return nil, err + } + resourceConfig, err := systemConfig.ResourceConfig(&bind.CallOpts{}) + if err != nil { + return nil, err + } + newResourceConfig := ResourceMeteringResourceConfig{ + MaxResourceLimit: resourceConfig.MaxResourceLimit, + ElasticityMultiplier: resourceConfig.ElasticityMultiplier, + BaseFeeMaxChangeDenominator: resourceConfig.BaseFeeMaxChangeDenominator, + MinimumBaseFee: resourceConfig.MinimumBaseFee, + SystemTxMaxGas: resourceConfig.SystemTxMaxGas, + MaximumBaseFee: resourceConfig.MaximumBaseFee.String(), + } + oldSystemConfig := SystemConfigInfo{ + Name: "SystemConfig", + Address: proxyAddresses["SystemConfigProxy"].String(), + Owner: owner.String(), + UnsafeBlockSigner: unsafeBlockSigner.String(), + Version: version, + Overhead: overhead.String(), + Scalar: scalar.String(), + BatcherHash: hex.EncodeToString(batcherHash[:]), + GasLimit: strconv.FormatUint(gasLimit, 10), + ResourceConfig: newResourceConfig, + } + data := []interface{}{oldL1CrossDomainMessenger, oldL1ERC721Bridge, + oldL1StandardBridge, oldL2OutputOracle, oldOptimismMintableERC20Factory, oldOptimismPortal, oldSystemConfig} + return data, nil +} + +func CheckNewContracts(proxyAddresses map[string]common.Address, backend *ethclient.Client) ([]interface{}, error) { + l1CrossDomainMessenger, err := newBindings.NewL1CrossDomainMessengerCaller(proxyAddresses["L1CrossDomainMessengerProxy"], backend) + version, err := l1CrossDomainMessenger.Version(&bind.CallOpts{}) + if err != nil { + return nil, err + } + otherMessenger, err := l1CrossDomainMessenger.OTHERMESSENGER(&bind.CallOpts{}) + if err != nil { + return nil, err + } + portal, err := l1CrossDomainMessenger.PORTAL(&bind.CallOpts{}) + if err != nil { + return nil, err + } + superChainConfig, err := l1CrossDomainMessenger.SuperchainConfig(&bind.CallOpts{}) + if err != nil { + return nil, err + } + systemConfigAddr, err := l1CrossDomainMessenger.SystemConfig(&bind.CallOpts{}) + if err != nil { + return nil, err + } + newL1CrossDomainMessenger := L1CrossDomainMessengerInfo{ + Name: "L1CrossDomainMessenger", + Address: proxyAddresses["L1CrossDomainMessengerProxy"].String(), + Version: version, + OtherMessenger: otherMessenger.String(), + Portal: portal.String(), + SuperChainConfig: superChainConfig.String(), + SystemConfig: systemConfigAddr.String(), + } + l1ERC721Bridge, err := newBindings.NewL1ERC721BridgeCaller(proxyAddresses["L1ERC721BridgeProxy"], backend) + version, err = l1ERC721Bridge.Version(&bind.CallOpts{}) + if err != nil { + return nil, err + } + otherMessenger, err = l1ERC721Bridge.MESSENGER(&bind.CallOpts{}) + if err != nil { + return nil, err + } + otherBridge, err := l1ERC721Bridge.OtherBridge(&bind.CallOpts{}) + if err != nil { + return nil, err + } + superChainConfig, err = l1ERC721Bridge.SuperchainConfig(&bind.CallOpts{}) + if err != nil { + return nil, err + } + newL1ERC721Bridge := L1ERC721BridgeInfo{ + Name: "L1ERC721Bridge", + Address: proxyAddresses["L1ERC721BridgeProxy"].String(), + Version: version, + OtherMessenger: otherMessenger.String(), + OtherBridge: otherBridge.String(), + SuperChainConfig: superChainConfig.String(), + } + l1StandardBridge, err := newBindings.NewL1StandardBridgeCaller(proxyAddresses["L1StandardBridgeProxy"], backend) + version, err = l1StandardBridge.Version(&bind.CallOpts{}) + if err != nil { + return nil, err + } + otherMessenger, err = l1StandardBridge.MESSENGER(&bind.CallOpts{}) + if err != nil { + return nil, err + } + otherBridge, err = l1StandardBridge.OTHERBRIDGE(&bind.CallOpts{}) + if err != nil { + return nil, err + } + superChainConfig, err = l1StandardBridge.SuperchainConfig(&bind.CallOpts{}) + if err != nil { + return nil, err + } + systemConfigAddr, err = l1StandardBridge.SystemConfig(&bind.CallOpts{}) + if err != nil { + return nil, err + } + newL1StandardBridge := L1StandardBridgeInfo{ + Name: "L1StandardBridge", + Address: proxyAddresses["L1StandardBridgeProxy"].String(), + Version: version, + OtherMessenger: otherMessenger.String(), + OtherBridge: otherBridge.String(), + SuperChainConfig: superChainConfig.String(), + SystemConfig: systemConfigAddr.String(), + } + l2OutputOracle, err := newBindings.NewL2OutputOracleCaller(proxyAddresses["L2OutputOracleProxy"], backend) + version, err = l2OutputOracle.Version(&bind.CallOpts{}) + if err != nil { + return nil, err + } + submissionInterval, err := l2OutputOracle.SUBMISSIONINTERVAL(&bind.CallOpts{}) + if err != nil { + return nil, err + } + l2blockTime, err := l2OutputOracle.L2BLOCKTIME(&bind.CallOpts{}) + if err != nil { + return nil, err + } + challenger, err := l2OutputOracle.CHALLENGER(&bind.CallOpts{}) + if err != nil { + return nil, err + } + proposer, err := l2OutputOracle.PROPOSER(&bind.CallOpts{}) + if err != nil { + return nil, err + } + finalizationPeriodSeconds, err := l2OutputOracle.FINALIZATIONPERIODSECONDS(&bind.CallOpts{}) + if err != nil { + return nil, err + } + startingBlockNumber, err := l2OutputOracle.StartingBlockNumber(&bind.CallOpts{}) + if err != nil { + return nil, err + } + startingTimestamp, err := l2OutputOracle.StartingTimestamp(&bind.CallOpts{}) + if err != nil { + return nil, err + } + newL2OutputOracle := L2OutputOracleInfo{ + Name: "L2OutputOracle", + Address: proxyAddresses["L2OutputOracleProxy"].String(), + Version: version, + SubmissionInterval: submissionInterval.String(), + L2BlockTime: l2blockTime.String(), + Challenger: challenger.String(), + Proposer: proposer.String(), + FinalizationPeriodSeconds: finalizationPeriodSeconds.String(), + StartingBlockNumber: startingBlockNumber.String(), + StartingTimestamp: startingTimestamp.String(), + } + optimismMintableERC20Factory, err := newBindings.NewOptimismMintableERC20FactoryCaller(proxyAddresses["OptimismMintableERC20FactoryProxy"], backend) + version, err = optimismMintableERC20Factory.Version(&bind.CallOpts{}) + if err != nil { + return nil, err + } + bridge, err := optimismMintableERC20Factory.BRIDGE(&bind.CallOpts{}) + newOptimismMintableERC20Factory := OptimismMintableERC20FactoryInfo{ + Name: "OptimismMintableERC20Factory", + Version: version, + Bridge: bridge.String(), + } + optimismPortal, err := newBindings.NewOptimismPortalCaller(proxyAddresses["OptimismPortalProxy"], backend) + version, err = optimismPortal.Version(&bind.CallOpts{}) + if err != nil { + return nil, err + } + l2oracle, err := optimismPortal.L2Oracle(&bind.CallOpts{}) + if err != nil { + return nil, err + } + l2Sender, err := optimismPortal.L2Sender(&bind.CallOpts{}) + if err != nil { + return nil, err + } + systemConfigAddr, err = optimismPortal.SystemConfig(&bind.CallOpts{}) + if err != nil { + return nil, err + } + guardian, err := optimismPortal.Guardian(&bind.CallOpts{}) + if err != nil { + return nil, err + } + balance, err := backend.BalanceAt(context.Background(), proxyAddresses["OptimismPortalProxy"], nil) + if err != nil { + return nil, err + } + superChainConfig, err = optimismPortal.SuperchainConfig(&bind.CallOpts{}) + if err != nil { + return nil, err + } + newOptimismPortal := OptimismPortalInfo{ + Name: "OptimismPortal", + Address: proxyAddresses["OptimismPortalProxy"].String(), + Version: version, + L2Oracle: l2oracle.String(), + L2Sender: l2Sender.String(), + SystemConfig: systemConfigAddr.String(), + Guardian: guardian.String(), + Balance: balance.String(), + SuperChainConfig: superChainConfig.String(), + } + systemConfig, err := newBindings.NewSystemConfigCaller(proxyAddresses["SystemConfigProxy"], backend) + owner, err := systemConfig.Owner(&bind.CallOpts{}) + if err != nil { + return nil, err + } + unsafeBlockSigner, err := systemConfig.UnsafeBlockSigner(&bind.CallOpts{}) + if err != nil { + return nil, err + } + version, err = systemConfig.Version(&bind.CallOpts{}) + if err != nil { + return nil, err + } + overhead, err := systemConfig.Overhead(&bind.CallOpts{}) + if err != nil { + return nil, err + } + scalar, err := systemConfig.Scalar(&bind.CallOpts{}) + if err != nil { + return nil, err + } + batcherHash, err := systemConfig.BatcherHash(&bind.CallOpts{}) + if err != nil { + return nil, err + } + gasLimit, err := systemConfig.GasLimit(&bind.CallOpts{}) + if err != nil { + return nil, err + } + resourceConfig, err := systemConfig.ResourceConfig(&bind.CallOpts{}) + if err != nil { + return nil, err + } + newResourceConfig := ResourceMeteringResourceConfig{ + MaxResourceLimit: resourceConfig.MaxResourceLimit, + ElasticityMultiplier: resourceConfig.ElasticityMultiplier, + BaseFeeMaxChangeDenominator: resourceConfig.BaseFeeMaxChangeDenominator, + MinimumBaseFee: resourceConfig.MinimumBaseFee, + SystemTxMaxGas: resourceConfig.SystemTxMaxGas, + MaximumBaseFee: resourceConfig.MaximumBaseFee.String(), + } + startBlock, err := systemConfig.StartBlock(&bind.CallOpts{}) + if err != nil { + return nil, err + } + baseFeeScalar, err := systemConfig.BasefeeScalar(&bind.CallOpts{}) + if err != nil { + return nil, err + } + blobBaseFeeScalar, err := systemConfig.BlobbasefeeScalar(&bind.CallOpts{}) + if err != nil { + return nil, err + } + batchInbox, err := systemConfig.BatchInbox(&bind.CallOpts{}) + if err != nil { + return nil, err + } + l1CrossDomainMessengerAddress, err := systemConfig.L1CrossDomainMessenger(&bind.CallOpts{}) + if err != nil { + return nil, err + } + l1ERC721BridgeAddress, err := systemConfig.L1ERC721Bridge(&bind.CallOpts{}) + if err != nil { + return nil, err + } + l1StandardBridgeAddress, err := systemConfig.L1StandardBridge(&bind.CallOpts{}) + if err != nil { + return nil, err + } + disputeGameFactoryAddress, err := systemConfig.DisputeGameFactory(&bind.CallOpts{}) + if err != nil { + return nil, err + } + optimismPortalAddress, err := systemConfig.OptimismPortal(&bind.CallOpts{}) + if err != nil { + return nil, err + } + optimismMintableERC20FactoryAddress, err := systemConfig.OptimismMintableERC20Factory(&bind.CallOpts{}) + if err != nil { + return nil, err + } + gasPayingTokenAddress, err := systemConfig.GasPayingToken(&bind.CallOpts{}) + if err != nil { + return nil, err + } + newSystemConfig := SystemConfigInfo{ + Name: "SystemConfig", + Address: proxyAddresses["SystemConfigProxy"].String(), + Version: version, + Owner: owner.String(), + UnsafeBlockSigner: unsafeBlockSigner.String(), + Overhead: overhead.String(), + Scalar: scalar.String(), + BatcherHash: hex.EncodeToString(batcherHash[:]), + GasLimit: strconv.FormatUint(gasLimit, 10), + ResourceConfig: newResourceConfig, + StartBlock: startBlock.String(), + BaseFeeScalar: strconv.FormatUint(uint64(baseFeeScalar), 10), + BlobBaseFeeScalar: strconv.FormatUint(uint64(blobBaseFeeScalar), 10), + BatcherInbox: batchInbox.String(), + L1CrossDomainMessengerAddress: l1CrossDomainMessengerAddress.String(), + L1ERC721BridgeAddress: l1ERC721BridgeAddress.String(), + L1StandardBridgeAddress: l1StandardBridgeAddress.String(), + DisputeGameFactoryAddress: disputeGameFactoryAddress.String(), + OptimismPortalAddress: optimismPortalAddress.String(), + OptimismMintableERC20FactoryAddress: optimismMintableERC20FactoryAddress.String(), + GasPayingTokenAddress: gasPayingTokenAddress.Addr.String(), + } + data := []interface{}{newL1CrossDomainMessenger, newL1ERC721Bridge, + newL1StandardBridge, newL2OutputOracle, newOptimismMintableERC20Factory, newOptimismPortal, newSystemConfig} + return data, nil +} + +func CompareContracts(oldContractsFilePath string, newContractsFilePath string, proxyAddresses map[string]common.Address, batchInboxAddr common.Address) error { + oldContractsFile, err := os.Open(oldContractsFilePath) + if err != nil { + return err + } + defer oldContractsFile.Close() + newContractsFile, err := os.Open(newContractsFilePath) + if err != nil { + return err + } + defer newContractsFile.Close() + + oldContractByte, err := io.ReadAll(oldContractsFile) + if err != nil { + return err + } + + var oldContract []map[string]interface{} + err = json.Unmarshal(oldContractByte, &oldContract) + if err != nil { + return err + } + + newContractByte, err := io.ReadAll(newContractsFile) + if err != nil { + return err + } + + var newContract []map[string]interface{} + err = json.Unmarshal(newContractByte, &newContract) + if err != nil { + return err + } + + var oldL1CrossDomainMessengerInfo L1CrossDomainMessengerInfo + var oldL1ERC721BridgeInfo L1ERC721BridgeInfo + var oldL1StandardBridgeInfo L1StandardBridgeInfo + var oldL2OutputOracleInfo L2OutputOracleInfo + var oldOptimismMintableERC20FactoryInfo OptimismMintableERC20FactoryInfo + var oldOptimismPortalInfo OptimismPortalInfo + var oldSystemConfigInfo SystemConfigInfo + for _, contract := range oldContract { + if contract["L1CrossDomainMessengerInfo"] != nil { + jsonData, _ := json.Marshal(contract) + err := json.Unmarshal(jsonData, &oldL1CrossDomainMessengerInfo) + if err != nil { + return err + } + } else if contract["L1ERC721BridgeInfo"] != nil { + jsonData, _ := json.Marshal(contract) + err := json.Unmarshal(jsonData, &oldL1ERC721BridgeInfo) + if err != nil { + return err + } + } else if contract["L1StandardBridgeInfo"] != nil { + jsonData, _ := json.Marshal(contract) + err := json.Unmarshal(jsonData, &oldL1StandardBridgeInfo) + if err != nil { + return err + } + } else if contract["L2OutputOracleInfo"] != nil { + jsonData, _ := json.Marshal(contract) + err := json.Unmarshal(jsonData, &oldL2OutputOracleInfo) + if err != nil { + return err + } + } else if contract["OptimismMintableERC20FactoryInfo"] != nil { + jsonData, _ := json.Marshal(contract) + err := json.Unmarshal(jsonData, &oldOptimismMintableERC20FactoryInfo) + if err != nil { + return err + } + } else if contract["OptimismPortalInfo"] != nil { + jsonData, _ := json.Marshal(contract) + err := json.Unmarshal(jsonData, &oldOptimismPortalInfo) + if err != nil { + return err + } + } else if contract["SystemConfigInfo"] != nil { + jsonData, _ := json.Marshal(contract) + err := json.Unmarshal(jsonData, &oldSystemConfigInfo) + if err != nil { + return err + } + } + } + + var newL1CrossDomainMessengerInfo L1CrossDomainMessengerInfo + var newL1ERC721BridgeInfo L1ERC721BridgeInfo + var newL1StandardBridgeInfo L1StandardBridgeInfo + var newL2OutputOracleInfo L2OutputOracleInfo + var newOptimismMintableERC20FactoryInfo OptimismMintableERC20FactoryInfo + var newOptimismPortalInfo OptimismPortalInfo + var newSystemConfigInfo SystemConfigInfo + for _, contract := range newContract { + if contract["L1CrossDomainMessengerInfo"] != nil { + jsonData, _ := json.Marshal(contract) + err := json.Unmarshal(jsonData, &newL1CrossDomainMessengerInfo) + if err != nil { + return err + } + } else if contract["L1ERC721BridgeInfo"] != nil { + jsonData, _ := json.Marshal(contract) + err := json.Unmarshal(jsonData, &newL1ERC721BridgeInfo) + if err != nil { + return err + } + } else if contract["L1StandardBridgeInfo"] != nil { + jsonData, _ := json.Marshal(contract) + err := json.Unmarshal(jsonData, &newL1StandardBridgeInfo) + if err != nil { + return err + } + } else if contract["L2OutputOracleInfo"] != nil { + jsonData, _ := json.Marshal(contract) + err := json.Unmarshal(jsonData, &newL2OutputOracleInfo) + if err != nil { + return err + } + } else if contract["OptimismMintableERC20FactoryInfo"] != nil { + jsonData, _ := json.Marshal(contract) + err := json.Unmarshal(jsonData, &newOptimismMintableERC20FactoryInfo) + if err != nil { + return err + } + } else if contract["OptimismPortalInfo"] != nil { + jsonData, _ := json.Marshal(contract) + err := json.Unmarshal(jsonData, &newOptimismPortalInfo) + if err != nil { + return err + } + } else if contract["SystemConfigInfo"] != nil { + jsonData, _ := json.Marshal(contract) + err := json.Unmarshal(jsonData, &newSystemConfigInfo) + if err != nil { + return err + } + } + } + + // compare L1CrossDomainMessenger + if newL1CrossDomainMessengerInfo.Portal != oldL1CrossDomainMessengerInfo.Portal { + return fmt.Errorf("L1CrossDomainMessenger Portal var check diff, expect %s actual %s", oldL1CrossDomainMessengerInfo.Portal, newL1CrossDomainMessengerInfo.Portal) + } + if newL1CrossDomainMessengerInfo.OtherMessenger != oldL1CrossDomainMessengerInfo.OtherMessenger { + return fmt.Errorf("L1CrossDomainMessenger OtherMessenger var check diff, expect %s actual %s", oldL1CrossDomainMessengerInfo.OtherMessenger, newL1CrossDomainMessengerInfo.OtherMessenger) + } + + // compare L1ERC721Bridge + if newL1ERC721BridgeInfo.OtherMessenger != oldL1ERC721BridgeInfo.OtherMessenger { + return fmt.Errorf("L1ERC721Bridge OtherMessenger var check diff, expect %s actual %s", oldL1ERC721BridgeInfo.OtherMessenger, newL1ERC721BridgeInfo.OtherMessenger) + } + if newL1ERC721BridgeInfo.OtherBridge != oldL1ERC721BridgeInfo.OtherBridge { + return fmt.Errorf("L1ERC721Bridge OtherBridge var check diff, expect %s actual %s", oldL1ERC721BridgeInfo.OtherBridge, newL1ERC721BridgeInfo.OtherBridge) + } + + // compare L1StandardBridge + if newL1StandardBridgeInfo.OtherMessenger != oldL1StandardBridgeInfo.OtherMessenger { + return fmt.Errorf("L1StandardBridge OtherMessenger var check diff, expect %s actual %s", oldL1StandardBridgeInfo.OtherMessenger, newL1StandardBridgeInfo.OtherMessenger) + } + if newL1StandardBridgeInfo.OtherBridge != oldL1StandardBridgeInfo.OtherBridge { + return fmt.Errorf("L1StandardBridge OtherBridge var check diff, expect %s actual %s", oldL1StandardBridgeInfo.OtherBridge, newL1StandardBridgeInfo.OtherBridge) + } + + // compare L2OutputOracle + if newL2OutputOracleInfo.SubmissionInterval != oldL2OutputOracleInfo.SubmissionInterval { + return fmt.Errorf("L2OutputOracle SubmissionInterval var check diff, expect %s actual %s", oldL2OutputOracleInfo.SubmissionInterval, newL2OutputOracleInfo.SubmissionInterval) + } + if newL2OutputOracleInfo.L2BlockTime != oldL2OutputOracleInfo.L2BlockTime { + return fmt.Errorf("L2OutputOracle L2BlockTime var check diff, expect %s actual %s", oldL2OutputOracleInfo.L2BlockTime, newL2OutputOracleInfo.L2BlockTime) + } + if newL2OutputOracleInfo.Challenger != oldL2OutputOracleInfo.Challenger { + return fmt.Errorf("L2OutputOracle Challenger var check diff, expect %s actual %s", oldL2OutputOracleInfo.Challenger, newL2OutputOracleInfo.Challenger) + } + if newL2OutputOracleInfo.Proposer != oldL2OutputOracleInfo.Proposer { + return fmt.Errorf("L2OutputOracle Proposer var check diff, expect %s actual %s", oldL2OutputOracleInfo.Proposer, newL2OutputOracleInfo.Proposer) + } + if newL2OutputOracleInfo.FinalizationPeriodSeconds != oldL2OutputOracleInfo.FinalizationPeriodSeconds { + return fmt.Errorf("L2OutputOracle FinalizationPeriodSeconds var check diff, expect %s actual %s", oldL2OutputOracleInfo.FinalizationPeriodSeconds, newL2OutputOracleInfo.FinalizationPeriodSeconds) + } + if newL2OutputOracleInfo.StartingBlockNumber != oldL2OutputOracleInfo.StartingBlockNumber { + return fmt.Errorf("L2OutputOracle StartingBlockNumber var check diff, expect %s actual %s", oldL2OutputOracleInfo.StartingBlockNumber, newL2OutputOracleInfo.StartingBlockNumber) + } + if newL2OutputOracleInfo.StartingTimestamp != oldL2OutputOracleInfo.StartingTimestamp { + return fmt.Errorf("L2OutputOracle StartingTimestamp var check diff, expect %s actual %s", oldL2OutputOracleInfo.StartingTimestamp, newL2OutputOracleInfo.StartingTimestamp) + } + + // compare OptimismMintableERC20Factory + if newOptimismMintableERC20FactoryInfo.Bridge != oldOptimismMintableERC20FactoryInfo.Bridge { + return fmt.Errorf("OptimismMintableERC20Factory Bridge var check diff, expect %s actual %s", oldOptimismMintableERC20FactoryInfo.Bridge, newOptimismMintableERC20FactoryInfo.Bridge) + } + + // compare OptimismPortal + if newOptimismPortalInfo.L2Oracle != oldOptimismPortalInfo.L2Oracle { + return fmt.Errorf("OptimismPortal L2Oracle var check diff, expect %s actual %s", oldOptimismPortalInfo.L2Oracle, newOptimismPortalInfo.L2Oracle) + } + if newOptimismPortalInfo.L2Sender != oldOptimismPortalInfo.L2Sender { + return fmt.Errorf("OptimismPortal L2Sender var check diff, expect %s actual %s", oldOptimismPortalInfo.L2Sender, newOptimismPortalInfo.L2Sender) + } + if newOptimismPortalInfo.SystemConfig != oldOptimismPortalInfo.SystemConfig { + return fmt.Errorf("OptimismPortal L2Oracle var check diff, expect %s actual %s", oldOptimismPortalInfo.L2Oracle, newOptimismPortalInfo.L2Oracle) + } + if newOptimismPortalInfo.Guardian != oldOptimismPortalInfo.Guardian { + return fmt.Errorf("OptimismPortal L2Oracle var check diff, expect %s actual %s", oldOptimismPortalInfo.L2Oracle, newOptimismPortalInfo.L2Oracle) + } + + // compare SystemConfig + if newSystemConfigInfo.Overhead != oldSystemConfigInfo.Overhead { + return fmt.Errorf("SystemConfig Overhead var check diff, expect %s actual %s", oldSystemConfigInfo.Overhead, newSystemConfigInfo.Overhead) + } + if newSystemConfigInfo.Scalar != oldSystemConfigInfo.Scalar { + return fmt.Errorf("SystemConfig Scalar var check diff, expect %s actual %s", oldSystemConfigInfo.Scalar, newSystemConfigInfo.Scalar) + } + if newSystemConfigInfo.Owner != oldSystemConfigInfo.Owner { + return fmt.Errorf("SystemConfig Owner var check diff, expect %s actual %s", oldSystemConfigInfo.Owner, newSystemConfigInfo.Owner) + } + if newSystemConfigInfo.UnsafeBlockSigner != oldSystemConfigInfo.UnsafeBlockSigner { + return fmt.Errorf("SystemConfig UnsafeBlockSigner var check diff, expect %s actual %s", oldSystemConfigInfo.UnsafeBlockSigner, newSystemConfigInfo.UnsafeBlockSigner) + } + if newSystemConfigInfo.BatcherHash != oldSystemConfigInfo.BatcherHash { + return fmt.Errorf("SystemConfig BatcherHash var check diff, expect %s actual %s", oldSystemConfigInfo.BatcherHash, newSystemConfigInfo.BatcherHash) + } + if newSystemConfigInfo.GasLimit != oldSystemConfigInfo.GasLimit { + return fmt.Errorf("SystemConfig GasLimit var check diff, expect %s actual %s", oldSystemConfigInfo.GasLimit, newSystemConfigInfo.GasLimit) + } + if newSystemConfigInfo.BaseFeeScalar != strconv.FormatUint(uint64(BasefeeScalar), 10) { + return fmt.Errorf("SystemConfig BaseFeeScalar var check diff, expect %s actual %s", strconv.FormatUint(uint64(BasefeeScalar), 10), newSystemConfigInfo.BaseFeeScalar) + } + if newSystemConfigInfo.BlobBaseFeeScalar != strconv.FormatUint(uint64(Blobbasefeescala), 10) { + return fmt.Errorf("SystemConfig BlobBaseFeeScalar var check diff, expect %s actual %s", strconv.FormatUint(uint64(Blobbasefeescala), 10), newSystemConfigInfo.BlobBaseFeeScalar) + } + if newSystemConfigInfo.ResourceConfig.MaxResourceLimit != oldSystemConfigInfo.ResourceConfig.MaxResourceLimit { + return fmt.Errorf("SystemConfig ResourceConfig.MaxResourceLimit var check diff, expect %d actual %d", oldSystemConfigInfo.ResourceConfig.MaxResourceLimit, newSystemConfigInfo.ResourceConfig.MaxResourceLimit) + } + if newSystemConfigInfo.ResourceConfig.ElasticityMultiplier != oldSystemConfigInfo.ResourceConfig.ElasticityMultiplier { + return fmt.Errorf("SystemConfig ResourceConfig.ElasticityMultiplier var check diff, expect %d actual %d", oldSystemConfigInfo.ResourceConfig.ElasticityMultiplier, newSystemConfigInfo.ResourceConfig.ElasticityMultiplier) + } + if newSystemConfigInfo.ResourceConfig.BaseFeeMaxChangeDenominator != oldSystemConfigInfo.ResourceConfig.BaseFeeMaxChangeDenominator { + return fmt.Errorf("SystemConfig ResourceConfig.MaxResourceLimit var check diff, expect %d actual %d", oldSystemConfigInfo.ResourceConfig.BaseFeeMaxChangeDenominator, newSystemConfigInfo.ResourceConfig.BaseFeeMaxChangeDenominator) + } + if newSystemConfigInfo.ResourceConfig.MinimumBaseFee != oldSystemConfigInfo.ResourceConfig.MinimumBaseFee { + return fmt.Errorf("SystemConfig ResourceConfig.MinimumBaseFee var check diff, expect %d actual %d", oldSystemConfigInfo.ResourceConfig.MaxResourceLimit, newSystemConfigInfo.ResourceConfig.MaxResourceLimit) + } + if newSystemConfigInfo.ResourceConfig.SystemTxMaxGas != oldSystemConfigInfo.ResourceConfig.SystemTxMaxGas { + return fmt.Errorf("SystemConfig ResourceConfig.SystemTxMaxGas var check diff, expect %d actual %d", oldSystemConfigInfo.ResourceConfig.SystemTxMaxGas, newSystemConfigInfo.ResourceConfig.SystemTxMaxGas) + } + if newSystemConfigInfo.ResourceConfig.MaximumBaseFee != oldSystemConfigInfo.ResourceConfig.MaximumBaseFee { + return fmt.Errorf("SystemConfig ResourceConfig.MaximumBaseFee var check diff, expect %s actual %s", oldSystemConfigInfo.ResourceConfig.MaximumBaseFee, newSystemConfigInfo.ResourceConfig.MaximumBaseFee) + } + if newSystemConfigInfo.BatcherInbox != batchInboxAddr.String() { + return fmt.Errorf("SystemConfig BatcherInbox var check diff, expect %s actual %s", batchInboxAddr.String(), newSystemConfigInfo.BatcherInbox) + } + if newSystemConfigInfo.L1CrossDomainMessengerAddress != proxyAddresses["L1CrossDomainMessengerProxy"].String() { + return fmt.Errorf("SystemConfig L1CrossDomainMessengerAddress var check diff, expect %s actual %s", proxyAddresses["L1CrossDomainMessengerProxy"].String(), newSystemConfigInfo.L1CrossDomainMessengerAddress) + } + if newSystemConfigInfo.L1ERC721BridgeAddress != proxyAddresses["L1ERC721BridgeProxy"].String() { + return fmt.Errorf("SystemConfig L1ERC721BridgeAddress var check diff, expect %s actual %s", proxyAddresses["L1ERC721BridgeProxy"].String(), newSystemConfigInfo.L1ERC721BridgeAddress) + } + if newSystemConfigInfo.L1StandardBridgeAddress != proxyAddresses["L1StandardBridgeProxy"].String() { + return fmt.Errorf("SystemConfig L1StandardBridgeAddress var check diff, expect %s actual %s", proxyAddresses["L1StandardBridgeAddressProxy"].String(), newSystemConfigInfo.L1StandardBridgeAddress) + } + if newSystemConfigInfo.DisputeGameFactoryAddress != ZeroAddress { + return fmt.Errorf("SystemConfig L1StandardBridgeAddress var check diff, expect %s actual %s", ZeroAddress, newSystemConfigInfo.DisputeGameFactoryAddress) + } + if newSystemConfigInfo.OptimismPortalAddress != proxyAddresses["OptimismPortalProxy"].String() { + return fmt.Errorf("SystemConfig OptimismPortalAddress var check diff, expect %s actual %s", proxyAddresses["OptimismPortalAddressProxy"].String(), newSystemConfigInfo.OptimismPortalAddress) + } + if newSystemConfigInfo.OptimismMintableERC20FactoryAddress != proxyAddresses["OptimismMintableERC20FactoryProxy"].String() { + return fmt.Errorf("SystemConfig OptimismMintableERC20FactoryAddress var check diff, expect %s actual %s", proxyAddresses["OptimismMintableERC20FactoryProxy"].String(), newSystemConfigInfo.OptimismMintableERC20FactoryAddress) + } + if newSystemConfigInfo.GasPayingTokenAddress != ETHER { + return fmt.Errorf("SystemConfig GasPayingTokenAddress var check diff, expect %s actual %s", ETHER, newSystemConfigInfo.GasPayingTokenAddress) + } + return nil +} + +// GetProxyContractVersions will fetch the versions of all of the contracts. +func GetProxyContractVersions(ctx context.Context, addresses map[string]common.Address, backend bind.ContractBackend) (ContractVersions, error) { + var versions ContractVersions + var err error + + versions.L1CrossDomainMessenger, err = getVersion(ctx, addresses["L1CrossDomainMessengerProxy"], backend) + if err != nil { + return versions, fmt.Errorf("L1CrossDomainMessenger: %w", err) + } + versions.L1ERC721Bridge, err = getVersion(ctx, addresses["L1ERC721BridgeProxy"], backend) + if err != nil { + return versions, fmt.Errorf("L1ERC721Bridge: %w", err) + } + versions.L1StandardBridge, err = getVersion(ctx, addresses["L1StandardBridgeProxy"], backend) + if err != nil { + return versions, fmt.Errorf("L1StandardBridge: %w", err) + } + versions.L2OutputOracle, err = getVersion(ctx, addresses["L2OutputOracleProxy"], backend) + if err != nil { + return versions, fmt.Errorf("L2OutputOracle: %w", err) + } + versions.OptimismMintableERC20Factory, err = getVersion(ctx, addresses["OptimismMintableERC20FactoryProxy"], backend) + if err != nil { + return versions, fmt.Errorf("OptimismMintableERC20Factory: %w", err) + } + versions.OptimismPortal, err = getVersion(ctx, addresses["OptimismPortalProxy"], backend) + if err != nil { + return versions, fmt.Errorf("OptimismPortal: %w", err) + } + versions.SystemConfig, err = getVersion(ctx, addresses["SystemConfigProxy"], backend) + if err != nil { + return versions, fmt.Errorf("SystemConfig: %w", err) + } + return versions, err +} + +// GetImplContractVersions will fetch the versions of all of the contracts. +func GetImplContractVersions(ctx context.Context, addresses map[string]common.Address, backend bind.ContractBackend) (ContractVersions, error) { + var versions ContractVersions + var err error + + versions.L1CrossDomainMessenger, err = getVersion(ctx, addresses["L1CrossDomainMessenger"], backend) + if err != nil { + return versions, fmt.Errorf("L1CrossDomainMessenger: %w", err) + } + versions.L1ERC721Bridge, err = getVersion(ctx, addresses["L1ERC721Bridge"], backend) + if err != nil { + return versions, fmt.Errorf("L1ERC721Bridge: %w", err) + } + versions.L1StandardBridge, err = getVersion(ctx, addresses["L1StandardBridge"], backend) + if err != nil { + return versions, fmt.Errorf("L1StandardBridge: %w", err) + } + versions.L2OutputOracle, err = getVersion(ctx, addresses["L2OutputOracle"], backend) + if err != nil { + return versions, fmt.Errorf("L2OutputOracle: %w", err) + } + versions.OptimismMintableERC20Factory, err = getVersion(ctx, addresses["OptimismMintableERC20Factory"], backend) + if err != nil { + return versions, fmt.Errorf("OptimismMintableERC20Factory: %w", err) + } + versions.OptimismPortal, err = getVersion(ctx, addresses["OptimismPortal"], backend) + if err != nil { + return versions, fmt.Errorf("OptimismPortal: %w", err) + } + versions.SystemConfig, err = getVersion(ctx, addresses["SystemConfig"], backend) + if err != nil { + return versions, fmt.Errorf("SystemConfig: %w", err) + } + return versions, err +} + +// getVersion will get the version of a contract at a given address. +func getVersion(ctx context.Context, addr common.Address, backend bind.ContractBackend) (string, error) { + semver, err := oldBindings.NewSemver(addr, backend) + if err != nil { + return "", fmt.Errorf("%s: %w", addr, err) + } + version, err := semver.Version(&bind.CallOpts{ + Context: ctx, + }) + if err != nil { + return "", fmt.Errorf("%s: %w", addr, err) + } + return version, nil +} diff --git a/op-chain-ops/opbnb-upgrades/const.go b/op-chain-ops/opbnb-upgrades/const.go new file mode 100644 index 000000000..200116507 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/const.go @@ -0,0 +1,103 @@ +package opbnb_upgrades + +import "github.com/ethereum/go-ethereum/common" + +const ( + BscTestnet = 97 + BscMainnet = 56 +) + +const ( + BscTestnetStartBlock = 30727847 + BscMainnetStartBlock = 30758357 + BscQAnetStartBlock = 44147099 +) + +const ( + // all networks are the same + BasefeeScalar uint32 = 68000 + Blobbasefeescala uint32 = 655000 +) + +const ( + ETHER = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" + ZeroAddress = "0x0000000000000000000000000000000000000000" +) + +var ( + BscTestnetBatcherInbox = common.HexToAddress("0xff00000000000000000000000000000000005611") + BscMainnetBatcherInbox = common.HexToAddress("0xff00000000000000000000000000000000000204") + BscQAnetBatcherInbox = common.HexToAddress("0xff00000000000000000000000000000000008848") +) + +var BscTestnetProxyContracts = map[string]common.Address{ + "SuperChainConfigProxy": common.HexToAddress("0xb19bFAC32Aa9aADEc286E2c918FF949bc0e59218"), + "L1CrossDomainMessengerProxy": common.HexToAddress("0xD506952e78eeCd5d4424B1990a0c99B1568E7c2C"), + "L1ERC721BridgeProxy": common.HexToAddress("0x17e1454015bFb3377c75bE7b6d47B236fd2ddbE7"), + "L1StandardBridgeProxy": common.HexToAddress("0x677311Fd2cCc511Bbc0f581E8d9a07B033D5E840"), + "L2OutputOracleProxy": common.HexToAddress("0xFf2394Bb843012562f4349C6632a0EcB92fC8810"), + "OptimismMintableERC20FactoryProxy": common.HexToAddress("0x182cE4305791744202BB4F802C155B94cb66163B"), + "OptimismPortalProxy": common.HexToAddress("0x4386C8ABf2009aC0c263462Da568DD9d46e52a31"), + "SystemConfigProxy": common.HexToAddress("0x406aC857817708eAf4ca3A82317eF4ae3D1EA23B"), +} + +var BscTestnetImplContracts = map[string]common.Address{ + "SuperChainConfig": common.HexToAddress("0x80E480e226F38c11f33A4cf7744EE92C90224B83"), + "L1CrossDomainMessenger": common.HexToAddress("0xc25C60b8f38AF900F520E19aA9eCeaBAF6501906"), + "L1ERC721Bridge": common.HexToAddress("0x7d68a6F2B21B28Bc058837Cd1Fb67f36D717e554"), + "L1StandardBridge": common.HexToAddress("0xCC3E823575e77B2E47c50C86800bdCcDb73d4185"), + "L2OutputOracle": common.HexToAddress("0xe80A6945CD3b32eA2d05702772232A056a218D13"), + "OptimismMintableERC20Factory": common.HexToAddress("0x21751BDb682A73036B3dB0Fa5faB1Ec629b29941"), + "OptimismPortal": common.HexToAddress("0x2Dc5fAB884EC606b196381feb5743C9390b899F0"), + "SystemConfig": common.HexToAddress("0x218E3dCdf2E0f29E569b6934fef6Ad50bbDe785C"), + "ProxyAdmin": common.HexToAddress("0xE4925bD8Ac30b2d4e2bD7b8Ba495a5c92d4c5156"), + "StorageSetter": common.HexToAddress("0x14C1079C7F0e436d76D5fbBe6a212da7244D8244"), +} + +var BscMainnetProxyContracts = map[string]common.Address{ + "SuperChainConfigProxy": common.HexToAddress("0x0000000000000000000000000000000000000000"), + "L1CrossDomainMessengerProxy": common.HexToAddress("0xd95D508f13f7029CCF0fb61984d5dfD11b879c4f"), + "L1ERC721BridgeProxy": common.HexToAddress("0xC7c796D3B712ad223Bc29Bf85E6cdD3045D998C4"), + "L1StandardBridgeProxy": common.HexToAddress("0xF05F0e4362859c3331Cb9395CBC201E3Fa6757Ea"), + "L2OutputOracleProxy": common.HexToAddress("0x153CAB79f4767E2ff862C94aa49573294B13D169"), + "OptimismMintableERC20FactoryProxy": common.HexToAddress("0xAa53ddCDC64A53F65A5f570cc13eB13529d780f1"), + "OptimismPortalProxy": common.HexToAddress("0x1876EA7702C0ad0C6A2ae6036DE7733edfBca519"), + "SystemConfigProxy": common.HexToAddress("0x7AC836148C14c74086D57F7828F2D065672Db3B8"), +} + +var BscMainnetImplContracts = map[string]common.Address{ + "SuperChainConfig": common.HexToAddress(""), + "L1CrossDomainMessenger": common.HexToAddress(""), + "L1ERC721Bridge": common.HexToAddress(""), + "L1StandardBridge": common.HexToAddress(""), + "L2OutputOracle": common.HexToAddress(""), + "OptimismMintableERC20Factory": common.HexToAddress(""), + "OptimismPortal": common.HexToAddress(""), + "SystemConfig": common.HexToAddress(""), + "ProxyAdmin": common.HexToAddress(""), + "StorageSetter": common.HexToAddress(""), +} + +var BscQAnetProxyContracts = map[string]common.Address{ + "SuperChainConfigProxy": common.HexToAddress("0x83Fa2e9cA2DF536fF3cdC80c33e33a625cE75C0f"), + "L1CrossDomainMessengerProxy": common.HexToAddress("0x192EB5D7C741A8Ab047Ee16065672E13b75fD778"), + "L1ERC721BridgeProxy": common.HexToAddress("0xc45a6EeAa0ed6D07B000A60ea8Ef720247aa79DC"), + "L1StandardBridgeProxy": common.HexToAddress("0x8614FBaE2c54a8149F3DEDEe89b5Cf6e848f4d9E"), + "L2OutputOracleProxy": common.HexToAddress("0x9906a258D0adb25de3a73d57f27Bff73Eb1078b8"), + "OptimismMintableERC20FactoryProxy": common.HexToAddress("0xe5e4733d55305D7266148781C7534AC02C6F2861"), + "OptimismPortalProxy": common.HexToAddress("0xDe279cb3237b7b322449E5cbc141BaE0EB450137"), + "SystemConfigProxy": common.HexToAddress("0x38e24297458C0B6Aa4a44497086cbE7839dafb70"), +} + +var BscQAnetImplContracts = map[string]common.Address{ + "SuperChainConfig": common.HexToAddress("0x96eE40cEe4Db1A59AF5Fb62AA8110eE3909B3A24"), + "L1CrossDomainMessenger": common.HexToAddress("0xb811d5c3169df318cd7aaE4f518AF2B0591Be82b"), + "L1ERC721Bridge": common.HexToAddress("0x9b46a0729Db9D7db74a0a6447E56cd8eFBdbb7b2"), + "L1StandardBridge": common.HexToAddress("0xAd65f684432aA24166145b55492630797306888d"), + "L2OutputOracle": common.HexToAddress("0x96B8e03E9BE5eB60507e16b59B1A1Ea3c8199ba9"), + "OptimismMintableERC20Factory": common.HexToAddress("0xcda36E872a271416cEaA62db667ef4334Db2C46c"), + "OptimismPortal": common.HexToAddress("0x9Afdf32859305A203d201e450b1860e92aeC15F3"), + "SystemConfig": common.HexToAddress("0x448beed7e0a1D7ec5671A96Cb5703a4EE1282908"), + "ProxyAdmin": common.HexToAddress("0x28Fa925aD1CC9C8F0c4daF601BfaB0b36e576a71"), + "StorageSetter": common.HexToAddress("0x954E3c51483BAb314e23F740bd9Ff9A4cDEA74dd"), +} diff --git a/op-chain-ops/opbnb-upgrades/l1.go b/op-chain-ops/opbnb-upgrades/l1.go new file mode 100644 index 000000000..242cca01f --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/l1.go @@ -0,0 +1,706 @@ +package opbnb_upgrades + +import ( + "fmt" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "math/big" + + newBindings "github.com/ethereum-optimism/optimism/op-chain-ops/opbnb-upgrades/new-contracts/bindings" + oldBindings "github.com/ethereum-optimism/optimism/op-chain-ops/opbnb-upgrades/old-contracts/bindings" + "github.com/ethereum-optimism/optimism/op-chain-ops/safe" + "github.com/ethereum-optimism/optimism/op-chain-ops/upgrades/bindings" +) + +const ( + // upgradeAndCall represents the signature of the upgradeAndCall function + // on the ProxyAdmin contract. + upgradeAndCall = "upgradeAndCall(address,address,bytes)" + + method = "setBytes32" +) + +// L1 will add calls for upgrading each of the L1 contracts. +func L1(batch *safe.Batch, proxyAddresses map[string]common.Address, implAddresses map[string]common.Address, backend bind.ContractBackend, chainId *big.Int) error { + if err := SuperChainConfig(batch, proxyAddresses, implAddresses, backend); err != nil { + return fmt.Errorf("upgrading SuperChainConfig: %w", err) + } + if err := L1CrossDomainMessenger(batch, proxyAddresses, implAddresses, backend); err != nil { + return fmt.Errorf("upgrading L1CrossDomainMessenger: %w", err) + } + if err := L1ERC721Bridge(batch, proxyAddresses, implAddresses, backend); err != nil { + return fmt.Errorf("upgrading L1ERC721Bridge: %w", err) + } + if err := L1StandardBridge(batch, proxyAddresses, implAddresses, backend); err != nil { + return fmt.Errorf("upgrading L1StandardBridge: %w", err) + } + if err := L2OutputOracle(batch, proxyAddresses, implAddresses, backend); err != nil { + return fmt.Errorf("upgrading L2OutputOracle: %w", err) + } + if err := OptimismMintableERC20Factory(batch, proxyAddresses, implAddresses, backend); err != nil { + return fmt.Errorf("upgrading OptimismMintableERC20Factory: %w", err) + } + if err := OptimismPortal(batch, proxyAddresses, implAddresses, backend); err != nil { + return fmt.Errorf("upgrading OptimismPortal: %w", err) + } + if err := SystemConfig(batch, proxyAddresses, implAddresses, backend, chainId); err != nil { + return fmt.Errorf("upgrading SystemConfig: %w", err) + } + return nil +} + +// SuperChainConfig will add a call to the batch that upgrades the SuperChainConfig. +func SuperChainConfig(batch *safe.Batch, proxyAddresses map[string]common.Address, implAddresses map[string]common.Address, backend bind.ContractBackend) error { + proxyAdminABI, err := oldBindings.ProxyAdminMetaData.GetAbi() + if err != nil { + return err + } + + // 2 Step Upgrade + // can remove upgrade storageSetter superChainConfig first upgrade + { + storageSetterABI, err := newBindings.StorageSetterMetaData.GetAbi() + if err != nil { + return err + } + + input := []bindings.StorageSetterSlot{ + // https://github.com/ethereum-optimism/optimism/blob/86a96023ffd04d119296dff095d02fff79fa15de/packages/contracts-bedrock/.storage-layout#L11-L13 + { + Key: common.Hash{}, + Value: common.Hash{}, + }, + } + + calldata, err := storageSetterABI.Pack(method, input) + if err != nil { + return err + } + args := []any{ + proxyAddresses["SuperChainConfigProxy"], + implAddresses["StorageSetter"], + calldata, + } + if err := batch.AddCall(implAddresses["ProxyAdmin"], common.Big0, upgradeAndCall, args, proxyAdminABI); err != nil { + return err + } + } + + optimismPortal, err := oldBindings.NewOptimismPortalCaller(proxyAddresses["OptimismPortalProxy"], backend) + if err != nil { + return err + } + guardian, err := optimismPortal.GUARDIAN(&bind.CallOpts{}) + if err != nil { + return err + } + paused, err := optimismPortal.Paused(&bind.CallOpts{}) + if err != nil { + return err + } + + superChainConfigABI, err := newBindings.SuperChainConfigMetaData.GetAbi() + if err != nil { + return err + } + + calldata, err := superChainConfigABI.Pack("initialize", guardian, paused) + if err != nil { + return err + } + + args := []any{ + proxyAddresses["SuperChainConfigProxy"], + implAddresses["SuperChainConfig"], + calldata, + } + + if err := batch.AddCall(implAddresses["ProxyAdmin"], common.Big0, upgradeAndCall, args, proxyAdminABI); err != nil { + return err + } + + return nil +} + +// L1CrossDomainMessenger will add a call to the batch that upgrades the L1CrossDomainMessenger. +func L1CrossDomainMessenger(batch *safe.Batch, proxyAddresses map[string]common.Address, implAddresses map[string]common.Address, backend bind.ContractBackend) error { + proxyAdminABI, err := oldBindings.ProxyAdminMetaData.GetAbi() + if err != nil { + return err + } + + // 2 Step Upgrade + { + storageSetterABI, err := newBindings.StorageSetterMetaData.GetAbi() + if err != nil { + return err + } + + input := []bindings.StorageSetterSlot{ + // https://github.com/ethereum-optimism/optimism/blob/86a96023ffd04d119296dff095d02fff79fa15de/packages/contracts-bedrock/.storage-layout#L11-L13 + { + Key: common.Hash{}, + Value: common.Hash{}, + }, + } + + calldata, err := storageSetterABI.Pack(method, input) + if err != nil { + return err + } + args := []any{ + proxyAddresses["L1CrossDomainMessengerProxy"], + implAddresses["StorageSetter"], + calldata, + } + if err := batch.AddCall(implAddresses["ProxyAdmin"], common.Big0, upgradeAndCall, args, proxyAdminABI); err != nil { + return err + } + } + + l1CrossDomainMessenger, err := oldBindings.NewL1CrossDomainMessengerCaller(proxyAddresses["L1CrossDomainMessengerProxy"], backend) + if err != nil { + return err + } + optimismPortal, err := l1CrossDomainMessenger.PORTAL(&bind.CallOpts{}) + if err != nil { + return err + } + + l1CrossDomainMessengerABI, err := newBindings.L1CrossDomainMessengerMetaData.GetAbi() + if err != nil { + return err + } + + calldata, err := l1CrossDomainMessengerABI.Pack("initialize", proxyAddresses["SuperChainConfigProxy"], optimismPortal, proxyAddresses["SystemConfigProxy"]) + if err != nil { + return err + } + + args := []any{ + proxyAddresses["L1CrossDomainMessengerProxy"], + implAddresses["L1CrossDomainMessenger"], + calldata, + } + + if err := batch.AddCall(implAddresses["ProxyAdmin"], common.Big0, upgradeAndCall, args, proxyAdminABI); err != nil { + return err + } + + return nil +} + +// L1ERC721Bridge will add a call to the batch that upgrades the L1ERC721Bridge. +func L1ERC721Bridge(batch *safe.Batch, proxyAddresses map[string]common.Address, implAddresses map[string]common.Address, backend bind.ContractBackend) error { + proxyAdminABI, err := oldBindings.ProxyAdminMetaData.GetAbi() + if err != nil { + return err + } + + // 2 Step Upgrade + { + storageSetterABI, err := newBindings.StorageSetterMetaData.GetAbi() + if err != nil { + return err + } + + input := []bindings.StorageSetterSlot{ + // https://github.com/ethereum-optimism/optimism/blob/86a96023ffd04d119296dff095d02fff79fa15de/packages/contracts-bedrock/.storage-layout#L100-L102 + { + Key: common.Hash{}, + Value: common.Hash{}, + }, + } + + calldata, err := storageSetterABI.Pack(method, input) + if err != nil { + return fmt.Errorf("setBytes32: %w", err) + } + args := []any{ + proxyAddresses["L1ERC721BridgeProxy"], + implAddresses["StorageSetter"], + calldata, + } + if err := batch.AddCall(implAddresses["ProxyAdmin"], common.Big0, upgradeAndCall, args, proxyAdminABI); err != nil { + return err + } + } + + l1ERC721BridgeABI, err := bindings.L1ERC721BridgeMetaData.GetAbi() + if err != nil { + return err + } + + l1ERC721Bridge, err := bindings.NewL1ERC721BridgeCaller(proxyAddresses["L1ERC721BridgeProxy"], backend) + if err != nil { + return err + } + messenger, err := l1ERC721Bridge.Messenger(&bind.CallOpts{}) + if err != nil { + return err + } + + calldata, err := l1ERC721BridgeABI.Pack("initialize", messenger, proxyAddresses["SuperChainConfigProxy"]) + if err != nil { + return err + } + + args := []any{ + proxyAddresses["L1ERC721BridgeProxy"], + implAddresses["L1ERC721Bridge"], + calldata, + } + + if err := batch.AddCall(implAddresses["ProxyAdmin"], common.Big0, upgradeAndCall, args, proxyAdminABI); err != nil { + return err + } + + return nil +} + +// L1StandardBridge will add a call to the batch that upgrades the L1StandardBridge. +func L1StandardBridge(batch *safe.Batch, proxyAddresses map[string]common.Address, implAddresses map[string]common.Address, backend bind.ContractBackend) error { + proxyAdminABI, err := oldBindings.ProxyAdminMetaData.GetAbi() + if err != nil { + return err + } + + // 2 Step Upgrade + { + storageSetterABI, err := newBindings.StorageSetterMetaData.GetAbi() + if err != nil { + return err + } + + input := []bindings.StorageSetterSlot{ + // https://github.com/ethereum-optimism/optimism/blob/86a96023ffd04d119296dff095d02fff79fa15de/packages/contracts-bedrock/.storage-layout#L36-L37 + { + Key: common.Hash{}, + Value: common.Hash{}, + }, + } + + calldata, err := storageSetterABI.Pack(method, input) + if err != nil { + return err + } + args := []any{ + proxyAddresses["L1StandardBridgeProxy"], + implAddresses["StorageSetter"], + calldata, + } + if err := batch.AddCall(implAddresses["ProxyAdmin"], common.Big0, upgradeAndCall, args, proxyAdminABI); err != nil { + return err + } + } + + l1StandardBridgeABI, err := newBindings.L1StandardBridgeMetaData.GetAbi() + if err != nil { + return err + } + + l1StandardBridge, err := oldBindings.NewL1StandardBridgeCaller(proxyAddresses["L1StandardBridgeProxy"], backend) + if err != nil { + return err + } + + messenger, err := l1StandardBridge.MESSENGER(&bind.CallOpts{}) + if err != nil { + return err + } + + calldata, err := l1StandardBridgeABI.Pack("initialize", messenger, proxyAddresses["SuperChainConfigProxy"], proxyAddresses["SystemConfigProxy"]) + if err != nil { + return err + } + + args := []any{ + proxyAddresses["L1StandardBridgeProxy"], + implAddresses["L1StandardBridge"], + calldata, + } + + if err := batch.AddCall(implAddresses["ProxyAdmin"], common.Big0, upgradeAndCall, args, proxyAdminABI); err != nil { + return err + } + + return nil +} + +// L2OutputOracle will add a call to the batch that upgrades the L2OutputOracle. +func L2OutputOracle(batch *safe.Batch, proxyAddresses map[string]common.Address, implAddresses map[string]common.Address, backend bind.ContractBackend) error { + proxyAdminABI, err := oldBindings.ProxyAdminMetaData.GetAbi() + if err != nil { + return err + } + + // 2 Step Upgrade + { + storageSetterABI, err := newBindings.StorageSetterMetaData.GetAbi() + if err != nil { + return err + } + + input := []bindings.StorageSetterSlot{ + // https://github.com/ethereum-optimism/optimism/blob/86a96023ffd04d119296dff095d02fff79fa15de/packages/contracts-bedrock/.storage-layout#L50-L51 + { + Key: common.Hash{}, + Value: common.Hash{}, + }, + } + + calldata, err := storageSetterABI.Pack(method, input) + if err != nil { + return err + } + args := []any{ + proxyAddresses["L2OutputOracleProxy"], + implAddresses["StorageSetter"], + calldata, + } + if err := batch.AddCall(implAddresses["ProxyAdmin"], common.Big0, upgradeAndCall, args, proxyAdminABI); err != nil { + return err + } + } + + l2OutputOracleABI, err := newBindings.L2OutputOracleMetaData.GetAbi() + if err != nil { + return err + } + + l2OutputOracle, err := oldBindings.NewL2OutputOracleCaller(proxyAddresses["L2OutputOracleProxy"], backend) + if err != nil { + return err + } + + l2OutputOracleSubmissionInterval, err := l2OutputOracle.SUBMISSIONINTERVAL(&bind.CallOpts{}) + if err != nil { + return err + } + + l2BlockTime, err := l2OutputOracle.L2BLOCKTIME(&bind.CallOpts{}) + if err != nil { + return err + } + + l2OutputOracleStartingBlockNumber, err := l2OutputOracle.StartingBlockNumber(&bind.CallOpts{}) + if err != nil { + return err + } + + l2OutputOracleStartingTimestamp, err := l2OutputOracle.StartingTimestamp(&bind.CallOpts{}) + if err != nil { + return err + } + + l2OutputOracleProposer, err := l2OutputOracle.PROPOSER(&bind.CallOpts{}) + if err != nil { + return err + } + + l2OutputOracleChallenger, err := l2OutputOracle.CHALLENGER(&bind.CallOpts{}) + if err != nil { + return err + } + + finalizationPeriodSeconds, err := l2OutputOracle.FINALIZATIONPERIODSECONDS(&bind.CallOpts{}) + if err != nil { + return err + } + calldata, err := l2OutputOracleABI.Pack( + "initialize", + l2OutputOracleSubmissionInterval, + l2BlockTime, + l2OutputOracleStartingBlockNumber, + l2OutputOracleStartingTimestamp, + l2OutputOracleProposer, + l2OutputOracleChallenger, + finalizationPeriodSeconds, + ) + if err != nil { + return err + } + + args := []any{ + proxyAddresses["L2OutputOracleProxy"], + implAddresses["L2OutputOracle"], + calldata, + } + + if err := batch.AddCall(implAddresses["ProxyAdmin"], common.Big0, upgradeAndCall, args, proxyAdminABI); err != nil { + return err + } + + return nil +} + +// OptimismMintableERC20Factory will add a call to the batch that upgrades the OptimismMintableERC20Factory. +func OptimismMintableERC20Factory(batch *safe.Batch, proxyAddresses map[string]common.Address, implAddresses map[string]common.Address, backend bind.ContractBackend) error { + proxyAdminABI, err := oldBindings.ProxyAdminMetaData.GetAbi() + if err != nil { + return err + } + + // 2 Step Upgrade + { + storageSetterABI, err := newBindings.StorageSetterMetaData.GetAbi() + if err != nil { + return err + } + + input := []bindings.StorageSetterSlot{ + // https://github.com/ethereum-optimism/optimism/blob/86a96023ffd04d119296dff095d02fff79fa15de/packages/contracts-bedrock/.storage-layout#L287-L289 + { + Key: common.Hash{}, + Value: common.Hash{}, + }, + } + + calldata, err := storageSetterABI.Pack(method, input) + if err != nil { + return err + } + args := []any{ + proxyAddresses["OptimismMintableERC20FactoryProxy"], + implAddresses["StorageSetter"], + calldata, + } + if err := batch.AddCall(implAddresses["ProxyAdmin"], common.Big0, upgradeAndCall, args, proxyAdminABI); err != nil { + return err + } + } + + optimismMintableERC20FactoryABI, err := newBindings.OptimismMintableERC20FactoryMetaData.GetAbi() + if err != nil { + return err + } + + optimismMintableERC20Factory, err := oldBindings.NewOptimismMintableERC20FactoryCaller(proxyAddresses["OptimismMintableERC20FactoryProxy"], backend) + if err != nil { + return err + } + + bridge, err := optimismMintableERC20Factory.BRIDGE(&bind.CallOpts{}) + if err != nil { + return err + } + + calldata, err := optimismMintableERC20FactoryABI.Pack("initialize", bridge) + if err != nil { + return err + } + + args := []any{ + proxyAddresses["OptimismMintableERC20FactoryProxy"], + implAddresses["OptimismMintableERC20Factory"], + calldata, + } + + if err := batch.AddCall(implAddresses["ProxyAdmin"], common.Big0, upgradeAndCall, args, proxyAdminABI); err != nil { + return err + } + + return nil +} + +// OptimismPortal will add a call to the batch that upgrades the OptimismPortal. +func OptimismPortal(batch *safe.Batch, proxyAddresses map[string]common.Address, implAddresses map[string]common.Address, backend bind.ContractBackend) error { + proxyAdminABI, err := oldBindings.ProxyAdminMetaData.GetAbi() + if err != nil { + return err + } + + // 2 Step Upgrade + { + storageSetterABI, err := newBindings.StorageSetterMetaData.GetAbi() + if err != nil { + return err + } + + input := []bindings.StorageSetterSlot{ + // https://github.com/ethereum-optimism/optimism/blob/86a96023ffd04d119296dff095d02fff79fa15de/packages/contracts-bedrock/.storage-layout#L64-L65 + { + Key: common.Hash{}, + Value: common.Hash{}, + }, + } + + calldata, err := storageSetterABI.Pack(method, input) + if err != nil { + return err + } + args := []any{ + proxyAddresses["OptimismPortalProxy"], + implAddresses["StorageSetter"], + calldata, + } + if err := batch.AddCall(implAddresses["ProxyAdmin"], common.Big0, upgradeAndCall, args, proxyAdminABI); err != nil { + return err + } + } + + optimismPortalABI, err := newBindings.OptimismPortalMetaData.GetAbi() + if err != nil { + return err + } + + optimismPortal, err := oldBindings.NewOptimismPortalCaller(proxyAddresses["OptimismPortalProxy"], backend) + if err != nil { + return err + } + l2OutputOracle, err := optimismPortal.L2ORACLE(&bind.CallOpts{}) + if err != nil { + return err + } + systemConfig, err := optimismPortal.SYSTEMCONFIG(&bind.CallOpts{}) + if err != nil { + return err + } + + calldata, err := optimismPortalABI.Pack("initialize", l2OutputOracle, systemConfig, proxyAddresses["SuperChainConfigProxy"]) + if err != nil { + return err + } + + args := []any{ + proxyAddresses["OptimismPortalProxy"], + implAddresses["OptimismPortal"], + calldata, + } + + if err := batch.AddCall(implAddresses["ProxyAdmin"], common.Big0, upgradeAndCall, args, proxyAdminABI); err != nil { + return err + } + + return nil +} + +// SystemConfig will add a call to the batch that upgrades the SystemConfig. +func SystemConfig(batch *safe.Batch, proxyAddresses map[string]common.Address, implAddresses map[string]common.Address, backend bind.ContractBackend, chainId *big.Int) error { + proxyAdminABI, err := oldBindings.ProxyAdminMetaData.GetAbi() + if err != nil { + return err + } + + // 2 Step Upgrade + { + storageSetterABI, err := newBindings.StorageSetterMetaData.GetAbi() + if err != nil { + return err + } + + // set startBlock genesis block l1 origin + startBlock := common.BigToHash(new(big.Int).SetUint64(BscQAnetStartBlock)) + if chainId.Uint64() == BscTestnet { + startBlock = common.BigToHash(new(big.Int).SetUint64(BscTestnetStartBlock)) + } else if chainId.Uint64() == BscMainnet { + startBlock = common.BigToHash(new(big.Int).SetUint64(BscMainnetStartBlock)) + } + + input := []bindings.StorageSetterSlot{ + // https://github.com/ethereum-optimism/optimism/blob/86a96023ffd04d119296dff095d02fff79fa15de/packages/contracts-bedrock/.storage-layout#L82-L83 + { + Key: common.Hash{}, + Value: common.Hash{}, + }, + // bytes32 public constant START_BLOCK_SLOT = bytes32(uint256(keccak256("systemconfig.startBlock")) - 1); + { + Key: common.HexToHash("0xa11ee3ab75b40e88a0105e935d17cd36c8faee0138320d776c411291bdbbb19f"), + Value: startBlock, + }, + } + + calldata, err := storageSetterABI.Pack(method, input) + if err != nil { + return err + } + args := []any{ + proxyAddresses["SystemConfigProxy"], + implAddresses["StorageSetter"], + calldata, + } + if err := batch.AddCall(implAddresses["ProxyAdmin"], common.Big0, upgradeAndCall, args, proxyAdminABI); err != nil { + return err + } + } + + systemConfigABI, err := newBindings.SystemConfigMetaData.GetAbi() + if err != nil { + return err + } + + systemConfig, err := oldBindings.NewSystemConfigCaller(proxyAddresses["SystemConfigProxy"], backend) + if err != nil { + return err + } + + batcherHash, err := systemConfig.BatcherHash(&bind.CallOpts{}) + if err != nil { + return err + } + + l2GenesisBlockGasLimit, err := systemConfig.GasLimit(&bind.CallOpts{}) + if err != nil { + return err + } + + p2pSequencerAddress, err := systemConfig.UnsafeBlockSigner(&bind.CallOpts{}) + if err != nil { + return err + } + + finalSystemOwner, err := systemConfig.Owner(&bind.CallOpts{}) + if err != nil { + return err + } + + resourceConfig, err := systemConfig.ResourceConfig(&bind.CallOpts{}) + if err != nil { + return err + } + + // set startBlock genesis block l1 origin + batchInboxAddr := BscQAnetBatcherInbox + if chainId.Uint64() == BscTestnet { + batchInboxAddr = BscTestnetBatcherInbox + } else if chainId.Uint64() == BscMainnet { + batchInboxAddr = BscMainnetBatcherInbox + } + _basefeeScalar := BasefeeScalar + _blobbasefeeScalar := Blobbasefeescala + calldata, err := systemConfigABI.Pack( + "initialize", + finalSystemOwner, + _basefeeScalar, + _blobbasefeeScalar, + batcherHash, + l2GenesisBlockGasLimit, + p2pSequencerAddress, + resourceConfig, + batchInboxAddr, + bindings.SystemConfigAddresses{ + L1CrossDomainMessenger: proxyAddresses["L1CrossDomainMessengerProxy"], + L1ERC721Bridge: proxyAddresses["L1ERC721BridgeProxy"], + L1StandardBridge: proxyAddresses["L1StandardBridgeProxy"], + DisputeGameFactory: common.Address{}, + OptimismPortal: proxyAddresses["OptimismPortalProxy"], + OptimismMintableERC20Factory: proxyAddresses["OptimismMintableERC20FactoryProxy"], + GasPayingToken: common.Address{}, + }, + ) + if err != nil { + return err + } + + args := []any{ + proxyAddresses["SystemConfigProxy"], + implAddresses["SystemConfig"], + calldata, + } + + if err := batch.AddCall(implAddresses["ProxyAdmin"], common.Big0, upgradeAndCall, args, proxyAdminABI); err != nil { + return err + } + + return nil +} diff --git a/op-chain-ops/opbnb-upgrades/new-contracts/L1CrossDomainMessenger.json b/op-chain-ops/opbnb-upgrades/new-contracts/L1CrossDomainMessenger.json new file mode 100644 index 000000000..8515de9fe --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/new-contracts/L1CrossDomainMessenger.json @@ -0,0 +1 @@ +[{"type":"constructor","inputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"MESSAGE_VERSION","inputs":[],"outputs":[{"name":"","type":"uint16","internalType":"uint16"}],"stateMutability":"view"},{"type":"function","name":"MIN_GAS_CALLDATA_OVERHEAD","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"OTHER_MESSENGER","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract CrossDomainMessenger"}],"stateMutability":"view"},{"type":"function","name":"PORTAL","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract OptimismPortal"}],"stateMutability":"view"},{"type":"function","name":"RELAY_CALL_OVERHEAD","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"RELAY_CONSTANT_OVERHEAD","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"RELAY_GAS_CHECK_BUFFER","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"RELAY_RESERVED_GAS","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"baseGas","inputs":[{"name":"_message","type":"bytes","internalType":"bytes"},{"name":"_minGasLimit","type":"uint32","internalType":"uint32"}],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"pure"},{"type":"function","name":"failedMessages","inputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"initialize","inputs":[{"name":"_superchainConfig","type":"address","internalType":"contract SuperchainConfig"},{"name":"_portal","type":"address","internalType":"contract OptimismPortal"},{"name":"_systemConfig","type":"address","internalType":"contract SystemConfig"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"messageNonce","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"otherMessenger","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract CrossDomainMessenger"}],"stateMutability":"view"},{"type":"function","name":"paused","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"portal","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract OptimismPortal"}],"stateMutability":"view"},{"type":"function","name":"relayMessage","inputs":[{"name":"_nonce","type":"uint256","internalType":"uint256"},{"name":"_sender","type":"address","internalType":"address"},{"name":"_target","type":"address","internalType":"address"},{"name":"_value","type":"uint256","internalType":"uint256"},{"name":"_minGasLimit","type":"uint256","internalType":"uint256"},{"name":"_message","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"sendMessage","inputs":[{"name":"_target","type":"address","internalType":"address"},{"name":"_message","type":"bytes","internalType":"bytes"},{"name":"_minGasLimit","type":"uint32","internalType":"uint32"}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"successfulMessages","inputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"superchainConfig","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract SuperchainConfig"}],"stateMutability":"view"},{"type":"function","name":"systemConfig","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract SystemConfig"}],"stateMutability":"view"},{"type":"function","name":"version","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"xDomainMessageSender","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"event","name":"FailedRelayedMessage","inputs":[{"name":"msgHash","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"Initialized","inputs":[{"name":"version","type":"uint8","indexed":false,"internalType":"uint8"}],"anonymous":false},{"type":"event","name":"RelayedMessage","inputs":[{"name":"msgHash","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"SentMessage","inputs":[{"name":"target","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"message","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"messageNonce","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"gasLimit","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"SentMessageExtension1","inputs":[{"name":"sender","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false}] diff --git a/op-chain-ops/opbnb-upgrades/new-contracts/L1ERC721Bridge.json b/op-chain-ops/opbnb-upgrades/new-contracts/L1ERC721Bridge.json new file mode 100644 index 000000000..1fef879d3 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/new-contracts/L1ERC721Bridge.json @@ -0,0 +1 @@ +[{"type":"constructor","inputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"MESSENGER","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract CrossDomainMessenger"}],"stateMutability":"view"},{"type":"function","name":"OTHER_BRIDGE","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract StandardBridge"}],"stateMutability":"view"},{"type":"function","name":"bridgeERC721","inputs":[{"name":"_localToken","type":"address","internalType":"address"},{"name":"_remoteToken","type":"address","internalType":"address"},{"name":"_tokenId","type":"uint256","internalType":"uint256"},{"name":"_minGasLimit","type":"uint32","internalType":"uint32"},{"name":"_extraData","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"bridgeERC721To","inputs":[{"name":"_localToken","type":"address","internalType":"address"},{"name":"_remoteToken","type":"address","internalType":"address"},{"name":"_to","type":"address","internalType":"address"},{"name":"_tokenId","type":"uint256","internalType":"uint256"},{"name":"_minGasLimit","type":"uint32","internalType":"uint32"},{"name":"_extraData","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"deposits","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"","type":"address","internalType":"address"},{"name":"","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"finalizeBridgeERC721","inputs":[{"name":"_localToken","type":"address","internalType":"address"},{"name":"_remoteToken","type":"address","internalType":"address"},{"name":"_from","type":"address","internalType":"address"},{"name":"_to","type":"address","internalType":"address"},{"name":"_tokenId","type":"uint256","internalType":"uint256"},{"name":"_extraData","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"initialize","inputs":[{"name":"_messenger","type":"address","internalType":"contract CrossDomainMessenger"},{"name":"_superchainConfig","type":"address","internalType":"contract SuperchainConfig"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"messenger","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract CrossDomainMessenger"}],"stateMutability":"view"},{"type":"function","name":"otherBridge","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract StandardBridge"}],"stateMutability":"view"},{"type":"function","name":"paused","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"superchainConfig","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract SuperchainConfig"}],"stateMutability":"view"},{"type":"function","name":"version","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"event","name":"ERC721BridgeFinalized","inputs":[{"name":"localToken","type":"address","indexed":true,"internalType":"address"},{"name":"remoteToken","type":"address","indexed":true,"internalType":"address"},{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":false,"internalType":"address"},{"name":"tokenId","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"extraData","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"ERC721BridgeInitiated","inputs":[{"name":"localToken","type":"address","indexed":true,"internalType":"address"},{"name":"remoteToken","type":"address","indexed":true,"internalType":"address"},{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":false,"internalType":"address"},{"name":"tokenId","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"extraData","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"Initialized","inputs":[{"name":"version","type":"uint8","indexed":false,"internalType":"uint8"}],"anonymous":false}] diff --git a/op-chain-ops/opbnb-upgrades/new-contracts/L1StandardBridge.json b/op-chain-ops/opbnb-upgrades/new-contracts/L1StandardBridge.json new file mode 100644 index 000000000..f7b38a894 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/new-contracts/L1StandardBridge.json @@ -0,0 +1 @@ +[{"type":"constructor","inputs":[],"stateMutability":"nonpayable"},{"type":"receive","stateMutability":"payable"},{"type":"function","name":"MESSENGER","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract CrossDomainMessenger"}],"stateMutability":"view"},{"type":"function","name":"OTHER_BRIDGE","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract StandardBridge"}],"stateMutability":"view"},{"type":"function","name":"bridgeERC20","inputs":[{"name":"_localToken","type":"address","internalType":"address"},{"name":"_remoteToken","type":"address","internalType":"address"},{"name":"_amount","type":"uint256","internalType":"uint256"},{"name":"_minGasLimit","type":"uint32","internalType":"uint32"},{"name":"_extraData","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"bridgeERC20To","inputs":[{"name":"_localToken","type":"address","internalType":"address"},{"name":"_remoteToken","type":"address","internalType":"address"},{"name":"_to","type":"address","internalType":"address"},{"name":"_amount","type":"uint256","internalType":"uint256"},{"name":"_minGasLimit","type":"uint32","internalType":"uint32"},{"name":"_extraData","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"bridgeETH","inputs":[{"name":"_minGasLimit","type":"uint32","internalType":"uint32"},{"name":"_extraData","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"bridgeETHTo","inputs":[{"name":"_to","type":"address","internalType":"address"},{"name":"_minGasLimit","type":"uint32","internalType":"uint32"},{"name":"_extraData","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"depositERC20","inputs":[{"name":"_l1Token","type":"address","internalType":"address"},{"name":"_l2Token","type":"address","internalType":"address"},{"name":"_amount","type":"uint256","internalType":"uint256"},{"name":"_minGasLimit","type":"uint32","internalType":"uint32"},{"name":"_extraData","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"depositERC20To","inputs":[{"name":"_l1Token","type":"address","internalType":"address"},{"name":"_l2Token","type":"address","internalType":"address"},{"name":"_to","type":"address","internalType":"address"},{"name":"_amount","type":"uint256","internalType":"uint256"},{"name":"_minGasLimit","type":"uint32","internalType":"uint32"},{"name":"_extraData","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"depositETH","inputs":[{"name":"_minGasLimit","type":"uint32","internalType":"uint32"},{"name":"_extraData","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"depositETHTo","inputs":[{"name":"_to","type":"address","internalType":"address"},{"name":"_minGasLimit","type":"uint32","internalType":"uint32"},{"name":"_extraData","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"deposits","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"finalizeBridgeERC20","inputs":[{"name":"_localToken","type":"address","internalType":"address"},{"name":"_remoteToken","type":"address","internalType":"address"},{"name":"_from","type":"address","internalType":"address"},{"name":"_to","type":"address","internalType":"address"},{"name":"_amount","type":"uint256","internalType":"uint256"},{"name":"_extraData","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"finalizeBridgeETH","inputs":[{"name":"_from","type":"address","internalType":"address"},{"name":"_to","type":"address","internalType":"address"},{"name":"_amount","type":"uint256","internalType":"uint256"},{"name":"_extraData","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"finalizeERC20Withdrawal","inputs":[{"name":"_l1Token","type":"address","internalType":"address"},{"name":"_l2Token","type":"address","internalType":"address"},{"name":"_from","type":"address","internalType":"address"},{"name":"_to","type":"address","internalType":"address"},{"name":"_amount","type":"uint256","internalType":"uint256"},{"name":"_extraData","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"finalizeETHWithdrawal","inputs":[{"name":"_from","type":"address","internalType":"address"},{"name":"_to","type":"address","internalType":"address"},{"name":"_amount","type":"uint256","internalType":"uint256"},{"name":"_extraData","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"initialize","inputs":[{"name":"_messenger","type":"address","internalType":"contract CrossDomainMessenger"},{"name":"_superchainConfig","type":"address","internalType":"contract SuperchainConfig"},{"name":"_systemConfig","type":"address","internalType":"contract SystemConfig"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"l2TokenBridge","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"messenger","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract CrossDomainMessenger"}],"stateMutability":"view"},{"type":"function","name":"otherBridge","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract StandardBridge"}],"stateMutability":"view"},{"type":"function","name":"paused","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"superchainConfig","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract SuperchainConfig"}],"stateMutability":"view"},{"type":"function","name":"systemConfig","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract SystemConfig"}],"stateMutability":"view"},{"type":"function","name":"version","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"event","name":"ERC20BridgeFinalized","inputs":[{"name":"localToken","type":"address","indexed":true,"internalType":"address"},{"name":"remoteToken","type":"address","indexed":true,"internalType":"address"},{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"extraData","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"ERC20BridgeInitiated","inputs":[{"name":"localToken","type":"address","indexed":true,"internalType":"address"},{"name":"remoteToken","type":"address","indexed":true,"internalType":"address"},{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"extraData","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"ERC20DepositInitiated","inputs":[{"name":"l1Token","type":"address","indexed":true,"internalType":"address"},{"name":"l2Token","type":"address","indexed":true,"internalType":"address"},{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"extraData","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"ERC20WithdrawalFinalized","inputs":[{"name":"l1Token","type":"address","indexed":true,"internalType":"address"},{"name":"l2Token","type":"address","indexed":true,"internalType":"address"},{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"extraData","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"ETHBridgeFinalized","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"extraData","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"ETHBridgeInitiated","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"extraData","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"ETHDepositInitiated","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"extraData","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"ETHWithdrawalFinalized","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"extraData","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"Initialized","inputs":[{"name":"version","type":"uint8","indexed":false,"internalType":"uint8"}],"anonymous":false}] diff --git a/op-chain-ops/opbnb-upgrades/new-contracts/L2OutputOracle.json b/op-chain-ops/opbnb-upgrades/new-contracts/L2OutputOracle.json new file mode 100644 index 000000000..b37cdc543 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/new-contracts/L2OutputOracle.json @@ -0,0 +1 @@ +[{"type":"constructor","inputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"CHALLENGER","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"FINALIZATION_PERIOD_SECONDS","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"L2_BLOCK_TIME","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"PROPOSER","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"SUBMISSION_INTERVAL","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"challenger","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"computeL2Timestamp","inputs":[{"name":"_l2BlockNumber","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"deleteL2Outputs","inputs":[{"name":"_l2OutputIndex","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"finalizationPeriodSeconds","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getL2Output","inputs":[{"name":"_l2OutputIndex","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Types.OutputProposal","components":[{"name":"outputRoot","type":"bytes32","internalType":"bytes32"},{"name":"timestamp","type":"uint128","internalType":"uint128"},{"name":"l2BlockNumber","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getL2OutputAfter","inputs":[{"name":"_l2BlockNumber","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Types.OutputProposal","components":[{"name":"outputRoot","type":"bytes32","internalType":"bytes32"},{"name":"timestamp","type":"uint128","internalType":"uint128"},{"name":"l2BlockNumber","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getL2OutputIndexAfter","inputs":[{"name":"_l2BlockNumber","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"initialize","inputs":[{"name":"_submissionInterval","type":"uint256","internalType":"uint256"},{"name":"_l2BlockTime","type":"uint256","internalType":"uint256"},{"name":"_startingBlockNumber","type":"uint256","internalType":"uint256"},{"name":"_startingTimestamp","type":"uint256","internalType":"uint256"},{"name":"_proposer","type":"address","internalType":"address"},{"name":"_challenger","type":"address","internalType":"address"},{"name":"_finalizationPeriodSeconds","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"l2BlockTime","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"latestBlockNumber","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"latestOutputIndex","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"nextBlockNumber","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"nextOutputIndex","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"proposeL2Output","inputs":[{"name":"_outputRoot","type":"bytes32","internalType":"bytes32"},{"name":"_l2BlockNumber","type":"uint256","internalType":"uint256"},{"name":"_l1BlockHash","type":"bytes32","internalType":"bytes32"},{"name":"_l1BlockNumber","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"proposer","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"startingBlockNumber","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"startingTimestamp","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"submissionInterval","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"version","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"event","name":"Initialized","inputs":[{"name":"version","type":"uint8","indexed":false,"internalType":"uint8"}],"anonymous":false},{"type":"event","name":"OutputProposed","inputs":[{"name":"outputRoot","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"l2OutputIndex","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"l2BlockNumber","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"l1Timestamp","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OutputsDeleted","inputs":[{"name":"prevNextOutputIndex","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"newNextOutputIndex","type":"uint256","indexed":true,"internalType":"uint256"}],"anonymous":false}] diff --git a/op-chain-ops/opbnb-upgrades/new-contracts/OptimismMintableERC20Factory.json b/op-chain-ops/opbnb-upgrades/new-contracts/OptimismMintableERC20Factory.json new file mode 100644 index 000000000..ed75cfd18 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/new-contracts/OptimismMintableERC20Factory.json @@ -0,0 +1 @@ +[{"type":"constructor","inputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"BRIDGE","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"bridge","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"createOptimismMintableERC20","inputs":[{"name":"_remoteToken","type":"address","internalType":"address"},{"name":"_name","type":"string","internalType":"string"},{"name":"_symbol","type":"string","internalType":"string"}],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"createOptimismMintableERC20WithDecimals","inputs":[{"name":"_remoteToken","type":"address","internalType":"address"},{"name":"_name","type":"string","internalType":"string"},{"name":"_symbol","type":"string","internalType":"string"},{"name":"_decimals","type":"uint8","internalType":"uint8"}],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"createStandardL2Token","inputs":[{"name":"_remoteToken","type":"address","internalType":"address"},{"name":"_name","type":"string","internalType":"string"},{"name":"_symbol","type":"string","internalType":"string"}],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"initialize","inputs":[{"name":"_bridge","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"version","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"event","name":"Initialized","inputs":[{"name":"version","type":"uint8","indexed":false,"internalType":"uint8"}],"anonymous":false},{"type":"event","name":"OptimismMintableERC20Created","inputs":[{"name":"localToken","type":"address","indexed":true,"internalType":"address"},{"name":"remoteToken","type":"address","indexed":true,"internalType":"address"},{"name":"deployer","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"StandardL2TokenCreated","inputs":[{"name":"remoteToken","type":"address","indexed":true,"internalType":"address"},{"name":"localToken","type":"address","indexed":true,"internalType":"address"}],"anonymous":false}] diff --git a/op-chain-ops/opbnb-upgrades/new-contracts/OptimismPortal.json b/op-chain-ops/opbnb-upgrades/new-contracts/OptimismPortal.json new file mode 100644 index 000000000..abb5cb0fc --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/new-contracts/OptimismPortal.json @@ -0,0 +1 @@ +[{"type":"constructor","inputs":[],"stateMutability":"nonpayable"},{"type":"receive","stateMutability":"payable"},{"type":"function","name":"balance","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"depositERC20Transaction","inputs":[{"name":"_to","type":"address","internalType":"address"},{"name":"_mint","type":"uint256","internalType":"uint256"},{"name":"_value","type":"uint256","internalType":"uint256"},{"name":"_gasLimit","type":"uint64","internalType":"uint64"},{"name":"_isCreation","type":"bool","internalType":"bool"},{"name":"_data","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"depositTransaction","inputs":[{"name":"_to","type":"address","internalType":"address"},{"name":"_value","type":"uint256","internalType":"uint256"},{"name":"_gasLimit","type":"uint64","internalType":"uint64"},{"name":"_isCreation","type":"bool","internalType":"bool"},{"name":"_data","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"donateETH","inputs":[],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"finalizeWithdrawalTransaction","inputs":[{"name":"_tx","type":"tuple","internalType":"struct Types.WithdrawalTransaction","components":[{"name":"nonce","type":"uint256","internalType":"uint256"},{"name":"sender","type":"address","internalType":"address"},{"name":"target","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"},{"name":"gasLimit","type":"uint256","internalType":"uint256"},{"name":"data","type":"bytes","internalType":"bytes"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"finalizedWithdrawals","inputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"guardian","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"initialize","inputs":[{"name":"_l2Oracle","type":"address","internalType":"contract L2OutputOracle"},{"name":"_systemConfig","type":"address","internalType":"contract SystemConfig"},{"name":"_superchainConfig","type":"address","internalType":"contract SuperchainConfig"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"isOutputFinalized","inputs":[{"name":"_l2OutputIndex","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"l2Oracle","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract L2OutputOracle"}],"stateMutability":"view"},{"type":"function","name":"l2Sender","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"minimumGasLimit","inputs":[{"name":"_byteCount","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"pure"},{"type":"function","name":"params","inputs":[],"outputs":[{"name":"prevBaseFee","type":"uint128","internalType":"uint128"},{"name":"prevBoughtGas","type":"uint64","internalType":"uint64"},{"name":"prevBlockNum","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"paused","inputs":[],"outputs":[{"name":"paused_","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"proveWithdrawalTransaction","inputs":[{"name":"_tx","type":"tuple","internalType":"struct Types.WithdrawalTransaction","components":[{"name":"nonce","type":"uint256","internalType":"uint256"},{"name":"sender","type":"address","internalType":"address"},{"name":"target","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"},{"name":"gasLimit","type":"uint256","internalType":"uint256"},{"name":"data","type":"bytes","internalType":"bytes"}]},{"name":"_l2OutputIndex","type":"uint256","internalType":"uint256"},{"name":"_outputRootProof","type":"tuple","internalType":"struct Types.OutputRootProof","components":[{"name":"version","type":"bytes32","internalType":"bytes32"},{"name":"stateRoot","type":"bytes32","internalType":"bytes32"},{"name":"messagePasserStorageRoot","type":"bytes32","internalType":"bytes32"},{"name":"latestBlockhash","type":"bytes32","internalType":"bytes32"}]},{"name":"_withdrawalProof","type":"bytes[]","internalType":"bytes[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"provenWithdrawals","inputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"outputRoot","type":"bytes32","internalType":"bytes32"},{"name":"timestamp","type":"uint128","internalType":"uint128"},{"name":"l2OutputIndex","type":"uint128","internalType":"uint128"}],"stateMutability":"view"},{"type":"function","name":"setGasPayingToken","inputs":[{"name":"_token","type":"address","internalType":"address"},{"name":"_decimals","type":"uint8","internalType":"uint8"},{"name":"_name","type":"bytes32","internalType":"bytes32"},{"name":"_symbol","type":"bytes32","internalType":"bytes32"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"superchainConfig","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract SuperchainConfig"}],"stateMutability":"view"},{"type":"function","name":"systemConfig","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract SystemConfig"}],"stateMutability":"view"},{"type":"function","name":"version","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"pure"},{"type":"event","name":"Initialized","inputs":[{"name":"version","type":"uint8","indexed":false,"internalType":"uint8"}],"anonymous":false},{"type":"event","name":"TransactionDeposited","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"version","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"opaqueData","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"WithdrawalFinalized","inputs":[{"name":"withdrawalHash","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"success","type":"bool","indexed":false,"internalType":"bool"}],"anonymous":false},{"type":"event","name":"WithdrawalProven","inputs":[{"name":"withdrawalHash","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"error","name":"BadTarget","inputs":[]},{"type":"error","name":"CallPaused","inputs":[]},{"type":"error","name":"ContentLengthMismatch","inputs":[]},{"type":"error","name":"EmptyItem","inputs":[]},{"type":"error","name":"GasEstimation","inputs":[]},{"type":"error","name":"InvalidDataRemainder","inputs":[]},{"type":"error","name":"InvalidHeader","inputs":[]},{"type":"error","name":"LargeCalldata","inputs":[]},{"type":"error","name":"NoValue","inputs":[]},{"type":"error","name":"NonReentrant","inputs":[]},{"type":"error","name":"OnlyCustomGasToken","inputs":[]},{"type":"error","name":"OutOfGas","inputs":[]},{"type":"error","name":"SmallGasLimit","inputs":[]},{"type":"error","name":"TransferFailed","inputs":[]},{"type":"error","name":"Unauthorized","inputs":[]},{"type":"error","name":"UnexpectedList","inputs":[]},{"type":"error","name":"UnexpectedString","inputs":[]}] diff --git a/op-chain-ops/opbnb-upgrades/new-contracts/StorageSetter.json b/op-chain-ops/opbnb-upgrades/new-contracts/StorageSetter.json new file mode 100644 index 000000000..ce27fc756 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/new-contracts/StorageSetter.json @@ -0,0 +1 @@ +[{"type":"function","name":"getAddress","inputs":[{"name":"_slot","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"addr_","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getBool","inputs":[{"name":"_slot","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"value_","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getBytes32","inputs":[{"name":"_slot","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"value_","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"getUint","inputs":[{"name":"_slot","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"value_","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"setAddress","inputs":[{"name":"_slot","type":"bytes32","internalType":"bytes32"},{"name":"_address","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setBool","inputs":[{"name":"_slot","type":"bytes32","internalType":"bytes32"},{"name":"_value","type":"bool","internalType":"bool"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setBytes32","inputs":[{"name":"slots","type":"tuple[]","internalType":"struct StorageSetter.Slot[]","components":[{"name":"key","type":"bytes32","internalType":"bytes32"},{"name":"value","type":"bytes32","internalType":"bytes32"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setBytes32","inputs":[{"name":"_slot","type":"bytes32","internalType":"bytes32"},{"name":"_value","type":"bytes32","internalType":"bytes32"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setUint","inputs":[{"name":"_slot","type":"bytes32","internalType":"bytes32"},{"name":"_value","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"version","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"}] diff --git a/op-chain-ops/opbnb-upgrades/new-contracts/SuperChainConfig.json b/op-chain-ops/opbnb-upgrades/new-contracts/SuperChainConfig.json new file mode 100644 index 000000000..8915a154b --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/new-contracts/SuperChainConfig.json @@ -0,0 +1 @@ +[{"type":"constructor","inputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"GUARDIAN_SLOT","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"PAUSED_SLOT","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"guardian","inputs":[],"outputs":[{"name":"guardian_","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"initialize","inputs":[{"name":"_guardian","type":"address","internalType":"address"},{"name":"_paused","type":"bool","internalType":"bool"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"pause","inputs":[{"name":"_identifier","type":"string","internalType":"string"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"paused","inputs":[],"outputs":[{"name":"paused_","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"unpause","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"version","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"event","name":"ConfigUpdate","inputs":[{"name":"updateType","type":"uint8","indexed":true,"internalType":"enum SuperchainConfig.UpdateType"},{"name":"data","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"Initialized","inputs":[{"name":"version","type":"uint8","indexed":false,"internalType":"uint8"}],"anonymous":false},{"type":"event","name":"Paused","inputs":[{"name":"identifier","type":"string","indexed":false,"internalType":"string"}],"anonymous":false},{"type":"event","name":"Unpaused","inputs":[],"anonymous":false}] diff --git a/op-chain-ops/opbnb-upgrades/new-contracts/SystemConfig.json b/op-chain-ops/opbnb-upgrades/new-contracts/SystemConfig.json new file mode 100644 index 000000000..0a5267eae --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/new-contracts/SystemConfig.json @@ -0,0 +1 @@ +[{"type":"constructor","inputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"BATCH_INBOX_SLOT","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"DISPUTE_GAME_FACTORY_SLOT","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"L1_CROSS_DOMAIN_MESSENGER_SLOT","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"L1_ERC_721_BRIDGE_SLOT","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"L1_STANDARD_BRIDGE_SLOT","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"OPTIMISM_MINTABLE_ERC20_FACTORY_SLOT","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"OPTIMISM_PORTAL_SLOT","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"START_BLOCK_SLOT","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"UNSAFE_BLOCK_SIGNER_SLOT","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"VERSION","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"basefeeScalar","inputs":[],"outputs":[{"name":"","type":"uint32","internalType":"uint32"}],"stateMutability":"view"},{"type":"function","name":"batchInbox","inputs":[],"outputs":[{"name":"addr_","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"batcherHash","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"blobbasefeeScalar","inputs":[],"outputs":[{"name":"","type":"uint32","internalType":"uint32"}],"stateMutability":"view"},{"type":"function","name":"disputeGameFactory","inputs":[],"outputs":[{"name":"addr_","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"gasLimit","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"gasPayingToken","inputs":[],"outputs":[{"name":"addr_","type":"address","internalType":"address"},{"name":"decimals_","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"gasPayingTokenName","inputs":[],"outputs":[{"name":"name_","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"gasPayingTokenSymbol","inputs":[],"outputs":[{"name":"symbol_","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"initialize","inputs":[{"name":"_owner","type":"address","internalType":"address"},{"name":"_basefeeScalar","type":"uint32","internalType":"uint32"},{"name":"_blobbasefeeScalar","type":"uint32","internalType":"uint32"},{"name":"_batcherHash","type":"bytes32","internalType":"bytes32"},{"name":"_gasLimit","type":"uint64","internalType":"uint64"},{"name":"_unsafeBlockSigner","type":"address","internalType":"address"},{"name":"_config","type":"tuple","internalType":"struct ResourceMetering.ResourceConfig","components":[{"name":"maxResourceLimit","type":"uint32","internalType":"uint32"},{"name":"elasticityMultiplier","type":"uint8","internalType":"uint8"},{"name":"baseFeeMaxChangeDenominator","type":"uint8","internalType":"uint8"},{"name":"minimumBaseFee","type":"uint32","internalType":"uint32"},{"name":"systemTxMaxGas","type":"uint32","internalType":"uint32"},{"name":"maximumBaseFee","type":"uint128","internalType":"uint128"}]},{"name":"_batchInbox","type":"address","internalType":"address"},{"name":"_addresses","type":"tuple","internalType":"struct SystemConfig.Addresses","components":[{"name":"l1CrossDomainMessenger","type":"address","internalType":"address"},{"name":"l1ERC721Bridge","type":"address","internalType":"address"},{"name":"l1StandardBridge","type":"address","internalType":"address"},{"name":"disputeGameFactory","type":"address","internalType":"address"},{"name":"optimismPortal","type":"address","internalType":"address"},{"name":"optimismMintableERC20Factory","type":"address","internalType":"address"},{"name":"gasPayingToken","type":"address","internalType":"address"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"isCustomGasToken","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"l1CrossDomainMessenger","inputs":[],"outputs":[{"name":"addr_","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"l1ERC721Bridge","inputs":[],"outputs":[{"name":"addr_","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"l1StandardBridge","inputs":[],"outputs":[{"name":"addr_","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"maximumGasLimit","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"pure"},{"type":"function","name":"minimumGasLimit","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"optimismMintableERC20Factory","inputs":[],"outputs":[{"name":"addr_","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"optimismPortal","inputs":[],"outputs":[{"name":"addr_","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"overhead","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"renounceOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"resourceConfig","inputs":[],"outputs":[{"name":"","type":"tuple","internalType":"struct ResourceMetering.ResourceConfig","components":[{"name":"maxResourceLimit","type":"uint32","internalType":"uint32"},{"name":"elasticityMultiplier","type":"uint8","internalType":"uint8"},{"name":"baseFeeMaxChangeDenominator","type":"uint8","internalType":"uint8"},{"name":"minimumBaseFee","type":"uint32","internalType":"uint32"},{"name":"systemTxMaxGas","type":"uint32","internalType":"uint32"},{"name":"maximumBaseFee","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"scalar","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"setBatcherHash","inputs":[{"name":"_batcherHash","type":"bytes32","internalType":"bytes32"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setGasConfig","inputs":[{"name":"_overhead","type":"uint256","internalType":"uint256"},{"name":"_scalar","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setGasConfigEcotone","inputs":[{"name":"_basefeeScalar","type":"uint32","internalType":"uint32"},{"name":"_blobbasefeeScalar","type":"uint32","internalType":"uint32"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setGasLimit","inputs":[{"name":"_gasLimit","type":"uint64","internalType":"uint64"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setUnsafeBlockSigner","inputs":[{"name":"_unsafeBlockSigner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"startBlock","inputs":[],"outputs":[{"name":"startBlock_","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"unsafeBlockSigner","inputs":[],"outputs":[{"name":"addr_","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"version","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"pure"},{"type":"event","name":"ConfigUpdate","inputs":[{"name":"version","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"updateType","type":"uint8","indexed":true,"internalType":"enum SystemConfig.UpdateType"},{"name":"data","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"Initialized","inputs":[{"name":"version","type":"uint8","indexed":false,"internalType":"uint8"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"previousOwner","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false}] diff --git a/op-chain-ops/opbnb-upgrades/new-contracts/bindings/L1CrossDomainMessenger.go b/op-chain-ops/opbnb-upgrades/new-contracts/bindings/L1CrossDomainMessenger.go new file mode 100644 index 000000000..f13475fc0 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/new-contracts/bindings/L1CrossDomainMessenger.go @@ -0,0 +1,1610 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// L1CrossDomainMessengerMetaData contains all meta data concerning the L1CrossDomainMessenger contract. +var L1CrossDomainMessengerMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"MESSAGE_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MIN_GAS_CALLDATA_OVERHEAD\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"OTHER_MESSENGER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractCrossDomainMessenger\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PORTAL\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractOptimismPortal\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"RELAY_CALL_OVERHEAD\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"RELAY_CONSTANT_OVERHEAD\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"RELAY_GAS_CHECK_BUFFER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"RELAY_RESERVED_GAS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"baseGas\",\"inputs\":[{\"name\":\"_message\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"_minGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"failedMessages\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_superchainConfig\",\"type\":\"address\",\"internalType\":\"contractSuperchainConfig\"},{\"name\":\"_portal\",\"type\":\"address\",\"internalType\":\"contractOptimismPortal\"},{\"name\":\"_systemConfig\",\"type\":\"address\",\"internalType\":\"contractSystemConfig\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"messageNonce\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"otherMessenger\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractCrossDomainMessenger\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"portal\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractOptimismPortal\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"relayMessage\",\"inputs\":[{\"name\":\"_nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_target\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minGasLimit\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_message\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"sendMessage\",\"inputs\":[{\"name\":\"_target\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_message\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"_minGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"successfulMessages\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"superchainConfig\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractSuperchainConfig\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"systemConfig\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractSystemConfig\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"xDomainMessageSender\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"FailedRelayedMessage\",\"inputs\":[{\"name\":\"msgHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RelayedMessage\",\"inputs\":[{\"name\":\"msgHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SentMessage\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"sender\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"message\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"messageNonce\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"gasLimit\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SentMessageExtension1\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false}]", +} + +// L1CrossDomainMessengerABI is the input ABI used to generate the binding from. +// Deprecated: Use L1CrossDomainMessengerMetaData.ABI instead. +var L1CrossDomainMessengerABI = L1CrossDomainMessengerMetaData.ABI + +// L1CrossDomainMessenger is an auto generated Go binding around an Ethereum contract. +type L1CrossDomainMessenger struct { + L1CrossDomainMessengerCaller // Read-only binding to the contract + L1CrossDomainMessengerTransactor // Write-only binding to the contract + L1CrossDomainMessengerFilterer // Log filterer for contract events +} + +// L1CrossDomainMessengerCaller is an auto generated read-only Go binding around an Ethereum contract. +type L1CrossDomainMessengerCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L1CrossDomainMessengerTransactor is an auto generated write-only Go binding around an Ethereum contract. +type L1CrossDomainMessengerTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L1CrossDomainMessengerFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type L1CrossDomainMessengerFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L1CrossDomainMessengerSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type L1CrossDomainMessengerSession struct { + Contract *L1CrossDomainMessenger // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// L1CrossDomainMessengerCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type L1CrossDomainMessengerCallerSession struct { + Contract *L1CrossDomainMessengerCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// L1CrossDomainMessengerTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type L1CrossDomainMessengerTransactorSession struct { + Contract *L1CrossDomainMessengerTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// L1CrossDomainMessengerRaw is an auto generated low-level Go binding around an Ethereum contract. +type L1CrossDomainMessengerRaw struct { + Contract *L1CrossDomainMessenger // Generic contract binding to access the raw methods on +} + +// L1CrossDomainMessengerCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type L1CrossDomainMessengerCallerRaw struct { + Contract *L1CrossDomainMessengerCaller // Generic read-only contract binding to access the raw methods on +} + +// L1CrossDomainMessengerTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type L1CrossDomainMessengerTransactorRaw struct { + Contract *L1CrossDomainMessengerTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewL1CrossDomainMessenger creates a new instance of L1CrossDomainMessenger, bound to a specific deployed contract. +func NewL1CrossDomainMessenger(address common.Address, backend bind.ContractBackend) (*L1CrossDomainMessenger, error) { + contract, err := bindL1CrossDomainMessenger(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &L1CrossDomainMessenger{L1CrossDomainMessengerCaller: L1CrossDomainMessengerCaller{contract: contract}, L1CrossDomainMessengerTransactor: L1CrossDomainMessengerTransactor{contract: contract}, L1CrossDomainMessengerFilterer: L1CrossDomainMessengerFilterer{contract: contract}}, nil +} + +// NewL1CrossDomainMessengerCaller creates a new read-only instance of L1CrossDomainMessenger, bound to a specific deployed contract. +func NewL1CrossDomainMessengerCaller(address common.Address, caller bind.ContractCaller) (*L1CrossDomainMessengerCaller, error) { + contract, err := bindL1CrossDomainMessenger(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &L1CrossDomainMessengerCaller{contract: contract}, nil +} + +// NewL1CrossDomainMessengerTransactor creates a new write-only instance of L1CrossDomainMessenger, bound to a specific deployed contract. +func NewL1CrossDomainMessengerTransactor(address common.Address, transactor bind.ContractTransactor) (*L1CrossDomainMessengerTransactor, error) { + contract, err := bindL1CrossDomainMessenger(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &L1CrossDomainMessengerTransactor{contract: contract}, nil +} + +// NewL1CrossDomainMessengerFilterer creates a new log filterer instance of L1CrossDomainMessenger, bound to a specific deployed contract. +func NewL1CrossDomainMessengerFilterer(address common.Address, filterer bind.ContractFilterer) (*L1CrossDomainMessengerFilterer, error) { + contract, err := bindL1CrossDomainMessenger(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &L1CrossDomainMessengerFilterer{contract: contract}, nil +} + +// bindL1CrossDomainMessenger binds a generic wrapper to an already deployed contract. +func bindL1CrossDomainMessenger(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := L1CrossDomainMessengerMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_L1CrossDomainMessenger *L1CrossDomainMessengerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _L1CrossDomainMessenger.Contract.L1CrossDomainMessengerCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_L1CrossDomainMessenger *L1CrossDomainMessengerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _L1CrossDomainMessenger.Contract.L1CrossDomainMessengerTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_L1CrossDomainMessenger *L1CrossDomainMessengerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _L1CrossDomainMessenger.Contract.L1CrossDomainMessengerTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _L1CrossDomainMessenger.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_L1CrossDomainMessenger *L1CrossDomainMessengerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _L1CrossDomainMessenger.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_L1CrossDomainMessenger *L1CrossDomainMessengerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _L1CrossDomainMessenger.Contract.contract.Transact(opts, method, params...) +} + +// MESSAGEVERSION is a free data retrieval call binding the contract method 0x3f827a5a. +// +// Solidity: function MESSAGE_VERSION() view returns(uint16) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MESSAGEVERSION(opts *bind.CallOpts) (uint16, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "MESSAGE_VERSION") + + if err != nil { + return *new(uint16), err + } + + out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16) + + return out0, err + +} + +// MESSAGEVERSION is a free data retrieval call binding the contract method 0x3f827a5a. +// +// Solidity: function MESSAGE_VERSION() view returns(uint16) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) MESSAGEVERSION() (uint16, error) { + return _L1CrossDomainMessenger.Contract.MESSAGEVERSION(&_L1CrossDomainMessenger.CallOpts) +} + +// MESSAGEVERSION is a free data retrieval call binding the contract method 0x3f827a5a. +// +// Solidity: function MESSAGE_VERSION() view returns(uint16) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) MESSAGEVERSION() (uint16, error) { + return _L1CrossDomainMessenger.Contract.MESSAGEVERSION(&_L1CrossDomainMessenger.CallOpts) +} + +// MINGASCALLDATAOVERHEAD is a free data retrieval call binding the contract method 0x028f85f7. +// +// Solidity: function MIN_GAS_CALLDATA_OVERHEAD() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MINGASCALLDATAOVERHEAD(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "MIN_GAS_CALLDATA_OVERHEAD") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// MINGASCALLDATAOVERHEAD is a free data retrieval call binding the contract method 0x028f85f7. +// +// Solidity: function MIN_GAS_CALLDATA_OVERHEAD() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) MINGASCALLDATAOVERHEAD() (uint64, error) { + return _L1CrossDomainMessenger.Contract.MINGASCALLDATAOVERHEAD(&_L1CrossDomainMessenger.CallOpts) +} + +// MINGASCALLDATAOVERHEAD is a free data retrieval call binding the contract method 0x028f85f7. +// +// Solidity: function MIN_GAS_CALLDATA_OVERHEAD() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) MINGASCALLDATAOVERHEAD() (uint64, error) { + return _L1CrossDomainMessenger.Contract.MINGASCALLDATAOVERHEAD(&_L1CrossDomainMessenger.CallOpts) +} + +// MINGASDYNAMICOVERHEADDENOMINATOR is a free data retrieval call binding the contract method 0x0c568498. +// +// Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MINGASDYNAMICOVERHEADDENOMINATOR(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// MINGASDYNAMICOVERHEADDENOMINATOR is a free data retrieval call binding the contract method 0x0c568498. +// +// Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) MINGASDYNAMICOVERHEADDENOMINATOR() (uint64, error) { + return _L1CrossDomainMessenger.Contract.MINGASDYNAMICOVERHEADDENOMINATOR(&_L1CrossDomainMessenger.CallOpts) +} + +// MINGASDYNAMICOVERHEADDENOMINATOR is a free data retrieval call binding the contract method 0x0c568498. +// +// Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) MINGASDYNAMICOVERHEADDENOMINATOR() (uint64, error) { + return _L1CrossDomainMessenger.Contract.MINGASDYNAMICOVERHEADDENOMINATOR(&_L1CrossDomainMessenger.CallOpts) +} + +// MINGASDYNAMICOVERHEADNUMERATOR is a free data retrieval call binding the contract method 0x2828d7e8. +// +// Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MINGASDYNAMICOVERHEADNUMERATOR(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// MINGASDYNAMICOVERHEADNUMERATOR is a free data retrieval call binding the contract method 0x2828d7e8. +// +// Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) MINGASDYNAMICOVERHEADNUMERATOR() (uint64, error) { + return _L1CrossDomainMessenger.Contract.MINGASDYNAMICOVERHEADNUMERATOR(&_L1CrossDomainMessenger.CallOpts) +} + +// MINGASDYNAMICOVERHEADNUMERATOR is a free data retrieval call binding the contract method 0x2828d7e8. +// +// Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) MINGASDYNAMICOVERHEADNUMERATOR() (uint64, error) { + return _L1CrossDomainMessenger.Contract.MINGASDYNAMICOVERHEADNUMERATOR(&_L1CrossDomainMessenger.CallOpts) +} + +// OTHERMESSENGER is a free data retrieval call binding the contract method 0x9fce812c. +// +// Solidity: function OTHER_MESSENGER() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) OTHERMESSENGER(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "OTHER_MESSENGER") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// OTHERMESSENGER is a free data retrieval call binding the contract method 0x9fce812c. +// +// Solidity: function OTHER_MESSENGER() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) OTHERMESSENGER() (common.Address, error) { + return _L1CrossDomainMessenger.Contract.OTHERMESSENGER(&_L1CrossDomainMessenger.CallOpts) +} + +// OTHERMESSENGER is a free data retrieval call binding the contract method 0x9fce812c. +// +// Solidity: function OTHER_MESSENGER() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) OTHERMESSENGER() (common.Address, error) { + return _L1CrossDomainMessenger.Contract.OTHERMESSENGER(&_L1CrossDomainMessenger.CallOpts) +} + +// PORTAL is a free data retrieval call binding the contract method 0x0ff754ea. +// +// Solidity: function PORTAL() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) PORTAL(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "PORTAL") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// PORTAL is a free data retrieval call binding the contract method 0x0ff754ea. +// +// Solidity: function PORTAL() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) PORTAL() (common.Address, error) { + return _L1CrossDomainMessenger.Contract.PORTAL(&_L1CrossDomainMessenger.CallOpts) +} + +// PORTAL is a free data retrieval call binding the contract method 0x0ff754ea. +// +// Solidity: function PORTAL() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) PORTAL() (common.Address, error) { + return _L1CrossDomainMessenger.Contract.PORTAL(&_L1CrossDomainMessenger.CallOpts) +} + +// RELAYCALLOVERHEAD is a free data retrieval call binding the contract method 0x4c1d6a69. +// +// Solidity: function RELAY_CALL_OVERHEAD() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) RELAYCALLOVERHEAD(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "RELAY_CALL_OVERHEAD") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// RELAYCALLOVERHEAD is a free data retrieval call binding the contract method 0x4c1d6a69. +// +// Solidity: function RELAY_CALL_OVERHEAD() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) RELAYCALLOVERHEAD() (uint64, error) { + return _L1CrossDomainMessenger.Contract.RELAYCALLOVERHEAD(&_L1CrossDomainMessenger.CallOpts) +} + +// RELAYCALLOVERHEAD is a free data retrieval call binding the contract method 0x4c1d6a69. +// +// Solidity: function RELAY_CALL_OVERHEAD() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) RELAYCALLOVERHEAD() (uint64, error) { + return _L1CrossDomainMessenger.Contract.RELAYCALLOVERHEAD(&_L1CrossDomainMessenger.CallOpts) +} + +// RELAYCONSTANTOVERHEAD is a free data retrieval call binding the contract method 0x83a74074. +// +// Solidity: function RELAY_CONSTANT_OVERHEAD() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) RELAYCONSTANTOVERHEAD(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "RELAY_CONSTANT_OVERHEAD") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// RELAYCONSTANTOVERHEAD is a free data retrieval call binding the contract method 0x83a74074. +// +// Solidity: function RELAY_CONSTANT_OVERHEAD() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) RELAYCONSTANTOVERHEAD() (uint64, error) { + return _L1CrossDomainMessenger.Contract.RELAYCONSTANTOVERHEAD(&_L1CrossDomainMessenger.CallOpts) +} + +// RELAYCONSTANTOVERHEAD is a free data retrieval call binding the contract method 0x83a74074. +// +// Solidity: function RELAY_CONSTANT_OVERHEAD() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) RELAYCONSTANTOVERHEAD() (uint64, error) { + return _L1CrossDomainMessenger.Contract.RELAYCONSTANTOVERHEAD(&_L1CrossDomainMessenger.CallOpts) +} + +// RELAYGASCHECKBUFFER is a free data retrieval call binding the contract method 0x5644cfdf. +// +// Solidity: function RELAY_GAS_CHECK_BUFFER() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) RELAYGASCHECKBUFFER(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "RELAY_GAS_CHECK_BUFFER") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// RELAYGASCHECKBUFFER is a free data retrieval call binding the contract method 0x5644cfdf. +// +// Solidity: function RELAY_GAS_CHECK_BUFFER() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) RELAYGASCHECKBUFFER() (uint64, error) { + return _L1CrossDomainMessenger.Contract.RELAYGASCHECKBUFFER(&_L1CrossDomainMessenger.CallOpts) +} + +// RELAYGASCHECKBUFFER is a free data retrieval call binding the contract method 0x5644cfdf. +// +// Solidity: function RELAY_GAS_CHECK_BUFFER() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) RELAYGASCHECKBUFFER() (uint64, error) { + return _L1CrossDomainMessenger.Contract.RELAYGASCHECKBUFFER(&_L1CrossDomainMessenger.CallOpts) +} + +// RELAYRESERVEDGAS is a free data retrieval call binding the contract method 0x8cbeeef2. +// +// Solidity: function RELAY_RESERVED_GAS() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) RELAYRESERVEDGAS(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "RELAY_RESERVED_GAS") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// RELAYRESERVEDGAS is a free data retrieval call binding the contract method 0x8cbeeef2. +// +// Solidity: function RELAY_RESERVED_GAS() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) RELAYRESERVEDGAS() (uint64, error) { + return _L1CrossDomainMessenger.Contract.RELAYRESERVEDGAS(&_L1CrossDomainMessenger.CallOpts) +} + +// RELAYRESERVEDGAS is a free data retrieval call binding the contract method 0x8cbeeef2. +// +// Solidity: function RELAY_RESERVED_GAS() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) RELAYRESERVEDGAS() (uint64, error) { + return _L1CrossDomainMessenger.Contract.RELAYRESERVEDGAS(&_L1CrossDomainMessenger.CallOpts) +} + +// BaseGas is a free data retrieval call binding the contract method 0xb28ade25. +// +// Solidity: function baseGas(bytes _message, uint32 _minGasLimit) pure returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) BaseGas(opts *bind.CallOpts, _message []byte, _minGasLimit uint32) (uint64, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "baseGas", _message, _minGasLimit) + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// BaseGas is a free data retrieval call binding the contract method 0xb28ade25. +// +// Solidity: function baseGas(bytes _message, uint32 _minGasLimit) pure returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) BaseGas(_message []byte, _minGasLimit uint32) (uint64, error) { + return _L1CrossDomainMessenger.Contract.BaseGas(&_L1CrossDomainMessenger.CallOpts, _message, _minGasLimit) +} + +// BaseGas is a free data retrieval call binding the contract method 0xb28ade25. +// +// Solidity: function baseGas(bytes _message, uint32 _minGasLimit) pure returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) BaseGas(_message []byte, _minGasLimit uint32) (uint64, error) { + return _L1CrossDomainMessenger.Contract.BaseGas(&_L1CrossDomainMessenger.CallOpts, _message, _minGasLimit) +} + +// FailedMessages is a free data retrieval call binding the contract method 0xa4e7f8bd. +// +// Solidity: function failedMessages(bytes32 ) view returns(bool) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) FailedMessages(opts *bind.CallOpts, arg0 [32]byte) (bool, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "failedMessages", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// FailedMessages is a free data retrieval call binding the contract method 0xa4e7f8bd. +// +// Solidity: function failedMessages(bytes32 ) view returns(bool) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) FailedMessages(arg0 [32]byte) (bool, error) { + return _L1CrossDomainMessenger.Contract.FailedMessages(&_L1CrossDomainMessenger.CallOpts, arg0) +} + +// FailedMessages is a free data retrieval call binding the contract method 0xa4e7f8bd. +// +// Solidity: function failedMessages(bytes32 ) view returns(bool) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) FailedMessages(arg0 [32]byte) (bool, error) { + return _L1CrossDomainMessenger.Contract.FailedMessages(&_L1CrossDomainMessenger.CallOpts, arg0) +} + +// MessageNonce is a free data retrieval call binding the contract method 0xecc70428. +// +// Solidity: function messageNonce() view returns(uint256) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MessageNonce(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "messageNonce") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MessageNonce is a free data retrieval call binding the contract method 0xecc70428. +// +// Solidity: function messageNonce() view returns(uint256) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) MessageNonce() (*big.Int, error) { + return _L1CrossDomainMessenger.Contract.MessageNonce(&_L1CrossDomainMessenger.CallOpts) +} + +// MessageNonce is a free data retrieval call binding the contract method 0xecc70428. +// +// Solidity: function messageNonce() view returns(uint256) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) MessageNonce() (*big.Int, error) { + return _L1CrossDomainMessenger.Contract.MessageNonce(&_L1CrossDomainMessenger.CallOpts) +} + +// OtherMessenger is a free data retrieval call binding the contract method 0xdb505d80. +// +// Solidity: function otherMessenger() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) OtherMessenger(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "otherMessenger") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// OtherMessenger is a free data retrieval call binding the contract method 0xdb505d80. +// +// Solidity: function otherMessenger() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) OtherMessenger() (common.Address, error) { + return _L1CrossDomainMessenger.Contract.OtherMessenger(&_L1CrossDomainMessenger.CallOpts) +} + +// OtherMessenger is a free data retrieval call binding the contract method 0xdb505d80. +// +// Solidity: function otherMessenger() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) OtherMessenger() (common.Address, error) { + return _L1CrossDomainMessenger.Contract.OtherMessenger(&_L1CrossDomainMessenger.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) Paused(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) Paused() (bool, error) { + return _L1CrossDomainMessenger.Contract.Paused(&_L1CrossDomainMessenger.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) Paused() (bool, error) { + return _L1CrossDomainMessenger.Contract.Paused(&_L1CrossDomainMessenger.CallOpts) +} + +// Portal is a free data retrieval call binding the contract method 0x6425666b. +// +// Solidity: function portal() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) Portal(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "portal") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Portal is a free data retrieval call binding the contract method 0x6425666b. +// +// Solidity: function portal() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) Portal() (common.Address, error) { + return _L1CrossDomainMessenger.Contract.Portal(&_L1CrossDomainMessenger.CallOpts) +} + +// Portal is a free data retrieval call binding the contract method 0x6425666b. +// +// Solidity: function portal() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) Portal() (common.Address, error) { + return _L1CrossDomainMessenger.Contract.Portal(&_L1CrossDomainMessenger.CallOpts) +} + +// SuccessfulMessages is a free data retrieval call binding the contract method 0xb1b1b209. +// +// Solidity: function successfulMessages(bytes32 ) view returns(bool) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) SuccessfulMessages(opts *bind.CallOpts, arg0 [32]byte) (bool, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "successfulMessages", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// SuccessfulMessages is a free data retrieval call binding the contract method 0xb1b1b209. +// +// Solidity: function successfulMessages(bytes32 ) view returns(bool) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) SuccessfulMessages(arg0 [32]byte) (bool, error) { + return _L1CrossDomainMessenger.Contract.SuccessfulMessages(&_L1CrossDomainMessenger.CallOpts, arg0) +} + +// SuccessfulMessages is a free data retrieval call binding the contract method 0xb1b1b209. +// +// Solidity: function successfulMessages(bytes32 ) view returns(bool) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) SuccessfulMessages(arg0 [32]byte) (bool, error) { + return _L1CrossDomainMessenger.Contract.SuccessfulMessages(&_L1CrossDomainMessenger.CallOpts, arg0) +} + +// SuperchainConfig is a free data retrieval call binding the contract method 0x35e80ab3. +// +// Solidity: function superchainConfig() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) SuperchainConfig(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "superchainConfig") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// SuperchainConfig is a free data retrieval call binding the contract method 0x35e80ab3. +// +// Solidity: function superchainConfig() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) SuperchainConfig() (common.Address, error) { + return _L1CrossDomainMessenger.Contract.SuperchainConfig(&_L1CrossDomainMessenger.CallOpts) +} + +// SuperchainConfig is a free data retrieval call binding the contract method 0x35e80ab3. +// +// Solidity: function superchainConfig() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) SuperchainConfig() (common.Address, error) { + return _L1CrossDomainMessenger.Contract.SuperchainConfig(&_L1CrossDomainMessenger.CallOpts) +} + +// SystemConfig is a free data retrieval call binding the contract method 0x33d7e2bd. +// +// Solidity: function systemConfig() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) SystemConfig(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "systemConfig") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// SystemConfig is a free data retrieval call binding the contract method 0x33d7e2bd. +// +// Solidity: function systemConfig() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) SystemConfig() (common.Address, error) { + return _L1CrossDomainMessenger.Contract.SystemConfig(&_L1CrossDomainMessenger.CallOpts) +} + +// SystemConfig is a free data retrieval call binding the contract method 0x33d7e2bd. +// +// Solidity: function systemConfig() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) SystemConfig() (common.Address, error) { + return _L1CrossDomainMessenger.Contract.SystemConfig(&_L1CrossDomainMessenger.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) Version(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "version") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) Version() (string, error) { + return _L1CrossDomainMessenger.Contract.Version(&_L1CrossDomainMessenger.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) Version() (string, error) { + return _L1CrossDomainMessenger.Contract.Version(&_L1CrossDomainMessenger.CallOpts) +} + +// XDomainMessageSender is a free data retrieval call binding the contract method 0x6e296e45. +// +// Solidity: function xDomainMessageSender() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) XDomainMessageSender(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "xDomainMessageSender") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// XDomainMessageSender is a free data retrieval call binding the contract method 0x6e296e45. +// +// Solidity: function xDomainMessageSender() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) XDomainMessageSender() (common.Address, error) { + return _L1CrossDomainMessenger.Contract.XDomainMessageSender(&_L1CrossDomainMessenger.CallOpts) +} + +// XDomainMessageSender is a free data retrieval call binding the contract method 0x6e296e45. +// +// Solidity: function xDomainMessageSender() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) XDomainMessageSender() (common.Address, error) { + return _L1CrossDomainMessenger.Contract.XDomainMessageSender(&_L1CrossDomainMessenger.CallOpts) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc0c53b8b. +// +// Solidity: function initialize(address _superchainConfig, address _portal, address _systemConfig) returns() +func (_L1CrossDomainMessenger *L1CrossDomainMessengerTransactor) Initialize(opts *bind.TransactOpts, _superchainConfig common.Address, _portal common.Address, _systemConfig common.Address) (*types.Transaction, error) { + return _L1CrossDomainMessenger.contract.Transact(opts, "initialize", _superchainConfig, _portal, _systemConfig) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc0c53b8b. +// +// Solidity: function initialize(address _superchainConfig, address _portal, address _systemConfig) returns() +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) Initialize(_superchainConfig common.Address, _portal common.Address, _systemConfig common.Address) (*types.Transaction, error) { + return _L1CrossDomainMessenger.Contract.Initialize(&_L1CrossDomainMessenger.TransactOpts, _superchainConfig, _portal, _systemConfig) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc0c53b8b. +// +// Solidity: function initialize(address _superchainConfig, address _portal, address _systemConfig) returns() +func (_L1CrossDomainMessenger *L1CrossDomainMessengerTransactorSession) Initialize(_superchainConfig common.Address, _portal common.Address, _systemConfig common.Address) (*types.Transaction, error) { + return _L1CrossDomainMessenger.Contract.Initialize(&_L1CrossDomainMessenger.TransactOpts, _superchainConfig, _portal, _systemConfig) +} + +// RelayMessage is a paid mutator transaction binding the contract method 0xd764ad0b. +// +// Solidity: function relayMessage(uint256 _nonce, address _sender, address _target, uint256 _value, uint256 _minGasLimit, bytes _message) payable returns() +func (_L1CrossDomainMessenger *L1CrossDomainMessengerTransactor) RelayMessage(opts *bind.TransactOpts, _nonce *big.Int, _sender common.Address, _target common.Address, _value *big.Int, _minGasLimit *big.Int, _message []byte) (*types.Transaction, error) { + return _L1CrossDomainMessenger.contract.Transact(opts, "relayMessage", _nonce, _sender, _target, _value, _minGasLimit, _message) +} + +// RelayMessage is a paid mutator transaction binding the contract method 0xd764ad0b. +// +// Solidity: function relayMessage(uint256 _nonce, address _sender, address _target, uint256 _value, uint256 _minGasLimit, bytes _message) payable returns() +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) RelayMessage(_nonce *big.Int, _sender common.Address, _target common.Address, _value *big.Int, _minGasLimit *big.Int, _message []byte) (*types.Transaction, error) { + return _L1CrossDomainMessenger.Contract.RelayMessage(&_L1CrossDomainMessenger.TransactOpts, _nonce, _sender, _target, _value, _minGasLimit, _message) +} + +// RelayMessage is a paid mutator transaction binding the contract method 0xd764ad0b. +// +// Solidity: function relayMessage(uint256 _nonce, address _sender, address _target, uint256 _value, uint256 _minGasLimit, bytes _message) payable returns() +func (_L1CrossDomainMessenger *L1CrossDomainMessengerTransactorSession) RelayMessage(_nonce *big.Int, _sender common.Address, _target common.Address, _value *big.Int, _minGasLimit *big.Int, _message []byte) (*types.Transaction, error) { + return _L1CrossDomainMessenger.Contract.RelayMessage(&_L1CrossDomainMessenger.TransactOpts, _nonce, _sender, _target, _value, _minGasLimit, _message) +} + +// SendMessage is a paid mutator transaction binding the contract method 0x3dbb202b. +// +// Solidity: function sendMessage(address _target, bytes _message, uint32 _minGasLimit) payable returns() +func (_L1CrossDomainMessenger *L1CrossDomainMessengerTransactor) SendMessage(opts *bind.TransactOpts, _target common.Address, _message []byte, _minGasLimit uint32) (*types.Transaction, error) { + return _L1CrossDomainMessenger.contract.Transact(opts, "sendMessage", _target, _message, _minGasLimit) +} + +// SendMessage is a paid mutator transaction binding the contract method 0x3dbb202b. +// +// Solidity: function sendMessage(address _target, bytes _message, uint32 _minGasLimit) payable returns() +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) SendMessage(_target common.Address, _message []byte, _minGasLimit uint32) (*types.Transaction, error) { + return _L1CrossDomainMessenger.Contract.SendMessage(&_L1CrossDomainMessenger.TransactOpts, _target, _message, _minGasLimit) +} + +// SendMessage is a paid mutator transaction binding the contract method 0x3dbb202b. +// +// Solidity: function sendMessage(address _target, bytes _message, uint32 _minGasLimit) payable returns() +func (_L1CrossDomainMessenger *L1CrossDomainMessengerTransactorSession) SendMessage(_target common.Address, _message []byte, _minGasLimit uint32) (*types.Transaction, error) { + return _L1CrossDomainMessenger.Contract.SendMessage(&_L1CrossDomainMessenger.TransactOpts, _target, _message, _minGasLimit) +} + +// L1CrossDomainMessengerFailedRelayedMessageIterator is returned from FilterFailedRelayedMessage and is used to iterate over the raw logs and unpacked data for FailedRelayedMessage events raised by the L1CrossDomainMessenger contract. +type L1CrossDomainMessengerFailedRelayedMessageIterator struct { + Event *L1CrossDomainMessengerFailedRelayedMessage // 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 *L1CrossDomainMessengerFailedRelayedMessageIterator) 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(L1CrossDomainMessengerFailedRelayedMessage) + 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(L1CrossDomainMessengerFailedRelayedMessage) + 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 *L1CrossDomainMessengerFailedRelayedMessageIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1CrossDomainMessengerFailedRelayedMessageIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1CrossDomainMessengerFailedRelayedMessage represents a FailedRelayedMessage event raised by the L1CrossDomainMessenger contract. +type L1CrossDomainMessengerFailedRelayedMessage struct { + MsgHash [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFailedRelayedMessage is a free log retrieval operation binding the contract event 0x99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f. +// +// Solidity: event FailedRelayedMessage(bytes32 indexed msgHash) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) FilterFailedRelayedMessage(opts *bind.FilterOpts, msgHash [][32]byte) (*L1CrossDomainMessengerFailedRelayedMessageIterator, error) { + + var msgHashRule []interface{} + for _, msgHashItem := range msgHash { + msgHashRule = append(msgHashRule, msgHashItem) + } + + logs, sub, err := _L1CrossDomainMessenger.contract.FilterLogs(opts, "FailedRelayedMessage", msgHashRule) + if err != nil { + return nil, err + } + return &L1CrossDomainMessengerFailedRelayedMessageIterator{contract: _L1CrossDomainMessenger.contract, event: "FailedRelayedMessage", logs: logs, sub: sub}, nil +} + +// WatchFailedRelayedMessage is a free log subscription operation binding the contract event 0x99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f. +// +// Solidity: event FailedRelayedMessage(bytes32 indexed msgHash) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) WatchFailedRelayedMessage(opts *bind.WatchOpts, sink chan<- *L1CrossDomainMessengerFailedRelayedMessage, msgHash [][32]byte) (event.Subscription, error) { + + var msgHashRule []interface{} + for _, msgHashItem := range msgHash { + msgHashRule = append(msgHashRule, msgHashItem) + } + + logs, sub, err := _L1CrossDomainMessenger.contract.WatchLogs(opts, "FailedRelayedMessage", msgHashRule) + 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(L1CrossDomainMessengerFailedRelayedMessage) + if err := _L1CrossDomainMessenger.contract.UnpackLog(event, "FailedRelayedMessage", 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 +} + +// ParseFailedRelayedMessage is a log parse operation binding the contract event 0x99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f. +// +// Solidity: event FailedRelayedMessage(bytes32 indexed msgHash) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) ParseFailedRelayedMessage(log types.Log) (*L1CrossDomainMessengerFailedRelayedMessage, error) { + event := new(L1CrossDomainMessengerFailedRelayedMessage) + if err := _L1CrossDomainMessenger.contract.UnpackLog(event, "FailedRelayedMessage", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1CrossDomainMessengerInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the L1CrossDomainMessenger contract. +type L1CrossDomainMessengerInitializedIterator struct { + Event *L1CrossDomainMessengerInitialized // 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 *L1CrossDomainMessengerInitializedIterator) 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(L1CrossDomainMessengerInitialized) + 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(L1CrossDomainMessengerInitialized) + 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 *L1CrossDomainMessengerInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1CrossDomainMessengerInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1CrossDomainMessengerInitialized represents a Initialized event raised by the L1CrossDomainMessenger contract. +type L1CrossDomainMessengerInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) FilterInitialized(opts *bind.FilterOpts) (*L1CrossDomainMessengerInitializedIterator, error) { + + logs, sub, err := _L1CrossDomainMessenger.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &L1CrossDomainMessengerInitializedIterator{contract: _L1CrossDomainMessenger.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *L1CrossDomainMessengerInitialized) (event.Subscription, error) { + + logs, sub, err := _L1CrossDomainMessenger.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(L1CrossDomainMessengerInitialized) + if err := _L1CrossDomainMessenger.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) ParseInitialized(log types.Log) (*L1CrossDomainMessengerInitialized, error) { + event := new(L1CrossDomainMessengerInitialized) + if err := _L1CrossDomainMessenger.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1CrossDomainMessengerRelayedMessageIterator is returned from FilterRelayedMessage and is used to iterate over the raw logs and unpacked data for RelayedMessage events raised by the L1CrossDomainMessenger contract. +type L1CrossDomainMessengerRelayedMessageIterator struct { + Event *L1CrossDomainMessengerRelayedMessage // 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 *L1CrossDomainMessengerRelayedMessageIterator) 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(L1CrossDomainMessengerRelayedMessage) + 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(L1CrossDomainMessengerRelayedMessage) + 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 *L1CrossDomainMessengerRelayedMessageIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1CrossDomainMessengerRelayedMessageIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1CrossDomainMessengerRelayedMessage represents a RelayedMessage event raised by the L1CrossDomainMessenger contract. +type L1CrossDomainMessengerRelayedMessage struct { + MsgHash [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRelayedMessage is a free log retrieval operation binding the contract event 0x4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c. +// +// Solidity: event RelayedMessage(bytes32 indexed msgHash) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) FilterRelayedMessage(opts *bind.FilterOpts, msgHash [][32]byte) (*L1CrossDomainMessengerRelayedMessageIterator, error) { + + var msgHashRule []interface{} + for _, msgHashItem := range msgHash { + msgHashRule = append(msgHashRule, msgHashItem) + } + + logs, sub, err := _L1CrossDomainMessenger.contract.FilterLogs(opts, "RelayedMessage", msgHashRule) + if err != nil { + return nil, err + } + return &L1CrossDomainMessengerRelayedMessageIterator{contract: _L1CrossDomainMessenger.contract, event: "RelayedMessage", logs: logs, sub: sub}, nil +} + +// WatchRelayedMessage is a free log subscription operation binding the contract event 0x4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c. +// +// Solidity: event RelayedMessage(bytes32 indexed msgHash) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) WatchRelayedMessage(opts *bind.WatchOpts, sink chan<- *L1CrossDomainMessengerRelayedMessage, msgHash [][32]byte) (event.Subscription, error) { + + var msgHashRule []interface{} + for _, msgHashItem := range msgHash { + msgHashRule = append(msgHashRule, msgHashItem) + } + + logs, sub, err := _L1CrossDomainMessenger.contract.WatchLogs(opts, "RelayedMessage", msgHashRule) + 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(L1CrossDomainMessengerRelayedMessage) + if err := _L1CrossDomainMessenger.contract.UnpackLog(event, "RelayedMessage", 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 +} + +// ParseRelayedMessage is a log parse operation binding the contract event 0x4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c. +// +// Solidity: event RelayedMessage(bytes32 indexed msgHash) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) ParseRelayedMessage(log types.Log) (*L1CrossDomainMessengerRelayedMessage, error) { + event := new(L1CrossDomainMessengerRelayedMessage) + if err := _L1CrossDomainMessenger.contract.UnpackLog(event, "RelayedMessage", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1CrossDomainMessengerSentMessageIterator is returned from FilterSentMessage and is used to iterate over the raw logs and unpacked data for SentMessage events raised by the L1CrossDomainMessenger contract. +type L1CrossDomainMessengerSentMessageIterator struct { + Event *L1CrossDomainMessengerSentMessage // 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 *L1CrossDomainMessengerSentMessageIterator) 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(L1CrossDomainMessengerSentMessage) + 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(L1CrossDomainMessengerSentMessage) + 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 *L1CrossDomainMessengerSentMessageIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1CrossDomainMessengerSentMessageIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1CrossDomainMessengerSentMessage represents a SentMessage event raised by the L1CrossDomainMessenger contract. +type L1CrossDomainMessengerSentMessage struct { + Target common.Address + Sender common.Address + Message []byte + MessageNonce *big.Int + GasLimit *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSentMessage is a free log retrieval operation binding the contract event 0xcb0f7ffd78f9aee47a248fae8db181db6eee833039123e026dcbff529522e52a. +// +// Solidity: event SentMessage(address indexed target, address sender, bytes message, uint256 messageNonce, uint256 gasLimit) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) FilterSentMessage(opts *bind.FilterOpts, target []common.Address) (*L1CrossDomainMessengerSentMessageIterator, error) { + + var targetRule []interface{} + for _, targetItem := range target { + targetRule = append(targetRule, targetItem) + } + + logs, sub, err := _L1CrossDomainMessenger.contract.FilterLogs(opts, "SentMessage", targetRule) + if err != nil { + return nil, err + } + return &L1CrossDomainMessengerSentMessageIterator{contract: _L1CrossDomainMessenger.contract, event: "SentMessage", logs: logs, sub: sub}, nil +} + +// WatchSentMessage is a free log subscription operation binding the contract event 0xcb0f7ffd78f9aee47a248fae8db181db6eee833039123e026dcbff529522e52a. +// +// Solidity: event SentMessage(address indexed target, address sender, bytes message, uint256 messageNonce, uint256 gasLimit) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) WatchSentMessage(opts *bind.WatchOpts, sink chan<- *L1CrossDomainMessengerSentMessage, target []common.Address) (event.Subscription, error) { + + var targetRule []interface{} + for _, targetItem := range target { + targetRule = append(targetRule, targetItem) + } + + logs, sub, err := _L1CrossDomainMessenger.contract.WatchLogs(opts, "SentMessage", targetRule) + 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(L1CrossDomainMessengerSentMessage) + if err := _L1CrossDomainMessenger.contract.UnpackLog(event, "SentMessage", 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 +} + +// ParseSentMessage is a log parse operation binding the contract event 0xcb0f7ffd78f9aee47a248fae8db181db6eee833039123e026dcbff529522e52a. +// +// Solidity: event SentMessage(address indexed target, address sender, bytes message, uint256 messageNonce, uint256 gasLimit) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) ParseSentMessage(log types.Log) (*L1CrossDomainMessengerSentMessage, error) { + event := new(L1CrossDomainMessengerSentMessage) + if err := _L1CrossDomainMessenger.contract.UnpackLog(event, "SentMessage", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1CrossDomainMessengerSentMessageExtension1Iterator is returned from FilterSentMessageExtension1 and is used to iterate over the raw logs and unpacked data for SentMessageExtension1 events raised by the L1CrossDomainMessenger contract. +type L1CrossDomainMessengerSentMessageExtension1Iterator struct { + Event *L1CrossDomainMessengerSentMessageExtension1 // 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 *L1CrossDomainMessengerSentMessageExtension1Iterator) 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(L1CrossDomainMessengerSentMessageExtension1) + 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(L1CrossDomainMessengerSentMessageExtension1) + 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 *L1CrossDomainMessengerSentMessageExtension1Iterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1CrossDomainMessengerSentMessageExtension1Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1CrossDomainMessengerSentMessageExtension1 represents a SentMessageExtension1 event raised by the L1CrossDomainMessenger contract. +type L1CrossDomainMessengerSentMessageExtension1 struct { + Sender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSentMessageExtension1 is a free log retrieval operation binding the contract event 0x8ebb2ec2465bdb2a06a66fc37a0963af8a2a6a1479d81d56fdb8cbb98096d546. +// +// Solidity: event SentMessageExtension1(address indexed sender, uint256 value) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) FilterSentMessageExtension1(opts *bind.FilterOpts, sender []common.Address) (*L1CrossDomainMessengerSentMessageExtension1Iterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _L1CrossDomainMessenger.contract.FilterLogs(opts, "SentMessageExtension1", senderRule) + if err != nil { + return nil, err + } + return &L1CrossDomainMessengerSentMessageExtension1Iterator{contract: _L1CrossDomainMessenger.contract, event: "SentMessageExtension1", logs: logs, sub: sub}, nil +} + +// WatchSentMessageExtension1 is a free log subscription operation binding the contract event 0x8ebb2ec2465bdb2a06a66fc37a0963af8a2a6a1479d81d56fdb8cbb98096d546. +// +// Solidity: event SentMessageExtension1(address indexed sender, uint256 value) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) WatchSentMessageExtension1(opts *bind.WatchOpts, sink chan<- *L1CrossDomainMessengerSentMessageExtension1, sender []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _L1CrossDomainMessenger.contract.WatchLogs(opts, "SentMessageExtension1", senderRule) + 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(L1CrossDomainMessengerSentMessageExtension1) + if err := _L1CrossDomainMessenger.contract.UnpackLog(event, "SentMessageExtension1", 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 +} + +// ParseSentMessageExtension1 is a log parse operation binding the contract event 0x8ebb2ec2465bdb2a06a66fc37a0963af8a2a6a1479d81d56fdb8cbb98096d546. +// +// Solidity: event SentMessageExtension1(address indexed sender, uint256 value) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) ParseSentMessageExtension1(log types.Log) (*L1CrossDomainMessengerSentMessageExtension1, error) { + event := new(L1CrossDomainMessengerSentMessageExtension1) + if err := _L1CrossDomainMessenger.contract.UnpackLog(event, "SentMessageExtension1", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/op-chain-ops/opbnb-upgrades/new-contracts/bindings/L1ERC721Bridge.go b/op-chain-ops/opbnb-upgrades/new-contracts/bindings/L1ERC721Bridge.go new file mode 100644 index 000000000..d5ade3b91 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/new-contracts/bindings/L1ERC721Bridge.go @@ -0,0 +1,977 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// L1ERC721BridgeMetaData contains all meta data concerning the L1ERC721Bridge contract. +var L1ERC721BridgeMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"MESSENGER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractCrossDomainMessenger\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"OTHER_BRIDGE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractStandardBridge\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"bridgeERC721\",\"inputs\":[{\"name\":\"_localToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_remoteToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_tokenId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"bridgeERC721To\",\"inputs\":[{\"name\":\"_localToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_remoteToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_tokenId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"deposits\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"finalizeBridgeERC721\",\"inputs\":[{\"name\":\"_localToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_remoteToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_tokenId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_messenger\",\"type\":\"address\",\"internalType\":\"contractCrossDomainMessenger\"},{\"name\":\"_superchainConfig\",\"type\":\"address\",\"internalType\":\"contractSuperchainConfig\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"messenger\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractCrossDomainMessenger\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"otherBridge\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractStandardBridge\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"superchainConfig\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractSuperchainConfig\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"ERC721BridgeFinalized\",\"inputs\":[{\"name\":\"localToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"remoteToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"extraData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ERC721BridgeInitiated\",\"inputs\":[{\"name\":\"localToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"remoteToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"extraData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false}]", +} + +// L1ERC721BridgeABI is the input ABI used to generate the binding from. +// Deprecated: Use L1ERC721BridgeMetaData.ABI instead. +var L1ERC721BridgeABI = L1ERC721BridgeMetaData.ABI + +// L1ERC721Bridge is an auto generated Go binding around an Ethereum contract. +type L1ERC721Bridge struct { + L1ERC721BridgeCaller // Read-only binding to the contract + L1ERC721BridgeTransactor // Write-only binding to the contract + L1ERC721BridgeFilterer // Log filterer for contract events +} + +// L1ERC721BridgeCaller is an auto generated read-only Go binding around an Ethereum contract. +type L1ERC721BridgeCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L1ERC721BridgeTransactor is an auto generated write-only Go binding around an Ethereum contract. +type L1ERC721BridgeTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L1ERC721BridgeFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type L1ERC721BridgeFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L1ERC721BridgeSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type L1ERC721BridgeSession struct { + Contract *L1ERC721Bridge // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// L1ERC721BridgeCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type L1ERC721BridgeCallerSession struct { + Contract *L1ERC721BridgeCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// L1ERC721BridgeTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type L1ERC721BridgeTransactorSession struct { + Contract *L1ERC721BridgeTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// L1ERC721BridgeRaw is an auto generated low-level Go binding around an Ethereum contract. +type L1ERC721BridgeRaw struct { + Contract *L1ERC721Bridge // Generic contract binding to access the raw methods on +} + +// L1ERC721BridgeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type L1ERC721BridgeCallerRaw struct { + Contract *L1ERC721BridgeCaller // Generic read-only contract binding to access the raw methods on +} + +// L1ERC721BridgeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type L1ERC721BridgeTransactorRaw struct { + Contract *L1ERC721BridgeTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewL1ERC721Bridge creates a new instance of L1ERC721Bridge, bound to a specific deployed contract. +func NewL1ERC721Bridge(address common.Address, backend bind.ContractBackend) (*L1ERC721Bridge, error) { + contract, err := bindL1ERC721Bridge(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &L1ERC721Bridge{L1ERC721BridgeCaller: L1ERC721BridgeCaller{contract: contract}, L1ERC721BridgeTransactor: L1ERC721BridgeTransactor{contract: contract}, L1ERC721BridgeFilterer: L1ERC721BridgeFilterer{contract: contract}}, nil +} + +// NewL1ERC721BridgeCaller creates a new read-only instance of L1ERC721Bridge, bound to a specific deployed contract. +func NewL1ERC721BridgeCaller(address common.Address, caller bind.ContractCaller) (*L1ERC721BridgeCaller, error) { + contract, err := bindL1ERC721Bridge(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &L1ERC721BridgeCaller{contract: contract}, nil +} + +// NewL1ERC721BridgeTransactor creates a new write-only instance of L1ERC721Bridge, bound to a specific deployed contract. +func NewL1ERC721BridgeTransactor(address common.Address, transactor bind.ContractTransactor) (*L1ERC721BridgeTransactor, error) { + contract, err := bindL1ERC721Bridge(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &L1ERC721BridgeTransactor{contract: contract}, nil +} + +// NewL1ERC721BridgeFilterer creates a new log filterer instance of L1ERC721Bridge, bound to a specific deployed contract. +func NewL1ERC721BridgeFilterer(address common.Address, filterer bind.ContractFilterer) (*L1ERC721BridgeFilterer, error) { + contract, err := bindL1ERC721Bridge(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &L1ERC721BridgeFilterer{contract: contract}, nil +} + +// bindL1ERC721Bridge binds a generic wrapper to an already deployed contract. +func bindL1ERC721Bridge(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := L1ERC721BridgeMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_L1ERC721Bridge *L1ERC721BridgeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _L1ERC721Bridge.Contract.L1ERC721BridgeCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_L1ERC721Bridge *L1ERC721BridgeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _L1ERC721Bridge.Contract.L1ERC721BridgeTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_L1ERC721Bridge *L1ERC721BridgeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _L1ERC721Bridge.Contract.L1ERC721BridgeTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_L1ERC721Bridge *L1ERC721BridgeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _L1ERC721Bridge.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_L1ERC721Bridge *L1ERC721BridgeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _L1ERC721Bridge.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_L1ERC721Bridge *L1ERC721BridgeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _L1ERC721Bridge.Contract.contract.Transact(opts, method, params...) +} + +// MESSENGER is a free data retrieval call binding the contract method 0x927ede2d. +// +// Solidity: function MESSENGER() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeCaller) MESSENGER(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1ERC721Bridge.contract.Call(opts, &out, "MESSENGER") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// MESSENGER is a free data retrieval call binding the contract method 0x927ede2d. +// +// Solidity: function MESSENGER() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeSession) MESSENGER() (common.Address, error) { + return _L1ERC721Bridge.Contract.MESSENGER(&_L1ERC721Bridge.CallOpts) +} + +// MESSENGER is a free data retrieval call binding the contract method 0x927ede2d. +// +// Solidity: function MESSENGER() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeCallerSession) MESSENGER() (common.Address, error) { + return _L1ERC721Bridge.Contract.MESSENGER(&_L1ERC721Bridge.CallOpts) +} + +// OTHERBRIDGE is a free data retrieval call binding the contract method 0x7f46ddb2. +// +// Solidity: function OTHER_BRIDGE() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeCaller) OTHERBRIDGE(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1ERC721Bridge.contract.Call(opts, &out, "OTHER_BRIDGE") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// OTHERBRIDGE is a free data retrieval call binding the contract method 0x7f46ddb2. +// +// Solidity: function OTHER_BRIDGE() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeSession) OTHERBRIDGE() (common.Address, error) { + return _L1ERC721Bridge.Contract.OTHERBRIDGE(&_L1ERC721Bridge.CallOpts) +} + +// OTHERBRIDGE is a free data retrieval call binding the contract method 0x7f46ddb2. +// +// Solidity: function OTHER_BRIDGE() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeCallerSession) OTHERBRIDGE() (common.Address, error) { + return _L1ERC721Bridge.Contract.OTHERBRIDGE(&_L1ERC721Bridge.CallOpts) +} + +// Deposits is a free data retrieval call binding the contract method 0x5d93a3fc. +// +// Solidity: function deposits(address , address , uint256 ) view returns(bool) +func (_L1ERC721Bridge *L1ERC721BridgeCaller) Deposits(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address, arg2 *big.Int) (bool, error) { + var out []interface{} + err := _L1ERC721Bridge.contract.Call(opts, &out, "deposits", arg0, arg1, arg2) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Deposits is a free data retrieval call binding the contract method 0x5d93a3fc. +// +// Solidity: function deposits(address , address , uint256 ) view returns(bool) +func (_L1ERC721Bridge *L1ERC721BridgeSession) Deposits(arg0 common.Address, arg1 common.Address, arg2 *big.Int) (bool, error) { + return _L1ERC721Bridge.Contract.Deposits(&_L1ERC721Bridge.CallOpts, arg0, arg1, arg2) +} + +// Deposits is a free data retrieval call binding the contract method 0x5d93a3fc. +// +// Solidity: function deposits(address , address , uint256 ) view returns(bool) +func (_L1ERC721Bridge *L1ERC721BridgeCallerSession) Deposits(arg0 common.Address, arg1 common.Address, arg2 *big.Int) (bool, error) { + return _L1ERC721Bridge.Contract.Deposits(&_L1ERC721Bridge.CallOpts, arg0, arg1, arg2) +} + +// Messenger is a free data retrieval call binding the contract method 0x3cb747bf. +// +// Solidity: function messenger() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeCaller) Messenger(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1ERC721Bridge.contract.Call(opts, &out, "messenger") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Messenger is a free data retrieval call binding the contract method 0x3cb747bf. +// +// Solidity: function messenger() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeSession) Messenger() (common.Address, error) { + return _L1ERC721Bridge.Contract.Messenger(&_L1ERC721Bridge.CallOpts) +} + +// Messenger is a free data retrieval call binding the contract method 0x3cb747bf. +// +// Solidity: function messenger() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeCallerSession) Messenger() (common.Address, error) { + return _L1ERC721Bridge.Contract.Messenger(&_L1ERC721Bridge.CallOpts) +} + +// OtherBridge is a free data retrieval call binding the contract method 0xc89701a2. +// +// Solidity: function otherBridge() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeCaller) OtherBridge(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1ERC721Bridge.contract.Call(opts, &out, "otherBridge") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// OtherBridge is a free data retrieval call binding the contract method 0xc89701a2. +// +// Solidity: function otherBridge() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeSession) OtherBridge() (common.Address, error) { + return _L1ERC721Bridge.Contract.OtherBridge(&_L1ERC721Bridge.CallOpts) +} + +// OtherBridge is a free data retrieval call binding the contract method 0xc89701a2. +// +// Solidity: function otherBridge() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeCallerSession) OtherBridge() (common.Address, error) { + return _L1ERC721Bridge.Contract.OtherBridge(&_L1ERC721Bridge.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_L1ERC721Bridge *L1ERC721BridgeCaller) Paused(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _L1ERC721Bridge.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_L1ERC721Bridge *L1ERC721BridgeSession) Paused() (bool, error) { + return _L1ERC721Bridge.Contract.Paused(&_L1ERC721Bridge.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_L1ERC721Bridge *L1ERC721BridgeCallerSession) Paused() (bool, error) { + return _L1ERC721Bridge.Contract.Paused(&_L1ERC721Bridge.CallOpts) +} + +// SuperchainConfig is a free data retrieval call binding the contract method 0x35e80ab3. +// +// Solidity: function superchainConfig() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeCaller) SuperchainConfig(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1ERC721Bridge.contract.Call(opts, &out, "superchainConfig") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// SuperchainConfig is a free data retrieval call binding the contract method 0x35e80ab3. +// +// Solidity: function superchainConfig() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeSession) SuperchainConfig() (common.Address, error) { + return _L1ERC721Bridge.Contract.SuperchainConfig(&_L1ERC721Bridge.CallOpts) +} + +// SuperchainConfig is a free data retrieval call binding the contract method 0x35e80ab3. +// +// Solidity: function superchainConfig() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeCallerSession) SuperchainConfig() (common.Address, error) { + return _L1ERC721Bridge.Contract.SuperchainConfig(&_L1ERC721Bridge.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L1ERC721Bridge *L1ERC721BridgeCaller) Version(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _L1ERC721Bridge.contract.Call(opts, &out, "version") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L1ERC721Bridge *L1ERC721BridgeSession) Version() (string, error) { + return _L1ERC721Bridge.Contract.Version(&_L1ERC721Bridge.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L1ERC721Bridge *L1ERC721BridgeCallerSession) Version() (string, error) { + return _L1ERC721Bridge.Contract.Version(&_L1ERC721Bridge.CallOpts) +} + +// BridgeERC721 is a paid mutator transaction binding the contract method 0x3687011a. +// +// Solidity: function bridgeERC721(address _localToken, address _remoteToken, uint256 _tokenId, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1ERC721Bridge *L1ERC721BridgeTransactor) BridgeERC721(opts *bind.TransactOpts, _localToken common.Address, _remoteToken common.Address, _tokenId *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1ERC721Bridge.contract.Transact(opts, "bridgeERC721", _localToken, _remoteToken, _tokenId, _minGasLimit, _extraData) +} + +// BridgeERC721 is a paid mutator transaction binding the contract method 0x3687011a. +// +// Solidity: function bridgeERC721(address _localToken, address _remoteToken, uint256 _tokenId, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1ERC721Bridge *L1ERC721BridgeSession) BridgeERC721(_localToken common.Address, _remoteToken common.Address, _tokenId *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1ERC721Bridge.Contract.BridgeERC721(&_L1ERC721Bridge.TransactOpts, _localToken, _remoteToken, _tokenId, _minGasLimit, _extraData) +} + +// BridgeERC721 is a paid mutator transaction binding the contract method 0x3687011a. +// +// Solidity: function bridgeERC721(address _localToken, address _remoteToken, uint256 _tokenId, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1ERC721Bridge *L1ERC721BridgeTransactorSession) BridgeERC721(_localToken common.Address, _remoteToken common.Address, _tokenId *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1ERC721Bridge.Contract.BridgeERC721(&_L1ERC721Bridge.TransactOpts, _localToken, _remoteToken, _tokenId, _minGasLimit, _extraData) +} + +// BridgeERC721To is a paid mutator transaction binding the contract method 0xaa557452. +// +// Solidity: function bridgeERC721To(address _localToken, address _remoteToken, address _to, uint256 _tokenId, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1ERC721Bridge *L1ERC721BridgeTransactor) BridgeERC721To(opts *bind.TransactOpts, _localToken common.Address, _remoteToken common.Address, _to common.Address, _tokenId *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1ERC721Bridge.contract.Transact(opts, "bridgeERC721To", _localToken, _remoteToken, _to, _tokenId, _minGasLimit, _extraData) +} + +// BridgeERC721To is a paid mutator transaction binding the contract method 0xaa557452. +// +// Solidity: function bridgeERC721To(address _localToken, address _remoteToken, address _to, uint256 _tokenId, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1ERC721Bridge *L1ERC721BridgeSession) BridgeERC721To(_localToken common.Address, _remoteToken common.Address, _to common.Address, _tokenId *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1ERC721Bridge.Contract.BridgeERC721To(&_L1ERC721Bridge.TransactOpts, _localToken, _remoteToken, _to, _tokenId, _minGasLimit, _extraData) +} + +// BridgeERC721To is a paid mutator transaction binding the contract method 0xaa557452. +// +// Solidity: function bridgeERC721To(address _localToken, address _remoteToken, address _to, uint256 _tokenId, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1ERC721Bridge *L1ERC721BridgeTransactorSession) BridgeERC721To(_localToken common.Address, _remoteToken common.Address, _to common.Address, _tokenId *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1ERC721Bridge.Contract.BridgeERC721To(&_L1ERC721Bridge.TransactOpts, _localToken, _remoteToken, _to, _tokenId, _minGasLimit, _extraData) +} + +// FinalizeBridgeERC721 is a paid mutator transaction binding the contract method 0x761f4493. +// +// Solidity: function finalizeBridgeERC721(address _localToken, address _remoteToken, address _from, address _to, uint256 _tokenId, bytes _extraData) returns() +func (_L1ERC721Bridge *L1ERC721BridgeTransactor) FinalizeBridgeERC721(opts *bind.TransactOpts, _localToken common.Address, _remoteToken common.Address, _from common.Address, _to common.Address, _tokenId *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1ERC721Bridge.contract.Transact(opts, "finalizeBridgeERC721", _localToken, _remoteToken, _from, _to, _tokenId, _extraData) +} + +// FinalizeBridgeERC721 is a paid mutator transaction binding the contract method 0x761f4493. +// +// Solidity: function finalizeBridgeERC721(address _localToken, address _remoteToken, address _from, address _to, uint256 _tokenId, bytes _extraData) returns() +func (_L1ERC721Bridge *L1ERC721BridgeSession) FinalizeBridgeERC721(_localToken common.Address, _remoteToken common.Address, _from common.Address, _to common.Address, _tokenId *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1ERC721Bridge.Contract.FinalizeBridgeERC721(&_L1ERC721Bridge.TransactOpts, _localToken, _remoteToken, _from, _to, _tokenId, _extraData) +} + +// FinalizeBridgeERC721 is a paid mutator transaction binding the contract method 0x761f4493. +// +// Solidity: function finalizeBridgeERC721(address _localToken, address _remoteToken, address _from, address _to, uint256 _tokenId, bytes _extraData) returns() +func (_L1ERC721Bridge *L1ERC721BridgeTransactorSession) FinalizeBridgeERC721(_localToken common.Address, _remoteToken common.Address, _from common.Address, _to common.Address, _tokenId *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1ERC721Bridge.Contract.FinalizeBridgeERC721(&_L1ERC721Bridge.TransactOpts, _localToken, _remoteToken, _from, _to, _tokenId, _extraData) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _messenger, address _superchainConfig) returns() +func (_L1ERC721Bridge *L1ERC721BridgeTransactor) Initialize(opts *bind.TransactOpts, _messenger common.Address, _superchainConfig common.Address) (*types.Transaction, error) { + return _L1ERC721Bridge.contract.Transact(opts, "initialize", _messenger, _superchainConfig) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _messenger, address _superchainConfig) returns() +func (_L1ERC721Bridge *L1ERC721BridgeSession) Initialize(_messenger common.Address, _superchainConfig common.Address) (*types.Transaction, error) { + return _L1ERC721Bridge.Contract.Initialize(&_L1ERC721Bridge.TransactOpts, _messenger, _superchainConfig) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _messenger, address _superchainConfig) returns() +func (_L1ERC721Bridge *L1ERC721BridgeTransactorSession) Initialize(_messenger common.Address, _superchainConfig common.Address) (*types.Transaction, error) { + return _L1ERC721Bridge.Contract.Initialize(&_L1ERC721Bridge.TransactOpts, _messenger, _superchainConfig) +} + +// L1ERC721BridgeERC721BridgeFinalizedIterator is returned from FilterERC721BridgeFinalized and is used to iterate over the raw logs and unpacked data for ERC721BridgeFinalized events raised by the L1ERC721Bridge contract. +type L1ERC721BridgeERC721BridgeFinalizedIterator struct { + Event *L1ERC721BridgeERC721BridgeFinalized // 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 *L1ERC721BridgeERC721BridgeFinalizedIterator) 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(L1ERC721BridgeERC721BridgeFinalized) + 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(L1ERC721BridgeERC721BridgeFinalized) + 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 *L1ERC721BridgeERC721BridgeFinalizedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1ERC721BridgeERC721BridgeFinalizedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1ERC721BridgeERC721BridgeFinalized represents a ERC721BridgeFinalized event raised by the L1ERC721Bridge contract. +type L1ERC721BridgeERC721BridgeFinalized struct { + LocalToken common.Address + RemoteToken common.Address + From common.Address + To common.Address + TokenId *big.Int + ExtraData []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterERC721BridgeFinalized is a free log retrieval operation binding the contract event 0x1f39bf6707b5d608453e0ae4c067b562bcc4c85c0f562ef5d2c774d2e7f131ac. +// +// Solidity: event ERC721BridgeFinalized(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 tokenId, bytes extraData) +func (_L1ERC721Bridge *L1ERC721BridgeFilterer) FilterERC721BridgeFinalized(opts *bind.FilterOpts, localToken []common.Address, remoteToken []common.Address, from []common.Address) (*L1ERC721BridgeERC721BridgeFinalizedIterator, error) { + + var localTokenRule []interface{} + for _, localTokenItem := range localToken { + localTokenRule = append(localTokenRule, localTokenItem) + } + var remoteTokenRule []interface{} + for _, remoteTokenItem := range remoteToken { + remoteTokenRule = append(remoteTokenRule, remoteTokenItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _L1ERC721Bridge.contract.FilterLogs(opts, "ERC721BridgeFinalized", localTokenRule, remoteTokenRule, fromRule) + if err != nil { + return nil, err + } + return &L1ERC721BridgeERC721BridgeFinalizedIterator{contract: _L1ERC721Bridge.contract, event: "ERC721BridgeFinalized", logs: logs, sub: sub}, nil +} + +// WatchERC721BridgeFinalized is a free log subscription operation binding the contract event 0x1f39bf6707b5d608453e0ae4c067b562bcc4c85c0f562ef5d2c774d2e7f131ac. +// +// Solidity: event ERC721BridgeFinalized(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 tokenId, bytes extraData) +func (_L1ERC721Bridge *L1ERC721BridgeFilterer) WatchERC721BridgeFinalized(opts *bind.WatchOpts, sink chan<- *L1ERC721BridgeERC721BridgeFinalized, localToken []common.Address, remoteToken []common.Address, from []common.Address) (event.Subscription, error) { + + var localTokenRule []interface{} + for _, localTokenItem := range localToken { + localTokenRule = append(localTokenRule, localTokenItem) + } + var remoteTokenRule []interface{} + for _, remoteTokenItem := range remoteToken { + remoteTokenRule = append(remoteTokenRule, remoteTokenItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _L1ERC721Bridge.contract.WatchLogs(opts, "ERC721BridgeFinalized", localTokenRule, remoteTokenRule, fromRule) + 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(L1ERC721BridgeERC721BridgeFinalized) + if err := _L1ERC721Bridge.contract.UnpackLog(event, "ERC721BridgeFinalized", 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 +} + +// ParseERC721BridgeFinalized is a log parse operation binding the contract event 0x1f39bf6707b5d608453e0ae4c067b562bcc4c85c0f562ef5d2c774d2e7f131ac. +// +// Solidity: event ERC721BridgeFinalized(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 tokenId, bytes extraData) +func (_L1ERC721Bridge *L1ERC721BridgeFilterer) ParseERC721BridgeFinalized(log types.Log) (*L1ERC721BridgeERC721BridgeFinalized, error) { + event := new(L1ERC721BridgeERC721BridgeFinalized) + if err := _L1ERC721Bridge.contract.UnpackLog(event, "ERC721BridgeFinalized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1ERC721BridgeERC721BridgeInitiatedIterator is returned from FilterERC721BridgeInitiated and is used to iterate over the raw logs and unpacked data for ERC721BridgeInitiated events raised by the L1ERC721Bridge contract. +type L1ERC721BridgeERC721BridgeInitiatedIterator struct { + Event *L1ERC721BridgeERC721BridgeInitiated // 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 *L1ERC721BridgeERC721BridgeInitiatedIterator) 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(L1ERC721BridgeERC721BridgeInitiated) + 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(L1ERC721BridgeERC721BridgeInitiated) + 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 *L1ERC721BridgeERC721BridgeInitiatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1ERC721BridgeERC721BridgeInitiatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1ERC721BridgeERC721BridgeInitiated represents a ERC721BridgeInitiated event raised by the L1ERC721Bridge contract. +type L1ERC721BridgeERC721BridgeInitiated struct { + LocalToken common.Address + RemoteToken common.Address + From common.Address + To common.Address + TokenId *big.Int + ExtraData []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterERC721BridgeInitiated is a free log retrieval operation binding the contract event 0xb7460e2a880f256ebef3406116ff3eee0cee51ebccdc2a40698f87ebb2e9c1a5. +// +// Solidity: event ERC721BridgeInitiated(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 tokenId, bytes extraData) +func (_L1ERC721Bridge *L1ERC721BridgeFilterer) FilterERC721BridgeInitiated(opts *bind.FilterOpts, localToken []common.Address, remoteToken []common.Address, from []common.Address) (*L1ERC721BridgeERC721BridgeInitiatedIterator, error) { + + var localTokenRule []interface{} + for _, localTokenItem := range localToken { + localTokenRule = append(localTokenRule, localTokenItem) + } + var remoteTokenRule []interface{} + for _, remoteTokenItem := range remoteToken { + remoteTokenRule = append(remoteTokenRule, remoteTokenItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _L1ERC721Bridge.contract.FilterLogs(opts, "ERC721BridgeInitiated", localTokenRule, remoteTokenRule, fromRule) + if err != nil { + return nil, err + } + return &L1ERC721BridgeERC721BridgeInitiatedIterator{contract: _L1ERC721Bridge.contract, event: "ERC721BridgeInitiated", logs: logs, sub: sub}, nil +} + +// WatchERC721BridgeInitiated is a free log subscription operation binding the contract event 0xb7460e2a880f256ebef3406116ff3eee0cee51ebccdc2a40698f87ebb2e9c1a5. +// +// Solidity: event ERC721BridgeInitiated(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 tokenId, bytes extraData) +func (_L1ERC721Bridge *L1ERC721BridgeFilterer) WatchERC721BridgeInitiated(opts *bind.WatchOpts, sink chan<- *L1ERC721BridgeERC721BridgeInitiated, localToken []common.Address, remoteToken []common.Address, from []common.Address) (event.Subscription, error) { + + var localTokenRule []interface{} + for _, localTokenItem := range localToken { + localTokenRule = append(localTokenRule, localTokenItem) + } + var remoteTokenRule []interface{} + for _, remoteTokenItem := range remoteToken { + remoteTokenRule = append(remoteTokenRule, remoteTokenItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _L1ERC721Bridge.contract.WatchLogs(opts, "ERC721BridgeInitiated", localTokenRule, remoteTokenRule, fromRule) + 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(L1ERC721BridgeERC721BridgeInitiated) + if err := _L1ERC721Bridge.contract.UnpackLog(event, "ERC721BridgeInitiated", 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 +} + +// ParseERC721BridgeInitiated is a log parse operation binding the contract event 0xb7460e2a880f256ebef3406116ff3eee0cee51ebccdc2a40698f87ebb2e9c1a5. +// +// Solidity: event ERC721BridgeInitiated(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 tokenId, bytes extraData) +func (_L1ERC721Bridge *L1ERC721BridgeFilterer) ParseERC721BridgeInitiated(log types.Log) (*L1ERC721BridgeERC721BridgeInitiated, error) { + event := new(L1ERC721BridgeERC721BridgeInitiated) + if err := _L1ERC721Bridge.contract.UnpackLog(event, "ERC721BridgeInitiated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1ERC721BridgeInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the L1ERC721Bridge contract. +type L1ERC721BridgeInitializedIterator struct { + Event *L1ERC721BridgeInitialized // 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 *L1ERC721BridgeInitializedIterator) 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(L1ERC721BridgeInitialized) + 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(L1ERC721BridgeInitialized) + 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 *L1ERC721BridgeInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1ERC721BridgeInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1ERC721BridgeInitialized represents a Initialized event raised by the L1ERC721Bridge contract. +type L1ERC721BridgeInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_L1ERC721Bridge *L1ERC721BridgeFilterer) FilterInitialized(opts *bind.FilterOpts) (*L1ERC721BridgeInitializedIterator, error) { + + logs, sub, err := _L1ERC721Bridge.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &L1ERC721BridgeInitializedIterator{contract: _L1ERC721Bridge.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_L1ERC721Bridge *L1ERC721BridgeFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *L1ERC721BridgeInitialized) (event.Subscription, error) { + + logs, sub, err := _L1ERC721Bridge.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(L1ERC721BridgeInitialized) + if err := _L1ERC721Bridge.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_L1ERC721Bridge *L1ERC721BridgeFilterer) ParseInitialized(log types.Log) (*L1ERC721BridgeInitialized, error) { + event := new(L1ERC721BridgeInitialized) + if err := _L1ERC721Bridge.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/op-chain-ops/opbnb-upgrades/new-contracts/bindings/L1StandardBridge.go b/op-chain-ops/opbnb-upgrades/new-contracts/bindings/L1StandardBridge.go new file mode 100644 index 000000000..da6fa480e --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/new-contracts/bindings/L1StandardBridge.go @@ -0,0 +1,2199 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// L1StandardBridgeMetaData contains all meta data concerning the L1StandardBridge contract. +var L1StandardBridgeMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"MESSENGER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractCrossDomainMessenger\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"OTHER_BRIDGE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractStandardBridge\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"bridgeERC20\",\"inputs\":[{\"name\":\"_localToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_remoteToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"bridgeERC20To\",\"inputs\":[{\"name\":\"_localToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_remoteToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"bridgeETH\",\"inputs\":[{\"name\":\"_minGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"bridgeETHTo\",\"inputs\":[{\"name\":\"_to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_minGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"depositERC20\",\"inputs\":[{\"name\":\"_l1Token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_l2Token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"depositERC20To\",\"inputs\":[{\"name\":\"_l1Token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_l2Token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"depositETH\",\"inputs\":[{\"name\":\"_minGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"depositETHTo\",\"inputs\":[{\"name\":\"_to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_minGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"deposits\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"finalizeBridgeERC20\",\"inputs\":[{\"name\":\"_localToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_remoteToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"finalizeBridgeETH\",\"inputs\":[{\"name\":\"_from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"finalizeERC20Withdrawal\",\"inputs\":[{\"name\":\"_l1Token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_l2Token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"finalizeETHWithdrawal\",\"inputs\":[{\"name\":\"_from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_messenger\",\"type\":\"address\",\"internalType\":\"contractCrossDomainMessenger\"},{\"name\":\"_superchainConfig\",\"type\":\"address\",\"internalType\":\"contractSuperchainConfig\"},{\"name\":\"_systemConfig\",\"type\":\"address\",\"internalType\":\"contractSystemConfig\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"l2TokenBridge\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"messenger\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractCrossDomainMessenger\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"otherBridge\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractStandardBridge\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"superchainConfig\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractSuperchainConfig\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"systemConfig\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractSystemConfig\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"ERC20BridgeFinalized\",\"inputs\":[{\"name\":\"localToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"remoteToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"extraData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ERC20BridgeInitiated\",\"inputs\":[{\"name\":\"localToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"remoteToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"extraData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ERC20DepositInitiated\",\"inputs\":[{\"name\":\"l1Token\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"l2Token\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"extraData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ERC20WithdrawalFinalized\",\"inputs\":[{\"name\":\"l1Token\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"l2Token\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"extraData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ETHBridgeFinalized\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"extraData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ETHBridgeInitiated\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"extraData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ETHDepositInitiated\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"extraData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ETHWithdrawalFinalized\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"extraData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false}]", +} + +// L1StandardBridgeABI is the input ABI used to generate the binding from. +// Deprecated: Use L1StandardBridgeMetaData.ABI instead. +var L1StandardBridgeABI = L1StandardBridgeMetaData.ABI + +// L1StandardBridge is an auto generated Go binding around an Ethereum contract. +type L1StandardBridge struct { + L1StandardBridgeCaller // Read-only binding to the contract + L1StandardBridgeTransactor // Write-only binding to the contract + L1StandardBridgeFilterer // Log filterer for contract events +} + +// L1StandardBridgeCaller is an auto generated read-only Go binding around an Ethereum contract. +type L1StandardBridgeCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L1StandardBridgeTransactor is an auto generated write-only Go binding around an Ethereum contract. +type L1StandardBridgeTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L1StandardBridgeFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type L1StandardBridgeFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L1StandardBridgeSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type L1StandardBridgeSession struct { + Contract *L1StandardBridge // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// L1StandardBridgeCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type L1StandardBridgeCallerSession struct { + Contract *L1StandardBridgeCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// L1StandardBridgeTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type L1StandardBridgeTransactorSession struct { + Contract *L1StandardBridgeTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// L1StandardBridgeRaw is an auto generated low-level Go binding around an Ethereum contract. +type L1StandardBridgeRaw struct { + Contract *L1StandardBridge // Generic contract binding to access the raw methods on +} + +// L1StandardBridgeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type L1StandardBridgeCallerRaw struct { + Contract *L1StandardBridgeCaller // Generic read-only contract binding to access the raw methods on +} + +// L1StandardBridgeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type L1StandardBridgeTransactorRaw struct { + Contract *L1StandardBridgeTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewL1StandardBridge creates a new instance of L1StandardBridge, bound to a specific deployed contract. +func NewL1StandardBridge(address common.Address, backend bind.ContractBackend) (*L1StandardBridge, error) { + contract, err := bindL1StandardBridge(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &L1StandardBridge{L1StandardBridgeCaller: L1StandardBridgeCaller{contract: contract}, L1StandardBridgeTransactor: L1StandardBridgeTransactor{contract: contract}, L1StandardBridgeFilterer: L1StandardBridgeFilterer{contract: contract}}, nil +} + +// NewL1StandardBridgeCaller creates a new read-only instance of L1StandardBridge, bound to a specific deployed contract. +func NewL1StandardBridgeCaller(address common.Address, caller bind.ContractCaller) (*L1StandardBridgeCaller, error) { + contract, err := bindL1StandardBridge(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &L1StandardBridgeCaller{contract: contract}, nil +} + +// NewL1StandardBridgeTransactor creates a new write-only instance of L1StandardBridge, bound to a specific deployed contract. +func NewL1StandardBridgeTransactor(address common.Address, transactor bind.ContractTransactor) (*L1StandardBridgeTransactor, error) { + contract, err := bindL1StandardBridge(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &L1StandardBridgeTransactor{contract: contract}, nil +} + +// NewL1StandardBridgeFilterer creates a new log filterer instance of L1StandardBridge, bound to a specific deployed contract. +func NewL1StandardBridgeFilterer(address common.Address, filterer bind.ContractFilterer) (*L1StandardBridgeFilterer, error) { + contract, err := bindL1StandardBridge(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &L1StandardBridgeFilterer{contract: contract}, nil +} + +// bindL1StandardBridge binds a generic wrapper to an already deployed contract. +func bindL1StandardBridge(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := L1StandardBridgeMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_L1StandardBridge *L1StandardBridgeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _L1StandardBridge.Contract.L1StandardBridgeCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_L1StandardBridge *L1StandardBridgeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _L1StandardBridge.Contract.L1StandardBridgeTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_L1StandardBridge *L1StandardBridgeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _L1StandardBridge.Contract.L1StandardBridgeTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_L1StandardBridge *L1StandardBridgeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _L1StandardBridge.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_L1StandardBridge *L1StandardBridgeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _L1StandardBridge.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_L1StandardBridge *L1StandardBridgeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _L1StandardBridge.Contract.contract.Transact(opts, method, params...) +} + +// MESSENGER is a free data retrieval call binding the contract method 0x927ede2d. +// +// Solidity: function MESSENGER() view returns(address) +func (_L1StandardBridge *L1StandardBridgeCaller) MESSENGER(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1StandardBridge.contract.Call(opts, &out, "MESSENGER") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// MESSENGER is a free data retrieval call binding the contract method 0x927ede2d. +// +// Solidity: function MESSENGER() view returns(address) +func (_L1StandardBridge *L1StandardBridgeSession) MESSENGER() (common.Address, error) { + return _L1StandardBridge.Contract.MESSENGER(&_L1StandardBridge.CallOpts) +} + +// MESSENGER is a free data retrieval call binding the contract method 0x927ede2d. +// +// Solidity: function MESSENGER() view returns(address) +func (_L1StandardBridge *L1StandardBridgeCallerSession) MESSENGER() (common.Address, error) { + return _L1StandardBridge.Contract.MESSENGER(&_L1StandardBridge.CallOpts) +} + +// OTHERBRIDGE is a free data retrieval call binding the contract method 0x7f46ddb2. +// +// Solidity: function OTHER_BRIDGE() view returns(address) +func (_L1StandardBridge *L1StandardBridgeCaller) OTHERBRIDGE(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1StandardBridge.contract.Call(opts, &out, "OTHER_BRIDGE") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// OTHERBRIDGE is a free data retrieval call binding the contract method 0x7f46ddb2. +// +// Solidity: function OTHER_BRIDGE() view returns(address) +func (_L1StandardBridge *L1StandardBridgeSession) OTHERBRIDGE() (common.Address, error) { + return _L1StandardBridge.Contract.OTHERBRIDGE(&_L1StandardBridge.CallOpts) +} + +// OTHERBRIDGE is a free data retrieval call binding the contract method 0x7f46ddb2. +// +// Solidity: function OTHER_BRIDGE() view returns(address) +func (_L1StandardBridge *L1StandardBridgeCallerSession) OTHERBRIDGE() (common.Address, error) { + return _L1StandardBridge.Contract.OTHERBRIDGE(&_L1StandardBridge.CallOpts) +} + +// Deposits is a free data retrieval call binding the contract method 0x8f601f66. +// +// Solidity: function deposits(address , address ) view returns(uint256) +func (_L1StandardBridge *L1StandardBridgeCaller) Deposits(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (*big.Int, error) { + var out []interface{} + err := _L1StandardBridge.contract.Call(opts, &out, "deposits", arg0, arg1) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Deposits is a free data retrieval call binding the contract method 0x8f601f66. +// +// Solidity: function deposits(address , address ) view returns(uint256) +func (_L1StandardBridge *L1StandardBridgeSession) Deposits(arg0 common.Address, arg1 common.Address) (*big.Int, error) { + return _L1StandardBridge.Contract.Deposits(&_L1StandardBridge.CallOpts, arg0, arg1) +} + +// Deposits is a free data retrieval call binding the contract method 0x8f601f66. +// +// Solidity: function deposits(address , address ) view returns(uint256) +func (_L1StandardBridge *L1StandardBridgeCallerSession) Deposits(arg0 common.Address, arg1 common.Address) (*big.Int, error) { + return _L1StandardBridge.Contract.Deposits(&_L1StandardBridge.CallOpts, arg0, arg1) +} + +// L2TokenBridge is a free data retrieval call binding the contract method 0x91c49bf8. +// +// Solidity: function l2TokenBridge() view returns(address) +func (_L1StandardBridge *L1StandardBridgeCaller) L2TokenBridge(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1StandardBridge.contract.Call(opts, &out, "l2TokenBridge") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// L2TokenBridge is a free data retrieval call binding the contract method 0x91c49bf8. +// +// Solidity: function l2TokenBridge() view returns(address) +func (_L1StandardBridge *L1StandardBridgeSession) L2TokenBridge() (common.Address, error) { + return _L1StandardBridge.Contract.L2TokenBridge(&_L1StandardBridge.CallOpts) +} + +// L2TokenBridge is a free data retrieval call binding the contract method 0x91c49bf8. +// +// Solidity: function l2TokenBridge() view returns(address) +func (_L1StandardBridge *L1StandardBridgeCallerSession) L2TokenBridge() (common.Address, error) { + return _L1StandardBridge.Contract.L2TokenBridge(&_L1StandardBridge.CallOpts) +} + +// Messenger is a free data retrieval call binding the contract method 0x3cb747bf. +// +// Solidity: function messenger() view returns(address) +func (_L1StandardBridge *L1StandardBridgeCaller) Messenger(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1StandardBridge.contract.Call(opts, &out, "messenger") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Messenger is a free data retrieval call binding the contract method 0x3cb747bf. +// +// Solidity: function messenger() view returns(address) +func (_L1StandardBridge *L1StandardBridgeSession) Messenger() (common.Address, error) { + return _L1StandardBridge.Contract.Messenger(&_L1StandardBridge.CallOpts) +} + +// Messenger is a free data retrieval call binding the contract method 0x3cb747bf. +// +// Solidity: function messenger() view returns(address) +func (_L1StandardBridge *L1StandardBridgeCallerSession) Messenger() (common.Address, error) { + return _L1StandardBridge.Contract.Messenger(&_L1StandardBridge.CallOpts) +} + +// OtherBridge is a free data retrieval call binding the contract method 0xc89701a2. +// +// Solidity: function otherBridge() view returns(address) +func (_L1StandardBridge *L1StandardBridgeCaller) OtherBridge(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1StandardBridge.contract.Call(opts, &out, "otherBridge") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// OtherBridge is a free data retrieval call binding the contract method 0xc89701a2. +// +// Solidity: function otherBridge() view returns(address) +func (_L1StandardBridge *L1StandardBridgeSession) OtherBridge() (common.Address, error) { + return _L1StandardBridge.Contract.OtherBridge(&_L1StandardBridge.CallOpts) +} + +// OtherBridge is a free data retrieval call binding the contract method 0xc89701a2. +// +// Solidity: function otherBridge() view returns(address) +func (_L1StandardBridge *L1StandardBridgeCallerSession) OtherBridge() (common.Address, error) { + return _L1StandardBridge.Contract.OtherBridge(&_L1StandardBridge.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_L1StandardBridge *L1StandardBridgeCaller) Paused(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _L1StandardBridge.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_L1StandardBridge *L1StandardBridgeSession) Paused() (bool, error) { + return _L1StandardBridge.Contract.Paused(&_L1StandardBridge.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_L1StandardBridge *L1StandardBridgeCallerSession) Paused() (bool, error) { + return _L1StandardBridge.Contract.Paused(&_L1StandardBridge.CallOpts) +} + +// SuperchainConfig is a free data retrieval call binding the contract method 0x35e80ab3. +// +// Solidity: function superchainConfig() view returns(address) +func (_L1StandardBridge *L1StandardBridgeCaller) SuperchainConfig(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1StandardBridge.contract.Call(opts, &out, "superchainConfig") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// SuperchainConfig is a free data retrieval call binding the contract method 0x35e80ab3. +// +// Solidity: function superchainConfig() view returns(address) +func (_L1StandardBridge *L1StandardBridgeSession) SuperchainConfig() (common.Address, error) { + return _L1StandardBridge.Contract.SuperchainConfig(&_L1StandardBridge.CallOpts) +} + +// SuperchainConfig is a free data retrieval call binding the contract method 0x35e80ab3. +// +// Solidity: function superchainConfig() view returns(address) +func (_L1StandardBridge *L1StandardBridgeCallerSession) SuperchainConfig() (common.Address, error) { + return _L1StandardBridge.Contract.SuperchainConfig(&_L1StandardBridge.CallOpts) +} + +// SystemConfig is a free data retrieval call binding the contract method 0x33d7e2bd. +// +// Solidity: function systemConfig() view returns(address) +func (_L1StandardBridge *L1StandardBridgeCaller) SystemConfig(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1StandardBridge.contract.Call(opts, &out, "systemConfig") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// SystemConfig is a free data retrieval call binding the contract method 0x33d7e2bd. +// +// Solidity: function systemConfig() view returns(address) +func (_L1StandardBridge *L1StandardBridgeSession) SystemConfig() (common.Address, error) { + return _L1StandardBridge.Contract.SystemConfig(&_L1StandardBridge.CallOpts) +} + +// SystemConfig is a free data retrieval call binding the contract method 0x33d7e2bd. +// +// Solidity: function systemConfig() view returns(address) +func (_L1StandardBridge *L1StandardBridgeCallerSession) SystemConfig() (common.Address, error) { + return _L1StandardBridge.Contract.SystemConfig(&_L1StandardBridge.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L1StandardBridge *L1StandardBridgeCaller) Version(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _L1StandardBridge.contract.Call(opts, &out, "version") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L1StandardBridge *L1StandardBridgeSession) Version() (string, error) { + return _L1StandardBridge.Contract.Version(&_L1StandardBridge.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L1StandardBridge *L1StandardBridgeCallerSession) Version() (string, error) { + return _L1StandardBridge.Contract.Version(&_L1StandardBridge.CallOpts) +} + +// BridgeERC20 is a paid mutator transaction binding the contract method 0x87087623. +// +// Solidity: function bridgeERC20(address _localToken, address _remoteToken, uint256 _amount, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) BridgeERC20(opts *bind.TransactOpts, _localToken common.Address, _remoteToken common.Address, _amount *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.contract.Transact(opts, "bridgeERC20", _localToken, _remoteToken, _amount, _minGasLimit, _extraData) +} + +// BridgeERC20 is a paid mutator transaction binding the contract method 0x87087623. +// +// Solidity: function bridgeERC20(address _localToken, address _remoteToken, uint256 _amount, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeSession) BridgeERC20(_localToken common.Address, _remoteToken common.Address, _amount *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.BridgeERC20(&_L1StandardBridge.TransactOpts, _localToken, _remoteToken, _amount, _minGasLimit, _extraData) +} + +// BridgeERC20 is a paid mutator transaction binding the contract method 0x87087623. +// +// Solidity: function bridgeERC20(address _localToken, address _remoteToken, uint256 _amount, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) BridgeERC20(_localToken common.Address, _remoteToken common.Address, _amount *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.BridgeERC20(&_L1StandardBridge.TransactOpts, _localToken, _remoteToken, _amount, _minGasLimit, _extraData) +} + +// BridgeERC20To is a paid mutator transaction binding the contract method 0x540abf73. +// +// Solidity: function bridgeERC20To(address _localToken, address _remoteToken, address _to, uint256 _amount, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) BridgeERC20To(opts *bind.TransactOpts, _localToken common.Address, _remoteToken common.Address, _to common.Address, _amount *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.contract.Transact(opts, "bridgeERC20To", _localToken, _remoteToken, _to, _amount, _minGasLimit, _extraData) +} + +// BridgeERC20To is a paid mutator transaction binding the contract method 0x540abf73. +// +// Solidity: function bridgeERC20To(address _localToken, address _remoteToken, address _to, uint256 _amount, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeSession) BridgeERC20To(_localToken common.Address, _remoteToken common.Address, _to common.Address, _amount *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.BridgeERC20To(&_L1StandardBridge.TransactOpts, _localToken, _remoteToken, _to, _amount, _minGasLimit, _extraData) +} + +// BridgeERC20To is a paid mutator transaction binding the contract method 0x540abf73. +// +// Solidity: function bridgeERC20To(address _localToken, address _remoteToken, address _to, uint256 _amount, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) BridgeERC20To(_localToken common.Address, _remoteToken common.Address, _to common.Address, _amount *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.BridgeERC20To(&_L1StandardBridge.TransactOpts, _localToken, _remoteToken, _to, _amount, _minGasLimit, _extraData) +} + +// BridgeETH is a paid mutator transaction binding the contract method 0x09fc8843. +// +// Solidity: function bridgeETH(uint32 _minGasLimit, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) BridgeETH(opts *bind.TransactOpts, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.contract.Transact(opts, "bridgeETH", _minGasLimit, _extraData) +} + +// BridgeETH is a paid mutator transaction binding the contract method 0x09fc8843. +// +// Solidity: function bridgeETH(uint32 _minGasLimit, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeSession) BridgeETH(_minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.BridgeETH(&_L1StandardBridge.TransactOpts, _minGasLimit, _extraData) +} + +// BridgeETH is a paid mutator transaction binding the contract method 0x09fc8843. +// +// Solidity: function bridgeETH(uint32 _minGasLimit, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) BridgeETH(_minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.BridgeETH(&_L1StandardBridge.TransactOpts, _minGasLimit, _extraData) +} + +// BridgeETHTo is a paid mutator transaction binding the contract method 0xe11013dd. +// +// Solidity: function bridgeETHTo(address _to, uint32 _minGasLimit, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) BridgeETHTo(opts *bind.TransactOpts, _to common.Address, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.contract.Transact(opts, "bridgeETHTo", _to, _minGasLimit, _extraData) +} + +// BridgeETHTo is a paid mutator transaction binding the contract method 0xe11013dd. +// +// Solidity: function bridgeETHTo(address _to, uint32 _minGasLimit, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeSession) BridgeETHTo(_to common.Address, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.BridgeETHTo(&_L1StandardBridge.TransactOpts, _to, _minGasLimit, _extraData) +} + +// BridgeETHTo is a paid mutator transaction binding the contract method 0xe11013dd. +// +// Solidity: function bridgeETHTo(address _to, uint32 _minGasLimit, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) BridgeETHTo(_to common.Address, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.BridgeETHTo(&_L1StandardBridge.TransactOpts, _to, _minGasLimit, _extraData) +} + +// DepositERC20 is a paid mutator transaction binding the contract method 0x58a997f6. +// +// Solidity: function depositERC20(address _l1Token, address _l2Token, uint256 _amount, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) DepositERC20(opts *bind.TransactOpts, _l1Token common.Address, _l2Token common.Address, _amount *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.contract.Transact(opts, "depositERC20", _l1Token, _l2Token, _amount, _minGasLimit, _extraData) +} + +// DepositERC20 is a paid mutator transaction binding the contract method 0x58a997f6. +// +// Solidity: function depositERC20(address _l1Token, address _l2Token, uint256 _amount, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeSession) DepositERC20(_l1Token common.Address, _l2Token common.Address, _amount *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.DepositERC20(&_L1StandardBridge.TransactOpts, _l1Token, _l2Token, _amount, _minGasLimit, _extraData) +} + +// DepositERC20 is a paid mutator transaction binding the contract method 0x58a997f6. +// +// Solidity: function depositERC20(address _l1Token, address _l2Token, uint256 _amount, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) DepositERC20(_l1Token common.Address, _l2Token common.Address, _amount *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.DepositERC20(&_L1StandardBridge.TransactOpts, _l1Token, _l2Token, _amount, _minGasLimit, _extraData) +} + +// DepositERC20To is a paid mutator transaction binding the contract method 0x838b2520. +// +// Solidity: function depositERC20To(address _l1Token, address _l2Token, address _to, uint256 _amount, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) DepositERC20To(opts *bind.TransactOpts, _l1Token common.Address, _l2Token common.Address, _to common.Address, _amount *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.contract.Transact(opts, "depositERC20To", _l1Token, _l2Token, _to, _amount, _minGasLimit, _extraData) +} + +// DepositERC20To is a paid mutator transaction binding the contract method 0x838b2520. +// +// Solidity: function depositERC20To(address _l1Token, address _l2Token, address _to, uint256 _amount, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeSession) DepositERC20To(_l1Token common.Address, _l2Token common.Address, _to common.Address, _amount *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.DepositERC20To(&_L1StandardBridge.TransactOpts, _l1Token, _l2Token, _to, _amount, _minGasLimit, _extraData) +} + +// DepositERC20To is a paid mutator transaction binding the contract method 0x838b2520. +// +// Solidity: function depositERC20To(address _l1Token, address _l2Token, address _to, uint256 _amount, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) DepositERC20To(_l1Token common.Address, _l2Token common.Address, _to common.Address, _amount *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.DepositERC20To(&_L1StandardBridge.TransactOpts, _l1Token, _l2Token, _to, _amount, _minGasLimit, _extraData) +} + +// DepositETH is a paid mutator transaction binding the contract method 0xb1a1a882. +// +// Solidity: function depositETH(uint32 _minGasLimit, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) DepositETH(opts *bind.TransactOpts, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.contract.Transact(opts, "depositETH", _minGasLimit, _extraData) +} + +// DepositETH is a paid mutator transaction binding the contract method 0xb1a1a882. +// +// Solidity: function depositETH(uint32 _minGasLimit, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeSession) DepositETH(_minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.DepositETH(&_L1StandardBridge.TransactOpts, _minGasLimit, _extraData) +} + +// DepositETH is a paid mutator transaction binding the contract method 0xb1a1a882. +// +// Solidity: function depositETH(uint32 _minGasLimit, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) DepositETH(_minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.DepositETH(&_L1StandardBridge.TransactOpts, _minGasLimit, _extraData) +} + +// DepositETHTo is a paid mutator transaction binding the contract method 0x9a2ac6d5. +// +// Solidity: function depositETHTo(address _to, uint32 _minGasLimit, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) DepositETHTo(opts *bind.TransactOpts, _to common.Address, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.contract.Transact(opts, "depositETHTo", _to, _minGasLimit, _extraData) +} + +// DepositETHTo is a paid mutator transaction binding the contract method 0x9a2ac6d5. +// +// Solidity: function depositETHTo(address _to, uint32 _minGasLimit, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeSession) DepositETHTo(_to common.Address, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.DepositETHTo(&_L1StandardBridge.TransactOpts, _to, _minGasLimit, _extraData) +} + +// DepositETHTo is a paid mutator transaction binding the contract method 0x9a2ac6d5. +// +// Solidity: function depositETHTo(address _to, uint32 _minGasLimit, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) DepositETHTo(_to common.Address, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.DepositETHTo(&_L1StandardBridge.TransactOpts, _to, _minGasLimit, _extraData) +} + +// FinalizeBridgeERC20 is a paid mutator transaction binding the contract method 0x0166a07a. +// +// Solidity: function finalizeBridgeERC20(address _localToken, address _remoteToken, address _from, address _to, uint256 _amount, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) FinalizeBridgeERC20(opts *bind.TransactOpts, _localToken common.Address, _remoteToken common.Address, _from common.Address, _to common.Address, _amount *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.contract.Transact(opts, "finalizeBridgeERC20", _localToken, _remoteToken, _from, _to, _amount, _extraData) +} + +// FinalizeBridgeERC20 is a paid mutator transaction binding the contract method 0x0166a07a. +// +// Solidity: function finalizeBridgeERC20(address _localToken, address _remoteToken, address _from, address _to, uint256 _amount, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeSession) FinalizeBridgeERC20(_localToken common.Address, _remoteToken common.Address, _from common.Address, _to common.Address, _amount *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.FinalizeBridgeERC20(&_L1StandardBridge.TransactOpts, _localToken, _remoteToken, _from, _to, _amount, _extraData) +} + +// FinalizeBridgeERC20 is a paid mutator transaction binding the contract method 0x0166a07a. +// +// Solidity: function finalizeBridgeERC20(address _localToken, address _remoteToken, address _from, address _to, uint256 _amount, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) FinalizeBridgeERC20(_localToken common.Address, _remoteToken common.Address, _from common.Address, _to common.Address, _amount *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.FinalizeBridgeERC20(&_L1StandardBridge.TransactOpts, _localToken, _remoteToken, _from, _to, _amount, _extraData) +} + +// FinalizeBridgeETH is a paid mutator transaction binding the contract method 0x1635f5fd. +// +// Solidity: function finalizeBridgeETH(address _from, address _to, uint256 _amount, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) FinalizeBridgeETH(opts *bind.TransactOpts, _from common.Address, _to common.Address, _amount *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.contract.Transact(opts, "finalizeBridgeETH", _from, _to, _amount, _extraData) +} + +// FinalizeBridgeETH is a paid mutator transaction binding the contract method 0x1635f5fd. +// +// Solidity: function finalizeBridgeETH(address _from, address _to, uint256 _amount, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeSession) FinalizeBridgeETH(_from common.Address, _to common.Address, _amount *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.FinalizeBridgeETH(&_L1StandardBridge.TransactOpts, _from, _to, _amount, _extraData) +} + +// FinalizeBridgeETH is a paid mutator transaction binding the contract method 0x1635f5fd. +// +// Solidity: function finalizeBridgeETH(address _from, address _to, uint256 _amount, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) FinalizeBridgeETH(_from common.Address, _to common.Address, _amount *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.FinalizeBridgeETH(&_L1StandardBridge.TransactOpts, _from, _to, _amount, _extraData) +} + +// FinalizeERC20Withdrawal is a paid mutator transaction binding the contract method 0xa9f9e675. +// +// Solidity: function finalizeERC20Withdrawal(address _l1Token, address _l2Token, address _from, address _to, uint256 _amount, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) FinalizeERC20Withdrawal(opts *bind.TransactOpts, _l1Token common.Address, _l2Token common.Address, _from common.Address, _to common.Address, _amount *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.contract.Transact(opts, "finalizeERC20Withdrawal", _l1Token, _l2Token, _from, _to, _amount, _extraData) +} + +// FinalizeERC20Withdrawal is a paid mutator transaction binding the contract method 0xa9f9e675. +// +// Solidity: function finalizeERC20Withdrawal(address _l1Token, address _l2Token, address _from, address _to, uint256 _amount, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeSession) FinalizeERC20Withdrawal(_l1Token common.Address, _l2Token common.Address, _from common.Address, _to common.Address, _amount *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.FinalizeERC20Withdrawal(&_L1StandardBridge.TransactOpts, _l1Token, _l2Token, _from, _to, _amount, _extraData) +} + +// FinalizeERC20Withdrawal is a paid mutator transaction binding the contract method 0xa9f9e675. +// +// Solidity: function finalizeERC20Withdrawal(address _l1Token, address _l2Token, address _from, address _to, uint256 _amount, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) FinalizeERC20Withdrawal(_l1Token common.Address, _l2Token common.Address, _from common.Address, _to common.Address, _amount *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.FinalizeERC20Withdrawal(&_L1StandardBridge.TransactOpts, _l1Token, _l2Token, _from, _to, _amount, _extraData) +} + +// FinalizeETHWithdrawal is a paid mutator transaction binding the contract method 0x1532ec34. +// +// Solidity: function finalizeETHWithdrawal(address _from, address _to, uint256 _amount, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) FinalizeETHWithdrawal(opts *bind.TransactOpts, _from common.Address, _to common.Address, _amount *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.contract.Transact(opts, "finalizeETHWithdrawal", _from, _to, _amount, _extraData) +} + +// FinalizeETHWithdrawal is a paid mutator transaction binding the contract method 0x1532ec34. +// +// Solidity: function finalizeETHWithdrawal(address _from, address _to, uint256 _amount, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeSession) FinalizeETHWithdrawal(_from common.Address, _to common.Address, _amount *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.FinalizeETHWithdrawal(&_L1StandardBridge.TransactOpts, _from, _to, _amount, _extraData) +} + +// FinalizeETHWithdrawal is a paid mutator transaction binding the contract method 0x1532ec34. +// +// Solidity: function finalizeETHWithdrawal(address _from, address _to, uint256 _amount, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) FinalizeETHWithdrawal(_from common.Address, _to common.Address, _amount *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.FinalizeETHWithdrawal(&_L1StandardBridge.TransactOpts, _from, _to, _amount, _extraData) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc0c53b8b. +// +// Solidity: function initialize(address _messenger, address _superchainConfig, address _systemConfig) returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) Initialize(opts *bind.TransactOpts, _messenger common.Address, _superchainConfig common.Address, _systemConfig common.Address) (*types.Transaction, error) { + return _L1StandardBridge.contract.Transact(opts, "initialize", _messenger, _superchainConfig, _systemConfig) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc0c53b8b. +// +// Solidity: function initialize(address _messenger, address _superchainConfig, address _systemConfig) returns() +func (_L1StandardBridge *L1StandardBridgeSession) Initialize(_messenger common.Address, _superchainConfig common.Address, _systemConfig common.Address) (*types.Transaction, error) { + return _L1StandardBridge.Contract.Initialize(&_L1StandardBridge.TransactOpts, _messenger, _superchainConfig, _systemConfig) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc0c53b8b. +// +// Solidity: function initialize(address _messenger, address _superchainConfig, address _systemConfig) returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) Initialize(_messenger common.Address, _superchainConfig common.Address, _systemConfig common.Address) (*types.Transaction, error) { + return _L1StandardBridge.Contract.Initialize(&_L1StandardBridge.TransactOpts, _messenger, _superchainConfig, _systemConfig) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _L1StandardBridge.contract.RawTransact(opts, nil) // calldata is disallowed for receive function +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_L1StandardBridge *L1StandardBridgeSession) Receive() (*types.Transaction, error) { + return _L1StandardBridge.Contract.Receive(&_L1StandardBridge.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) Receive() (*types.Transaction, error) { + return _L1StandardBridge.Contract.Receive(&_L1StandardBridge.TransactOpts) +} + +// L1StandardBridgeERC20BridgeFinalizedIterator is returned from FilterERC20BridgeFinalized and is used to iterate over the raw logs and unpacked data for ERC20BridgeFinalized events raised by the L1StandardBridge contract. +type L1StandardBridgeERC20BridgeFinalizedIterator struct { + Event *L1StandardBridgeERC20BridgeFinalized // 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 *L1StandardBridgeERC20BridgeFinalizedIterator) 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(L1StandardBridgeERC20BridgeFinalized) + 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(L1StandardBridgeERC20BridgeFinalized) + 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 *L1StandardBridgeERC20BridgeFinalizedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1StandardBridgeERC20BridgeFinalizedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1StandardBridgeERC20BridgeFinalized represents a ERC20BridgeFinalized event raised by the L1StandardBridge contract. +type L1StandardBridgeERC20BridgeFinalized struct { + LocalToken common.Address + RemoteToken common.Address + From common.Address + To common.Address + Amount *big.Int + ExtraData []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterERC20BridgeFinalized is a free log retrieval operation binding the contract event 0xd59c65b35445225835c83f50b6ede06a7be047d22e357073e250d9af537518cd. +// +// Solidity: event ERC20BridgeFinalized(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) FilterERC20BridgeFinalized(opts *bind.FilterOpts, localToken []common.Address, remoteToken []common.Address, from []common.Address) (*L1StandardBridgeERC20BridgeFinalizedIterator, error) { + + var localTokenRule []interface{} + for _, localTokenItem := range localToken { + localTokenRule = append(localTokenRule, localTokenItem) + } + var remoteTokenRule []interface{} + for _, remoteTokenItem := range remoteToken { + remoteTokenRule = append(remoteTokenRule, remoteTokenItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _L1StandardBridge.contract.FilterLogs(opts, "ERC20BridgeFinalized", localTokenRule, remoteTokenRule, fromRule) + if err != nil { + return nil, err + } + return &L1StandardBridgeERC20BridgeFinalizedIterator{contract: _L1StandardBridge.contract, event: "ERC20BridgeFinalized", logs: logs, sub: sub}, nil +} + +// WatchERC20BridgeFinalized is a free log subscription operation binding the contract event 0xd59c65b35445225835c83f50b6ede06a7be047d22e357073e250d9af537518cd. +// +// Solidity: event ERC20BridgeFinalized(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) WatchERC20BridgeFinalized(opts *bind.WatchOpts, sink chan<- *L1StandardBridgeERC20BridgeFinalized, localToken []common.Address, remoteToken []common.Address, from []common.Address) (event.Subscription, error) { + + var localTokenRule []interface{} + for _, localTokenItem := range localToken { + localTokenRule = append(localTokenRule, localTokenItem) + } + var remoteTokenRule []interface{} + for _, remoteTokenItem := range remoteToken { + remoteTokenRule = append(remoteTokenRule, remoteTokenItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _L1StandardBridge.contract.WatchLogs(opts, "ERC20BridgeFinalized", localTokenRule, remoteTokenRule, fromRule) + 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(L1StandardBridgeERC20BridgeFinalized) + if err := _L1StandardBridge.contract.UnpackLog(event, "ERC20BridgeFinalized", 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 +} + +// ParseERC20BridgeFinalized is a log parse operation binding the contract event 0xd59c65b35445225835c83f50b6ede06a7be047d22e357073e250d9af537518cd. +// +// Solidity: event ERC20BridgeFinalized(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) ParseERC20BridgeFinalized(log types.Log) (*L1StandardBridgeERC20BridgeFinalized, error) { + event := new(L1StandardBridgeERC20BridgeFinalized) + if err := _L1StandardBridge.contract.UnpackLog(event, "ERC20BridgeFinalized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1StandardBridgeERC20BridgeInitiatedIterator is returned from FilterERC20BridgeInitiated and is used to iterate over the raw logs and unpacked data for ERC20BridgeInitiated events raised by the L1StandardBridge contract. +type L1StandardBridgeERC20BridgeInitiatedIterator struct { + Event *L1StandardBridgeERC20BridgeInitiated // 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 *L1StandardBridgeERC20BridgeInitiatedIterator) 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(L1StandardBridgeERC20BridgeInitiated) + 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(L1StandardBridgeERC20BridgeInitiated) + 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 *L1StandardBridgeERC20BridgeInitiatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1StandardBridgeERC20BridgeInitiatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1StandardBridgeERC20BridgeInitiated represents a ERC20BridgeInitiated event raised by the L1StandardBridge contract. +type L1StandardBridgeERC20BridgeInitiated struct { + LocalToken common.Address + RemoteToken common.Address + From common.Address + To common.Address + Amount *big.Int + ExtraData []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterERC20BridgeInitiated is a free log retrieval operation binding the contract event 0x7ff126db8024424bbfd9826e8ab82ff59136289ea440b04b39a0df1b03b9cabf. +// +// Solidity: event ERC20BridgeInitiated(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) FilterERC20BridgeInitiated(opts *bind.FilterOpts, localToken []common.Address, remoteToken []common.Address, from []common.Address) (*L1StandardBridgeERC20BridgeInitiatedIterator, error) { + + var localTokenRule []interface{} + for _, localTokenItem := range localToken { + localTokenRule = append(localTokenRule, localTokenItem) + } + var remoteTokenRule []interface{} + for _, remoteTokenItem := range remoteToken { + remoteTokenRule = append(remoteTokenRule, remoteTokenItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _L1StandardBridge.contract.FilterLogs(opts, "ERC20BridgeInitiated", localTokenRule, remoteTokenRule, fromRule) + if err != nil { + return nil, err + } + return &L1StandardBridgeERC20BridgeInitiatedIterator{contract: _L1StandardBridge.contract, event: "ERC20BridgeInitiated", logs: logs, sub: sub}, nil +} + +// WatchERC20BridgeInitiated is a free log subscription operation binding the contract event 0x7ff126db8024424bbfd9826e8ab82ff59136289ea440b04b39a0df1b03b9cabf. +// +// Solidity: event ERC20BridgeInitiated(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) WatchERC20BridgeInitiated(opts *bind.WatchOpts, sink chan<- *L1StandardBridgeERC20BridgeInitiated, localToken []common.Address, remoteToken []common.Address, from []common.Address) (event.Subscription, error) { + + var localTokenRule []interface{} + for _, localTokenItem := range localToken { + localTokenRule = append(localTokenRule, localTokenItem) + } + var remoteTokenRule []interface{} + for _, remoteTokenItem := range remoteToken { + remoteTokenRule = append(remoteTokenRule, remoteTokenItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _L1StandardBridge.contract.WatchLogs(opts, "ERC20BridgeInitiated", localTokenRule, remoteTokenRule, fromRule) + 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(L1StandardBridgeERC20BridgeInitiated) + if err := _L1StandardBridge.contract.UnpackLog(event, "ERC20BridgeInitiated", 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 +} + +// ParseERC20BridgeInitiated is a log parse operation binding the contract event 0x7ff126db8024424bbfd9826e8ab82ff59136289ea440b04b39a0df1b03b9cabf. +// +// Solidity: event ERC20BridgeInitiated(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) ParseERC20BridgeInitiated(log types.Log) (*L1StandardBridgeERC20BridgeInitiated, error) { + event := new(L1StandardBridgeERC20BridgeInitiated) + if err := _L1StandardBridge.contract.UnpackLog(event, "ERC20BridgeInitiated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1StandardBridgeERC20DepositInitiatedIterator is returned from FilterERC20DepositInitiated and is used to iterate over the raw logs and unpacked data for ERC20DepositInitiated events raised by the L1StandardBridge contract. +type L1StandardBridgeERC20DepositInitiatedIterator struct { + Event *L1StandardBridgeERC20DepositInitiated // 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 *L1StandardBridgeERC20DepositInitiatedIterator) 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(L1StandardBridgeERC20DepositInitiated) + 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(L1StandardBridgeERC20DepositInitiated) + 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 *L1StandardBridgeERC20DepositInitiatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1StandardBridgeERC20DepositInitiatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1StandardBridgeERC20DepositInitiated represents a ERC20DepositInitiated event raised by the L1StandardBridge contract. +type L1StandardBridgeERC20DepositInitiated struct { + L1Token common.Address + L2Token common.Address + From common.Address + To common.Address + Amount *big.Int + ExtraData []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterERC20DepositInitiated is a free log retrieval operation binding the contract event 0x718594027abd4eaed59f95162563e0cc6d0e8d5b86b1c7be8b1b0ac3343d0396. +// +// Solidity: event ERC20DepositInitiated(address indexed l1Token, address indexed l2Token, address indexed from, address to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) FilterERC20DepositInitiated(opts *bind.FilterOpts, l1Token []common.Address, l2Token []common.Address, from []common.Address) (*L1StandardBridgeERC20DepositInitiatedIterator, error) { + + var l1TokenRule []interface{} + for _, l1TokenItem := range l1Token { + l1TokenRule = append(l1TokenRule, l1TokenItem) + } + var l2TokenRule []interface{} + for _, l2TokenItem := range l2Token { + l2TokenRule = append(l2TokenRule, l2TokenItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _L1StandardBridge.contract.FilterLogs(opts, "ERC20DepositInitiated", l1TokenRule, l2TokenRule, fromRule) + if err != nil { + return nil, err + } + return &L1StandardBridgeERC20DepositInitiatedIterator{contract: _L1StandardBridge.contract, event: "ERC20DepositInitiated", logs: logs, sub: sub}, nil +} + +// WatchERC20DepositInitiated is a free log subscription operation binding the contract event 0x718594027abd4eaed59f95162563e0cc6d0e8d5b86b1c7be8b1b0ac3343d0396. +// +// Solidity: event ERC20DepositInitiated(address indexed l1Token, address indexed l2Token, address indexed from, address to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) WatchERC20DepositInitiated(opts *bind.WatchOpts, sink chan<- *L1StandardBridgeERC20DepositInitiated, l1Token []common.Address, l2Token []common.Address, from []common.Address) (event.Subscription, error) { + + var l1TokenRule []interface{} + for _, l1TokenItem := range l1Token { + l1TokenRule = append(l1TokenRule, l1TokenItem) + } + var l2TokenRule []interface{} + for _, l2TokenItem := range l2Token { + l2TokenRule = append(l2TokenRule, l2TokenItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _L1StandardBridge.contract.WatchLogs(opts, "ERC20DepositInitiated", l1TokenRule, l2TokenRule, fromRule) + 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(L1StandardBridgeERC20DepositInitiated) + if err := _L1StandardBridge.contract.UnpackLog(event, "ERC20DepositInitiated", 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 +} + +// ParseERC20DepositInitiated is a log parse operation binding the contract event 0x718594027abd4eaed59f95162563e0cc6d0e8d5b86b1c7be8b1b0ac3343d0396. +// +// Solidity: event ERC20DepositInitiated(address indexed l1Token, address indexed l2Token, address indexed from, address to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) ParseERC20DepositInitiated(log types.Log) (*L1StandardBridgeERC20DepositInitiated, error) { + event := new(L1StandardBridgeERC20DepositInitiated) + if err := _L1StandardBridge.contract.UnpackLog(event, "ERC20DepositInitiated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1StandardBridgeERC20WithdrawalFinalizedIterator is returned from FilterERC20WithdrawalFinalized and is used to iterate over the raw logs and unpacked data for ERC20WithdrawalFinalized events raised by the L1StandardBridge contract. +type L1StandardBridgeERC20WithdrawalFinalizedIterator struct { + Event *L1StandardBridgeERC20WithdrawalFinalized // 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 *L1StandardBridgeERC20WithdrawalFinalizedIterator) 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(L1StandardBridgeERC20WithdrawalFinalized) + 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(L1StandardBridgeERC20WithdrawalFinalized) + 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 *L1StandardBridgeERC20WithdrawalFinalizedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1StandardBridgeERC20WithdrawalFinalizedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1StandardBridgeERC20WithdrawalFinalized represents a ERC20WithdrawalFinalized event raised by the L1StandardBridge contract. +type L1StandardBridgeERC20WithdrawalFinalized struct { + L1Token common.Address + L2Token common.Address + From common.Address + To common.Address + Amount *big.Int + ExtraData []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterERC20WithdrawalFinalized is a free log retrieval operation binding the contract event 0x3ceee06c1e37648fcbb6ed52e17b3e1f275a1f8c7b22a84b2b84732431e046b3. +// +// Solidity: event ERC20WithdrawalFinalized(address indexed l1Token, address indexed l2Token, address indexed from, address to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) FilterERC20WithdrawalFinalized(opts *bind.FilterOpts, l1Token []common.Address, l2Token []common.Address, from []common.Address) (*L1StandardBridgeERC20WithdrawalFinalizedIterator, error) { + + var l1TokenRule []interface{} + for _, l1TokenItem := range l1Token { + l1TokenRule = append(l1TokenRule, l1TokenItem) + } + var l2TokenRule []interface{} + for _, l2TokenItem := range l2Token { + l2TokenRule = append(l2TokenRule, l2TokenItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _L1StandardBridge.contract.FilterLogs(opts, "ERC20WithdrawalFinalized", l1TokenRule, l2TokenRule, fromRule) + if err != nil { + return nil, err + } + return &L1StandardBridgeERC20WithdrawalFinalizedIterator{contract: _L1StandardBridge.contract, event: "ERC20WithdrawalFinalized", logs: logs, sub: sub}, nil +} + +// WatchERC20WithdrawalFinalized is a free log subscription operation binding the contract event 0x3ceee06c1e37648fcbb6ed52e17b3e1f275a1f8c7b22a84b2b84732431e046b3. +// +// Solidity: event ERC20WithdrawalFinalized(address indexed l1Token, address indexed l2Token, address indexed from, address to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) WatchERC20WithdrawalFinalized(opts *bind.WatchOpts, sink chan<- *L1StandardBridgeERC20WithdrawalFinalized, l1Token []common.Address, l2Token []common.Address, from []common.Address) (event.Subscription, error) { + + var l1TokenRule []interface{} + for _, l1TokenItem := range l1Token { + l1TokenRule = append(l1TokenRule, l1TokenItem) + } + var l2TokenRule []interface{} + for _, l2TokenItem := range l2Token { + l2TokenRule = append(l2TokenRule, l2TokenItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _L1StandardBridge.contract.WatchLogs(opts, "ERC20WithdrawalFinalized", l1TokenRule, l2TokenRule, fromRule) + 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(L1StandardBridgeERC20WithdrawalFinalized) + if err := _L1StandardBridge.contract.UnpackLog(event, "ERC20WithdrawalFinalized", 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 +} + +// ParseERC20WithdrawalFinalized is a log parse operation binding the contract event 0x3ceee06c1e37648fcbb6ed52e17b3e1f275a1f8c7b22a84b2b84732431e046b3. +// +// Solidity: event ERC20WithdrawalFinalized(address indexed l1Token, address indexed l2Token, address indexed from, address to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) ParseERC20WithdrawalFinalized(log types.Log) (*L1StandardBridgeERC20WithdrawalFinalized, error) { + event := new(L1StandardBridgeERC20WithdrawalFinalized) + if err := _L1StandardBridge.contract.UnpackLog(event, "ERC20WithdrawalFinalized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1StandardBridgeETHBridgeFinalizedIterator is returned from FilterETHBridgeFinalized and is used to iterate over the raw logs and unpacked data for ETHBridgeFinalized events raised by the L1StandardBridge contract. +type L1StandardBridgeETHBridgeFinalizedIterator struct { + Event *L1StandardBridgeETHBridgeFinalized // 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 *L1StandardBridgeETHBridgeFinalizedIterator) 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(L1StandardBridgeETHBridgeFinalized) + 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(L1StandardBridgeETHBridgeFinalized) + 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 *L1StandardBridgeETHBridgeFinalizedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1StandardBridgeETHBridgeFinalizedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1StandardBridgeETHBridgeFinalized represents a ETHBridgeFinalized event raised by the L1StandardBridge contract. +type L1StandardBridgeETHBridgeFinalized struct { + From common.Address + To common.Address + Amount *big.Int + ExtraData []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterETHBridgeFinalized is a free log retrieval operation binding the contract event 0x31b2166ff604fc5672ea5df08a78081d2bc6d746cadce880747f3643d819e83d. +// +// Solidity: event ETHBridgeFinalized(address indexed from, address indexed to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) FilterETHBridgeFinalized(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*L1StandardBridgeETHBridgeFinalizedIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _L1StandardBridge.contract.FilterLogs(opts, "ETHBridgeFinalized", fromRule, toRule) + if err != nil { + return nil, err + } + return &L1StandardBridgeETHBridgeFinalizedIterator{contract: _L1StandardBridge.contract, event: "ETHBridgeFinalized", logs: logs, sub: sub}, nil +} + +// WatchETHBridgeFinalized is a free log subscription operation binding the contract event 0x31b2166ff604fc5672ea5df08a78081d2bc6d746cadce880747f3643d819e83d. +// +// Solidity: event ETHBridgeFinalized(address indexed from, address indexed to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) WatchETHBridgeFinalized(opts *bind.WatchOpts, sink chan<- *L1StandardBridgeETHBridgeFinalized, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _L1StandardBridge.contract.WatchLogs(opts, "ETHBridgeFinalized", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(L1StandardBridgeETHBridgeFinalized) + if err := _L1StandardBridge.contract.UnpackLog(event, "ETHBridgeFinalized", 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 +} + +// ParseETHBridgeFinalized is a log parse operation binding the contract event 0x31b2166ff604fc5672ea5df08a78081d2bc6d746cadce880747f3643d819e83d. +// +// Solidity: event ETHBridgeFinalized(address indexed from, address indexed to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) ParseETHBridgeFinalized(log types.Log) (*L1StandardBridgeETHBridgeFinalized, error) { + event := new(L1StandardBridgeETHBridgeFinalized) + if err := _L1StandardBridge.contract.UnpackLog(event, "ETHBridgeFinalized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1StandardBridgeETHBridgeInitiatedIterator is returned from FilterETHBridgeInitiated and is used to iterate over the raw logs and unpacked data for ETHBridgeInitiated events raised by the L1StandardBridge contract. +type L1StandardBridgeETHBridgeInitiatedIterator struct { + Event *L1StandardBridgeETHBridgeInitiated // 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 *L1StandardBridgeETHBridgeInitiatedIterator) 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(L1StandardBridgeETHBridgeInitiated) + 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(L1StandardBridgeETHBridgeInitiated) + 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 *L1StandardBridgeETHBridgeInitiatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1StandardBridgeETHBridgeInitiatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1StandardBridgeETHBridgeInitiated represents a ETHBridgeInitiated event raised by the L1StandardBridge contract. +type L1StandardBridgeETHBridgeInitiated struct { + From common.Address + To common.Address + Amount *big.Int + ExtraData []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterETHBridgeInitiated is a free log retrieval operation binding the contract event 0x2849b43074093a05396b6f2a937dee8565b15a48a7b3d4bffb732a5017380af5. +// +// Solidity: event ETHBridgeInitiated(address indexed from, address indexed to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) FilterETHBridgeInitiated(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*L1StandardBridgeETHBridgeInitiatedIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _L1StandardBridge.contract.FilterLogs(opts, "ETHBridgeInitiated", fromRule, toRule) + if err != nil { + return nil, err + } + return &L1StandardBridgeETHBridgeInitiatedIterator{contract: _L1StandardBridge.contract, event: "ETHBridgeInitiated", logs: logs, sub: sub}, nil +} + +// WatchETHBridgeInitiated is a free log subscription operation binding the contract event 0x2849b43074093a05396b6f2a937dee8565b15a48a7b3d4bffb732a5017380af5. +// +// Solidity: event ETHBridgeInitiated(address indexed from, address indexed to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) WatchETHBridgeInitiated(opts *bind.WatchOpts, sink chan<- *L1StandardBridgeETHBridgeInitiated, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _L1StandardBridge.contract.WatchLogs(opts, "ETHBridgeInitiated", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(L1StandardBridgeETHBridgeInitiated) + if err := _L1StandardBridge.contract.UnpackLog(event, "ETHBridgeInitiated", 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 +} + +// ParseETHBridgeInitiated is a log parse operation binding the contract event 0x2849b43074093a05396b6f2a937dee8565b15a48a7b3d4bffb732a5017380af5. +// +// Solidity: event ETHBridgeInitiated(address indexed from, address indexed to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) ParseETHBridgeInitiated(log types.Log) (*L1StandardBridgeETHBridgeInitiated, error) { + event := new(L1StandardBridgeETHBridgeInitiated) + if err := _L1StandardBridge.contract.UnpackLog(event, "ETHBridgeInitiated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1StandardBridgeETHDepositInitiatedIterator is returned from FilterETHDepositInitiated and is used to iterate over the raw logs and unpacked data for ETHDepositInitiated events raised by the L1StandardBridge contract. +type L1StandardBridgeETHDepositInitiatedIterator struct { + Event *L1StandardBridgeETHDepositInitiated // 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 *L1StandardBridgeETHDepositInitiatedIterator) 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(L1StandardBridgeETHDepositInitiated) + 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(L1StandardBridgeETHDepositInitiated) + 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 *L1StandardBridgeETHDepositInitiatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1StandardBridgeETHDepositInitiatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1StandardBridgeETHDepositInitiated represents a ETHDepositInitiated event raised by the L1StandardBridge contract. +type L1StandardBridgeETHDepositInitiated struct { + From common.Address + To common.Address + Amount *big.Int + ExtraData []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterETHDepositInitiated is a free log retrieval operation binding the contract event 0x35d79ab81f2b2017e19afb5c5571778877782d7a8786f5907f93b0f4702f4f23. +// +// Solidity: event ETHDepositInitiated(address indexed from, address indexed to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) FilterETHDepositInitiated(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*L1StandardBridgeETHDepositInitiatedIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _L1StandardBridge.contract.FilterLogs(opts, "ETHDepositInitiated", fromRule, toRule) + if err != nil { + return nil, err + } + return &L1StandardBridgeETHDepositInitiatedIterator{contract: _L1StandardBridge.contract, event: "ETHDepositInitiated", logs: logs, sub: sub}, nil +} + +// WatchETHDepositInitiated is a free log subscription operation binding the contract event 0x35d79ab81f2b2017e19afb5c5571778877782d7a8786f5907f93b0f4702f4f23. +// +// Solidity: event ETHDepositInitiated(address indexed from, address indexed to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) WatchETHDepositInitiated(opts *bind.WatchOpts, sink chan<- *L1StandardBridgeETHDepositInitiated, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _L1StandardBridge.contract.WatchLogs(opts, "ETHDepositInitiated", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(L1StandardBridgeETHDepositInitiated) + if err := _L1StandardBridge.contract.UnpackLog(event, "ETHDepositInitiated", 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 +} + +// ParseETHDepositInitiated is a log parse operation binding the contract event 0x35d79ab81f2b2017e19afb5c5571778877782d7a8786f5907f93b0f4702f4f23. +// +// Solidity: event ETHDepositInitiated(address indexed from, address indexed to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) ParseETHDepositInitiated(log types.Log) (*L1StandardBridgeETHDepositInitiated, error) { + event := new(L1StandardBridgeETHDepositInitiated) + if err := _L1StandardBridge.contract.UnpackLog(event, "ETHDepositInitiated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1StandardBridgeETHWithdrawalFinalizedIterator is returned from FilterETHWithdrawalFinalized and is used to iterate over the raw logs and unpacked data for ETHWithdrawalFinalized events raised by the L1StandardBridge contract. +type L1StandardBridgeETHWithdrawalFinalizedIterator struct { + Event *L1StandardBridgeETHWithdrawalFinalized // 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 *L1StandardBridgeETHWithdrawalFinalizedIterator) 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(L1StandardBridgeETHWithdrawalFinalized) + 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(L1StandardBridgeETHWithdrawalFinalized) + 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 *L1StandardBridgeETHWithdrawalFinalizedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1StandardBridgeETHWithdrawalFinalizedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1StandardBridgeETHWithdrawalFinalized represents a ETHWithdrawalFinalized event raised by the L1StandardBridge contract. +type L1StandardBridgeETHWithdrawalFinalized struct { + From common.Address + To common.Address + Amount *big.Int + ExtraData []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterETHWithdrawalFinalized is a free log retrieval operation binding the contract event 0x2ac69ee804d9a7a0984249f508dfab7cb2534b465b6ce1580f99a38ba9c5e631. +// +// Solidity: event ETHWithdrawalFinalized(address indexed from, address indexed to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) FilterETHWithdrawalFinalized(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*L1StandardBridgeETHWithdrawalFinalizedIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _L1StandardBridge.contract.FilterLogs(opts, "ETHWithdrawalFinalized", fromRule, toRule) + if err != nil { + return nil, err + } + return &L1StandardBridgeETHWithdrawalFinalizedIterator{contract: _L1StandardBridge.contract, event: "ETHWithdrawalFinalized", logs: logs, sub: sub}, nil +} + +// WatchETHWithdrawalFinalized is a free log subscription operation binding the contract event 0x2ac69ee804d9a7a0984249f508dfab7cb2534b465b6ce1580f99a38ba9c5e631. +// +// Solidity: event ETHWithdrawalFinalized(address indexed from, address indexed to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) WatchETHWithdrawalFinalized(opts *bind.WatchOpts, sink chan<- *L1StandardBridgeETHWithdrawalFinalized, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _L1StandardBridge.contract.WatchLogs(opts, "ETHWithdrawalFinalized", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(L1StandardBridgeETHWithdrawalFinalized) + if err := _L1StandardBridge.contract.UnpackLog(event, "ETHWithdrawalFinalized", 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 +} + +// ParseETHWithdrawalFinalized is a log parse operation binding the contract event 0x2ac69ee804d9a7a0984249f508dfab7cb2534b465b6ce1580f99a38ba9c5e631. +// +// Solidity: event ETHWithdrawalFinalized(address indexed from, address indexed to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) ParseETHWithdrawalFinalized(log types.Log) (*L1StandardBridgeETHWithdrawalFinalized, error) { + event := new(L1StandardBridgeETHWithdrawalFinalized) + if err := _L1StandardBridge.contract.UnpackLog(event, "ETHWithdrawalFinalized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1StandardBridgeInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the L1StandardBridge contract. +type L1StandardBridgeInitializedIterator struct { + Event *L1StandardBridgeInitialized // 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 *L1StandardBridgeInitializedIterator) 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(L1StandardBridgeInitialized) + 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(L1StandardBridgeInitialized) + 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 *L1StandardBridgeInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1StandardBridgeInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1StandardBridgeInitialized represents a Initialized event raised by the L1StandardBridge contract. +type L1StandardBridgeInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_L1StandardBridge *L1StandardBridgeFilterer) FilterInitialized(opts *bind.FilterOpts) (*L1StandardBridgeInitializedIterator, error) { + + logs, sub, err := _L1StandardBridge.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &L1StandardBridgeInitializedIterator{contract: _L1StandardBridge.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_L1StandardBridge *L1StandardBridgeFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *L1StandardBridgeInitialized) (event.Subscription, error) { + + logs, sub, err := _L1StandardBridge.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(L1StandardBridgeInitialized) + if err := _L1StandardBridge.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_L1StandardBridge *L1StandardBridgeFilterer) ParseInitialized(log types.Log) (*L1StandardBridgeInitialized, error) { + event := new(L1StandardBridgeInitialized) + if err := _L1StandardBridge.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/op-chain-ops/opbnb-upgrades/new-contracts/bindings/L2OutputOracle.go b/op-chain-ops/opbnb-upgrades/new-contracts/bindings/L2OutputOracle.go new file mode 100644 index 000000000..0c99d56c6 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/new-contracts/bindings/L2OutputOracle.go @@ -0,0 +1,1352 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// TypesOutputProposal is an auto generated low-level Go binding around an user-defined struct. +type TypesOutputProposal struct { + OutputRoot [32]byte + Timestamp *big.Int + L2BlockNumber *big.Int +} + +// L2OutputOracleMetaData contains all meta data concerning the L2OutputOracle contract. +var L2OutputOracleMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"CHALLENGER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"FINALIZATION_PERIOD_SECONDS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"L2_BLOCK_TIME\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PROPOSER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"SUBMISSION_INTERVAL\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"challenger\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"computeL2Timestamp\",\"inputs\":[{\"name\":\"_l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deleteL2Outputs\",\"inputs\":[{\"name\":\"_l2OutputIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"finalizationPeriodSeconds\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getL2Output\",\"inputs\":[{\"name\":\"_l2OutputIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structTypes.OutputProposal\",\"components\":[{\"name\":\"outputRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"timestamp\",\"type\":\"uint128\",\"internalType\":\"uint128\"},{\"name\":\"l2BlockNumber\",\"type\":\"uint128\",\"internalType\":\"uint128\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getL2OutputAfter\",\"inputs\":[{\"name\":\"_l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structTypes.OutputProposal\",\"components\":[{\"name\":\"outputRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"timestamp\",\"type\":\"uint128\",\"internalType\":\"uint128\"},{\"name\":\"l2BlockNumber\",\"type\":\"uint128\",\"internalType\":\"uint128\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getL2OutputIndexAfter\",\"inputs\":[{\"name\":\"_l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_submissionInterval\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_l2BlockTime\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_startingBlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_startingTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_proposer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_challenger\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_finalizationPeriodSeconds\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"l2BlockTime\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestBlockNumber\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestOutputIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nextBlockNumber\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nextOutputIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proposeL2Output\",\"inputs\":[{\"name\":\"_outputRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_l1BlockHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_l1BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"proposer\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"startingBlockNumber\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"startingTimestamp\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"submissionInterval\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OutputProposed\",\"inputs\":[{\"name\":\"outputRoot\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"l2OutputIndex\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"l2BlockNumber\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"l1Timestamp\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OutputsDeleted\",\"inputs\":[{\"name\":\"prevNextOutputIndex\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"newNextOutputIndex\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false}]", +} + +// L2OutputOracleABI is the input ABI used to generate the binding from. +// Deprecated: Use L2OutputOracleMetaData.ABI instead. +var L2OutputOracleABI = L2OutputOracleMetaData.ABI + +// L2OutputOracle is an auto generated Go binding around an Ethereum contract. +type L2OutputOracle struct { + L2OutputOracleCaller // Read-only binding to the contract + L2OutputOracleTransactor // Write-only binding to the contract + L2OutputOracleFilterer // Log filterer for contract events +} + +// L2OutputOracleCaller is an auto generated read-only Go binding around an Ethereum contract. +type L2OutputOracleCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L2OutputOracleTransactor is an auto generated write-only Go binding around an Ethereum contract. +type L2OutputOracleTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L2OutputOracleFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type L2OutputOracleFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L2OutputOracleSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type L2OutputOracleSession struct { + Contract *L2OutputOracle // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// L2OutputOracleCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type L2OutputOracleCallerSession struct { + Contract *L2OutputOracleCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// L2OutputOracleTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type L2OutputOracleTransactorSession struct { + Contract *L2OutputOracleTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// L2OutputOracleRaw is an auto generated low-level Go binding around an Ethereum contract. +type L2OutputOracleRaw struct { + Contract *L2OutputOracle // Generic contract binding to access the raw methods on +} + +// L2OutputOracleCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type L2OutputOracleCallerRaw struct { + Contract *L2OutputOracleCaller // Generic read-only contract binding to access the raw methods on +} + +// L2OutputOracleTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type L2OutputOracleTransactorRaw struct { + Contract *L2OutputOracleTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewL2OutputOracle creates a new instance of L2OutputOracle, bound to a specific deployed contract. +func NewL2OutputOracle(address common.Address, backend bind.ContractBackend) (*L2OutputOracle, error) { + contract, err := bindL2OutputOracle(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &L2OutputOracle{L2OutputOracleCaller: L2OutputOracleCaller{contract: contract}, L2OutputOracleTransactor: L2OutputOracleTransactor{contract: contract}, L2OutputOracleFilterer: L2OutputOracleFilterer{contract: contract}}, nil +} + +// NewL2OutputOracleCaller creates a new read-only instance of L2OutputOracle, bound to a specific deployed contract. +func NewL2OutputOracleCaller(address common.Address, caller bind.ContractCaller) (*L2OutputOracleCaller, error) { + contract, err := bindL2OutputOracle(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &L2OutputOracleCaller{contract: contract}, nil +} + +// NewL2OutputOracleTransactor creates a new write-only instance of L2OutputOracle, bound to a specific deployed contract. +func NewL2OutputOracleTransactor(address common.Address, transactor bind.ContractTransactor) (*L2OutputOracleTransactor, error) { + contract, err := bindL2OutputOracle(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &L2OutputOracleTransactor{contract: contract}, nil +} + +// NewL2OutputOracleFilterer creates a new log filterer instance of L2OutputOracle, bound to a specific deployed contract. +func NewL2OutputOracleFilterer(address common.Address, filterer bind.ContractFilterer) (*L2OutputOracleFilterer, error) { + contract, err := bindL2OutputOracle(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &L2OutputOracleFilterer{contract: contract}, nil +} + +// bindL2OutputOracle binds a generic wrapper to an already deployed contract. +func bindL2OutputOracle(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := L2OutputOracleMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_L2OutputOracle *L2OutputOracleRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _L2OutputOracle.Contract.L2OutputOracleCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_L2OutputOracle *L2OutputOracleRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _L2OutputOracle.Contract.L2OutputOracleTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_L2OutputOracle *L2OutputOracleRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _L2OutputOracle.Contract.L2OutputOracleTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_L2OutputOracle *L2OutputOracleCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _L2OutputOracle.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_L2OutputOracle *L2OutputOracleTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _L2OutputOracle.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_L2OutputOracle *L2OutputOracleTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _L2OutputOracle.Contract.contract.Transact(opts, method, params...) +} + +// CHALLENGER is a free data retrieval call binding the contract method 0x6b4d98dd. +// +// Solidity: function CHALLENGER() view returns(address) +func (_L2OutputOracle *L2OutputOracleCaller) CHALLENGER(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "CHALLENGER") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// CHALLENGER is a free data retrieval call binding the contract method 0x6b4d98dd. +// +// Solidity: function CHALLENGER() view returns(address) +func (_L2OutputOracle *L2OutputOracleSession) CHALLENGER() (common.Address, error) { + return _L2OutputOracle.Contract.CHALLENGER(&_L2OutputOracle.CallOpts) +} + +// CHALLENGER is a free data retrieval call binding the contract method 0x6b4d98dd. +// +// Solidity: function CHALLENGER() view returns(address) +func (_L2OutputOracle *L2OutputOracleCallerSession) CHALLENGER() (common.Address, error) { + return _L2OutputOracle.Contract.CHALLENGER(&_L2OutputOracle.CallOpts) +} + +// FINALIZATIONPERIODSECONDS is a free data retrieval call binding the contract method 0xf4daa291. +// +// Solidity: function FINALIZATION_PERIOD_SECONDS() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCaller) FINALIZATIONPERIODSECONDS(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "FINALIZATION_PERIOD_SECONDS") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// FINALIZATIONPERIODSECONDS is a free data retrieval call binding the contract method 0xf4daa291. +// +// Solidity: function FINALIZATION_PERIOD_SECONDS() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleSession) FINALIZATIONPERIODSECONDS() (*big.Int, error) { + return _L2OutputOracle.Contract.FINALIZATIONPERIODSECONDS(&_L2OutputOracle.CallOpts) +} + +// FINALIZATIONPERIODSECONDS is a free data retrieval call binding the contract method 0xf4daa291. +// +// Solidity: function FINALIZATION_PERIOD_SECONDS() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCallerSession) FINALIZATIONPERIODSECONDS() (*big.Int, error) { + return _L2OutputOracle.Contract.FINALIZATIONPERIODSECONDS(&_L2OutputOracle.CallOpts) +} + +// L2BLOCKTIME is a free data retrieval call binding the contract method 0x002134cc. +// +// Solidity: function L2_BLOCK_TIME() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCaller) L2BLOCKTIME(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "L2_BLOCK_TIME") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// L2BLOCKTIME is a free data retrieval call binding the contract method 0x002134cc. +// +// Solidity: function L2_BLOCK_TIME() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleSession) L2BLOCKTIME() (*big.Int, error) { + return _L2OutputOracle.Contract.L2BLOCKTIME(&_L2OutputOracle.CallOpts) +} + +// L2BLOCKTIME is a free data retrieval call binding the contract method 0x002134cc. +// +// Solidity: function L2_BLOCK_TIME() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCallerSession) L2BLOCKTIME() (*big.Int, error) { + return _L2OutputOracle.Contract.L2BLOCKTIME(&_L2OutputOracle.CallOpts) +} + +// PROPOSER is a free data retrieval call binding the contract method 0xbffa7f0f. +// +// Solidity: function PROPOSER() view returns(address) +func (_L2OutputOracle *L2OutputOracleCaller) PROPOSER(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "PROPOSER") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// PROPOSER is a free data retrieval call binding the contract method 0xbffa7f0f. +// +// Solidity: function PROPOSER() view returns(address) +func (_L2OutputOracle *L2OutputOracleSession) PROPOSER() (common.Address, error) { + return _L2OutputOracle.Contract.PROPOSER(&_L2OutputOracle.CallOpts) +} + +// PROPOSER is a free data retrieval call binding the contract method 0xbffa7f0f. +// +// Solidity: function PROPOSER() view returns(address) +func (_L2OutputOracle *L2OutputOracleCallerSession) PROPOSER() (common.Address, error) { + return _L2OutputOracle.Contract.PROPOSER(&_L2OutputOracle.CallOpts) +} + +// SUBMISSIONINTERVAL is a free data retrieval call binding the contract method 0x529933df. +// +// Solidity: function SUBMISSION_INTERVAL() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCaller) SUBMISSIONINTERVAL(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "SUBMISSION_INTERVAL") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// SUBMISSIONINTERVAL is a free data retrieval call binding the contract method 0x529933df. +// +// Solidity: function SUBMISSION_INTERVAL() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleSession) SUBMISSIONINTERVAL() (*big.Int, error) { + return _L2OutputOracle.Contract.SUBMISSIONINTERVAL(&_L2OutputOracle.CallOpts) +} + +// SUBMISSIONINTERVAL is a free data retrieval call binding the contract method 0x529933df. +// +// Solidity: function SUBMISSION_INTERVAL() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCallerSession) SUBMISSIONINTERVAL() (*big.Int, error) { + return _L2OutputOracle.Contract.SUBMISSIONINTERVAL(&_L2OutputOracle.CallOpts) +} + +// Challenger is a free data retrieval call binding the contract method 0x534db0e2. +// +// Solidity: function challenger() view returns(address) +func (_L2OutputOracle *L2OutputOracleCaller) Challenger(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "challenger") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Challenger is a free data retrieval call binding the contract method 0x534db0e2. +// +// Solidity: function challenger() view returns(address) +func (_L2OutputOracle *L2OutputOracleSession) Challenger() (common.Address, error) { + return _L2OutputOracle.Contract.Challenger(&_L2OutputOracle.CallOpts) +} + +// Challenger is a free data retrieval call binding the contract method 0x534db0e2. +// +// Solidity: function challenger() view returns(address) +func (_L2OutputOracle *L2OutputOracleCallerSession) Challenger() (common.Address, error) { + return _L2OutputOracle.Contract.Challenger(&_L2OutputOracle.CallOpts) +} + +// ComputeL2Timestamp is a free data retrieval call binding the contract method 0xd1de856c. +// +// Solidity: function computeL2Timestamp(uint256 _l2BlockNumber) view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCaller) ComputeL2Timestamp(opts *bind.CallOpts, _l2BlockNumber *big.Int) (*big.Int, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "computeL2Timestamp", _l2BlockNumber) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// ComputeL2Timestamp is a free data retrieval call binding the contract method 0xd1de856c. +// +// Solidity: function computeL2Timestamp(uint256 _l2BlockNumber) view returns(uint256) +func (_L2OutputOracle *L2OutputOracleSession) ComputeL2Timestamp(_l2BlockNumber *big.Int) (*big.Int, error) { + return _L2OutputOracle.Contract.ComputeL2Timestamp(&_L2OutputOracle.CallOpts, _l2BlockNumber) +} + +// ComputeL2Timestamp is a free data retrieval call binding the contract method 0xd1de856c. +// +// Solidity: function computeL2Timestamp(uint256 _l2BlockNumber) view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCallerSession) ComputeL2Timestamp(_l2BlockNumber *big.Int) (*big.Int, error) { + return _L2OutputOracle.Contract.ComputeL2Timestamp(&_L2OutputOracle.CallOpts, _l2BlockNumber) +} + +// FinalizationPeriodSeconds is a free data retrieval call binding the contract method 0xce5db8d6. +// +// Solidity: function finalizationPeriodSeconds() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCaller) FinalizationPeriodSeconds(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "finalizationPeriodSeconds") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// FinalizationPeriodSeconds is a free data retrieval call binding the contract method 0xce5db8d6. +// +// Solidity: function finalizationPeriodSeconds() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleSession) FinalizationPeriodSeconds() (*big.Int, error) { + return _L2OutputOracle.Contract.FinalizationPeriodSeconds(&_L2OutputOracle.CallOpts) +} + +// FinalizationPeriodSeconds is a free data retrieval call binding the contract method 0xce5db8d6. +// +// Solidity: function finalizationPeriodSeconds() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCallerSession) FinalizationPeriodSeconds() (*big.Int, error) { + return _L2OutputOracle.Contract.FinalizationPeriodSeconds(&_L2OutputOracle.CallOpts) +} + +// GetL2Output is a free data retrieval call binding the contract method 0xa25ae557. +// +// Solidity: function getL2Output(uint256 _l2OutputIndex) view returns((bytes32,uint128,uint128)) +func (_L2OutputOracle *L2OutputOracleCaller) GetL2Output(opts *bind.CallOpts, _l2OutputIndex *big.Int) (TypesOutputProposal, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "getL2Output", _l2OutputIndex) + + if err != nil { + return *new(TypesOutputProposal), err + } + + out0 := *abi.ConvertType(out[0], new(TypesOutputProposal)).(*TypesOutputProposal) + + return out0, err + +} + +// GetL2Output is a free data retrieval call binding the contract method 0xa25ae557. +// +// Solidity: function getL2Output(uint256 _l2OutputIndex) view returns((bytes32,uint128,uint128)) +func (_L2OutputOracle *L2OutputOracleSession) GetL2Output(_l2OutputIndex *big.Int) (TypesOutputProposal, error) { + return _L2OutputOracle.Contract.GetL2Output(&_L2OutputOracle.CallOpts, _l2OutputIndex) +} + +// GetL2Output is a free data retrieval call binding the contract method 0xa25ae557. +// +// Solidity: function getL2Output(uint256 _l2OutputIndex) view returns((bytes32,uint128,uint128)) +func (_L2OutputOracle *L2OutputOracleCallerSession) GetL2Output(_l2OutputIndex *big.Int) (TypesOutputProposal, error) { + return _L2OutputOracle.Contract.GetL2Output(&_L2OutputOracle.CallOpts, _l2OutputIndex) +} + +// GetL2OutputAfter is a free data retrieval call binding the contract method 0xcf8e5cf0. +// +// Solidity: function getL2OutputAfter(uint256 _l2BlockNumber) view returns((bytes32,uint128,uint128)) +func (_L2OutputOracle *L2OutputOracleCaller) GetL2OutputAfter(opts *bind.CallOpts, _l2BlockNumber *big.Int) (TypesOutputProposal, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "getL2OutputAfter", _l2BlockNumber) + + if err != nil { + return *new(TypesOutputProposal), err + } + + out0 := *abi.ConvertType(out[0], new(TypesOutputProposal)).(*TypesOutputProposal) + + return out0, err + +} + +// GetL2OutputAfter is a free data retrieval call binding the contract method 0xcf8e5cf0. +// +// Solidity: function getL2OutputAfter(uint256 _l2BlockNumber) view returns((bytes32,uint128,uint128)) +func (_L2OutputOracle *L2OutputOracleSession) GetL2OutputAfter(_l2BlockNumber *big.Int) (TypesOutputProposal, error) { + return _L2OutputOracle.Contract.GetL2OutputAfter(&_L2OutputOracle.CallOpts, _l2BlockNumber) +} + +// GetL2OutputAfter is a free data retrieval call binding the contract method 0xcf8e5cf0. +// +// Solidity: function getL2OutputAfter(uint256 _l2BlockNumber) view returns((bytes32,uint128,uint128)) +func (_L2OutputOracle *L2OutputOracleCallerSession) GetL2OutputAfter(_l2BlockNumber *big.Int) (TypesOutputProposal, error) { + return _L2OutputOracle.Contract.GetL2OutputAfter(&_L2OutputOracle.CallOpts, _l2BlockNumber) +} + +// GetL2OutputIndexAfter is a free data retrieval call binding the contract method 0x7f006420. +// +// Solidity: function getL2OutputIndexAfter(uint256 _l2BlockNumber) view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCaller) GetL2OutputIndexAfter(opts *bind.CallOpts, _l2BlockNumber *big.Int) (*big.Int, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "getL2OutputIndexAfter", _l2BlockNumber) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetL2OutputIndexAfter is a free data retrieval call binding the contract method 0x7f006420. +// +// Solidity: function getL2OutputIndexAfter(uint256 _l2BlockNumber) view returns(uint256) +func (_L2OutputOracle *L2OutputOracleSession) GetL2OutputIndexAfter(_l2BlockNumber *big.Int) (*big.Int, error) { + return _L2OutputOracle.Contract.GetL2OutputIndexAfter(&_L2OutputOracle.CallOpts, _l2BlockNumber) +} + +// GetL2OutputIndexAfter is a free data retrieval call binding the contract method 0x7f006420. +// +// Solidity: function getL2OutputIndexAfter(uint256 _l2BlockNumber) view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCallerSession) GetL2OutputIndexAfter(_l2BlockNumber *big.Int) (*big.Int, error) { + return _L2OutputOracle.Contract.GetL2OutputIndexAfter(&_L2OutputOracle.CallOpts, _l2BlockNumber) +} + +// L2BlockTime is a free data retrieval call binding the contract method 0x93991af3. +// +// Solidity: function l2BlockTime() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCaller) L2BlockTime(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "l2BlockTime") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// L2BlockTime is a free data retrieval call binding the contract method 0x93991af3. +// +// Solidity: function l2BlockTime() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleSession) L2BlockTime() (*big.Int, error) { + return _L2OutputOracle.Contract.L2BlockTime(&_L2OutputOracle.CallOpts) +} + +// L2BlockTime is a free data retrieval call binding the contract method 0x93991af3. +// +// Solidity: function l2BlockTime() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCallerSession) L2BlockTime() (*big.Int, error) { + return _L2OutputOracle.Contract.L2BlockTime(&_L2OutputOracle.CallOpts) +} + +// LatestBlockNumber is a free data retrieval call binding the contract method 0x4599c788. +// +// Solidity: function latestBlockNumber() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCaller) LatestBlockNumber(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "latestBlockNumber") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// LatestBlockNumber is a free data retrieval call binding the contract method 0x4599c788. +// +// Solidity: function latestBlockNumber() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleSession) LatestBlockNumber() (*big.Int, error) { + return _L2OutputOracle.Contract.LatestBlockNumber(&_L2OutputOracle.CallOpts) +} + +// LatestBlockNumber is a free data retrieval call binding the contract method 0x4599c788. +// +// Solidity: function latestBlockNumber() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCallerSession) LatestBlockNumber() (*big.Int, error) { + return _L2OutputOracle.Contract.LatestBlockNumber(&_L2OutputOracle.CallOpts) +} + +// LatestOutputIndex is a free data retrieval call binding the contract method 0x69f16eec. +// +// Solidity: function latestOutputIndex() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCaller) LatestOutputIndex(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "latestOutputIndex") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// LatestOutputIndex is a free data retrieval call binding the contract method 0x69f16eec. +// +// Solidity: function latestOutputIndex() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleSession) LatestOutputIndex() (*big.Int, error) { + return _L2OutputOracle.Contract.LatestOutputIndex(&_L2OutputOracle.CallOpts) +} + +// LatestOutputIndex is a free data retrieval call binding the contract method 0x69f16eec. +// +// Solidity: function latestOutputIndex() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCallerSession) LatestOutputIndex() (*big.Int, error) { + return _L2OutputOracle.Contract.LatestOutputIndex(&_L2OutputOracle.CallOpts) +} + +// NextBlockNumber is a free data retrieval call binding the contract method 0xdcec3348. +// +// Solidity: function nextBlockNumber() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCaller) NextBlockNumber(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "nextBlockNumber") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// NextBlockNumber is a free data retrieval call binding the contract method 0xdcec3348. +// +// Solidity: function nextBlockNumber() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleSession) NextBlockNumber() (*big.Int, error) { + return _L2OutputOracle.Contract.NextBlockNumber(&_L2OutputOracle.CallOpts) +} + +// NextBlockNumber is a free data retrieval call binding the contract method 0xdcec3348. +// +// Solidity: function nextBlockNumber() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCallerSession) NextBlockNumber() (*big.Int, error) { + return _L2OutputOracle.Contract.NextBlockNumber(&_L2OutputOracle.CallOpts) +} + +// NextOutputIndex is a free data retrieval call binding the contract method 0x6abcf563. +// +// Solidity: function nextOutputIndex() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCaller) NextOutputIndex(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "nextOutputIndex") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// NextOutputIndex is a free data retrieval call binding the contract method 0x6abcf563. +// +// Solidity: function nextOutputIndex() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleSession) NextOutputIndex() (*big.Int, error) { + return _L2OutputOracle.Contract.NextOutputIndex(&_L2OutputOracle.CallOpts) +} + +// NextOutputIndex is a free data retrieval call binding the contract method 0x6abcf563. +// +// Solidity: function nextOutputIndex() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCallerSession) NextOutputIndex() (*big.Int, error) { + return _L2OutputOracle.Contract.NextOutputIndex(&_L2OutputOracle.CallOpts) +} + +// Proposer is a free data retrieval call binding the contract method 0xa8e4fb90. +// +// Solidity: function proposer() view returns(address) +func (_L2OutputOracle *L2OutputOracleCaller) Proposer(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "proposer") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Proposer is a free data retrieval call binding the contract method 0xa8e4fb90. +// +// Solidity: function proposer() view returns(address) +func (_L2OutputOracle *L2OutputOracleSession) Proposer() (common.Address, error) { + return _L2OutputOracle.Contract.Proposer(&_L2OutputOracle.CallOpts) +} + +// Proposer is a free data retrieval call binding the contract method 0xa8e4fb90. +// +// Solidity: function proposer() view returns(address) +func (_L2OutputOracle *L2OutputOracleCallerSession) Proposer() (common.Address, error) { + return _L2OutputOracle.Contract.Proposer(&_L2OutputOracle.CallOpts) +} + +// StartingBlockNumber is a free data retrieval call binding the contract method 0x70872aa5. +// +// Solidity: function startingBlockNumber() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCaller) StartingBlockNumber(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "startingBlockNumber") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// StartingBlockNumber is a free data retrieval call binding the contract method 0x70872aa5. +// +// Solidity: function startingBlockNumber() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleSession) StartingBlockNumber() (*big.Int, error) { + return _L2OutputOracle.Contract.StartingBlockNumber(&_L2OutputOracle.CallOpts) +} + +// StartingBlockNumber is a free data retrieval call binding the contract method 0x70872aa5. +// +// Solidity: function startingBlockNumber() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCallerSession) StartingBlockNumber() (*big.Int, error) { + return _L2OutputOracle.Contract.StartingBlockNumber(&_L2OutputOracle.CallOpts) +} + +// StartingTimestamp is a free data retrieval call binding the contract method 0x88786272. +// +// Solidity: function startingTimestamp() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCaller) StartingTimestamp(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "startingTimestamp") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// StartingTimestamp is a free data retrieval call binding the contract method 0x88786272. +// +// Solidity: function startingTimestamp() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleSession) StartingTimestamp() (*big.Int, error) { + return _L2OutputOracle.Contract.StartingTimestamp(&_L2OutputOracle.CallOpts) +} + +// StartingTimestamp is a free data retrieval call binding the contract method 0x88786272. +// +// Solidity: function startingTimestamp() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCallerSession) StartingTimestamp() (*big.Int, error) { + return _L2OutputOracle.Contract.StartingTimestamp(&_L2OutputOracle.CallOpts) +} + +// SubmissionInterval is a free data retrieval call binding the contract method 0xe1a41bcf. +// +// Solidity: function submissionInterval() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCaller) SubmissionInterval(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "submissionInterval") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// SubmissionInterval is a free data retrieval call binding the contract method 0xe1a41bcf. +// +// Solidity: function submissionInterval() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleSession) SubmissionInterval() (*big.Int, error) { + return _L2OutputOracle.Contract.SubmissionInterval(&_L2OutputOracle.CallOpts) +} + +// SubmissionInterval is a free data retrieval call binding the contract method 0xe1a41bcf. +// +// Solidity: function submissionInterval() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCallerSession) SubmissionInterval() (*big.Int, error) { + return _L2OutputOracle.Contract.SubmissionInterval(&_L2OutputOracle.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L2OutputOracle *L2OutputOracleCaller) Version(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "version") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L2OutputOracle *L2OutputOracleSession) Version() (string, error) { + return _L2OutputOracle.Contract.Version(&_L2OutputOracle.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L2OutputOracle *L2OutputOracleCallerSession) Version() (string, error) { + return _L2OutputOracle.Contract.Version(&_L2OutputOracle.CallOpts) +} + +// DeleteL2Outputs is a paid mutator transaction binding the contract method 0x89c44cbb. +// +// Solidity: function deleteL2Outputs(uint256 _l2OutputIndex) returns() +func (_L2OutputOracle *L2OutputOracleTransactor) DeleteL2Outputs(opts *bind.TransactOpts, _l2OutputIndex *big.Int) (*types.Transaction, error) { + return _L2OutputOracle.contract.Transact(opts, "deleteL2Outputs", _l2OutputIndex) +} + +// DeleteL2Outputs is a paid mutator transaction binding the contract method 0x89c44cbb. +// +// Solidity: function deleteL2Outputs(uint256 _l2OutputIndex) returns() +func (_L2OutputOracle *L2OutputOracleSession) DeleteL2Outputs(_l2OutputIndex *big.Int) (*types.Transaction, error) { + return _L2OutputOracle.Contract.DeleteL2Outputs(&_L2OutputOracle.TransactOpts, _l2OutputIndex) +} + +// DeleteL2Outputs is a paid mutator transaction binding the contract method 0x89c44cbb. +// +// Solidity: function deleteL2Outputs(uint256 _l2OutputIndex) returns() +func (_L2OutputOracle *L2OutputOracleTransactorSession) DeleteL2Outputs(_l2OutputIndex *big.Int) (*types.Transaction, error) { + return _L2OutputOracle.Contract.DeleteL2Outputs(&_L2OutputOracle.TransactOpts, _l2OutputIndex) +} + +// Initialize is a paid mutator transaction binding the contract method 0x1c89c97d. +// +// Solidity: function initialize(uint256 _submissionInterval, uint256 _l2BlockTime, uint256 _startingBlockNumber, uint256 _startingTimestamp, address _proposer, address _challenger, uint256 _finalizationPeriodSeconds) returns() +func (_L2OutputOracle *L2OutputOracleTransactor) Initialize(opts *bind.TransactOpts, _submissionInterval *big.Int, _l2BlockTime *big.Int, _startingBlockNumber *big.Int, _startingTimestamp *big.Int, _proposer common.Address, _challenger common.Address, _finalizationPeriodSeconds *big.Int) (*types.Transaction, error) { + return _L2OutputOracle.contract.Transact(opts, "initialize", _submissionInterval, _l2BlockTime, _startingBlockNumber, _startingTimestamp, _proposer, _challenger, _finalizationPeriodSeconds) +} + +// Initialize is a paid mutator transaction binding the contract method 0x1c89c97d. +// +// Solidity: function initialize(uint256 _submissionInterval, uint256 _l2BlockTime, uint256 _startingBlockNumber, uint256 _startingTimestamp, address _proposer, address _challenger, uint256 _finalizationPeriodSeconds) returns() +func (_L2OutputOracle *L2OutputOracleSession) Initialize(_submissionInterval *big.Int, _l2BlockTime *big.Int, _startingBlockNumber *big.Int, _startingTimestamp *big.Int, _proposer common.Address, _challenger common.Address, _finalizationPeriodSeconds *big.Int) (*types.Transaction, error) { + return _L2OutputOracle.Contract.Initialize(&_L2OutputOracle.TransactOpts, _submissionInterval, _l2BlockTime, _startingBlockNumber, _startingTimestamp, _proposer, _challenger, _finalizationPeriodSeconds) +} + +// Initialize is a paid mutator transaction binding the contract method 0x1c89c97d. +// +// Solidity: function initialize(uint256 _submissionInterval, uint256 _l2BlockTime, uint256 _startingBlockNumber, uint256 _startingTimestamp, address _proposer, address _challenger, uint256 _finalizationPeriodSeconds) returns() +func (_L2OutputOracle *L2OutputOracleTransactorSession) Initialize(_submissionInterval *big.Int, _l2BlockTime *big.Int, _startingBlockNumber *big.Int, _startingTimestamp *big.Int, _proposer common.Address, _challenger common.Address, _finalizationPeriodSeconds *big.Int) (*types.Transaction, error) { + return _L2OutputOracle.Contract.Initialize(&_L2OutputOracle.TransactOpts, _submissionInterval, _l2BlockTime, _startingBlockNumber, _startingTimestamp, _proposer, _challenger, _finalizationPeriodSeconds) +} + +// ProposeL2Output is a paid mutator transaction binding the contract method 0x9aaab648. +// +// Solidity: function proposeL2Output(bytes32 _outputRoot, uint256 _l2BlockNumber, bytes32 _l1BlockHash, uint256 _l1BlockNumber) payable returns() +func (_L2OutputOracle *L2OutputOracleTransactor) ProposeL2Output(opts *bind.TransactOpts, _outputRoot [32]byte, _l2BlockNumber *big.Int, _l1BlockHash [32]byte, _l1BlockNumber *big.Int) (*types.Transaction, error) { + return _L2OutputOracle.contract.Transact(opts, "proposeL2Output", _outputRoot, _l2BlockNumber, _l1BlockHash, _l1BlockNumber) +} + +// ProposeL2Output is a paid mutator transaction binding the contract method 0x9aaab648. +// +// Solidity: function proposeL2Output(bytes32 _outputRoot, uint256 _l2BlockNumber, bytes32 _l1BlockHash, uint256 _l1BlockNumber) payable returns() +func (_L2OutputOracle *L2OutputOracleSession) ProposeL2Output(_outputRoot [32]byte, _l2BlockNumber *big.Int, _l1BlockHash [32]byte, _l1BlockNumber *big.Int) (*types.Transaction, error) { + return _L2OutputOracle.Contract.ProposeL2Output(&_L2OutputOracle.TransactOpts, _outputRoot, _l2BlockNumber, _l1BlockHash, _l1BlockNumber) +} + +// ProposeL2Output is a paid mutator transaction binding the contract method 0x9aaab648. +// +// Solidity: function proposeL2Output(bytes32 _outputRoot, uint256 _l2BlockNumber, bytes32 _l1BlockHash, uint256 _l1BlockNumber) payable returns() +func (_L2OutputOracle *L2OutputOracleTransactorSession) ProposeL2Output(_outputRoot [32]byte, _l2BlockNumber *big.Int, _l1BlockHash [32]byte, _l1BlockNumber *big.Int) (*types.Transaction, error) { + return _L2OutputOracle.Contract.ProposeL2Output(&_L2OutputOracle.TransactOpts, _outputRoot, _l2BlockNumber, _l1BlockHash, _l1BlockNumber) +} + +// L2OutputOracleInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the L2OutputOracle contract. +type L2OutputOracleInitializedIterator struct { + Event *L2OutputOracleInitialized // 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 *L2OutputOracleInitializedIterator) 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(L2OutputOracleInitialized) + 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(L2OutputOracleInitialized) + 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 *L2OutputOracleInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L2OutputOracleInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L2OutputOracleInitialized represents a Initialized event raised by the L2OutputOracle contract. +type L2OutputOracleInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_L2OutputOracle *L2OutputOracleFilterer) FilterInitialized(opts *bind.FilterOpts) (*L2OutputOracleInitializedIterator, error) { + + logs, sub, err := _L2OutputOracle.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &L2OutputOracleInitializedIterator{contract: _L2OutputOracle.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_L2OutputOracle *L2OutputOracleFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *L2OutputOracleInitialized) (event.Subscription, error) { + + logs, sub, err := _L2OutputOracle.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(L2OutputOracleInitialized) + if err := _L2OutputOracle.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_L2OutputOracle *L2OutputOracleFilterer) ParseInitialized(log types.Log) (*L2OutputOracleInitialized, error) { + event := new(L2OutputOracleInitialized) + if err := _L2OutputOracle.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L2OutputOracleOutputProposedIterator is returned from FilterOutputProposed and is used to iterate over the raw logs and unpacked data for OutputProposed events raised by the L2OutputOracle contract. +type L2OutputOracleOutputProposedIterator struct { + Event *L2OutputOracleOutputProposed // 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 *L2OutputOracleOutputProposedIterator) 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(L2OutputOracleOutputProposed) + 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(L2OutputOracleOutputProposed) + 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 *L2OutputOracleOutputProposedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L2OutputOracleOutputProposedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L2OutputOracleOutputProposed represents a OutputProposed event raised by the L2OutputOracle contract. +type L2OutputOracleOutputProposed struct { + OutputRoot [32]byte + L2OutputIndex *big.Int + L2BlockNumber *big.Int + L1Timestamp *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOutputProposed is a free log retrieval operation binding the contract event 0xa7aaf2512769da4e444e3de247be2564225c2e7a8f74cfe528e46e17d24868e2. +// +// Solidity: event OutputProposed(bytes32 indexed outputRoot, uint256 indexed l2OutputIndex, uint256 indexed l2BlockNumber, uint256 l1Timestamp) +func (_L2OutputOracle *L2OutputOracleFilterer) FilterOutputProposed(opts *bind.FilterOpts, outputRoot [][32]byte, l2OutputIndex []*big.Int, l2BlockNumber []*big.Int) (*L2OutputOracleOutputProposedIterator, error) { + + var outputRootRule []interface{} + for _, outputRootItem := range outputRoot { + outputRootRule = append(outputRootRule, outputRootItem) + } + var l2OutputIndexRule []interface{} + for _, l2OutputIndexItem := range l2OutputIndex { + l2OutputIndexRule = append(l2OutputIndexRule, l2OutputIndexItem) + } + var l2BlockNumberRule []interface{} + for _, l2BlockNumberItem := range l2BlockNumber { + l2BlockNumberRule = append(l2BlockNumberRule, l2BlockNumberItem) + } + + logs, sub, err := _L2OutputOracle.contract.FilterLogs(opts, "OutputProposed", outputRootRule, l2OutputIndexRule, l2BlockNumberRule) + if err != nil { + return nil, err + } + return &L2OutputOracleOutputProposedIterator{contract: _L2OutputOracle.contract, event: "OutputProposed", logs: logs, sub: sub}, nil +} + +// WatchOutputProposed is a free log subscription operation binding the contract event 0xa7aaf2512769da4e444e3de247be2564225c2e7a8f74cfe528e46e17d24868e2. +// +// Solidity: event OutputProposed(bytes32 indexed outputRoot, uint256 indexed l2OutputIndex, uint256 indexed l2BlockNumber, uint256 l1Timestamp) +func (_L2OutputOracle *L2OutputOracleFilterer) WatchOutputProposed(opts *bind.WatchOpts, sink chan<- *L2OutputOracleOutputProposed, outputRoot [][32]byte, l2OutputIndex []*big.Int, l2BlockNumber []*big.Int) (event.Subscription, error) { + + var outputRootRule []interface{} + for _, outputRootItem := range outputRoot { + outputRootRule = append(outputRootRule, outputRootItem) + } + var l2OutputIndexRule []interface{} + for _, l2OutputIndexItem := range l2OutputIndex { + l2OutputIndexRule = append(l2OutputIndexRule, l2OutputIndexItem) + } + var l2BlockNumberRule []interface{} + for _, l2BlockNumberItem := range l2BlockNumber { + l2BlockNumberRule = append(l2BlockNumberRule, l2BlockNumberItem) + } + + logs, sub, err := _L2OutputOracle.contract.WatchLogs(opts, "OutputProposed", outputRootRule, l2OutputIndexRule, l2BlockNumberRule) + 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(L2OutputOracleOutputProposed) + if err := _L2OutputOracle.contract.UnpackLog(event, "OutputProposed", 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 +} + +// ParseOutputProposed is a log parse operation binding the contract event 0xa7aaf2512769da4e444e3de247be2564225c2e7a8f74cfe528e46e17d24868e2. +// +// Solidity: event OutputProposed(bytes32 indexed outputRoot, uint256 indexed l2OutputIndex, uint256 indexed l2BlockNumber, uint256 l1Timestamp) +func (_L2OutputOracle *L2OutputOracleFilterer) ParseOutputProposed(log types.Log) (*L2OutputOracleOutputProposed, error) { + event := new(L2OutputOracleOutputProposed) + if err := _L2OutputOracle.contract.UnpackLog(event, "OutputProposed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L2OutputOracleOutputsDeletedIterator is returned from FilterOutputsDeleted and is used to iterate over the raw logs and unpacked data for OutputsDeleted events raised by the L2OutputOracle contract. +type L2OutputOracleOutputsDeletedIterator struct { + Event *L2OutputOracleOutputsDeleted // 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 *L2OutputOracleOutputsDeletedIterator) 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(L2OutputOracleOutputsDeleted) + 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(L2OutputOracleOutputsDeleted) + 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 *L2OutputOracleOutputsDeletedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L2OutputOracleOutputsDeletedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L2OutputOracleOutputsDeleted represents a OutputsDeleted event raised by the L2OutputOracle contract. +type L2OutputOracleOutputsDeleted struct { + PrevNextOutputIndex *big.Int + NewNextOutputIndex *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOutputsDeleted is a free log retrieval operation binding the contract event 0x4ee37ac2c786ec85e87592d3c5c8a1dd66f8496dda3f125d9ea8ca5f657629b6. +// +// Solidity: event OutputsDeleted(uint256 indexed prevNextOutputIndex, uint256 indexed newNextOutputIndex) +func (_L2OutputOracle *L2OutputOracleFilterer) FilterOutputsDeleted(opts *bind.FilterOpts, prevNextOutputIndex []*big.Int, newNextOutputIndex []*big.Int) (*L2OutputOracleOutputsDeletedIterator, error) { + + var prevNextOutputIndexRule []interface{} + for _, prevNextOutputIndexItem := range prevNextOutputIndex { + prevNextOutputIndexRule = append(prevNextOutputIndexRule, prevNextOutputIndexItem) + } + var newNextOutputIndexRule []interface{} + for _, newNextOutputIndexItem := range newNextOutputIndex { + newNextOutputIndexRule = append(newNextOutputIndexRule, newNextOutputIndexItem) + } + + logs, sub, err := _L2OutputOracle.contract.FilterLogs(opts, "OutputsDeleted", prevNextOutputIndexRule, newNextOutputIndexRule) + if err != nil { + return nil, err + } + return &L2OutputOracleOutputsDeletedIterator{contract: _L2OutputOracle.contract, event: "OutputsDeleted", logs: logs, sub: sub}, nil +} + +// WatchOutputsDeleted is a free log subscription operation binding the contract event 0x4ee37ac2c786ec85e87592d3c5c8a1dd66f8496dda3f125d9ea8ca5f657629b6. +// +// Solidity: event OutputsDeleted(uint256 indexed prevNextOutputIndex, uint256 indexed newNextOutputIndex) +func (_L2OutputOracle *L2OutputOracleFilterer) WatchOutputsDeleted(opts *bind.WatchOpts, sink chan<- *L2OutputOracleOutputsDeleted, prevNextOutputIndex []*big.Int, newNextOutputIndex []*big.Int) (event.Subscription, error) { + + var prevNextOutputIndexRule []interface{} + for _, prevNextOutputIndexItem := range prevNextOutputIndex { + prevNextOutputIndexRule = append(prevNextOutputIndexRule, prevNextOutputIndexItem) + } + var newNextOutputIndexRule []interface{} + for _, newNextOutputIndexItem := range newNextOutputIndex { + newNextOutputIndexRule = append(newNextOutputIndexRule, newNextOutputIndexItem) + } + + logs, sub, err := _L2OutputOracle.contract.WatchLogs(opts, "OutputsDeleted", prevNextOutputIndexRule, newNextOutputIndexRule) + 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(L2OutputOracleOutputsDeleted) + if err := _L2OutputOracle.contract.UnpackLog(event, "OutputsDeleted", 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 +} + +// ParseOutputsDeleted is a log parse operation binding the contract event 0x4ee37ac2c786ec85e87592d3c5c8a1dd66f8496dda3f125d9ea8ca5f657629b6. +// +// Solidity: event OutputsDeleted(uint256 indexed prevNextOutputIndex, uint256 indexed newNextOutputIndex) +func (_L2OutputOracle *L2OutputOracleFilterer) ParseOutputsDeleted(log types.Log) (*L2OutputOracleOutputsDeleted, error) { + event := new(L2OutputOracleOutputsDeleted) + if err := _L2OutputOracle.contract.UnpackLog(event, "OutputsDeleted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/op-chain-ops/opbnb-upgrades/new-contracts/bindings/OptimismMintableERC20Factory.go b/op-chain-ops/opbnb-upgrades/new-contracts/bindings/OptimismMintableERC20Factory.go new file mode 100644 index 000000000..a797f84d9 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/new-contracts/bindings/OptimismMintableERC20Factory.go @@ -0,0 +1,799 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// OptimismMintableERC20FactoryMetaData contains all meta data concerning the OptimismMintableERC20Factory contract. +var OptimismMintableERC20FactoryMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"BRIDGE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"bridge\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"createOptimismMintableERC20\",\"inputs\":[{\"name\":\"_remoteToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_name\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_symbol\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createOptimismMintableERC20WithDecimals\",\"inputs\":[{\"name\":\"_remoteToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_name\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_symbol\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_decimals\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createStandardL2Token\",\"inputs\":[{\"name\":\"_remoteToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_name\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_symbol\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_bridge\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OptimismMintableERC20Created\",\"inputs\":[{\"name\":\"localToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"remoteToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"deployer\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StandardL2TokenCreated\",\"inputs\":[{\"name\":\"remoteToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"localToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false}]", +} + +// OptimismMintableERC20FactoryABI is the input ABI used to generate the binding from. +// Deprecated: Use OptimismMintableERC20FactoryMetaData.ABI instead. +var OptimismMintableERC20FactoryABI = OptimismMintableERC20FactoryMetaData.ABI + +// OptimismMintableERC20Factory is an auto generated Go binding around an Ethereum contract. +type OptimismMintableERC20Factory struct { + OptimismMintableERC20FactoryCaller // Read-only binding to the contract + OptimismMintableERC20FactoryTransactor // Write-only binding to the contract + OptimismMintableERC20FactoryFilterer // Log filterer for contract events +} + +// OptimismMintableERC20FactoryCaller is an auto generated read-only Go binding around an Ethereum contract. +type OptimismMintableERC20FactoryCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OptimismMintableERC20FactoryTransactor is an auto generated write-only Go binding around an Ethereum contract. +type OptimismMintableERC20FactoryTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OptimismMintableERC20FactoryFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type OptimismMintableERC20FactoryFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OptimismMintableERC20FactorySession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type OptimismMintableERC20FactorySession struct { + Contract *OptimismMintableERC20Factory // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OptimismMintableERC20FactoryCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type OptimismMintableERC20FactoryCallerSession struct { + Contract *OptimismMintableERC20FactoryCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// OptimismMintableERC20FactoryTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type OptimismMintableERC20FactoryTransactorSession struct { + Contract *OptimismMintableERC20FactoryTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OptimismMintableERC20FactoryRaw is an auto generated low-level Go binding around an Ethereum contract. +type OptimismMintableERC20FactoryRaw struct { + Contract *OptimismMintableERC20Factory // Generic contract binding to access the raw methods on +} + +// OptimismMintableERC20FactoryCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type OptimismMintableERC20FactoryCallerRaw struct { + Contract *OptimismMintableERC20FactoryCaller // Generic read-only contract binding to access the raw methods on +} + +// OptimismMintableERC20FactoryTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type OptimismMintableERC20FactoryTransactorRaw struct { + Contract *OptimismMintableERC20FactoryTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewOptimismMintableERC20Factory creates a new instance of OptimismMintableERC20Factory, bound to a specific deployed contract. +func NewOptimismMintableERC20Factory(address common.Address, backend bind.ContractBackend) (*OptimismMintableERC20Factory, error) { + contract, err := bindOptimismMintableERC20Factory(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &OptimismMintableERC20Factory{OptimismMintableERC20FactoryCaller: OptimismMintableERC20FactoryCaller{contract: contract}, OptimismMintableERC20FactoryTransactor: OptimismMintableERC20FactoryTransactor{contract: contract}, OptimismMintableERC20FactoryFilterer: OptimismMintableERC20FactoryFilterer{contract: contract}}, nil +} + +// NewOptimismMintableERC20FactoryCaller creates a new read-only instance of OptimismMintableERC20Factory, bound to a specific deployed contract. +func NewOptimismMintableERC20FactoryCaller(address common.Address, caller bind.ContractCaller) (*OptimismMintableERC20FactoryCaller, error) { + contract, err := bindOptimismMintableERC20Factory(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &OptimismMintableERC20FactoryCaller{contract: contract}, nil +} + +// NewOptimismMintableERC20FactoryTransactor creates a new write-only instance of OptimismMintableERC20Factory, bound to a specific deployed contract. +func NewOptimismMintableERC20FactoryTransactor(address common.Address, transactor bind.ContractTransactor) (*OptimismMintableERC20FactoryTransactor, error) { + contract, err := bindOptimismMintableERC20Factory(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &OptimismMintableERC20FactoryTransactor{contract: contract}, nil +} + +// NewOptimismMintableERC20FactoryFilterer creates a new log filterer instance of OptimismMintableERC20Factory, bound to a specific deployed contract. +func NewOptimismMintableERC20FactoryFilterer(address common.Address, filterer bind.ContractFilterer) (*OptimismMintableERC20FactoryFilterer, error) { + contract, err := bindOptimismMintableERC20Factory(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &OptimismMintableERC20FactoryFilterer{contract: contract}, nil +} + +// bindOptimismMintableERC20Factory binds a generic wrapper to an already deployed contract. +func bindOptimismMintableERC20Factory(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := OptimismMintableERC20FactoryMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _OptimismMintableERC20Factory.Contract.OptimismMintableERC20FactoryCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.Contract.OptimismMintableERC20FactoryTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.Contract.OptimismMintableERC20FactoryTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _OptimismMintableERC20Factory.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.Contract.contract.Transact(opts, method, params...) +} + +// BRIDGE is a free data retrieval call binding the contract method 0xee9a31a2. +// +// Solidity: function BRIDGE() view returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryCaller) BRIDGE(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _OptimismMintableERC20Factory.contract.Call(opts, &out, "BRIDGE") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// BRIDGE is a free data retrieval call binding the contract method 0xee9a31a2. +// +// Solidity: function BRIDGE() view returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactorySession) BRIDGE() (common.Address, error) { + return _OptimismMintableERC20Factory.Contract.BRIDGE(&_OptimismMintableERC20Factory.CallOpts) +} + +// BRIDGE is a free data retrieval call binding the contract method 0xee9a31a2. +// +// Solidity: function BRIDGE() view returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryCallerSession) BRIDGE() (common.Address, error) { + return _OptimismMintableERC20Factory.Contract.BRIDGE(&_OptimismMintableERC20Factory.CallOpts) +} + +// Bridge is a free data retrieval call binding the contract method 0xe78cea92. +// +// Solidity: function bridge() view returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryCaller) Bridge(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _OptimismMintableERC20Factory.contract.Call(opts, &out, "bridge") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Bridge is a free data retrieval call binding the contract method 0xe78cea92. +// +// Solidity: function bridge() view returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactorySession) Bridge() (common.Address, error) { + return _OptimismMintableERC20Factory.Contract.Bridge(&_OptimismMintableERC20Factory.CallOpts) +} + +// Bridge is a free data retrieval call binding the contract method 0xe78cea92. +// +// Solidity: function bridge() view returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryCallerSession) Bridge() (common.Address, error) { + return _OptimismMintableERC20Factory.Contract.Bridge(&_OptimismMintableERC20Factory.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryCaller) Version(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _OptimismMintableERC20Factory.contract.Call(opts, &out, "version") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactorySession) Version() (string, error) { + return _OptimismMintableERC20Factory.Contract.Version(&_OptimismMintableERC20Factory.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryCallerSession) Version() (string, error) { + return _OptimismMintableERC20Factory.Contract.Version(&_OptimismMintableERC20Factory.CallOpts) +} + +// CreateOptimismMintableERC20 is a paid mutator transaction binding the contract method 0xce5ac90f. +// +// Solidity: function createOptimismMintableERC20(address _remoteToken, string _name, string _symbol) returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryTransactor) CreateOptimismMintableERC20(opts *bind.TransactOpts, _remoteToken common.Address, _name string, _symbol string) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.contract.Transact(opts, "createOptimismMintableERC20", _remoteToken, _name, _symbol) +} + +// CreateOptimismMintableERC20 is a paid mutator transaction binding the contract method 0xce5ac90f. +// +// Solidity: function createOptimismMintableERC20(address _remoteToken, string _name, string _symbol) returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactorySession) CreateOptimismMintableERC20(_remoteToken common.Address, _name string, _symbol string) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.Contract.CreateOptimismMintableERC20(&_OptimismMintableERC20Factory.TransactOpts, _remoteToken, _name, _symbol) +} + +// CreateOptimismMintableERC20 is a paid mutator transaction binding the contract method 0xce5ac90f. +// +// Solidity: function createOptimismMintableERC20(address _remoteToken, string _name, string _symbol) returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryTransactorSession) CreateOptimismMintableERC20(_remoteToken common.Address, _name string, _symbol string) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.Contract.CreateOptimismMintableERC20(&_OptimismMintableERC20Factory.TransactOpts, _remoteToken, _name, _symbol) +} + +// CreateOptimismMintableERC20WithDecimals is a paid mutator transaction binding the contract method 0x8cf0629c. +// +// Solidity: function createOptimismMintableERC20WithDecimals(address _remoteToken, string _name, string _symbol, uint8 _decimals) returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryTransactor) CreateOptimismMintableERC20WithDecimals(opts *bind.TransactOpts, _remoteToken common.Address, _name string, _symbol string, _decimals uint8) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.contract.Transact(opts, "createOptimismMintableERC20WithDecimals", _remoteToken, _name, _symbol, _decimals) +} + +// CreateOptimismMintableERC20WithDecimals is a paid mutator transaction binding the contract method 0x8cf0629c. +// +// Solidity: function createOptimismMintableERC20WithDecimals(address _remoteToken, string _name, string _symbol, uint8 _decimals) returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactorySession) CreateOptimismMintableERC20WithDecimals(_remoteToken common.Address, _name string, _symbol string, _decimals uint8) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.Contract.CreateOptimismMintableERC20WithDecimals(&_OptimismMintableERC20Factory.TransactOpts, _remoteToken, _name, _symbol, _decimals) +} + +// CreateOptimismMintableERC20WithDecimals is a paid mutator transaction binding the contract method 0x8cf0629c. +// +// Solidity: function createOptimismMintableERC20WithDecimals(address _remoteToken, string _name, string _symbol, uint8 _decimals) returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryTransactorSession) CreateOptimismMintableERC20WithDecimals(_remoteToken common.Address, _name string, _symbol string, _decimals uint8) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.Contract.CreateOptimismMintableERC20WithDecimals(&_OptimismMintableERC20Factory.TransactOpts, _remoteToken, _name, _symbol, _decimals) +} + +// CreateStandardL2Token is a paid mutator transaction binding the contract method 0x896f93d1. +// +// Solidity: function createStandardL2Token(address _remoteToken, string _name, string _symbol) returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryTransactor) CreateStandardL2Token(opts *bind.TransactOpts, _remoteToken common.Address, _name string, _symbol string) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.contract.Transact(opts, "createStandardL2Token", _remoteToken, _name, _symbol) +} + +// CreateStandardL2Token is a paid mutator transaction binding the contract method 0x896f93d1. +// +// Solidity: function createStandardL2Token(address _remoteToken, string _name, string _symbol) returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactorySession) CreateStandardL2Token(_remoteToken common.Address, _name string, _symbol string) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.Contract.CreateStandardL2Token(&_OptimismMintableERC20Factory.TransactOpts, _remoteToken, _name, _symbol) +} + +// CreateStandardL2Token is a paid mutator transaction binding the contract method 0x896f93d1. +// +// Solidity: function createStandardL2Token(address _remoteToken, string _name, string _symbol) returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryTransactorSession) CreateStandardL2Token(_remoteToken common.Address, _name string, _symbol string) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.Contract.CreateStandardL2Token(&_OptimismMintableERC20Factory.TransactOpts, _remoteToken, _name, _symbol) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address _bridge) returns() +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryTransactor) Initialize(opts *bind.TransactOpts, _bridge common.Address) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.contract.Transact(opts, "initialize", _bridge) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address _bridge) returns() +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactorySession) Initialize(_bridge common.Address) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.Contract.Initialize(&_OptimismMintableERC20Factory.TransactOpts, _bridge) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address _bridge) returns() +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryTransactorSession) Initialize(_bridge common.Address) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.Contract.Initialize(&_OptimismMintableERC20Factory.TransactOpts, _bridge) +} + +// OptimismMintableERC20FactoryInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the OptimismMintableERC20Factory contract. +type OptimismMintableERC20FactoryInitializedIterator struct { + Event *OptimismMintableERC20FactoryInitialized // 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 *OptimismMintableERC20FactoryInitializedIterator) 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(OptimismMintableERC20FactoryInitialized) + 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(OptimismMintableERC20FactoryInitialized) + 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 *OptimismMintableERC20FactoryInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OptimismMintableERC20FactoryInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OptimismMintableERC20FactoryInitialized represents a Initialized event raised by the OptimismMintableERC20Factory contract. +type OptimismMintableERC20FactoryInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryFilterer) FilterInitialized(opts *bind.FilterOpts) (*OptimismMintableERC20FactoryInitializedIterator, error) { + + logs, sub, err := _OptimismMintableERC20Factory.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &OptimismMintableERC20FactoryInitializedIterator{contract: _OptimismMintableERC20Factory.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *OptimismMintableERC20FactoryInitialized) (event.Subscription, error) { + + logs, sub, err := _OptimismMintableERC20Factory.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(OptimismMintableERC20FactoryInitialized) + if err := _OptimismMintableERC20Factory.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryFilterer) ParseInitialized(log types.Log) (*OptimismMintableERC20FactoryInitialized, error) { + event := new(OptimismMintableERC20FactoryInitialized) + if err := _OptimismMintableERC20Factory.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// OptimismMintableERC20FactoryOptimismMintableERC20CreatedIterator is returned from FilterOptimismMintableERC20Created and is used to iterate over the raw logs and unpacked data for OptimismMintableERC20Created events raised by the OptimismMintableERC20Factory contract. +type OptimismMintableERC20FactoryOptimismMintableERC20CreatedIterator struct { + Event *OptimismMintableERC20FactoryOptimismMintableERC20Created // 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 *OptimismMintableERC20FactoryOptimismMintableERC20CreatedIterator) 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(OptimismMintableERC20FactoryOptimismMintableERC20Created) + 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(OptimismMintableERC20FactoryOptimismMintableERC20Created) + 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 *OptimismMintableERC20FactoryOptimismMintableERC20CreatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OptimismMintableERC20FactoryOptimismMintableERC20CreatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OptimismMintableERC20FactoryOptimismMintableERC20Created represents a OptimismMintableERC20Created event raised by the OptimismMintableERC20Factory contract. +type OptimismMintableERC20FactoryOptimismMintableERC20Created struct { + LocalToken common.Address + RemoteToken common.Address + Deployer common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOptimismMintableERC20Created is a free log retrieval operation binding the contract event 0x52fe89dd5930f343d25650b62fd367bae47088bcddffd2a88350a6ecdd620cdb. +// +// Solidity: event OptimismMintableERC20Created(address indexed localToken, address indexed remoteToken, address deployer) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryFilterer) FilterOptimismMintableERC20Created(opts *bind.FilterOpts, localToken []common.Address, remoteToken []common.Address) (*OptimismMintableERC20FactoryOptimismMintableERC20CreatedIterator, error) { + + var localTokenRule []interface{} + for _, localTokenItem := range localToken { + localTokenRule = append(localTokenRule, localTokenItem) + } + var remoteTokenRule []interface{} + for _, remoteTokenItem := range remoteToken { + remoteTokenRule = append(remoteTokenRule, remoteTokenItem) + } + + logs, sub, err := _OptimismMintableERC20Factory.contract.FilterLogs(opts, "OptimismMintableERC20Created", localTokenRule, remoteTokenRule) + if err != nil { + return nil, err + } + return &OptimismMintableERC20FactoryOptimismMintableERC20CreatedIterator{contract: _OptimismMintableERC20Factory.contract, event: "OptimismMintableERC20Created", logs: logs, sub: sub}, nil +} + +// WatchOptimismMintableERC20Created is a free log subscription operation binding the contract event 0x52fe89dd5930f343d25650b62fd367bae47088bcddffd2a88350a6ecdd620cdb. +// +// Solidity: event OptimismMintableERC20Created(address indexed localToken, address indexed remoteToken, address deployer) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryFilterer) WatchOptimismMintableERC20Created(opts *bind.WatchOpts, sink chan<- *OptimismMintableERC20FactoryOptimismMintableERC20Created, localToken []common.Address, remoteToken []common.Address) (event.Subscription, error) { + + var localTokenRule []interface{} + for _, localTokenItem := range localToken { + localTokenRule = append(localTokenRule, localTokenItem) + } + var remoteTokenRule []interface{} + for _, remoteTokenItem := range remoteToken { + remoteTokenRule = append(remoteTokenRule, remoteTokenItem) + } + + logs, sub, err := _OptimismMintableERC20Factory.contract.WatchLogs(opts, "OptimismMintableERC20Created", localTokenRule, remoteTokenRule) + 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(OptimismMintableERC20FactoryOptimismMintableERC20Created) + if err := _OptimismMintableERC20Factory.contract.UnpackLog(event, "OptimismMintableERC20Created", 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 +} + +// ParseOptimismMintableERC20Created is a log parse operation binding the contract event 0x52fe89dd5930f343d25650b62fd367bae47088bcddffd2a88350a6ecdd620cdb. +// +// Solidity: event OptimismMintableERC20Created(address indexed localToken, address indexed remoteToken, address deployer) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryFilterer) ParseOptimismMintableERC20Created(log types.Log) (*OptimismMintableERC20FactoryOptimismMintableERC20Created, error) { + event := new(OptimismMintableERC20FactoryOptimismMintableERC20Created) + if err := _OptimismMintableERC20Factory.contract.UnpackLog(event, "OptimismMintableERC20Created", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// OptimismMintableERC20FactoryStandardL2TokenCreatedIterator is returned from FilterStandardL2TokenCreated and is used to iterate over the raw logs and unpacked data for StandardL2TokenCreated events raised by the OptimismMintableERC20Factory contract. +type OptimismMintableERC20FactoryStandardL2TokenCreatedIterator struct { + Event *OptimismMintableERC20FactoryStandardL2TokenCreated // 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 *OptimismMintableERC20FactoryStandardL2TokenCreatedIterator) 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(OptimismMintableERC20FactoryStandardL2TokenCreated) + 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(OptimismMintableERC20FactoryStandardL2TokenCreated) + 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 *OptimismMintableERC20FactoryStandardL2TokenCreatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OptimismMintableERC20FactoryStandardL2TokenCreatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OptimismMintableERC20FactoryStandardL2TokenCreated represents a StandardL2TokenCreated event raised by the OptimismMintableERC20Factory contract. +type OptimismMintableERC20FactoryStandardL2TokenCreated struct { + RemoteToken common.Address + LocalToken common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterStandardL2TokenCreated is a free log retrieval operation binding the contract event 0xceeb8e7d520d7f3b65fc11a262b91066940193b05d4f93df07cfdced0eb551cf. +// +// Solidity: event StandardL2TokenCreated(address indexed remoteToken, address indexed localToken) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryFilterer) FilterStandardL2TokenCreated(opts *bind.FilterOpts, remoteToken []common.Address, localToken []common.Address) (*OptimismMintableERC20FactoryStandardL2TokenCreatedIterator, error) { + + var remoteTokenRule []interface{} + for _, remoteTokenItem := range remoteToken { + remoteTokenRule = append(remoteTokenRule, remoteTokenItem) + } + var localTokenRule []interface{} + for _, localTokenItem := range localToken { + localTokenRule = append(localTokenRule, localTokenItem) + } + + logs, sub, err := _OptimismMintableERC20Factory.contract.FilterLogs(opts, "StandardL2TokenCreated", remoteTokenRule, localTokenRule) + if err != nil { + return nil, err + } + return &OptimismMintableERC20FactoryStandardL2TokenCreatedIterator{contract: _OptimismMintableERC20Factory.contract, event: "StandardL2TokenCreated", logs: logs, sub: sub}, nil +} + +// WatchStandardL2TokenCreated is a free log subscription operation binding the contract event 0xceeb8e7d520d7f3b65fc11a262b91066940193b05d4f93df07cfdced0eb551cf. +// +// Solidity: event StandardL2TokenCreated(address indexed remoteToken, address indexed localToken) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryFilterer) WatchStandardL2TokenCreated(opts *bind.WatchOpts, sink chan<- *OptimismMintableERC20FactoryStandardL2TokenCreated, remoteToken []common.Address, localToken []common.Address) (event.Subscription, error) { + + var remoteTokenRule []interface{} + for _, remoteTokenItem := range remoteToken { + remoteTokenRule = append(remoteTokenRule, remoteTokenItem) + } + var localTokenRule []interface{} + for _, localTokenItem := range localToken { + localTokenRule = append(localTokenRule, localTokenItem) + } + + logs, sub, err := _OptimismMintableERC20Factory.contract.WatchLogs(opts, "StandardL2TokenCreated", remoteTokenRule, localTokenRule) + 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(OptimismMintableERC20FactoryStandardL2TokenCreated) + if err := _OptimismMintableERC20Factory.contract.UnpackLog(event, "StandardL2TokenCreated", 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 +} + +// ParseStandardL2TokenCreated is a log parse operation binding the contract event 0xceeb8e7d520d7f3b65fc11a262b91066940193b05d4f93df07cfdced0eb551cf. +// +// Solidity: event StandardL2TokenCreated(address indexed remoteToken, address indexed localToken) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryFilterer) ParseStandardL2TokenCreated(log types.Log) (*OptimismMintableERC20FactoryStandardL2TokenCreated, error) { + event := new(OptimismMintableERC20FactoryStandardL2TokenCreated) + if err := _OptimismMintableERC20Factory.contract.UnpackLog(event, "StandardL2TokenCreated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/op-chain-ops/opbnb-upgrades/new-contracts/bindings/OptimismPortal.go b/op-chain-ops/opbnb-upgrades/new-contracts/bindings/OptimismPortal.go new file mode 100644 index 000000000..20771b128 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/new-contracts/bindings/OptimismPortal.go @@ -0,0 +1,1412 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// TypesOutputRootProof is an auto generated low-level Go binding around an user-defined struct. +type TypesOutputRootProof struct { + Version [32]byte + StateRoot [32]byte + MessagePasserStorageRoot [32]byte + LatestBlockhash [32]byte +} + +// TypesWithdrawalTransaction is an auto generated low-level Go binding around an user-defined struct. +type TypesWithdrawalTransaction struct { + Nonce *big.Int + Sender common.Address + Target common.Address + Value *big.Int + GasLimit *big.Int + Data []byte +} + +// OptimismPortalMetaData contains all meta data concerning the OptimismPortal contract. +var OptimismPortalMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"balance\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"depositERC20Transaction\",\"inputs\":[{\"name\":\"_to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_mint\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_gasLimit\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_isCreation\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"_data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"depositTransaction\",\"inputs\":[{\"name\":\"_to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_gasLimit\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_isCreation\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"_data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"donateETH\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"finalizeWithdrawalTransaction\",\"inputs\":[{\"name\":\"_tx\",\"type\":\"tuple\",\"internalType\":\"structTypes.WithdrawalTransaction\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"gasLimit\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"finalizedWithdrawals\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"guardian\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_l2Oracle\",\"type\":\"address\",\"internalType\":\"contractL2OutputOracle\"},{\"name\":\"_systemConfig\",\"type\":\"address\",\"internalType\":\"contractSystemConfig\"},{\"name\":\"_superchainConfig\",\"type\":\"address\",\"internalType\":\"contractSuperchainConfig\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isOutputFinalized\",\"inputs\":[{\"name\":\"_l2OutputIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"l2Oracle\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractL2OutputOracle\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"l2Sender\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"minimumGasLimit\",\"inputs\":[{\"name\":\"_byteCount\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"params\",\"inputs\":[],\"outputs\":[{\"name\":\"prevBaseFee\",\"type\":\"uint128\",\"internalType\":\"uint128\"},{\"name\":\"prevBoughtGas\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"prevBlockNum\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"paused_\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proveWithdrawalTransaction\",\"inputs\":[{\"name\":\"_tx\",\"type\":\"tuple\",\"internalType\":\"structTypes.WithdrawalTransaction\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"gasLimit\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"_l2OutputIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_outputRootProof\",\"type\":\"tuple\",\"internalType\":\"structTypes.OutputRootProof\",\"components\":[{\"name\":\"version\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stateRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"messagePasserStorageRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"latestBlockhash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"_withdrawalProof\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"provenWithdrawals\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"outputRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"timestamp\",\"type\":\"uint128\",\"internalType\":\"uint128\"},{\"name\":\"l2OutputIndex\",\"type\":\"uint128\",\"internalType\":\"uint128\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setGasPayingToken\",\"inputs\":[{\"name\":\"_token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_decimals\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"_name\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_symbol\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"superchainConfig\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractSuperchainConfig\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"systemConfig\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractSystemConfig\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"pure\"},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TransactionDeposited\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"version\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"opaqueData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawalFinalized\",\"inputs\":[{\"name\":\"withdrawalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"success\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawalProven\",\"inputs\":[{\"name\":\"withdrawalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"BadTarget\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CallPaused\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ContentLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"EmptyItem\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"GasEstimation\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidDataRemainder\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidHeader\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"LargeCalldata\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoValue\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NonReentrant\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyCustomGasToken\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OutOfGas\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SmallGasLimit\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TransferFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"Unauthorized\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UnexpectedList\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UnexpectedString\",\"inputs\":[]}]", +} + +// OptimismPortalABI is the input ABI used to generate the binding from. +// Deprecated: Use OptimismPortalMetaData.ABI instead. +var OptimismPortalABI = OptimismPortalMetaData.ABI + +// OptimismPortal is an auto generated Go binding around an Ethereum contract. +type OptimismPortal struct { + OptimismPortalCaller // Read-only binding to the contract + OptimismPortalTransactor // Write-only binding to the contract + OptimismPortalFilterer // Log filterer for contract events +} + +// OptimismPortalCaller is an auto generated read-only Go binding around an Ethereum contract. +type OptimismPortalCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OptimismPortalTransactor is an auto generated write-only Go binding around an Ethereum contract. +type OptimismPortalTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OptimismPortalFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type OptimismPortalFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OptimismPortalSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type OptimismPortalSession struct { + Contract *OptimismPortal // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OptimismPortalCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type OptimismPortalCallerSession struct { + Contract *OptimismPortalCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// OptimismPortalTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type OptimismPortalTransactorSession struct { + Contract *OptimismPortalTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OptimismPortalRaw is an auto generated low-level Go binding around an Ethereum contract. +type OptimismPortalRaw struct { + Contract *OptimismPortal // Generic contract binding to access the raw methods on +} + +// OptimismPortalCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type OptimismPortalCallerRaw struct { + Contract *OptimismPortalCaller // Generic read-only contract binding to access the raw methods on +} + +// OptimismPortalTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type OptimismPortalTransactorRaw struct { + Contract *OptimismPortalTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewOptimismPortal creates a new instance of OptimismPortal, bound to a specific deployed contract. +func NewOptimismPortal(address common.Address, backend bind.ContractBackend) (*OptimismPortal, error) { + contract, err := bindOptimismPortal(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &OptimismPortal{OptimismPortalCaller: OptimismPortalCaller{contract: contract}, OptimismPortalTransactor: OptimismPortalTransactor{contract: contract}, OptimismPortalFilterer: OptimismPortalFilterer{contract: contract}}, nil +} + +// NewOptimismPortalCaller creates a new read-only instance of OptimismPortal, bound to a specific deployed contract. +func NewOptimismPortalCaller(address common.Address, caller bind.ContractCaller) (*OptimismPortalCaller, error) { + contract, err := bindOptimismPortal(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &OptimismPortalCaller{contract: contract}, nil +} + +// NewOptimismPortalTransactor creates a new write-only instance of OptimismPortal, bound to a specific deployed contract. +func NewOptimismPortalTransactor(address common.Address, transactor bind.ContractTransactor) (*OptimismPortalTransactor, error) { + contract, err := bindOptimismPortal(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &OptimismPortalTransactor{contract: contract}, nil +} + +// NewOptimismPortalFilterer creates a new log filterer instance of OptimismPortal, bound to a specific deployed contract. +func NewOptimismPortalFilterer(address common.Address, filterer bind.ContractFilterer) (*OptimismPortalFilterer, error) { + contract, err := bindOptimismPortal(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &OptimismPortalFilterer{contract: contract}, nil +} + +// bindOptimismPortal binds a generic wrapper to an already deployed contract. +func bindOptimismPortal(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := OptimismPortalMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_OptimismPortal *OptimismPortalRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _OptimismPortal.Contract.OptimismPortalCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_OptimismPortal *OptimismPortalRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OptimismPortal.Contract.OptimismPortalTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_OptimismPortal *OptimismPortalRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _OptimismPortal.Contract.OptimismPortalTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_OptimismPortal *OptimismPortalCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _OptimismPortal.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_OptimismPortal *OptimismPortalTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OptimismPortal.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_OptimismPortal *OptimismPortalTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _OptimismPortal.Contract.contract.Transact(opts, method, params...) +} + +// Balance is a free data retrieval call binding the contract method 0xb69ef8a8. +// +// Solidity: function balance() view returns(uint256) +func (_OptimismPortal *OptimismPortalCaller) Balance(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _OptimismPortal.contract.Call(opts, &out, "balance") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Balance is a free data retrieval call binding the contract method 0xb69ef8a8. +// +// Solidity: function balance() view returns(uint256) +func (_OptimismPortal *OptimismPortalSession) Balance() (*big.Int, error) { + return _OptimismPortal.Contract.Balance(&_OptimismPortal.CallOpts) +} + +// Balance is a free data retrieval call binding the contract method 0xb69ef8a8. +// +// Solidity: function balance() view returns(uint256) +func (_OptimismPortal *OptimismPortalCallerSession) Balance() (*big.Int, error) { + return _OptimismPortal.Contract.Balance(&_OptimismPortal.CallOpts) +} + +// FinalizedWithdrawals is a free data retrieval call binding the contract method 0xa14238e7. +// +// Solidity: function finalizedWithdrawals(bytes32 ) view returns(bool) +func (_OptimismPortal *OptimismPortalCaller) FinalizedWithdrawals(opts *bind.CallOpts, arg0 [32]byte) (bool, error) { + var out []interface{} + err := _OptimismPortal.contract.Call(opts, &out, "finalizedWithdrawals", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// FinalizedWithdrawals is a free data retrieval call binding the contract method 0xa14238e7. +// +// Solidity: function finalizedWithdrawals(bytes32 ) view returns(bool) +func (_OptimismPortal *OptimismPortalSession) FinalizedWithdrawals(arg0 [32]byte) (bool, error) { + return _OptimismPortal.Contract.FinalizedWithdrawals(&_OptimismPortal.CallOpts, arg0) +} + +// FinalizedWithdrawals is a free data retrieval call binding the contract method 0xa14238e7. +// +// Solidity: function finalizedWithdrawals(bytes32 ) view returns(bool) +func (_OptimismPortal *OptimismPortalCallerSession) FinalizedWithdrawals(arg0 [32]byte) (bool, error) { + return _OptimismPortal.Contract.FinalizedWithdrawals(&_OptimismPortal.CallOpts, arg0) +} + +// Guardian is a free data retrieval call binding the contract method 0x452a9320. +// +// Solidity: function guardian() view returns(address) +func (_OptimismPortal *OptimismPortalCaller) Guardian(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _OptimismPortal.contract.Call(opts, &out, "guardian") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Guardian is a free data retrieval call binding the contract method 0x452a9320. +// +// Solidity: function guardian() view returns(address) +func (_OptimismPortal *OptimismPortalSession) Guardian() (common.Address, error) { + return _OptimismPortal.Contract.Guardian(&_OptimismPortal.CallOpts) +} + +// Guardian is a free data retrieval call binding the contract method 0x452a9320. +// +// Solidity: function guardian() view returns(address) +func (_OptimismPortal *OptimismPortalCallerSession) Guardian() (common.Address, error) { + return _OptimismPortal.Contract.Guardian(&_OptimismPortal.CallOpts) +} + +// IsOutputFinalized is a free data retrieval call binding the contract method 0x6dbffb78. +// +// Solidity: function isOutputFinalized(uint256 _l2OutputIndex) view returns(bool) +func (_OptimismPortal *OptimismPortalCaller) IsOutputFinalized(opts *bind.CallOpts, _l2OutputIndex *big.Int) (bool, error) { + var out []interface{} + err := _OptimismPortal.contract.Call(opts, &out, "isOutputFinalized", _l2OutputIndex) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsOutputFinalized is a free data retrieval call binding the contract method 0x6dbffb78. +// +// Solidity: function isOutputFinalized(uint256 _l2OutputIndex) view returns(bool) +func (_OptimismPortal *OptimismPortalSession) IsOutputFinalized(_l2OutputIndex *big.Int) (bool, error) { + return _OptimismPortal.Contract.IsOutputFinalized(&_OptimismPortal.CallOpts, _l2OutputIndex) +} + +// IsOutputFinalized is a free data retrieval call binding the contract method 0x6dbffb78. +// +// Solidity: function isOutputFinalized(uint256 _l2OutputIndex) view returns(bool) +func (_OptimismPortal *OptimismPortalCallerSession) IsOutputFinalized(_l2OutputIndex *big.Int) (bool, error) { + return _OptimismPortal.Contract.IsOutputFinalized(&_OptimismPortal.CallOpts, _l2OutputIndex) +} + +// L2Oracle is a free data retrieval call binding the contract method 0x9b5f694a. +// +// Solidity: function l2Oracle() view returns(address) +func (_OptimismPortal *OptimismPortalCaller) L2Oracle(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _OptimismPortal.contract.Call(opts, &out, "l2Oracle") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// L2Oracle is a free data retrieval call binding the contract method 0x9b5f694a. +// +// Solidity: function l2Oracle() view returns(address) +func (_OptimismPortal *OptimismPortalSession) L2Oracle() (common.Address, error) { + return _OptimismPortal.Contract.L2Oracle(&_OptimismPortal.CallOpts) +} + +// L2Oracle is a free data retrieval call binding the contract method 0x9b5f694a. +// +// Solidity: function l2Oracle() view returns(address) +func (_OptimismPortal *OptimismPortalCallerSession) L2Oracle() (common.Address, error) { + return _OptimismPortal.Contract.L2Oracle(&_OptimismPortal.CallOpts) +} + +// L2Sender is a free data retrieval call binding the contract method 0x9bf62d82. +// +// Solidity: function l2Sender() view returns(address) +func (_OptimismPortal *OptimismPortalCaller) L2Sender(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _OptimismPortal.contract.Call(opts, &out, "l2Sender") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// L2Sender is a free data retrieval call binding the contract method 0x9bf62d82. +// +// Solidity: function l2Sender() view returns(address) +func (_OptimismPortal *OptimismPortalSession) L2Sender() (common.Address, error) { + return _OptimismPortal.Contract.L2Sender(&_OptimismPortal.CallOpts) +} + +// L2Sender is a free data retrieval call binding the contract method 0x9bf62d82. +// +// Solidity: function l2Sender() view returns(address) +func (_OptimismPortal *OptimismPortalCallerSession) L2Sender() (common.Address, error) { + return _OptimismPortal.Contract.L2Sender(&_OptimismPortal.CallOpts) +} + +// MinimumGasLimit is a free data retrieval call binding the contract method 0xa35d99df. +// +// Solidity: function minimumGasLimit(uint64 _byteCount) pure returns(uint64) +func (_OptimismPortal *OptimismPortalCaller) MinimumGasLimit(opts *bind.CallOpts, _byteCount uint64) (uint64, error) { + var out []interface{} + err := _OptimismPortal.contract.Call(opts, &out, "minimumGasLimit", _byteCount) + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// MinimumGasLimit is a free data retrieval call binding the contract method 0xa35d99df. +// +// Solidity: function minimumGasLimit(uint64 _byteCount) pure returns(uint64) +func (_OptimismPortal *OptimismPortalSession) MinimumGasLimit(_byteCount uint64) (uint64, error) { + return _OptimismPortal.Contract.MinimumGasLimit(&_OptimismPortal.CallOpts, _byteCount) +} + +// MinimumGasLimit is a free data retrieval call binding the contract method 0xa35d99df. +// +// Solidity: function minimumGasLimit(uint64 _byteCount) pure returns(uint64) +func (_OptimismPortal *OptimismPortalCallerSession) MinimumGasLimit(_byteCount uint64) (uint64, error) { + return _OptimismPortal.Contract.MinimumGasLimit(&_OptimismPortal.CallOpts, _byteCount) +} + +// Params is a free data retrieval call binding the contract method 0xcff0ab96. +// +// Solidity: function params() view returns(uint128 prevBaseFee, uint64 prevBoughtGas, uint64 prevBlockNum) +func (_OptimismPortal *OptimismPortalCaller) Params(opts *bind.CallOpts) (struct { + PrevBaseFee *big.Int + PrevBoughtGas uint64 + PrevBlockNum uint64 +}, error) { + var out []interface{} + err := _OptimismPortal.contract.Call(opts, &out, "params") + + outstruct := new(struct { + PrevBaseFee *big.Int + PrevBoughtGas uint64 + PrevBlockNum uint64 + }) + if err != nil { + return *outstruct, err + } + + outstruct.PrevBaseFee = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.PrevBoughtGas = *abi.ConvertType(out[1], new(uint64)).(*uint64) + outstruct.PrevBlockNum = *abi.ConvertType(out[2], new(uint64)).(*uint64) + + return *outstruct, err + +} + +// Params is a free data retrieval call binding the contract method 0xcff0ab96. +// +// Solidity: function params() view returns(uint128 prevBaseFee, uint64 prevBoughtGas, uint64 prevBlockNum) +func (_OptimismPortal *OptimismPortalSession) Params() (struct { + PrevBaseFee *big.Int + PrevBoughtGas uint64 + PrevBlockNum uint64 +}, error) { + return _OptimismPortal.Contract.Params(&_OptimismPortal.CallOpts) +} + +// Params is a free data retrieval call binding the contract method 0xcff0ab96. +// +// Solidity: function params() view returns(uint128 prevBaseFee, uint64 prevBoughtGas, uint64 prevBlockNum) +func (_OptimismPortal *OptimismPortalCallerSession) Params() (struct { + PrevBaseFee *big.Int + PrevBoughtGas uint64 + PrevBlockNum uint64 +}, error) { + return _OptimismPortal.Contract.Params(&_OptimismPortal.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool paused_) +func (_OptimismPortal *OptimismPortalCaller) Paused(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _OptimismPortal.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool paused_) +func (_OptimismPortal *OptimismPortalSession) Paused() (bool, error) { + return _OptimismPortal.Contract.Paused(&_OptimismPortal.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool paused_) +func (_OptimismPortal *OptimismPortalCallerSession) Paused() (bool, error) { + return _OptimismPortal.Contract.Paused(&_OptimismPortal.CallOpts) +} + +// ProvenWithdrawals is a free data retrieval call binding the contract method 0xe965084c. +// +// Solidity: function provenWithdrawals(bytes32 ) view returns(bytes32 outputRoot, uint128 timestamp, uint128 l2OutputIndex) +func (_OptimismPortal *OptimismPortalCaller) ProvenWithdrawals(opts *bind.CallOpts, arg0 [32]byte) (struct { + OutputRoot [32]byte + Timestamp *big.Int + L2OutputIndex *big.Int +}, error) { + var out []interface{} + err := _OptimismPortal.contract.Call(opts, &out, "provenWithdrawals", arg0) + + outstruct := new(struct { + OutputRoot [32]byte + Timestamp *big.Int + L2OutputIndex *big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.OutputRoot = *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + outstruct.Timestamp = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.L2OutputIndex = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +// ProvenWithdrawals is a free data retrieval call binding the contract method 0xe965084c. +// +// Solidity: function provenWithdrawals(bytes32 ) view returns(bytes32 outputRoot, uint128 timestamp, uint128 l2OutputIndex) +func (_OptimismPortal *OptimismPortalSession) ProvenWithdrawals(arg0 [32]byte) (struct { + OutputRoot [32]byte + Timestamp *big.Int + L2OutputIndex *big.Int +}, error) { + return _OptimismPortal.Contract.ProvenWithdrawals(&_OptimismPortal.CallOpts, arg0) +} + +// ProvenWithdrawals is a free data retrieval call binding the contract method 0xe965084c. +// +// Solidity: function provenWithdrawals(bytes32 ) view returns(bytes32 outputRoot, uint128 timestamp, uint128 l2OutputIndex) +func (_OptimismPortal *OptimismPortalCallerSession) ProvenWithdrawals(arg0 [32]byte) (struct { + OutputRoot [32]byte + Timestamp *big.Int + L2OutputIndex *big.Int +}, error) { + return _OptimismPortal.Contract.ProvenWithdrawals(&_OptimismPortal.CallOpts, arg0) +} + +// SuperchainConfig is a free data retrieval call binding the contract method 0x35e80ab3. +// +// Solidity: function superchainConfig() view returns(address) +func (_OptimismPortal *OptimismPortalCaller) SuperchainConfig(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _OptimismPortal.contract.Call(opts, &out, "superchainConfig") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// SuperchainConfig is a free data retrieval call binding the contract method 0x35e80ab3. +// +// Solidity: function superchainConfig() view returns(address) +func (_OptimismPortal *OptimismPortalSession) SuperchainConfig() (common.Address, error) { + return _OptimismPortal.Contract.SuperchainConfig(&_OptimismPortal.CallOpts) +} + +// SuperchainConfig is a free data retrieval call binding the contract method 0x35e80ab3. +// +// Solidity: function superchainConfig() view returns(address) +func (_OptimismPortal *OptimismPortalCallerSession) SuperchainConfig() (common.Address, error) { + return _OptimismPortal.Contract.SuperchainConfig(&_OptimismPortal.CallOpts) +} + +// SystemConfig is a free data retrieval call binding the contract method 0x33d7e2bd. +// +// Solidity: function systemConfig() view returns(address) +func (_OptimismPortal *OptimismPortalCaller) SystemConfig(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _OptimismPortal.contract.Call(opts, &out, "systemConfig") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// SystemConfig is a free data retrieval call binding the contract method 0x33d7e2bd. +// +// Solidity: function systemConfig() view returns(address) +func (_OptimismPortal *OptimismPortalSession) SystemConfig() (common.Address, error) { + return _OptimismPortal.Contract.SystemConfig(&_OptimismPortal.CallOpts) +} + +// SystemConfig is a free data retrieval call binding the contract method 0x33d7e2bd. +// +// Solidity: function systemConfig() view returns(address) +func (_OptimismPortal *OptimismPortalCallerSession) SystemConfig() (common.Address, error) { + return _OptimismPortal.Contract.SystemConfig(&_OptimismPortal.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() pure returns(string) +func (_OptimismPortal *OptimismPortalCaller) Version(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _OptimismPortal.contract.Call(opts, &out, "version") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() pure returns(string) +func (_OptimismPortal *OptimismPortalSession) Version() (string, error) { + return _OptimismPortal.Contract.Version(&_OptimismPortal.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() pure returns(string) +func (_OptimismPortal *OptimismPortalCallerSession) Version() (string, error) { + return _OptimismPortal.Contract.Version(&_OptimismPortal.CallOpts) +} + +// DepositERC20Transaction is a paid mutator transaction binding the contract method 0x149f2f22. +// +// Solidity: function depositERC20Transaction(address _to, uint256 _mint, uint256 _value, uint64 _gasLimit, bool _isCreation, bytes _data) returns() +func (_OptimismPortal *OptimismPortalTransactor) DepositERC20Transaction(opts *bind.TransactOpts, _to common.Address, _mint *big.Int, _value *big.Int, _gasLimit uint64, _isCreation bool, _data []byte) (*types.Transaction, error) { + return _OptimismPortal.contract.Transact(opts, "depositERC20Transaction", _to, _mint, _value, _gasLimit, _isCreation, _data) +} + +// DepositERC20Transaction is a paid mutator transaction binding the contract method 0x149f2f22. +// +// Solidity: function depositERC20Transaction(address _to, uint256 _mint, uint256 _value, uint64 _gasLimit, bool _isCreation, bytes _data) returns() +func (_OptimismPortal *OptimismPortalSession) DepositERC20Transaction(_to common.Address, _mint *big.Int, _value *big.Int, _gasLimit uint64, _isCreation bool, _data []byte) (*types.Transaction, error) { + return _OptimismPortal.Contract.DepositERC20Transaction(&_OptimismPortal.TransactOpts, _to, _mint, _value, _gasLimit, _isCreation, _data) +} + +// DepositERC20Transaction is a paid mutator transaction binding the contract method 0x149f2f22. +// +// Solidity: function depositERC20Transaction(address _to, uint256 _mint, uint256 _value, uint64 _gasLimit, bool _isCreation, bytes _data) returns() +func (_OptimismPortal *OptimismPortalTransactorSession) DepositERC20Transaction(_to common.Address, _mint *big.Int, _value *big.Int, _gasLimit uint64, _isCreation bool, _data []byte) (*types.Transaction, error) { + return _OptimismPortal.Contract.DepositERC20Transaction(&_OptimismPortal.TransactOpts, _to, _mint, _value, _gasLimit, _isCreation, _data) +} + +// DepositTransaction is a paid mutator transaction binding the contract method 0xe9e05c42. +// +// Solidity: function depositTransaction(address _to, uint256 _value, uint64 _gasLimit, bool _isCreation, bytes _data) payable returns() +func (_OptimismPortal *OptimismPortalTransactor) DepositTransaction(opts *bind.TransactOpts, _to common.Address, _value *big.Int, _gasLimit uint64, _isCreation bool, _data []byte) (*types.Transaction, error) { + return _OptimismPortal.contract.Transact(opts, "depositTransaction", _to, _value, _gasLimit, _isCreation, _data) +} + +// DepositTransaction is a paid mutator transaction binding the contract method 0xe9e05c42. +// +// Solidity: function depositTransaction(address _to, uint256 _value, uint64 _gasLimit, bool _isCreation, bytes _data) payable returns() +func (_OptimismPortal *OptimismPortalSession) DepositTransaction(_to common.Address, _value *big.Int, _gasLimit uint64, _isCreation bool, _data []byte) (*types.Transaction, error) { + return _OptimismPortal.Contract.DepositTransaction(&_OptimismPortal.TransactOpts, _to, _value, _gasLimit, _isCreation, _data) +} + +// DepositTransaction is a paid mutator transaction binding the contract method 0xe9e05c42. +// +// Solidity: function depositTransaction(address _to, uint256 _value, uint64 _gasLimit, bool _isCreation, bytes _data) payable returns() +func (_OptimismPortal *OptimismPortalTransactorSession) DepositTransaction(_to common.Address, _value *big.Int, _gasLimit uint64, _isCreation bool, _data []byte) (*types.Transaction, error) { + return _OptimismPortal.Contract.DepositTransaction(&_OptimismPortal.TransactOpts, _to, _value, _gasLimit, _isCreation, _data) +} + +// DonateETH is a paid mutator transaction binding the contract method 0x8b4c40b0. +// +// Solidity: function donateETH() payable returns() +func (_OptimismPortal *OptimismPortalTransactor) DonateETH(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OptimismPortal.contract.Transact(opts, "donateETH") +} + +// DonateETH is a paid mutator transaction binding the contract method 0x8b4c40b0. +// +// Solidity: function donateETH() payable returns() +func (_OptimismPortal *OptimismPortalSession) DonateETH() (*types.Transaction, error) { + return _OptimismPortal.Contract.DonateETH(&_OptimismPortal.TransactOpts) +} + +// DonateETH is a paid mutator transaction binding the contract method 0x8b4c40b0. +// +// Solidity: function donateETH() payable returns() +func (_OptimismPortal *OptimismPortalTransactorSession) DonateETH() (*types.Transaction, error) { + return _OptimismPortal.Contract.DonateETH(&_OptimismPortal.TransactOpts) +} + +// FinalizeWithdrawalTransaction is a paid mutator transaction binding the contract method 0x8c3152e9. +// +// Solidity: function finalizeWithdrawalTransaction((uint256,address,address,uint256,uint256,bytes) _tx) returns() +func (_OptimismPortal *OptimismPortalTransactor) FinalizeWithdrawalTransaction(opts *bind.TransactOpts, _tx TypesWithdrawalTransaction) (*types.Transaction, error) { + return _OptimismPortal.contract.Transact(opts, "finalizeWithdrawalTransaction", _tx) +} + +// FinalizeWithdrawalTransaction is a paid mutator transaction binding the contract method 0x8c3152e9. +// +// Solidity: function finalizeWithdrawalTransaction((uint256,address,address,uint256,uint256,bytes) _tx) returns() +func (_OptimismPortal *OptimismPortalSession) FinalizeWithdrawalTransaction(_tx TypesWithdrawalTransaction) (*types.Transaction, error) { + return _OptimismPortal.Contract.FinalizeWithdrawalTransaction(&_OptimismPortal.TransactOpts, _tx) +} + +// FinalizeWithdrawalTransaction is a paid mutator transaction binding the contract method 0x8c3152e9. +// +// Solidity: function finalizeWithdrawalTransaction((uint256,address,address,uint256,uint256,bytes) _tx) returns() +func (_OptimismPortal *OptimismPortalTransactorSession) FinalizeWithdrawalTransaction(_tx TypesWithdrawalTransaction) (*types.Transaction, error) { + return _OptimismPortal.Contract.FinalizeWithdrawalTransaction(&_OptimismPortal.TransactOpts, _tx) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc0c53b8b. +// +// Solidity: function initialize(address _l2Oracle, address _systemConfig, address _superchainConfig) returns() +func (_OptimismPortal *OptimismPortalTransactor) Initialize(opts *bind.TransactOpts, _l2Oracle common.Address, _systemConfig common.Address, _superchainConfig common.Address) (*types.Transaction, error) { + return _OptimismPortal.contract.Transact(opts, "initialize", _l2Oracle, _systemConfig, _superchainConfig) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc0c53b8b. +// +// Solidity: function initialize(address _l2Oracle, address _systemConfig, address _superchainConfig) returns() +func (_OptimismPortal *OptimismPortalSession) Initialize(_l2Oracle common.Address, _systemConfig common.Address, _superchainConfig common.Address) (*types.Transaction, error) { + return _OptimismPortal.Contract.Initialize(&_OptimismPortal.TransactOpts, _l2Oracle, _systemConfig, _superchainConfig) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc0c53b8b. +// +// Solidity: function initialize(address _l2Oracle, address _systemConfig, address _superchainConfig) returns() +func (_OptimismPortal *OptimismPortalTransactorSession) Initialize(_l2Oracle common.Address, _systemConfig common.Address, _superchainConfig common.Address) (*types.Transaction, error) { + return _OptimismPortal.Contract.Initialize(&_OptimismPortal.TransactOpts, _l2Oracle, _systemConfig, _superchainConfig) +} + +// ProveWithdrawalTransaction is a paid mutator transaction binding the contract method 0x4870496f. +// +// Solidity: function proveWithdrawalTransaction((uint256,address,address,uint256,uint256,bytes) _tx, uint256 _l2OutputIndex, (bytes32,bytes32,bytes32,bytes32) _outputRootProof, bytes[] _withdrawalProof) returns() +func (_OptimismPortal *OptimismPortalTransactor) ProveWithdrawalTransaction(opts *bind.TransactOpts, _tx TypesWithdrawalTransaction, _l2OutputIndex *big.Int, _outputRootProof TypesOutputRootProof, _withdrawalProof [][]byte) (*types.Transaction, error) { + return _OptimismPortal.contract.Transact(opts, "proveWithdrawalTransaction", _tx, _l2OutputIndex, _outputRootProof, _withdrawalProof) +} + +// ProveWithdrawalTransaction is a paid mutator transaction binding the contract method 0x4870496f. +// +// Solidity: function proveWithdrawalTransaction((uint256,address,address,uint256,uint256,bytes) _tx, uint256 _l2OutputIndex, (bytes32,bytes32,bytes32,bytes32) _outputRootProof, bytes[] _withdrawalProof) returns() +func (_OptimismPortal *OptimismPortalSession) ProveWithdrawalTransaction(_tx TypesWithdrawalTransaction, _l2OutputIndex *big.Int, _outputRootProof TypesOutputRootProof, _withdrawalProof [][]byte) (*types.Transaction, error) { + return _OptimismPortal.Contract.ProveWithdrawalTransaction(&_OptimismPortal.TransactOpts, _tx, _l2OutputIndex, _outputRootProof, _withdrawalProof) +} + +// ProveWithdrawalTransaction is a paid mutator transaction binding the contract method 0x4870496f. +// +// Solidity: function proveWithdrawalTransaction((uint256,address,address,uint256,uint256,bytes) _tx, uint256 _l2OutputIndex, (bytes32,bytes32,bytes32,bytes32) _outputRootProof, bytes[] _withdrawalProof) returns() +func (_OptimismPortal *OptimismPortalTransactorSession) ProveWithdrawalTransaction(_tx TypesWithdrawalTransaction, _l2OutputIndex *big.Int, _outputRootProof TypesOutputRootProof, _withdrawalProof [][]byte) (*types.Transaction, error) { + return _OptimismPortal.Contract.ProveWithdrawalTransaction(&_OptimismPortal.TransactOpts, _tx, _l2OutputIndex, _outputRootProof, _withdrawalProof) +} + +// SetGasPayingToken is a paid mutator transaction binding the contract method 0x71cfaa3f. +// +// Solidity: function setGasPayingToken(address _token, uint8 _decimals, bytes32 _name, bytes32 _symbol) returns() +func (_OptimismPortal *OptimismPortalTransactor) SetGasPayingToken(opts *bind.TransactOpts, _token common.Address, _decimals uint8, _name [32]byte, _symbol [32]byte) (*types.Transaction, error) { + return _OptimismPortal.contract.Transact(opts, "setGasPayingToken", _token, _decimals, _name, _symbol) +} + +// SetGasPayingToken is a paid mutator transaction binding the contract method 0x71cfaa3f. +// +// Solidity: function setGasPayingToken(address _token, uint8 _decimals, bytes32 _name, bytes32 _symbol) returns() +func (_OptimismPortal *OptimismPortalSession) SetGasPayingToken(_token common.Address, _decimals uint8, _name [32]byte, _symbol [32]byte) (*types.Transaction, error) { + return _OptimismPortal.Contract.SetGasPayingToken(&_OptimismPortal.TransactOpts, _token, _decimals, _name, _symbol) +} + +// SetGasPayingToken is a paid mutator transaction binding the contract method 0x71cfaa3f. +// +// Solidity: function setGasPayingToken(address _token, uint8 _decimals, bytes32 _name, bytes32 _symbol) returns() +func (_OptimismPortal *OptimismPortalTransactorSession) SetGasPayingToken(_token common.Address, _decimals uint8, _name [32]byte, _symbol [32]byte) (*types.Transaction, error) { + return _OptimismPortal.Contract.SetGasPayingToken(&_OptimismPortal.TransactOpts, _token, _decimals, _name, _symbol) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_OptimismPortal *OptimismPortalTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OptimismPortal.contract.RawTransact(opts, nil) // calldata is disallowed for receive function +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_OptimismPortal *OptimismPortalSession) Receive() (*types.Transaction, error) { + return _OptimismPortal.Contract.Receive(&_OptimismPortal.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_OptimismPortal *OptimismPortalTransactorSession) Receive() (*types.Transaction, error) { + return _OptimismPortal.Contract.Receive(&_OptimismPortal.TransactOpts) +} + +// OptimismPortalInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the OptimismPortal contract. +type OptimismPortalInitializedIterator struct { + Event *OptimismPortalInitialized // 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 *OptimismPortalInitializedIterator) 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(OptimismPortalInitialized) + 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(OptimismPortalInitialized) + 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 *OptimismPortalInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OptimismPortalInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OptimismPortalInitialized represents a Initialized event raised by the OptimismPortal contract. +type OptimismPortalInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_OptimismPortal *OptimismPortalFilterer) FilterInitialized(opts *bind.FilterOpts) (*OptimismPortalInitializedIterator, error) { + + logs, sub, err := _OptimismPortal.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &OptimismPortalInitializedIterator{contract: _OptimismPortal.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_OptimismPortal *OptimismPortalFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *OptimismPortalInitialized) (event.Subscription, error) { + + logs, sub, err := _OptimismPortal.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(OptimismPortalInitialized) + if err := _OptimismPortal.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_OptimismPortal *OptimismPortalFilterer) ParseInitialized(log types.Log) (*OptimismPortalInitialized, error) { + event := new(OptimismPortalInitialized) + if err := _OptimismPortal.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// OptimismPortalTransactionDepositedIterator is returned from FilterTransactionDeposited and is used to iterate over the raw logs and unpacked data for TransactionDeposited events raised by the OptimismPortal contract. +type OptimismPortalTransactionDepositedIterator struct { + Event *OptimismPortalTransactionDeposited // 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 *OptimismPortalTransactionDepositedIterator) 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(OptimismPortalTransactionDeposited) + 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(OptimismPortalTransactionDeposited) + 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 *OptimismPortalTransactionDepositedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OptimismPortalTransactionDepositedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OptimismPortalTransactionDeposited represents a TransactionDeposited event raised by the OptimismPortal contract. +type OptimismPortalTransactionDeposited struct { + From common.Address + To common.Address + Version *big.Int + OpaqueData []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransactionDeposited is a free log retrieval operation binding the contract event 0xb3813568d9991fc951961fcb4c784893574240a28925604d09fc577c55bb7c32. +// +// Solidity: event TransactionDeposited(address indexed from, address indexed to, uint256 indexed version, bytes opaqueData) +func (_OptimismPortal *OptimismPortalFilterer) FilterTransactionDeposited(opts *bind.FilterOpts, from []common.Address, to []common.Address, version []*big.Int) (*OptimismPortalTransactionDepositedIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + var versionRule []interface{} + for _, versionItem := range version { + versionRule = append(versionRule, versionItem) + } + + logs, sub, err := _OptimismPortal.contract.FilterLogs(opts, "TransactionDeposited", fromRule, toRule, versionRule) + if err != nil { + return nil, err + } + return &OptimismPortalTransactionDepositedIterator{contract: _OptimismPortal.contract, event: "TransactionDeposited", logs: logs, sub: sub}, nil +} + +// WatchTransactionDeposited is a free log subscription operation binding the contract event 0xb3813568d9991fc951961fcb4c784893574240a28925604d09fc577c55bb7c32. +// +// Solidity: event TransactionDeposited(address indexed from, address indexed to, uint256 indexed version, bytes opaqueData) +func (_OptimismPortal *OptimismPortalFilterer) WatchTransactionDeposited(opts *bind.WatchOpts, sink chan<- *OptimismPortalTransactionDeposited, from []common.Address, to []common.Address, version []*big.Int) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + var versionRule []interface{} + for _, versionItem := range version { + versionRule = append(versionRule, versionItem) + } + + logs, sub, err := _OptimismPortal.contract.WatchLogs(opts, "TransactionDeposited", fromRule, toRule, versionRule) + 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(OptimismPortalTransactionDeposited) + if err := _OptimismPortal.contract.UnpackLog(event, "TransactionDeposited", 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 +} + +// ParseTransactionDeposited is a log parse operation binding the contract event 0xb3813568d9991fc951961fcb4c784893574240a28925604d09fc577c55bb7c32. +// +// Solidity: event TransactionDeposited(address indexed from, address indexed to, uint256 indexed version, bytes opaqueData) +func (_OptimismPortal *OptimismPortalFilterer) ParseTransactionDeposited(log types.Log) (*OptimismPortalTransactionDeposited, error) { + event := new(OptimismPortalTransactionDeposited) + if err := _OptimismPortal.contract.UnpackLog(event, "TransactionDeposited", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// OptimismPortalWithdrawalFinalizedIterator is returned from FilterWithdrawalFinalized and is used to iterate over the raw logs and unpacked data for WithdrawalFinalized events raised by the OptimismPortal contract. +type OptimismPortalWithdrawalFinalizedIterator struct { + Event *OptimismPortalWithdrawalFinalized // 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 *OptimismPortalWithdrawalFinalizedIterator) 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(OptimismPortalWithdrawalFinalized) + 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(OptimismPortalWithdrawalFinalized) + 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 *OptimismPortalWithdrawalFinalizedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OptimismPortalWithdrawalFinalizedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OptimismPortalWithdrawalFinalized represents a WithdrawalFinalized event raised by the OptimismPortal contract. +type OptimismPortalWithdrawalFinalized struct { + WithdrawalHash [32]byte + Success bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawalFinalized is a free log retrieval operation binding the contract event 0xdb5c7652857aa163daadd670e116628fb42e869d8ac4251ef8971d9e5727df1b. +// +// Solidity: event WithdrawalFinalized(bytes32 indexed withdrawalHash, bool success) +func (_OptimismPortal *OptimismPortalFilterer) FilterWithdrawalFinalized(opts *bind.FilterOpts, withdrawalHash [][32]byte) (*OptimismPortalWithdrawalFinalizedIterator, error) { + + var withdrawalHashRule []interface{} + for _, withdrawalHashItem := range withdrawalHash { + withdrawalHashRule = append(withdrawalHashRule, withdrawalHashItem) + } + + logs, sub, err := _OptimismPortal.contract.FilterLogs(opts, "WithdrawalFinalized", withdrawalHashRule) + if err != nil { + return nil, err + } + return &OptimismPortalWithdrawalFinalizedIterator{contract: _OptimismPortal.contract, event: "WithdrawalFinalized", logs: logs, sub: sub}, nil +} + +// WatchWithdrawalFinalized is a free log subscription operation binding the contract event 0xdb5c7652857aa163daadd670e116628fb42e869d8ac4251ef8971d9e5727df1b. +// +// Solidity: event WithdrawalFinalized(bytes32 indexed withdrawalHash, bool success) +func (_OptimismPortal *OptimismPortalFilterer) WatchWithdrawalFinalized(opts *bind.WatchOpts, sink chan<- *OptimismPortalWithdrawalFinalized, withdrawalHash [][32]byte) (event.Subscription, error) { + + var withdrawalHashRule []interface{} + for _, withdrawalHashItem := range withdrawalHash { + withdrawalHashRule = append(withdrawalHashRule, withdrawalHashItem) + } + + logs, sub, err := _OptimismPortal.contract.WatchLogs(opts, "WithdrawalFinalized", withdrawalHashRule) + 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(OptimismPortalWithdrawalFinalized) + if err := _OptimismPortal.contract.UnpackLog(event, "WithdrawalFinalized", 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 +} + +// ParseWithdrawalFinalized is a log parse operation binding the contract event 0xdb5c7652857aa163daadd670e116628fb42e869d8ac4251ef8971d9e5727df1b. +// +// Solidity: event WithdrawalFinalized(bytes32 indexed withdrawalHash, bool success) +func (_OptimismPortal *OptimismPortalFilterer) ParseWithdrawalFinalized(log types.Log) (*OptimismPortalWithdrawalFinalized, error) { + event := new(OptimismPortalWithdrawalFinalized) + if err := _OptimismPortal.contract.UnpackLog(event, "WithdrawalFinalized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// OptimismPortalWithdrawalProvenIterator is returned from FilterWithdrawalProven and is used to iterate over the raw logs and unpacked data for WithdrawalProven events raised by the OptimismPortal contract. +type OptimismPortalWithdrawalProvenIterator struct { + Event *OptimismPortalWithdrawalProven // 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 *OptimismPortalWithdrawalProvenIterator) 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(OptimismPortalWithdrawalProven) + 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(OptimismPortalWithdrawalProven) + 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 *OptimismPortalWithdrawalProvenIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OptimismPortalWithdrawalProvenIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OptimismPortalWithdrawalProven represents a WithdrawalProven event raised by the OptimismPortal contract. +type OptimismPortalWithdrawalProven struct { + WithdrawalHash [32]byte + From common.Address + To common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawalProven is a free log retrieval operation binding the contract event 0x67a6208cfcc0801d50f6cbe764733f4fddf66ac0b04442061a8a8c0cb6b63f62. +// +// Solidity: event WithdrawalProven(bytes32 indexed withdrawalHash, address indexed from, address indexed to) +func (_OptimismPortal *OptimismPortalFilterer) FilterWithdrawalProven(opts *bind.FilterOpts, withdrawalHash [][32]byte, from []common.Address, to []common.Address) (*OptimismPortalWithdrawalProvenIterator, error) { + + var withdrawalHashRule []interface{} + for _, withdrawalHashItem := range withdrawalHash { + withdrawalHashRule = append(withdrawalHashRule, withdrawalHashItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _OptimismPortal.contract.FilterLogs(opts, "WithdrawalProven", withdrawalHashRule, fromRule, toRule) + if err != nil { + return nil, err + } + return &OptimismPortalWithdrawalProvenIterator{contract: _OptimismPortal.contract, event: "WithdrawalProven", logs: logs, sub: sub}, nil +} + +// WatchWithdrawalProven is a free log subscription operation binding the contract event 0x67a6208cfcc0801d50f6cbe764733f4fddf66ac0b04442061a8a8c0cb6b63f62. +// +// Solidity: event WithdrawalProven(bytes32 indexed withdrawalHash, address indexed from, address indexed to) +func (_OptimismPortal *OptimismPortalFilterer) WatchWithdrawalProven(opts *bind.WatchOpts, sink chan<- *OptimismPortalWithdrawalProven, withdrawalHash [][32]byte, from []common.Address, to []common.Address) (event.Subscription, error) { + + var withdrawalHashRule []interface{} + for _, withdrawalHashItem := range withdrawalHash { + withdrawalHashRule = append(withdrawalHashRule, withdrawalHashItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _OptimismPortal.contract.WatchLogs(opts, "WithdrawalProven", withdrawalHashRule, fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(OptimismPortalWithdrawalProven) + if err := _OptimismPortal.contract.UnpackLog(event, "WithdrawalProven", 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 +} + +// ParseWithdrawalProven is a log parse operation binding the contract event 0x67a6208cfcc0801d50f6cbe764733f4fddf66ac0b04442061a8a8c0cb6b63f62. +// +// Solidity: event WithdrawalProven(bytes32 indexed withdrawalHash, address indexed from, address indexed to) +func (_OptimismPortal *OptimismPortalFilterer) ParseWithdrawalProven(log types.Log) (*OptimismPortalWithdrawalProven, error) { + event := new(OptimismPortalWithdrawalProven) + if err := _OptimismPortal.contract.UnpackLog(event, "WithdrawalProven", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/op-chain-ops/opbnb-upgrades/new-contracts/bindings/StorageSetter.go b/op-chain-ops/opbnb-upgrades/new-contracts/bindings/StorageSetter.go new file mode 100644 index 000000000..9effe9740 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/new-contracts/bindings/StorageSetter.go @@ -0,0 +1,447 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// StorageSetterSlot is an auto generated low-level Go binding around an user-defined struct. +type StorageSetterSlot struct { + Key [32]byte + Value [32]byte +} + +// StorageSetterMetaData contains all meta data concerning the StorageSetter contract. +var StorageSetterMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"function\",\"name\":\"getAddress\",\"inputs\":[{\"name\":\"_slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"addr_\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBool\",\"inputs\":[{\"name\":\"_slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"value_\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBytes32\",\"inputs\":[{\"name\":\"_slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"value_\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getUint\",\"inputs\":[{\"name\":\"_slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"value_\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setAddress\",\"inputs\":[{\"name\":\"_slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_address\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setBool\",\"inputs\":[{\"name\":\"_slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_value\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setBytes32\",\"inputs\":[{\"name\":\"slots\",\"type\":\"tuple[]\",\"internalType\":\"structStorageSetter.Slot[]\",\"components\":[{\"name\":\"key\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"value\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setBytes32\",\"inputs\":[{\"name\":\"_slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_value\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setUint\",\"inputs\":[{\"name\":\"_slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_value\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"}]", +} + +// StorageSetterABI is the input ABI used to generate the binding from. +// Deprecated: Use StorageSetterMetaData.ABI instead. +var StorageSetterABI = StorageSetterMetaData.ABI + +// StorageSetter is an auto generated Go binding around an Ethereum contract. +type StorageSetter struct { + StorageSetterCaller // Read-only binding to the contract + StorageSetterTransactor // Write-only binding to the contract + StorageSetterFilterer // Log filterer for contract events +} + +// StorageSetterCaller is an auto generated read-only Go binding around an Ethereum contract. +type StorageSetterCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// StorageSetterTransactor is an auto generated write-only Go binding around an Ethereum contract. +type StorageSetterTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// StorageSetterFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type StorageSetterFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// StorageSetterSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type StorageSetterSession struct { + Contract *StorageSetter // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// StorageSetterCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type StorageSetterCallerSession struct { + Contract *StorageSetterCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// StorageSetterTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type StorageSetterTransactorSession struct { + Contract *StorageSetterTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// StorageSetterRaw is an auto generated low-level Go binding around an Ethereum contract. +type StorageSetterRaw struct { + Contract *StorageSetter // Generic contract binding to access the raw methods on +} + +// StorageSetterCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type StorageSetterCallerRaw struct { + Contract *StorageSetterCaller // Generic read-only contract binding to access the raw methods on +} + +// StorageSetterTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type StorageSetterTransactorRaw struct { + Contract *StorageSetterTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewStorageSetter creates a new instance of StorageSetter, bound to a specific deployed contract. +func NewStorageSetter(address common.Address, backend bind.ContractBackend) (*StorageSetter, error) { + contract, err := bindStorageSetter(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &StorageSetter{StorageSetterCaller: StorageSetterCaller{contract: contract}, StorageSetterTransactor: StorageSetterTransactor{contract: contract}, StorageSetterFilterer: StorageSetterFilterer{contract: contract}}, nil +} + +// NewStorageSetterCaller creates a new read-only instance of StorageSetter, bound to a specific deployed contract. +func NewStorageSetterCaller(address common.Address, caller bind.ContractCaller) (*StorageSetterCaller, error) { + contract, err := bindStorageSetter(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &StorageSetterCaller{contract: contract}, nil +} + +// NewStorageSetterTransactor creates a new write-only instance of StorageSetter, bound to a specific deployed contract. +func NewStorageSetterTransactor(address common.Address, transactor bind.ContractTransactor) (*StorageSetterTransactor, error) { + contract, err := bindStorageSetter(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &StorageSetterTransactor{contract: contract}, nil +} + +// NewStorageSetterFilterer creates a new log filterer instance of StorageSetter, bound to a specific deployed contract. +func NewStorageSetterFilterer(address common.Address, filterer bind.ContractFilterer) (*StorageSetterFilterer, error) { + contract, err := bindStorageSetter(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &StorageSetterFilterer{contract: contract}, nil +} + +// bindStorageSetter binds a generic wrapper to an already deployed contract. +func bindStorageSetter(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := StorageSetterMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_StorageSetter *StorageSetterRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _StorageSetter.Contract.StorageSetterCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_StorageSetter *StorageSetterRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _StorageSetter.Contract.StorageSetterTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_StorageSetter *StorageSetterRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _StorageSetter.Contract.StorageSetterTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_StorageSetter *StorageSetterCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _StorageSetter.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_StorageSetter *StorageSetterTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _StorageSetter.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_StorageSetter *StorageSetterTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _StorageSetter.Contract.contract.Transact(opts, method, params...) +} + +// GetAddress is a free data retrieval call binding the contract method 0x21f8a721. +// +// Solidity: function getAddress(bytes32 _slot) view returns(address addr_) +func (_StorageSetter *StorageSetterCaller) GetAddress(opts *bind.CallOpts, _slot [32]byte) (common.Address, error) { + var out []interface{} + err := _StorageSetter.contract.Call(opts, &out, "getAddress", _slot) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetAddress is a free data retrieval call binding the contract method 0x21f8a721. +// +// Solidity: function getAddress(bytes32 _slot) view returns(address addr_) +func (_StorageSetter *StorageSetterSession) GetAddress(_slot [32]byte) (common.Address, error) { + return _StorageSetter.Contract.GetAddress(&_StorageSetter.CallOpts, _slot) +} + +// GetAddress is a free data retrieval call binding the contract method 0x21f8a721. +// +// Solidity: function getAddress(bytes32 _slot) view returns(address addr_) +func (_StorageSetter *StorageSetterCallerSession) GetAddress(_slot [32]byte) (common.Address, error) { + return _StorageSetter.Contract.GetAddress(&_StorageSetter.CallOpts, _slot) +} + +// GetBool is a free data retrieval call binding the contract method 0x7ae1cfca. +// +// Solidity: function getBool(bytes32 _slot) view returns(bool value_) +func (_StorageSetter *StorageSetterCaller) GetBool(opts *bind.CallOpts, _slot [32]byte) (bool, error) { + var out []interface{} + err := _StorageSetter.contract.Call(opts, &out, "getBool", _slot) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// GetBool is a free data retrieval call binding the contract method 0x7ae1cfca. +// +// Solidity: function getBool(bytes32 _slot) view returns(bool value_) +func (_StorageSetter *StorageSetterSession) GetBool(_slot [32]byte) (bool, error) { + return _StorageSetter.Contract.GetBool(&_StorageSetter.CallOpts, _slot) +} + +// GetBool is a free data retrieval call binding the contract method 0x7ae1cfca. +// +// Solidity: function getBool(bytes32 _slot) view returns(bool value_) +func (_StorageSetter *StorageSetterCallerSession) GetBool(_slot [32]byte) (bool, error) { + return _StorageSetter.Contract.GetBool(&_StorageSetter.CallOpts, _slot) +} + +// GetBytes32 is a free data retrieval call binding the contract method 0xa6ed563e. +// +// Solidity: function getBytes32(bytes32 _slot) view returns(bytes32 value_) +func (_StorageSetter *StorageSetterCaller) GetBytes32(opts *bind.CallOpts, _slot [32]byte) ([32]byte, error) { + var out []interface{} + err := _StorageSetter.contract.Call(opts, &out, "getBytes32", _slot) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetBytes32 is a free data retrieval call binding the contract method 0xa6ed563e. +// +// Solidity: function getBytes32(bytes32 _slot) view returns(bytes32 value_) +func (_StorageSetter *StorageSetterSession) GetBytes32(_slot [32]byte) ([32]byte, error) { + return _StorageSetter.Contract.GetBytes32(&_StorageSetter.CallOpts, _slot) +} + +// GetBytes32 is a free data retrieval call binding the contract method 0xa6ed563e. +// +// Solidity: function getBytes32(bytes32 _slot) view returns(bytes32 value_) +func (_StorageSetter *StorageSetterCallerSession) GetBytes32(_slot [32]byte) ([32]byte, error) { + return _StorageSetter.Contract.GetBytes32(&_StorageSetter.CallOpts, _slot) +} + +// GetUint is a free data retrieval call binding the contract method 0xbd02d0f5. +// +// Solidity: function getUint(bytes32 _slot) view returns(uint256 value_) +func (_StorageSetter *StorageSetterCaller) GetUint(opts *bind.CallOpts, _slot [32]byte) (*big.Int, error) { + var out []interface{} + err := _StorageSetter.contract.Call(opts, &out, "getUint", _slot) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetUint is a free data retrieval call binding the contract method 0xbd02d0f5. +// +// Solidity: function getUint(bytes32 _slot) view returns(uint256 value_) +func (_StorageSetter *StorageSetterSession) GetUint(_slot [32]byte) (*big.Int, error) { + return _StorageSetter.Contract.GetUint(&_StorageSetter.CallOpts, _slot) +} + +// GetUint is a free data retrieval call binding the contract method 0xbd02d0f5. +// +// Solidity: function getUint(bytes32 _slot) view returns(uint256 value_) +func (_StorageSetter *StorageSetterCallerSession) GetUint(_slot [32]byte) (*big.Int, error) { + return _StorageSetter.Contract.GetUint(&_StorageSetter.CallOpts, _slot) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_StorageSetter *StorageSetterCaller) Version(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _StorageSetter.contract.Call(opts, &out, "version") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_StorageSetter *StorageSetterSession) Version() (string, error) { + return _StorageSetter.Contract.Version(&_StorageSetter.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_StorageSetter *StorageSetterCallerSession) Version() (string, error) { + return _StorageSetter.Contract.Version(&_StorageSetter.CallOpts) +} + +// SetAddress is a paid mutator transaction binding the contract method 0xca446dd9. +// +// Solidity: function setAddress(bytes32 _slot, address _address) returns() +func (_StorageSetter *StorageSetterTransactor) SetAddress(opts *bind.TransactOpts, _slot [32]byte, _address common.Address) (*types.Transaction, error) { + return _StorageSetter.contract.Transact(opts, "setAddress", _slot, _address) +} + +// SetAddress is a paid mutator transaction binding the contract method 0xca446dd9. +// +// Solidity: function setAddress(bytes32 _slot, address _address) returns() +func (_StorageSetter *StorageSetterSession) SetAddress(_slot [32]byte, _address common.Address) (*types.Transaction, error) { + return _StorageSetter.Contract.SetAddress(&_StorageSetter.TransactOpts, _slot, _address) +} + +// SetAddress is a paid mutator transaction binding the contract method 0xca446dd9. +// +// Solidity: function setAddress(bytes32 _slot, address _address) returns() +func (_StorageSetter *StorageSetterTransactorSession) SetAddress(_slot [32]byte, _address common.Address) (*types.Transaction, error) { + return _StorageSetter.Contract.SetAddress(&_StorageSetter.TransactOpts, _slot, _address) +} + +// SetBool is a paid mutator transaction binding the contract method 0xabfdcced. +// +// Solidity: function setBool(bytes32 _slot, bool _value) returns() +func (_StorageSetter *StorageSetterTransactor) SetBool(opts *bind.TransactOpts, _slot [32]byte, _value bool) (*types.Transaction, error) { + return _StorageSetter.contract.Transact(opts, "setBool", _slot, _value) +} + +// SetBool is a paid mutator transaction binding the contract method 0xabfdcced. +// +// Solidity: function setBool(bytes32 _slot, bool _value) returns() +func (_StorageSetter *StorageSetterSession) SetBool(_slot [32]byte, _value bool) (*types.Transaction, error) { + return _StorageSetter.Contract.SetBool(&_StorageSetter.TransactOpts, _slot, _value) +} + +// SetBool is a paid mutator transaction binding the contract method 0xabfdcced. +// +// Solidity: function setBool(bytes32 _slot, bool _value) returns() +func (_StorageSetter *StorageSetterTransactorSession) SetBool(_slot [32]byte, _value bool) (*types.Transaction, error) { + return _StorageSetter.Contract.SetBool(&_StorageSetter.TransactOpts, _slot, _value) +} + +// SetBytes32 is a paid mutator transaction binding the contract method 0x0528afe2. +// +// Solidity: function setBytes32((bytes32,bytes32)[] slots) returns() +func (_StorageSetter *StorageSetterTransactor) SetBytes32(opts *bind.TransactOpts, slots []StorageSetterSlot) (*types.Transaction, error) { + return _StorageSetter.contract.Transact(opts, "setBytes32", slots) +} + +// SetBytes32 is a paid mutator transaction binding the contract method 0x0528afe2. +// +// Solidity: function setBytes32((bytes32,bytes32)[] slots) returns() +func (_StorageSetter *StorageSetterSession) SetBytes32(slots []StorageSetterSlot) (*types.Transaction, error) { + return _StorageSetter.Contract.SetBytes32(&_StorageSetter.TransactOpts, slots) +} + +// SetBytes32 is a paid mutator transaction binding the contract method 0x0528afe2. +// +// Solidity: function setBytes32((bytes32,bytes32)[] slots) returns() +func (_StorageSetter *StorageSetterTransactorSession) SetBytes32(slots []StorageSetterSlot) (*types.Transaction, error) { + return _StorageSetter.Contract.SetBytes32(&_StorageSetter.TransactOpts, slots) +} + +// SetBytes320 is a paid mutator transaction binding the contract method 0x4e91db08. +// +// Solidity: function setBytes32(bytes32 _slot, bytes32 _value) returns() +func (_StorageSetter *StorageSetterTransactor) SetBytes320(opts *bind.TransactOpts, _slot [32]byte, _value [32]byte) (*types.Transaction, error) { + return _StorageSetter.contract.Transact(opts, "setBytes320", _slot, _value) +} + +// SetBytes320 is a paid mutator transaction binding the contract method 0x4e91db08. +// +// Solidity: function setBytes32(bytes32 _slot, bytes32 _value) returns() +func (_StorageSetter *StorageSetterSession) SetBytes320(_slot [32]byte, _value [32]byte) (*types.Transaction, error) { + return _StorageSetter.Contract.SetBytes320(&_StorageSetter.TransactOpts, _slot, _value) +} + +// SetBytes320 is a paid mutator transaction binding the contract method 0x4e91db08. +// +// Solidity: function setBytes32(bytes32 _slot, bytes32 _value) returns() +func (_StorageSetter *StorageSetterTransactorSession) SetBytes320(_slot [32]byte, _value [32]byte) (*types.Transaction, error) { + return _StorageSetter.Contract.SetBytes320(&_StorageSetter.TransactOpts, _slot, _value) +} + +// SetUint is a paid mutator transaction binding the contract method 0xe2a4853a. +// +// Solidity: function setUint(bytes32 _slot, uint256 _value) returns() +func (_StorageSetter *StorageSetterTransactor) SetUint(opts *bind.TransactOpts, _slot [32]byte, _value *big.Int) (*types.Transaction, error) { + return _StorageSetter.contract.Transact(opts, "setUint", _slot, _value) +} + +// SetUint is a paid mutator transaction binding the contract method 0xe2a4853a. +// +// Solidity: function setUint(bytes32 _slot, uint256 _value) returns() +func (_StorageSetter *StorageSetterSession) SetUint(_slot [32]byte, _value *big.Int) (*types.Transaction, error) { + return _StorageSetter.Contract.SetUint(&_StorageSetter.TransactOpts, _slot, _value) +} + +// SetUint is a paid mutator transaction binding the contract method 0xe2a4853a. +// +// Solidity: function setUint(bytes32 _slot, uint256 _value) returns() +func (_StorageSetter *StorageSetterTransactorSession) SetUint(_slot [32]byte, _value *big.Int) (*types.Transaction, error) { + return _StorageSetter.Contract.SetUint(&_StorageSetter.TransactOpts, _slot, _value) +} diff --git a/op-chain-ops/opbnb-upgrades/new-contracts/bindings/SuperChainConfig.go b/op-chain-ops/opbnb-upgrades/new-contracts/bindings/SuperChainConfig.go new file mode 100644 index 000000000..e1f4ee167 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/new-contracts/bindings/SuperChainConfig.go @@ -0,0 +1,945 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// SuperChainConfigMetaData contains all meta data concerning the SuperChainConfig contract. +var SuperChainConfigMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"GUARDIAN_SLOT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PAUSED_SLOT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"guardian\",\"inputs\":[],\"outputs\":[{\"name\":\"guardian_\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_guardian\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_paused\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"_identifier\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"paused_\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"ConfigUpdate\",\"inputs\":[{\"name\":\"updateType\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"enumSuperchainConfig.UpdateType\"},{\"name\":\"data\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"identifier\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[],\"anonymous\":false}]", +} + +// SuperChainConfigABI is the input ABI used to generate the binding from. +// Deprecated: Use SuperChainConfigMetaData.ABI instead. +var SuperChainConfigABI = SuperChainConfigMetaData.ABI + +// SuperChainConfig is an auto generated Go binding around an Ethereum contract. +type SuperChainConfig struct { + SuperChainConfigCaller // Read-only binding to the contract + SuperChainConfigTransactor // Write-only binding to the contract + SuperChainConfigFilterer // Log filterer for contract events +} + +// SuperChainConfigCaller is an auto generated read-only Go binding around an Ethereum contract. +type SuperChainConfigCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SuperChainConfigTransactor is an auto generated write-only Go binding around an Ethereum contract. +type SuperChainConfigTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SuperChainConfigFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type SuperChainConfigFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SuperChainConfigSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type SuperChainConfigSession struct { + Contract *SuperChainConfig // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SuperChainConfigCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type SuperChainConfigCallerSession struct { + Contract *SuperChainConfigCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// SuperChainConfigTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type SuperChainConfigTransactorSession struct { + Contract *SuperChainConfigTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SuperChainConfigRaw is an auto generated low-level Go binding around an Ethereum contract. +type SuperChainConfigRaw struct { + Contract *SuperChainConfig // Generic contract binding to access the raw methods on +} + +// SuperChainConfigCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type SuperChainConfigCallerRaw struct { + Contract *SuperChainConfigCaller // Generic read-only contract binding to access the raw methods on +} + +// SuperChainConfigTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type SuperChainConfigTransactorRaw struct { + Contract *SuperChainConfigTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewSuperChainConfig creates a new instance of SuperChainConfig, bound to a specific deployed contract. +func NewSuperChainConfig(address common.Address, backend bind.ContractBackend) (*SuperChainConfig, error) { + contract, err := bindSuperChainConfig(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &SuperChainConfig{SuperChainConfigCaller: SuperChainConfigCaller{contract: contract}, SuperChainConfigTransactor: SuperChainConfigTransactor{contract: contract}, SuperChainConfigFilterer: SuperChainConfigFilterer{contract: contract}}, nil +} + +// NewSuperChainConfigCaller creates a new read-only instance of SuperChainConfig, bound to a specific deployed contract. +func NewSuperChainConfigCaller(address common.Address, caller bind.ContractCaller) (*SuperChainConfigCaller, error) { + contract, err := bindSuperChainConfig(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &SuperChainConfigCaller{contract: contract}, nil +} + +// NewSuperChainConfigTransactor creates a new write-only instance of SuperChainConfig, bound to a specific deployed contract. +func NewSuperChainConfigTransactor(address common.Address, transactor bind.ContractTransactor) (*SuperChainConfigTransactor, error) { + contract, err := bindSuperChainConfig(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &SuperChainConfigTransactor{contract: contract}, nil +} + +// NewSuperChainConfigFilterer creates a new log filterer instance of SuperChainConfig, bound to a specific deployed contract. +func NewSuperChainConfigFilterer(address common.Address, filterer bind.ContractFilterer) (*SuperChainConfigFilterer, error) { + contract, err := bindSuperChainConfig(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &SuperChainConfigFilterer{contract: contract}, nil +} + +// bindSuperChainConfig binds a generic wrapper to an already deployed contract. +func bindSuperChainConfig(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := SuperChainConfigMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_SuperChainConfig *SuperChainConfigRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _SuperChainConfig.Contract.SuperChainConfigCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_SuperChainConfig *SuperChainConfigRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SuperChainConfig.Contract.SuperChainConfigTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SuperChainConfig *SuperChainConfigRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SuperChainConfig.Contract.SuperChainConfigTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_SuperChainConfig *SuperChainConfigCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _SuperChainConfig.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_SuperChainConfig *SuperChainConfigTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SuperChainConfig.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SuperChainConfig *SuperChainConfigTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SuperChainConfig.Contract.contract.Transact(opts, method, params...) +} + +// GUARDIANSLOT is a free data retrieval call binding the contract method 0xc23a451a. +// +// Solidity: function GUARDIAN_SLOT() view returns(bytes32) +func (_SuperChainConfig *SuperChainConfigCaller) GUARDIANSLOT(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _SuperChainConfig.contract.Call(opts, &out, "GUARDIAN_SLOT") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GUARDIANSLOT is a free data retrieval call binding the contract method 0xc23a451a. +// +// Solidity: function GUARDIAN_SLOT() view returns(bytes32) +func (_SuperChainConfig *SuperChainConfigSession) GUARDIANSLOT() ([32]byte, error) { + return _SuperChainConfig.Contract.GUARDIANSLOT(&_SuperChainConfig.CallOpts) +} + +// GUARDIANSLOT is a free data retrieval call binding the contract method 0xc23a451a. +// +// Solidity: function GUARDIAN_SLOT() view returns(bytes32) +func (_SuperChainConfig *SuperChainConfigCallerSession) GUARDIANSLOT() ([32]byte, error) { + return _SuperChainConfig.Contract.GUARDIANSLOT(&_SuperChainConfig.CallOpts) +} + +// PAUSEDSLOT is a free data retrieval call binding the contract method 0x7fbf7b6a. +// +// Solidity: function PAUSED_SLOT() view returns(bytes32) +func (_SuperChainConfig *SuperChainConfigCaller) PAUSEDSLOT(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _SuperChainConfig.contract.Call(opts, &out, "PAUSED_SLOT") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// PAUSEDSLOT is a free data retrieval call binding the contract method 0x7fbf7b6a. +// +// Solidity: function PAUSED_SLOT() view returns(bytes32) +func (_SuperChainConfig *SuperChainConfigSession) PAUSEDSLOT() ([32]byte, error) { + return _SuperChainConfig.Contract.PAUSEDSLOT(&_SuperChainConfig.CallOpts) +} + +// PAUSEDSLOT is a free data retrieval call binding the contract method 0x7fbf7b6a. +// +// Solidity: function PAUSED_SLOT() view returns(bytes32) +func (_SuperChainConfig *SuperChainConfigCallerSession) PAUSEDSLOT() ([32]byte, error) { + return _SuperChainConfig.Contract.PAUSEDSLOT(&_SuperChainConfig.CallOpts) +} + +// Guardian is a free data retrieval call binding the contract method 0x452a9320. +// +// Solidity: function guardian() view returns(address guardian_) +func (_SuperChainConfig *SuperChainConfigCaller) Guardian(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _SuperChainConfig.contract.Call(opts, &out, "guardian") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Guardian is a free data retrieval call binding the contract method 0x452a9320. +// +// Solidity: function guardian() view returns(address guardian_) +func (_SuperChainConfig *SuperChainConfigSession) Guardian() (common.Address, error) { + return _SuperChainConfig.Contract.Guardian(&_SuperChainConfig.CallOpts) +} + +// Guardian is a free data retrieval call binding the contract method 0x452a9320. +// +// Solidity: function guardian() view returns(address guardian_) +func (_SuperChainConfig *SuperChainConfigCallerSession) Guardian() (common.Address, error) { + return _SuperChainConfig.Contract.Guardian(&_SuperChainConfig.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool paused_) +func (_SuperChainConfig *SuperChainConfigCaller) Paused(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _SuperChainConfig.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool paused_) +func (_SuperChainConfig *SuperChainConfigSession) Paused() (bool, error) { + return _SuperChainConfig.Contract.Paused(&_SuperChainConfig.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool paused_) +func (_SuperChainConfig *SuperChainConfigCallerSession) Paused() (bool, error) { + return _SuperChainConfig.Contract.Paused(&_SuperChainConfig.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_SuperChainConfig *SuperChainConfigCaller) Version(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _SuperChainConfig.contract.Call(opts, &out, "version") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_SuperChainConfig *SuperChainConfigSession) Version() (string, error) { + return _SuperChainConfig.Contract.Version(&_SuperChainConfig.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_SuperChainConfig *SuperChainConfigCallerSession) Version() (string, error) { + return _SuperChainConfig.Contract.Version(&_SuperChainConfig.CallOpts) +} + +// Initialize is a paid mutator transaction binding the contract method 0x400ada75. +// +// Solidity: function initialize(address _guardian, bool _paused) returns() +func (_SuperChainConfig *SuperChainConfigTransactor) Initialize(opts *bind.TransactOpts, _guardian common.Address, _paused bool) (*types.Transaction, error) { + return _SuperChainConfig.contract.Transact(opts, "initialize", _guardian, _paused) +} + +// Initialize is a paid mutator transaction binding the contract method 0x400ada75. +// +// Solidity: function initialize(address _guardian, bool _paused) returns() +func (_SuperChainConfig *SuperChainConfigSession) Initialize(_guardian common.Address, _paused bool) (*types.Transaction, error) { + return _SuperChainConfig.Contract.Initialize(&_SuperChainConfig.TransactOpts, _guardian, _paused) +} + +// Initialize is a paid mutator transaction binding the contract method 0x400ada75. +// +// Solidity: function initialize(address _guardian, bool _paused) returns() +func (_SuperChainConfig *SuperChainConfigTransactorSession) Initialize(_guardian common.Address, _paused bool) (*types.Transaction, error) { + return _SuperChainConfig.Contract.Initialize(&_SuperChainConfig.TransactOpts, _guardian, _paused) +} + +// Pause is a paid mutator transaction binding the contract method 0x6da66355. +// +// Solidity: function pause(string _identifier) returns() +func (_SuperChainConfig *SuperChainConfigTransactor) Pause(opts *bind.TransactOpts, _identifier string) (*types.Transaction, error) { + return _SuperChainConfig.contract.Transact(opts, "pause", _identifier) +} + +// Pause is a paid mutator transaction binding the contract method 0x6da66355. +// +// Solidity: function pause(string _identifier) returns() +func (_SuperChainConfig *SuperChainConfigSession) Pause(_identifier string) (*types.Transaction, error) { + return _SuperChainConfig.Contract.Pause(&_SuperChainConfig.TransactOpts, _identifier) +} + +// Pause is a paid mutator transaction binding the contract method 0x6da66355. +// +// Solidity: function pause(string _identifier) returns() +func (_SuperChainConfig *SuperChainConfigTransactorSession) Pause(_identifier string) (*types.Transaction, error) { + return _SuperChainConfig.Contract.Pause(&_SuperChainConfig.TransactOpts, _identifier) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_SuperChainConfig *SuperChainConfigTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SuperChainConfig.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_SuperChainConfig *SuperChainConfigSession) Unpause() (*types.Transaction, error) { + return _SuperChainConfig.Contract.Unpause(&_SuperChainConfig.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_SuperChainConfig *SuperChainConfigTransactorSession) Unpause() (*types.Transaction, error) { + return _SuperChainConfig.Contract.Unpause(&_SuperChainConfig.TransactOpts) +} + +// SuperChainConfigConfigUpdateIterator is returned from FilterConfigUpdate and is used to iterate over the raw logs and unpacked data for ConfigUpdate events raised by the SuperChainConfig contract. +type SuperChainConfigConfigUpdateIterator struct { + Event *SuperChainConfigConfigUpdate // 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 *SuperChainConfigConfigUpdateIterator) 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(SuperChainConfigConfigUpdate) + 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(SuperChainConfigConfigUpdate) + 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 *SuperChainConfigConfigUpdateIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SuperChainConfigConfigUpdateIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SuperChainConfigConfigUpdate represents a ConfigUpdate event raised by the SuperChainConfig contract. +type SuperChainConfigConfigUpdate struct { + UpdateType uint8 + Data []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterConfigUpdate is a free log retrieval operation binding the contract event 0x7b743789cff01dafdeae47739925425aab5dfd02d0c8229e4a508bcd2b9f42bb. +// +// Solidity: event ConfigUpdate(uint8 indexed updateType, bytes data) +func (_SuperChainConfig *SuperChainConfigFilterer) FilterConfigUpdate(opts *bind.FilterOpts, updateType []uint8) (*SuperChainConfigConfigUpdateIterator, error) { + + var updateTypeRule []interface{} + for _, updateTypeItem := range updateType { + updateTypeRule = append(updateTypeRule, updateTypeItem) + } + + logs, sub, err := _SuperChainConfig.contract.FilterLogs(opts, "ConfigUpdate", updateTypeRule) + if err != nil { + return nil, err + } + return &SuperChainConfigConfigUpdateIterator{contract: _SuperChainConfig.contract, event: "ConfigUpdate", logs: logs, sub: sub}, nil +} + +// WatchConfigUpdate is a free log subscription operation binding the contract event 0x7b743789cff01dafdeae47739925425aab5dfd02d0c8229e4a508bcd2b9f42bb. +// +// Solidity: event ConfigUpdate(uint8 indexed updateType, bytes data) +func (_SuperChainConfig *SuperChainConfigFilterer) WatchConfigUpdate(opts *bind.WatchOpts, sink chan<- *SuperChainConfigConfigUpdate, updateType []uint8) (event.Subscription, error) { + + var updateTypeRule []interface{} + for _, updateTypeItem := range updateType { + updateTypeRule = append(updateTypeRule, updateTypeItem) + } + + logs, sub, err := _SuperChainConfig.contract.WatchLogs(opts, "ConfigUpdate", updateTypeRule) + 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(SuperChainConfigConfigUpdate) + if err := _SuperChainConfig.contract.UnpackLog(event, "ConfigUpdate", 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 +} + +// ParseConfigUpdate is a log parse operation binding the contract event 0x7b743789cff01dafdeae47739925425aab5dfd02d0c8229e4a508bcd2b9f42bb. +// +// Solidity: event ConfigUpdate(uint8 indexed updateType, bytes data) +func (_SuperChainConfig *SuperChainConfigFilterer) ParseConfigUpdate(log types.Log) (*SuperChainConfigConfigUpdate, error) { + event := new(SuperChainConfigConfigUpdate) + if err := _SuperChainConfig.contract.UnpackLog(event, "ConfigUpdate", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SuperChainConfigInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the SuperChainConfig contract. +type SuperChainConfigInitializedIterator struct { + Event *SuperChainConfigInitialized // 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 *SuperChainConfigInitializedIterator) 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(SuperChainConfigInitialized) + 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(SuperChainConfigInitialized) + 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 *SuperChainConfigInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SuperChainConfigInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SuperChainConfigInitialized represents a Initialized event raised by the SuperChainConfig contract. +type SuperChainConfigInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_SuperChainConfig *SuperChainConfigFilterer) FilterInitialized(opts *bind.FilterOpts) (*SuperChainConfigInitializedIterator, error) { + + logs, sub, err := _SuperChainConfig.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &SuperChainConfigInitializedIterator{contract: _SuperChainConfig.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_SuperChainConfig *SuperChainConfigFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *SuperChainConfigInitialized) (event.Subscription, error) { + + logs, sub, err := _SuperChainConfig.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SuperChainConfigInitialized) + if err := _SuperChainConfig.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_SuperChainConfig *SuperChainConfigFilterer) ParseInitialized(log types.Log) (*SuperChainConfigInitialized, error) { + event := new(SuperChainConfigInitialized) + if err := _SuperChainConfig.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SuperChainConfigPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the SuperChainConfig contract. +type SuperChainConfigPausedIterator struct { + Event *SuperChainConfigPaused // 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 *SuperChainConfigPausedIterator) 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(SuperChainConfigPaused) + 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(SuperChainConfigPaused) + 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 *SuperChainConfigPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SuperChainConfigPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SuperChainConfigPaused represents a Paused event raised by the SuperChainConfig contract. +type SuperChainConfigPaused struct { + Identifier string + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0xc32e6d5d6d1de257f64eac19ddb1f700ba13527983849c9486b1ab007ea28381. +// +// Solidity: event Paused(string identifier) +func (_SuperChainConfig *SuperChainConfigFilterer) FilterPaused(opts *bind.FilterOpts) (*SuperChainConfigPausedIterator, error) { + + logs, sub, err := _SuperChainConfig.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &SuperChainConfigPausedIterator{contract: _SuperChainConfig.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0xc32e6d5d6d1de257f64eac19ddb1f700ba13527983849c9486b1ab007ea28381. +// +// Solidity: event Paused(string identifier) +func (_SuperChainConfig *SuperChainConfigFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *SuperChainConfigPaused) (event.Subscription, error) { + + logs, sub, err := _SuperChainConfig.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SuperChainConfigPaused) + if err := _SuperChainConfig.contract.UnpackLog(event, "Paused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePaused is a log parse operation binding the contract event 0xc32e6d5d6d1de257f64eac19ddb1f700ba13527983849c9486b1ab007ea28381. +// +// Solidity: event Paused(string identifier) +func (_SuperChainConfig *SuperChainConfigFilterer) ParsePaused(log types.Log) (*SuperChainConfigPaused, error) { + event := new(SuperChainConfigPaused) + if err := _SuperChainConfig.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SuperChainConfigUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the SuperChainConfig contract. +type SuperChainConfigUnpausedIterator struct { + Event *SuperChainConfigUnpaused // 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 *SuperChainConfigUnpausedIterator) 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(SuperChainConfigUnpaused) + 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(SuperChainConfigUnpaused) + 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 *SuperChainConfigUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SuperChainConfigUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SuperChainConfigUnpaused represents a Unpaused event raised by the SuperChainConfig contract. +type SuperChainConfigUnpaused struct { + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0xa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d16933. +// +// Solidity: event Unpaused() +func (_SuperChainConfig *SuperChainConfigFilterer) FilterUnpaused(opts *bind.FilterOpts) (*SuperChainConfigUnpausedIterator, error) { + + logs, sub, err := _SuperChainConfig.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &SuperChainConfigUnpausedIterator{contract: _SuperChainConfig.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0xa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d16933. +// +// Solidity: event Unpaused() +func (_SuperChainConfig *SuperChainConfigFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *SuperChainConfigUnpaused) (event.Subscription, error) { + + logs, sub, err := _SuperChainConfig.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SuperChainConfigUnpaused) + if err := _SuperChainConfig.contract.UnpackLog(event, "Unpaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0xa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d16933. +// +// Solidity: event Unpaused() +func (_SuperChainConfig *SuperChainConfigFilterer) ParseUnpaused(log types.Log) (*SuperChainConfigUnpaused, error) { + event := new(SuperChainConfigUnpaused) + if err := _SuperChainConfig.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/op-chain-ops/opbnb-upgrades/new-contracts/bindings/SystemConfig.go b/op-chain-ops/opbnb-upgrades/new-contracts/bindings/SystemConfig.go new file mode 100644 index 000000000..01a2c5bef --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/new-contracts/bindings/SystemConfig.go @@ -0,0 +1,1879 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// ResourceMeteringResourceConfig is an auto generated low-level Go binding around an user-defined struct. +type ResourceMeteringResourceConfig struct { + MaxResourceLimit uint32 + ElasticityMultiplier uint8 + BaseFeeMaxChangeDenominator uint8 + MinimumBaseFee uint32 + SystemTxMaxGas uint32 + MaximumBaseFee *big.Int +} + +// SystemConfigAddresses is an auto generated low-level Go binding around an user-defined struct. +type SystemConfigAddresses struct { + L1CrossDomainMessenger common.Address + L1ERC721Bridge common.Address + L1StandardBridge common.Address + DisputeGameFactory common.Address + OptimismPortal common.Address + OptimismMintableERC20Factory common.Address + GasPayingToken common.Address +} + +// SystemConfigMetaData contains all meta data concerning the SystemConfig contract. +var SystemConfigMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"BATCH_INBOX_SLOT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"DISPUTE_GAME_FACTORY_SLOT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"L1_CROSS_DOMAIN_MESSENGER_SLOT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"L1_ERC_721_BRIDGE_SLOT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"L1_STANDARD_BRIDGE_SLOT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"OPTIMISM_MINTABLE_ERC20_FACTORY_SLOT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"OPTIMISM_PORTAL_SLOT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"START_BLOCK_SLOT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"UNSAFE_BLOCK_SIGNER_SLOT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"basefeeScalar\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"batchInbox\",\"inputs\":[],\"outputs\":[{\"name\":\"addr_\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"batcherHash\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"blobbasefeeScalar\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"disputeGameFactory\",\"inputs\":[],\"outputs\":[{\"name\":\"addr_\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"gasLimit\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"gasPayingToken\",\"inputs\":[],\"outputs\":[{\"name\":\"addr_\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"decimals_\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"gasPayingTokenName\",\"inputs\":[],\"outputs\":[{\"name\":\"name_\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"gasPayingTokenSymbol\",\"inputs\":[],\"outputs\":[{\"name\":\"symbol_\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_basefeeScalar\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_blobbasefeeScalar\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_batcherHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_gasLimit\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_unsafeBlockSigner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_config\",\"type\":\"tuple\",\"internalType\":\"structResourceMetering.ResourceConfig\",\"components\":[{\"name\":\"maxResourceLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"elasticityMultiplier\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"baseFeeMaxChangeDenominator\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"minimumBaseFee\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"systemTxMaxGas\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"maximumBaseFee\",\"type\":\"uint128\",\"internalType\":\"uint128\"}]},{\"name\":\"_batchInbox\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_addresses\",\"type\":\"tuple\",\"internalType\":\"structSystemConfig.Addresses\",\"components\":[{\"name\":\"l1CrossDomainMessenger\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"l1ERC721Bridge\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"l1StandardBridge\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"disputeGameFactory\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"optimismPortal\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"optimismMintableERC20Factory\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"gasPayingToken\",\"type\":\"address\",\"internalType\":\"address\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isCustomGasToken\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"l1CrossDomainMessenger\",\"inputs\":[],\"outputs\":[{\"name\":\"addr_\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"l1ERC721Bridge\",\"inputs\":[],\"outputs\":[{\"name\":\"addr_\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"l1StandardBridge\",\"inputs\":[],\"outputs\":[{\"name\":\"addr_\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maximumGasLimit\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"minimumGasLimit\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"optimismMintableERC20Factory\",\"inputs\":[],\"outputs\":[{\"name\":\"addr_\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"optimismPortal\",\"inputs\":[],\"outputs\":[{\"name\":\"addr_\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"overhead\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"resourceConfig\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structResourceMetering.ResourceConfig\",\"components\":[{\"name\":\"maxResourceLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"elasticityMultiplier\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"baseFeeMaxChangeDenominator\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"minimumBaseFee\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"systemTxMaxGas\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"maximumBaseFee\",\"type\":\"uint128\",\"internalType\":\"uint128\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"scalar\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setBatcherHash\",\"inputs\":[{\"name\":\"_batcherHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setGasConfig\",\"inputs\":[{\"name\":\"_overhead\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_scalar\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setGasConfigEcotone\",\"inputs\":[{\"name\":\"_basefeeScalar\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_blobbasefeeScalar\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setGasLimit\",\"inputs\":[{\"name\":\"_gasLimit\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setUnsafeBlockSigner\",\"inputs\":[{\"name\":\"_unsafeBlockSigner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"startBlock\",\"inputs\":[],\"outputs\":[{\"name\":\"startBlock_\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unsafeBlockSigner\",\"inputs\":[],\"outputs\":[{\"name\":\"addr_\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"pure\"},{\"type\":\"event\",\"name\":\"ConfigUpdate\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"updateType\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"enumSystemConfig.UpdateType\"},{\"name\":\"data\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false}]", +} + +// SystemConfigABI is the input ABI used to generate the binding from. +// Deprecated: Use SystemConfigMetaData.ABI instead. +var SystemConfigABI = SystemConfigMetaData.ABI + +// SystemConfig is an auto generated Go binding around an Ethereum contract. +type SystemConfig struct { + SystemConfigCaller // Read-only binding to the contract + SystemConfigTransactor // Write-only binding to the contract + SystemConfigFilterer // Log filterer for contract events +} + +// SystemConfigCaller is an auto generated read-only Go binding around an Ethereum contract. +type SystemConfigCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SystemConfigTransactor is an auto generated write-only Go binding around an Ethereum contract. +type SystemConfigTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SystemConfigFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type SystemConfigFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SystemConfigSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type SystemConfigSession struct { + Contract *SystemConfig // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SystemConfigCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type SystemConfigCallerSession struct { + Contract *SystemConfigCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// SystemConfigTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type SystemConfigTransactorSession struct { + Contract *SystemConfigTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SystemConfigRaw is an auto generated low-level Go binding around an Ethereum contract. +type SystemConfigRaw struct { + Contract *SystemConfig // Generic contract binding to access the raw methods on +} + +// SystemConfigCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type SystemConfigCallerRaw struct { + Contract *SystemConfigCaller // Generic read-only contract binding to access the raw methods on +} + +// SystemConfigTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type SystemConfigTransactorRaw struct { + Contract *SystemConfigTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewSystemConfig creates a new instance of SystemConfig, bound to a specific deployed contract. +func NewSystemConfig(address common.Address, backend bind.ContractBackend) (*SystemConfig, error) { + contract, err := bindSystemConfig(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &SystemConfig{SystemConfigCaller: SystemConfigCaller{contract: contract}, SystemConfigTransactor: SystemConfigTransactor{contract: contract}, SystemConfigFilterer: SystemConfigFilterer{contract: contract}}, nil +} + +// NewSystemConfigCaller creates a new read-only instance of SystemConfig, bound to a specific deployed contract. +func NewSystemConfigCaller(address common.Address, caller bind.ContractCaller) (*SystemConfigCaller, error) { + contract, err := bindSystemConfig(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &SystemConfigCaller{contract: contract}, nil +} + +// NewSystemConfigTransactor creates a new write-only instance of SystemConfig, bound to a specific deployed contract. +func NewSystemConfigTransactor(address common.Address, transactor bind.ContractTransactor) (*SystemConfigTransactor, error) { + contract, err := bindSystemConfig(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &SystemConfigTransactor{contract: contract}, nil +} + +// NewSystemConfigFilterer creates a new log filterer instance of SystemConfig, bound to a specific deployed contract. +func NewSystemConfigFilterer(address common.Address, filterer bind.ContractFilterer) (*SystemConfigFilterer, error) { + contract, err := bindSystemConfig(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &SystemConfigFilterer{contract: contract}, nil +} + +// bindSystemConfig binds a generic wrapper to an already deployed contract. +func bindSystemConfig(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := SystemConfigMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_SystemConfig *SystemConfigRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _SystemConfig.Contract.SystemConfigCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_SystemConfig *SystemConfigRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SystemConfig.Contract.SystemConfigTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SystemConfig *SystemConfigRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SystemConfig.Contract.SystemConfigTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_SystemConfig *SystemConfigCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _SystemConfig.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_SystemConfig *SystemConfigTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SystemConfig.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SystemConfig *SystemConfigTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SystemConfig.Contract.contract.Transact(opts, method, params...) +} + +// BATCHINBOXSLOT is a free data retrieval call binding the contract method 0xbc49ce5f. +// +// Solidity: function BATCH_INBOX_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigCaller) BATCHINBOXSLOT(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "BATCH_INBOX_SLOT") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// BATCHINBOXSLOT is a free data retrieval call binding the contract method 0xbc49ce5f. +// +// Solidity: function BATCH_INBOX_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigSession) BATCHINBOXSLOT() ([32]byte, error) { + return _SystemConfig.Contract.BATCHINBOXSLOT(&_SystemConfig.CallOpts) +} + +// BATCHINBOXSLOT is a free data retrieval call binding the contract method 0xbc49ce5f. +// +// Solidity: function BATCH_INBOX_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigCallerSession) BATCHINBOXSLOT() ([32]byte, error) { + return _SystemConfig.Contract.BATCHINBOXSLOT(&_SystemConfig.CallOpts) +} + +// DISPUTEGAMEFACTORYSLOT is a free data retrieval call binding the contract method 0xe2a3285c. +// +// Solidity: function DISPUTE_GAME_FACTORY_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigCaller) DISPUTEGAMEFACTORYSLOT(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "DISPUTE_GAME_FACTORY_SLOT") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// DISPUTEGAMEFACTORYSLOT is a free data retrieval call binding the contract method 0xe2a3285c. +// +// Solidity: function DISPUTE_GAME_FACTORY_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigSession) DISPUTEGAMEFACTORYSLOT() ([32]byte, error) { + return _SystemConfig.Contract.DISPUTEGAMEFACTORYSLOT(&_SystemConfig.CallOpts) +} + +// DISPUTEGAMEFACTORYSLOT is a free data retrieval call binding the contract method 0xe2a3285c. +// +// Solidity: function DISPUTE_GAME_FACTORY_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigCallerSession) DISPUTEGAMEFACTORYSLOT() ([32]byte, error) { + return _SystemConfig.Contract.DISPUTEGAMEFACTORYSLOT(&_SystemConfig.CallOpts) +} + +// L1CROSSDOMAINMESSENGERSLOT is a free data retrieval call binding the contract method 0x5d73369c. +// +// Solidity: function L1_CROSS_DOMAIN_MESSENGER_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigCaller) L1CROSSDOMAINMESSENGERSLOT(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "L1_CROSS_DOMAIN_MESSENGER_SLOT") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// L1CROSSDOMAINMESSENGERSLOT is a free data retrieval call binding the contract method 0x5d73369c. +// +// Solidity: function L1_CROSS_DOMAIN_MESSENGER_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigSession) L1CROSSDOMAINMESSENGERSLOT() ([32]byte, error) { + return _SystemConfig.Contract.L1CROSSDOMAINMESSENGERSLOT(&_SystemConfig.CallOpts) +} + +// L1CROSSDOMAINMESSENGERSLOT is a free data retrieval call binding the contract method 0x5d73369c. +// +// Solidity: function L1_CROSS_DOMAIN_MESSENGER_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigCallerSession) L1CROSSDOMAINMESSENGERSLOT() ([32]byte, error) { + return _SystemConfig.Contract.L1CROSSDOMAINMESSENGERSLOT(&_SystemConfig.CallOpts) +} + +// L1ERC721BRIDGESLOT is a free data retrieval call binding the contract method 0x19f5cea8. +// +// Solidity: function L1_ERC_721_BRIDGE_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigCaller) L1ERC721BRIDGESLOT(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "L1_ERC_721_BRIDGE_SLOT") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// L1ERC721BRIDGESLOT is a free data retrieval call binding the contract method 0x19f5cea8. +// +// Solidity: function L1_ERC_721_BRIDGE_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigSession) L1ERC721BRIDGESLOT() ([32]byte, error) { + return _SystemConfig.Contract.L1ERC721BRIDGESLOT(&_SystemConfig.CallOpts) +} + +// L1ERC721BRIDGESLOT is a free data retrieval call binding the contract method 0x19f5cea8. +// +// Solidity: function L1_ERC_721_BRIDGE_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigCallerSession) L1ERC721BRIDGESLOT() ([32]byte, error) { + return _SystemConfig.Contract.L1ERC721BRIDGESLOT(&_SystemConfig.CallOpts) +} + +// L1STANDARDBRIDGESLOT is a free data retrieval call binding the contract method 0xf8c68de0. +// +// Solidity: function L1_STANDARD_BRIDGE_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigCaller) L1STANDARDBRIDGESLOT(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "L1_STANDARD_BRIDGE_SLOT") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// L1STANDARDBRIDGESLOT is a free data retrieval call binding the contract method 0xf8c68de0. +// +// Solidity: function L1_STANDARD_BRIDGE_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigSession) L1STANDARDBRIDGESLOT() ([32]byte, error) { + return _SystemConfig.Contract.L1STANDARDBRIDGESLOT(&_SystemConfig.CallOpts) +} + +// L1STANDARDBRIDGESLOT is a free data retrieval call binding the contract method 0xf8c68de0. +// +// Solidity: function L1_STANDARD_BRIDGE_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigCallerSession) L1STANDARDBRIDGESLOT() ([32]byte, error) { + return _SystemConfig.Contract.L1STANDARDBRIDGESLOT(&_SystemConfig.CallOpts) +} + +// OPTIMISMMINTABLEERC20FACTORYSLOT is a free data retrieval call binding the contract method 0x06c92657. +// +// Solidity: function OPTIMISM_MINTABLE_ERC20_FACTORY_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigCaller) OPTIMISMMINTABLEERC20FACTORYSLOT(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "OPTIMISM_MINTABLE_ERC20_FACTORY_SLOT") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// OPTIMISMMINTABLEERC20FACTORYSLOT is a free data retrieval call binding the contract method 0x06c92657. +// +// Solidity: function OPTIMISM_MINTABLE_ERC20_FACTORY_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigSession) OPTIMISMMINTABLEERC20FACTORYSLOT() ([32]byte, error) { + return _SystemConfig.Contract.OPTIMISMMINTABLEERC20FACTORYSLOT(&_SystemConfig.CallOpts) +} + +// OPTIMISMMINTABLEERC20FACTORYSLOT is a free data retrieval call binding the contract method 0x06c92657. +// +// Solidity: function OPTIMISM_MINTABLE_ERC20_FACTORY_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigCallerSession) OPTIMISMMINTABLEERC20FACTORYSLOT() ([32]byte, error) { + return _SystemConfig.Contract.OPTIMISMMINTABLEERC20FACTORYSLOT(&_SystemConfig.CallOpts) +} + +// OPTIMISMPORTALSLOT is a free data retrieval call binding the contract method 0xfd32aa0f. +// +// Solidity: function OPTIMISM_PORTAL_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigCaller) OPTIMISMPORTALSLOT(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "OPTIMISM_PORTAL_SLOT") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// OPTIMISMPORTALSLOT is a free data retrieval call binding the contract method 0xfd32aa0f. +// +// Solidity: function OPTIMISM_PORTAL_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigSession) OPTIMISMPORTALSLOT() ([32]byte, error) { + return _SystemConfig.Contract.OPTIMISMPORTALSLOT(&_SystemConfig.CallOpts) +} + +// OPTIMISMPORTALSLOT is a free data retrieval call binding the contract method 0xfd32aa0f. +// +// Solidity: function OPTIMISM_PORTAL_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigCallerSession) OPTIMISMPORTALSLOT() ([32]byte, error) { + return _SystemConfig.Contract.OPTIMISMPORTALSLOT(&_SystemConfig.CallOpts) +} + +// STARTBLOCKSLOT is a free data retrieval call binding the contract method 0xe0e2016d. +// +// Solidity: function START_BLOCK_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigCaller) STARTBLOCKSLOT(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "START_BLOCK_SLOT") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// STARTBLOCKSLOT is a free data retrieval call binding the contract method 0xe0e2016d. +// +// Solidity: function START_BLOCK_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigSession) STARTBLOCKSLOT() ([32]byte, error) { + return _SystemConfig.Contract.STARTBLOCKSLOT(&_SystemConfig.CallOpts) +} + +// STARTBLOCKSLOT is a free data retrieval call binding the contract method 0xe0e2016d. +// +// Solidity: function START_BLOCK_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigCallerSession) STARTBLOCKSLOT() ([32]byte, error) { + return _SystemConfig.Contract.STARTBLOCKSLOT(&_SystemConfig.CallOpts) +} + +// UNSAFEBLOCKSIGNERSLOT is a free data retrieval call binding the contract method 0x4f16540b. +// +// Solidity: function UNSAFE_BLOCK_SIGNER_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigCaller) UNSAFEBLOCKSIGNERSLOT(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "UNSAFE_BLOCK_SIGNER_SLOT") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// UNSAFEBLOCKSIGNERSLOT is a free data retrieval call binding the contract method 0x4f16540b. +// +// Solidity: function UNSAFE_BLOCK_SIGNER_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigSession) UNSAFEBLOCKSIGNERSLOT() ([32]byte, error) { + return _SystemConfig.Contract.UNSAFEBLOCKSIGNERSLOT(&_SystemConfig.CallOpts) +} + +// UNSAFEBLOCKSIGNERSLOT is a free data retrieval call binding the contract method 0x4f16540b. +// +// Solidity: function UNSAFE_BLOCK_SIGNER_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigCallerSession) UNSAFEBLOCKSIGNERSLOT() ([32]byte, error) { + return _SystemConfig.Contract.UNSAFEBLOCKSIGNERSLOT(&_SystemConfig.CallOpts) +} + +// VERSION is a free data retrieval call binding the contract method 0xffa1ad74. +// +// Solidity: function VERSION() view returns(uint256) +func (_SystemConfig *SystemConfigCaller) VERSION(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "VERSION") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// VERSION is a free data retrieval call binding the contract method 0xffa1ad74. +// +// Solidity: function VERSION() view returns(uint256) +func (_SystemConfig *SystemConfigSession) VERSION() (*big.Int, error) { + return _SystemConfig.Contract.VERSION(&_SystemConfig.CallOpts) +} + +// VERSION is a free data retrieval call binding the contract method 0xffa1ad74. +// +// Solidity: function VERSION() view returns(uint256) +func (_SystemConfig *SystemConfigCallerSession) VERSION() (*big.Int, error) { + return _SystemConfig.Contract.VERSION(&_SystemConfig.CallOpts) +} + +// BasefeeScalar is a free data retrieval call binding the contract method 0xbfb14fb7. +// +// Solidity: function basefeeScalar() view returns(uint32) +func (_SystemConfig *SystemConfigCaller) BasefeeScalar(opts *bind.CallOpts) (uint32, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "basefeeScalar") + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// BasefeeScalar is a free data retrieval call binding the contract method 0xbfb14fb7. +// +// Solidity: function basefeeScalar() view returns(uint32) +func (_SystemConfig *SystemConfigSession) BasefeeScalar() (uint32, error) { + return _SystemConfig.Contract.BasefeeScalar(&_SystemConfig.CallOpts) +} + +// BasefeeScalar is a free data retrieval call binding the contract method 0xbfb14fb7. +// +// Solidity: function basefeeScalar() view returns(uint32) +func (_SystemConfig *SystemConfigCallerSession) BasefeeScalar() (uint32, error) { + return _SystemConfig.Contract.BasefeeScalar(&_SystemConfig.CallOpts) +} + +// BatchInbox is a free data retrieval call binding the contract method 0xdac6e63a. +// +// Solidity: function batchInbox() view returns(address addr_) +func (_SystemConfig *SystemConfigCaller) BatchInbox(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "batchInbox") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// BatchInbox is a free data retrieval call binding the contract method 0xdac6e63a. +// +// Solidity: function batchInbox() view returns(address addr_) +func (_SystemConfig *SystemConfigSession) BatchInbox() (common.Address, error) { + return _SystemConfig.Contract.BatchInbox(&_SystemConfig.CallOpts) +} + +// BatchInbox is a free data retrieval call binding the contract method 0xdac6e63a. +// +// Solidity: function batchInbox() view returns(address addr_) +func (_SystemConfig *SystemConfigCallerSession) BatchInbox() (common.Address, error) { + return _SystemConfig.Contract.BatchInbox(&_SystemConfig.CallOpts) +} + +// BatcherHash is a free data retrieval call binding the contract method 0xe81b2c6d. +// +// Solidity: function batcherHash() view returns(bytes32) +func (_SystemConfig *SystemConfigCaller) BatcherHash(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "batcherHash") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// BatcherHash is a free data retrieval call binding the contract method 0xe81b2c6d. +// +// Solidity: function batcherHash() view returns(bytes32) +func (_SystemConfig *SystemConfigSession) BatcherHash() ([32]byte, error) { + return _SystemConfig.Contract.BatcherHash(&_SystemConfig.CallOpts) +} + +// BatcherHash is a free data retrieval call binding the contract method 0xe81b2c6d. +// +// Solidity: function batcherHash() view returns(bytes32) +func (_SystemConfig *SystemConfigCallerSession) BatcherHash() ([32]byte, error) { + return _SystemConfig.Contract.BatcherHash(&_SystemConfig.CallOpts) +} + +// BlobbasefeeScalar is a free data retrieval call binding the contract method 0xec707517. +// +// Solidity: function blobbasefeeScalar() view returns(uint32) +func (_SystemConfig *SystemConfigCaller) BlobbasefeeScalar(opts *bind.CallOpts) (uint32, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "blobbasefeeScalar") + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// BlobbasefeeScalar is a free data retrieval call binding the contract method 0xec707517. +// +// Solidity: function blobbasefeeScalar() view returns(uint32) +func (_SystemConfig *SystemConfigSession) BlobbasefeeScalar() (uint32, error) { + return _SystemConfig.Contract.BlobbasefeeScalar(&_SystemConfig.CallOpts) +} + +// BlobbasefeeScalar is a free data retrieval call binding the contract method 0xec707517. +// +// Solidity: function blobbasefeeScalar() view returns(uint32) +func (_SystemConfig *SystemConfigCallerSession) BlobbasefeeScalar() (uint32, error) { + return _SystemConfig.Contract.BlobbasefeeScalar(&_SystemConfig.CallOpts) +} + +// DisputeGameFactory is a free data retrieval call binding the contract method 0xf2b4e617. +// +// Solidity: function disputeGameFactory() view returns(address addr_) +func (_SystemConfig *SystemConfigCaller) DisputeGameFactory(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "disputeGameFactory") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// DisputeGameFactory is a free data retrieval call binding the contract method 0xf2b4e617. +// +// Solidity: function disputeGameFactory() view returns(address addr_) +func (_SystemConfig *SystemConfigSession) DisputeGameFactory() (common.Address, error) { + return _SystemConfig.Contract.DisputeGameFactory(&_SystemConfig.CallOpts) +} + +// DisputeGameFactory is a free data retrieval call binding the contract method 0xf2b4e617. +// +// Solidity: function disputeGameFactory() view returns(address addr_) +func (_SystemConfig *SystemConfigCallerSession) DisputeGameFactory() (common.Address, error) { + return _SystemConfig.Contract.DisputeGameFactory(&_SystemConfig.CallOpts) +} + +// GasLimit is a free data retrieval call binding the contract method 0xf68016b7. +// +// Solidity: function gasLimit() view returns(uint64) +func (_SystemConfig *SystemConfigCaller) GasLimit(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "gasLimit") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// GasLimit is a free data retrieval call binding the contract method 0xf68016b7. +// +// Solidity: function gasLimit() view returns(uint64) +func (_SystemConfig *SystemConfigSession) GasLimit() (uint64, error) { + return _SystemConfig.Contract.GasLimit(&_SystemConfig.CallOpts) +} + +// GasLimit is a free data retrieval call binding the contract method 0xf68016b7. +// +// Solidity: function gasLimit() view returns(uint64) +func (_SystemConfig *SystemConfigCallerSession) GasLimit() (uint64, error) { + return _SystemConfig.Contract.GasLimit(&_SystemConfig.CallOpts) +} + +// GasPayingToken is a free data retrieval call binding the contract method 0x4397dfef. +// +// Solidity: function gasPayingToken() view returns(address addr_, uint8 decimals_) +func (_SystemConfig *SystemConfigCaller) GasPayingToken(opts *bind.CallOpts) (struct { + Addr common.Address + Decimals uint8 +}, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "gasPayingToken") + + outstruct := new(struct { + Addr common.Address + Decimals uint8 + }) + if err != nil { + return *outstruct, err + } + + outstruct.Addr = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + outstruct.Decimals = *abi.ConvertType(out[1], new(uint8)).(*uint8) + + return *outstruct, err + +} + +// GasPayingToken is a free data retrieval call binding the contract method 0x4397dfef. +// +// Solidity: function gasPayingToken() view returns(address addr_, uint8 decimals_) +func (_SystemConfig *SystemConfigSession) GasPayingToken() (struct { + Addr common.Address + Decimals uint8 +}, error) { + return _SystemConfig.Contract.GasPayingToken(&_SystemConfig.CallOpts) +} + +// GasPayingToken is a free data retrieval call binding the contract method 0x4397dfef. +// +// Solidity: function gasPayingToken() view returns(address addr_, uint8 decimals_) +func (_SystemConfig *SystemConfigCallerSession) GasPayingToken() (struct { + Addr common.Address + Decimals uint8 +}, error) { + return _SystemConfig.Contract.GasPayingToken(&_SystemConfig.CallOpts) +} + +// GasPayingTokenName is a free data retrieval call binding the contract method 0xd8444715. +// +// Solidity: function gasPayingTokenName() view returns(string name_) +func (_SystemConfig *SystemConfigCaller) GasPayingTokenName(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "gasPayingTokenName") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// GasPayingTokenName is a free data retrieval call binding the contract method 0xd8444715. +// +// Solidity: function gasPayingTokenName() view returns(string name_) +func (_SystemConfig *SystemConfigSession) GasPayingTokenName() (string, error) { + return _SystemConfig.Contract.GasPayingTokenName(&_SystemConfig.CallOpts) +} + +// GasPayingTokenName is a free data retrieval call binding the contract method 0xd8444715. +// +// Solidity: function gasPayingTokenName() view returns(string name_) +func (_SystemConfig *SystemConfigCallerSession) GasPayingTokenName() (string, error) { + return _SystemConfig.Contract.GasPayingTokenName(&_SystemConfig.CallOpts) +} + +// GasPayingTokenSymbol is a free data retrieval call binding the contract method 0x550fcdc9. +// +// Solidity: function gasPayingTokenSymbol() view returns(string symbol_) +func (_SystemConfig *SystemConfigCaller) GasPayingTokenSymbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "gasPayingTokenSymbol") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// GasPayingTokenSymbol is a free data retrieval call binding the contract method 0x550fcdc9. +// +// Solidity: function gasPayingTokenSymbol() view returns(string symbol_) +func (_SystemConfig *SystemConfigSession) GasPayingTokenSymbol() (string, error) { + return _SystemConfig.Contract.GasPayingTokenSymbol(&_SystemConfig.CallOpts) +} + +// GasPayingTokenSymbol is a free data retrieval call binding the contract method 0x550fcdc9. +// +// Solidity: function gasPayingTokenSymbol() view returns(string symbol_) +func (_SystemConfig *SystemConfigCallerSession) GasPayingTokenSymbol() (string, error) { + return _SystemConfig.Contract.GasPayingTokenSymbol(&_SystemConfig.CallOpts) +} + +// IsCustomGasToken is a free data retrieval call binding the contract method 0x21326849. +// +// Solidity: function isCustomGasToken() view returns(bool) +func (_SystemConfig *SystemConfigCaller) IsCustomGasToken(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "isCustomGasToken") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsCustomGasToken is a free data retrieval call binding the contract method 0x21326849. +// +// Solidity: function isCustomGasToken() view returns(bool) +func (_SystemConfig *SystemConfigSession) IsCustomGasToken() (bool, error) { + return _SystemConfig.Contract.IsCustomGasToken(&_SystemConfig.CallOpts) +} + +// IsCustomGasToken is a free data retrieval call binding the contract method 0x21326849. +// +// Solidity: function isCustomGasToken() view returns(bool) +func (_SystemConfig *SystemConfigCallerSession) IsCustomGasToken() (bool, error) { + return _SystemConfig.Contract.IsCustomGasToken(&_SystemConfig.CallOpts) +} + +// L1CrossDomainMessenger is a free data retrieval call binding the contract method 0xa7119869. +// +// Solidity: function l1CrossDomainMessenger() view returns(address addr_) +func (_SystemConfig *SystemConfigCaller) L1CrossDomainMessenger(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "l1CrossDomainMessenger") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// L1CrossDomainMessenger is a free data retrieval call binding the contract method 0xa7119869. +// +// Solidity: function l1CrossDomainMessenger() view returns(address addr_) +func (_SystemConfig *SystemConfigSession) L1CrossDomainMessenger() (common.Address, error) { + return _SystemConfig.Contract.L1CrossDomainMessenger(&_SystemConfig.CallOpts) +} + +// L1CrossDomainMessenger is a free data retrieval call binding the contract method 0xa7119869. +// +// Solidity: function l1CrossDomainMessenger() view returns(address addr_) +func (_SystemConfig *SystemConfigCallerSession) L1CrossDomainMessenger() (common.Address, error) { + return _SystemConfig.Contract.L1CrossDomainMessenger(&_SystemConfig.CallOpts) +} + +// L1ERC721Bridge is a free data retrieval call binding the contract method 0xc4e8ddfa. +// +// Solidity: function l1ERC721Bridge() view returns(address addr_) +func (_SystemConfig *SystemConfigCaller) L1ERC721Bridge(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "l1ERC721Bridge") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// L1ERC721Bridge is a free data retrieval call binding the contract method 0xc4e8ddfa. +// +// Solidity: function l1ERC721Bridge() view returns(address addr_) +func (_SystemConfig *SystemConfigSession) L1ERC721Bridge() (common.Address, error) { + return _SystemConfig.Contract.L1ERC721Bridge(&_SystemConfig.CallOpts) +} + +// L1ERC721Bridge is a free data retrieval call binding the contract method 0xc4e8ddfa. +// +// Solidity: function l1ERC721Bridge() view returns(address addr_) +func (_SystemConfig *SystemConfigCallerSession) L1ERC721Bridge() (common.Address, error) { + return _SystemConfig.Contract.L1ERC721Bridge(&_SystemConfig.CallOpts) +} + +// L1StandardBridge is a free data retrieval call binding the contract method 0x078f29cf. +// +// Solidity: function l1StandardBridge() view returns(address addr_) +func (_SystemConfig *SystemConfigCaller) L1StandardBridge(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "l1StandardBridge") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// L1StandardBridge is a free data retrieval call binding the contract method 0x078f29cf. +// +// Solidity: function l1StandardBridge() view returns(address addr_) +func (_SystemConfig *SystemConfigSession) L1StandardBridge() (common.Address, error) { + return _SystemConfig.Contract.L1StandardBridge(&_SystemConfig.CallOpts) +} + +// L1StandardBridge is a free data retrieval call binding the contract method 0x078f29cf. +// +// Solidity: function l1StandardBridge() view returns(address addr_) +func (_SystemConfig *SystemConfigCallerSession) L1StandardBridge() (common.Address, error) { + return _SystemConfig.Contract.L1StandardBridge(&_SystemConfig.CallOpts) +} + +// MaximumGasLimit is a free data retrieval call binding the contract method 0x0ae14b1b. +// +// Solidity: function maximumGasLimit() pure returns(uint64) +func (_SystemConfig *SystemConfigCaller) MaximumGasLimit(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "maximumGasLimit") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// MaximumGasLimit is a free data retrieval call binding the contract method 0x0ae14b1b. +// +// Solidity: function maximumGasLimit() pure returns(uint64) +func (_SystemConfig *SystemConfigSession) MaximumGasLimit() (uint64, error) { + return _SystemConfig.Contract.MaximumGasLimit(&_SystemConfig.CallOpts) +} + +// MaximumGasLimit is a free data retrieval call binding the contract method 0x0ae14b1b. +// +// Solidity: function maximumGasLimit() pure returns(uint64) +func (_SystemConfig *SystemConfigCallerSession) MaximumGasLimit() (uint64, error) { + return _SystemConfig.Contract.MaximumGasLimit(&_SystemConfig.CallOpts) +} + +// MinimumGasLimit is a free data retrieval call binding the contract method 0x4add321d. +// +// Solidity: function minimumGasLimit() view returns(uint64) +func (_SystemConfig *SystemConfigCaller) MinimumGasLimit(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "minimumGasLimit") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// MinimumGasLimit is a free data retrieval call binding the contract method 0x4add321d. +// +// Solidity: function minimumGasLimit() view returns(uint64) +func (_SystemConfig *SystemConfigSession) MinimumGasLimit() (uint64, error) { + return _SystemConfig.Contract.MinimumGasLimit(&_SystemConfig.CallOpts) +} + +// MinimumGasLimit is a free data retrieval call binding the contract method 0x4add321d. +// +// Solidity: function minimumGasLimit() view returns(uint64) +func (_SystemConfig *SystemConfigCallerSession) MinimumGasLimit() (uint64, error) { + return _SystemConfig.Contract.MinimumGasLimit(&_SystemConfig.CallOpts) +} + +// OptimismMintableERC20Factory is a free data retrieval call binding the contract method 0x9b7d7f0a. +// +// Solidity: function optimismMintableERC20Factory() view returns(address addr_) +func (_SystemConfig *SystemConfigCaller) OptimismMintableERC20Factory(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "optimismMintableERC20Factory") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// OptimismMintableERC20Factory is a free data retrieval call binding the contract method 0x9b7d7f0a. +// +// Solidity: function optimismMintableERC20Factory() view returns(address addr_) +func (_SystemConfig *SystemConfigSession) OptimismMintableERC20Factory() (common.Address, error) { + return _SystemConfig.Contract.OptimismMintableERC20Factory(&_SystemConfig.CallOpts) +} + +// OptimismMintableERC20Factory is a free data retrieval call binding the contract method 0x9b7d7f0a. +// +// Solidity: function optimismMintableERC20Factory() view returns(address addr_) +func (_SystemConfig *SystemConfigCallerSession) OptimismMintableERC20Factory() (common.Address, error) { + return _SystemConfig.Contract.OptimismMintableERC20Factory(&_SystemConfig.CallOpts) +} + +// OptimismPortal is a free data retrieval call binding the contract method 0x0a49cb03. +// +// Solidity: function optimismPortal() view returns(address addr_) +func (_SystemConfig *SystemConfigCaller) OptimismPortal(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "optimismPortal") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// OptimismPortal is a free data retrieval call binding the contract method 0x0a49cb03. +// +// Solidity: function optimismPortal() view returns(address addr_) +func (_SystemConfig *SystemConfigSession) OptimismPortal() (common.Address, error) { + return _SystemConfig.Contract.OptimismPortal(&_SystemConfig.CallOpts) +} + +// OptimismPortal is a free data retrieval call binding the contract method 0x0a49cb03. +// +// Solidity: function optimismPortal() view returns(address addr_) +func (_SystemConfig *SystemConfigCallerSession) OptimismPortal() (common.Address, error) { + return _SystemConfig.Contract.OptimismPortal(&_SystemConfig.CallOpts) +} + +// Overhead is a free data retrieval call binding the contract method 0x0c18c162. +// +// Solidity: function overhead() view returns(uint256) +func (_SystemConfig *SystemConfigCaller) Overhead(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "overhead") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Overhead is a free data retrieval call binding the contract method 0x0c18c162. +// +// Solidity: function overhead() view returns(uint256) +func (_SystemConfig *SystemConfigSession) Overhead() (*big.Int, error) { + return _SystemConfig.Contract.Overhead(&_SystemConfig.CallOpts) +} + +// Overhead is a free data retrieval call binding the contract method 0x0c18c162. +// +// Solidity: function overhead() view returns(uint256) +func (_SystemConfig *SystemConfigCallerSession) Overhead() (*big.Int, error) { + return _SystemConfig.Contract.Overhead(&_SystemConfig.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_SystemConfig *SystemConfigCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_SystemConfig *SystemConfigSession) Owner() (common.Address, error) { + return _SystemConfig.Contract.Owner(&_SystemConfig.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_SystemConfig *SystemConfigCallerSession) Owner() (common.Address, error) { + return _SystemConfig.Contract.Owner(&_SystemConfig.CallOpts) +} + +// ResourceConfig is a free data retrieval call binding the contract method 0xcc731b02. +// +// Solidity: function resourceConfig() view returns((uint32,uint8,uint8,uint32,uint32,uint128)) +func (_SystemConfig *SystemConfigCaller) ResourceConfig(opts *bind.CallOpts) (ResourceMeteringResourceConfig, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "resourceConfig") + + if err != nil { + return *new(ResourceMeteringResourceConfig), err + } + + out0 := *abi.ConvertType(out[0], new(ResourceMeteringResourceConfig)).(*ResourceMeteringResourceConfig) + + return out0, err + +} + +// ResourceConfig is a free data retrieval call binding the contract method 0xcc731b02. +// +// Solidity: function resourceConfig() view returns((uint32,uint8,uint8,uint32,uint32,uint128)) +func (_SystemConfig *SystemConfigSession) ResourceConfig() (ResourceMeteringResourceConfig, error) { + return _SystemConfig.Contract.ResourceConfig(&_SystemConfig.CallOpts) +} + +// ResourceConfig is a free data retrieval call binding the contract method 0xcc731b02. +// +// Solidity: function resourceConfig() view returns((uint32,uint8,uint8,uint32,uint32,uint128)) +func (_SystemConfig *SystemConfigCallerSession) ResourceConfig() (ResourceMeteringResourceConfig, error) { + return _SystemConfig.Contract.ResourceConfig(&_SystemConfig.CallOpts) +} + +// Scalar is a free data retrieval call binding the contract method 0xf45e65d8. +// +// Solidity: function scalar() view returns(uint256) +func (_SystemConfig *SystemConfigCaller) Scalar(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "scalar") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Scalar is a free data retrieval call binding the contract method 0xf45e65d8. +// +// Solidity: function scalar() view returns(uint256) +func (_SystemConfig *SystemConfigSession) Scalar() (*big.Int, error) { + return _SystemConfig.Contract.Scalar(&_SystemConfig.CallOpts) +} + +// Scalar is a free data retrieval call binding the contract method 0xf45e65d8. +// +// Solidity: function scalar() view returns(uint256) +func (_SystemConfig *SystemConfigCallerSession) Scalar() (*big.Int, error) { + return _SystemConfig.Contract.Scalar(&_SystemConfig.CallOpts) +} + +// StartBlock is a free data retrieval call binding the contract method 0x48cd4cb1. +// +// Solidity: function startBlock() view returns(uint256 startBlock_) +func (_SystemConfig *SystemConfigCaller) StartBlock(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "startBlock") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// StartBlock is a free data retrieval call binding the contract method 0x48cd4cb1. +// +// Solidity: function startBlock() view returns(uint256 startBlock_) +func (_SystemConfig *SystemConfigSession) StartBlock() (*big.Int, error) { + return _SystemConfig.Contract.StartBlock(&_SystemConfig.CallOpts) +} + +// StartBlock is a free data retrieval call binding the contract method 0x48cd4cb1. +// +// Solidity: function startBlock() view returns(uint256 startBlock_) +func (_SystemConfig *SystemConfigCallerSession) StartBlock() (*big.Int, error) { + return _SystemConfig.Contract.StartBlock(&_SystemConfig.CallOpts) +} + +// UnsafeBlockSigner is a free data retrieval call binding the contract method 0x1fd19ee1. +// +// Solidity: function unsafeBlockSigner() view returns(address addr_) +func (_SystemConfig *SystemConfigCaller) UnsafeBlockSigner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "unsafeBlockSigner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// UnsafeBlockSigner is a free data retrieval call binding the contract method 0x1fd19ee1. +// +// Solidity: function unsafeBlockSigner() view returns(address addr_) +func (_SystemConfig *SystemConfigSession) UnsafeBlockSigner() (common.Address, error) { + return _SystemConfig.Contract.UnsafeBlockSigner(&_SystemConfig.CallOpts) +} + +// UnsafeBlockSigner is a free data retrieval call binding the contract method 0x1fd19ee1. +// +// Solidity: function unsafeBlockSigner() view returns(address addr_) +func (_SystemConfig *SystemConfigCallerSession) UnsafeBlockSigner() (common.Address, error) { + return _SystemConfig.Contract.UnsafeBlockSigner(&_SystemConfig.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() pure returns(string) +func (_SystemConfig *SystemConfigCaller) Version(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "version") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() pure returns(string) +func (_SystemConfig *SystemConfigSession) Version() (string, error) { + return _SystemConfig.Contract.Version(&_SystemConfig.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() pure returns(string) +func (_SystemConfig *SystemConfigCallerSession) Version() (string, error) { + return _SystemConfig.Contract.Version(&_SystemConfig.CallOpts) +} + +// Initialize is a paid mutator transaction binding the contract method 0xdb9040fa. +// +// Solidity: function initialize(address _owner, uint32 _basefeeScalar, uint32 _blobbasefeeScalar, bytes32 _batcherHash, uint64 _gasLimit, address _unsafeBlockSigner, (uint32,uint8,uint8,uint32,uint32,uint128) _config, address _batchInbox, (address,address,address,address,address,address,address) _addresses) returns() +func (_SystemConfig *SystemConfigTransactor) Initialize(opts *bind.TransactOpts, _owner common.Address, _basefeeScalar uint32, _blobbasefeeScalar uint32, _batcherHash [32]byte, _gasLimit uint64, _unsafeBlockSigner common.Address, _config ResourceMeteringResourceConfig, _batchInbox common.Address, _addresses SystemConfigAddresses) (*types.Transaction, error) { + return _SystemConfig.contract.Transact(opts, "initialize", _owner, _basefeeScalar, _blobbasefeeScalar, _batcherHash, _gasLimit, _unsafeBlockSigner, _config, _batchInbox, _addresses) +} + +// Initialize is a paid mutator transaction binding the contract method 0xdb9040fa. +// +// Solidity: function initialize(address _owner, uint32 _basefeeScalar, uint32 _blobbasefeeScalar, bytes32 _batcherHash, uint64 _gasLimit, address _unsafeBlockSigner, (uint32,uint8,uint8,uint32,uint32,uint128) _config, address _batchInbox, (address,address,address,address,address,address,address) _addresses) returns() +func (_SystemConfig *SystemConfigSession) Initialize(_owner common.Address, _basefeeScalar uint32, _blobbasefeeScalar uint32, _batcherHash [32]byte, _gasLimit uint64, _unsafeBlockSigner common.Address, _config ResourceMeteringResourceConfig, _batchInbox common.Address, _addresses SystemConfigAddresses) (*types.Transaction, error) { + return _SystemConfig.Contract.Initialize(&_SystemConfig.TransactOpts, _owner, _basefeeScalar, _blobbasefeeScalar, _batcherHash, _gasLimit, _unsafeBlockSigner, _config, _batchInbox, _addresses) +} + +// Initialize is a paid mutator transaction binding the contract method 0xdb9040fa. +// +// Solidity: function initialize(address _owner, uint32 _basefeeScalar, uint32 _blobbasefeeScalar, bytes32 _batcherHash, uint64 _gasLimit, address _unsafeBlockSigner, (uint32,uint8,uint8,uint32,uint32,uint128) _config, address _batchInbox, (address,address,address,address,address,address,address) _addresses) returns() +func (_SystemConfig *SystemConfigTransactorSession) Initialize(_owner common.Address, _basefeeScalar uint32, _blobbasefeeScalar uint32, _batcherHash [32]byte, _gasLimit uint64, _unsafeBlockSigner common.Address, _config ResourceMeteringResourceConfig, _batchInbox common.Address, _addresses SystemConfigAddresses) (*types.Transaction, error) { + return _SystemConfig.Contract.Initialize(&_SystemConfig.TransactOpts, _owner, _basefeeScalar, _blobbasefeeScalar, _batcherHash, _gasLimit, _unsafeBlockSigner, _config, _batchInbox, _addresses) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_SystemConfig *SystemConfigTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SystemConfig.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_SystemConfig *SystemConfigSession) RenounceOwnership() (*types.Transaction, error) { + return _SystemConfig.Contract.RenounceOwnership(&_SystemConfig.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_SystemConfig *SystemConfigTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _SystemConfig.Contract.RenounceOwnership(&_SystemConfig.TransactOpts) +} + +// SetBatcherHash is a paid mutator transaction binding the contract method 0xc9b26f61. +// +// Solidity: function setBatcherHash(bytes32 _batcherHash) returns() +func (_SystemConfig *SystemConfigTransactor) SetBatcherHash(opts *bind.TransactOpts, _batcherHash [32]byte) (*types.Transaction, error) { + return _SystemConfig.contract.Transact(opts, "setBatcherHash", _batcherHash) +} + +// SetBatcherHash is a paid mutator transaction binding the contract method 0xc9b26f61. +// +// Solidity: function setBatcherHash(bytes32 _batcherHash) returns() +func (_SystemConfig *SystemConfigSession) SetBatcherHash(_batcherHash [32]byte) (*types.Transaction, error) { + return _SystemConfig.Contract.SetBatcherHash(&_SystemConfig.TransactOpts, _batcherHash) +} + +// SetBatcherHash is a paid mutator transaction binding the contract method 0xc9b26f61. +// +// Solidity: function setBatcherHash(bytes32 _batcherHash) returns() +func (_SystemConfig *SystemConfigTransactorSession) SetBatcherHash(_batcherHash [32]byte) (*types.Transaction, error) { + return _SystemConfig.Contract.SetBatcherHash(&_SystemConfig.TransactOpts, _batcherHash) +} + +// SetGasConfig is a paid mutator transaction binding the contract method 0x935f029e. +// +// Solidity: function setGasConfig(uint256 _overhead, uint256 _scalar) returns() +func (_SystemConfig *SystemConfigTransactor) SetGasConfig(opts *bind.TransactOpts, _overhead *big.Int, _scalar *big.Int) (*types.Transaction, error) { + return _SystemConfig.contract.Transact(opts, "setGasConfig", _overhead, _scalar) +} + +// SetGasConfig is a paid mutator transaction binding the contract method 0x935f029e. +// +// Solidity: function setGasConfig(uint256 _overhead, uint256 _scalar) returns() +func (_SystemConfig *SystemConfigSession) SetGasConfig(_overhead *big.Int, _scalar *big.Int) (*types.Transaction, error) { + return _SystemConfig.Contract.SetGasConfig(&_SystemConfig.TransactOpts, _overhead, _scalar) +} + +// SetGasConfig is a paid mutator transaction binding the contract method 0x935f029e. +// +// Solidity: function setGasConfig(uint256 _overhead, uint256 _scalar) returns() +func (_SystemConfig *SystemConfigTransactorSession) SetGasConfig(_overhead *big.Int, _scalar *big.Int) (*types.Transaction, error) { + return _SystemConfig.Contract.SetGasConfig(&_SystemConfig.TransactOpts, _overhead, _scalar) +} + +// SetGasConfigEcotone is a paid mutator transaction binding the contract method 0x21d7fde5. +// +// Solidity: function setGasConfigEcotone(uint32 _basefeeScalar, uint32 _blobbasefeeScalar) returns() +func (_SystemConfig *SystemConfigTransactor) SetGasConfigEcotone(opts *bind.TransactOpts, _basefeeScalar uint32, _blobbasefeeScalar uint32) (*types.Transaction, error) { + return _SystemConfig.contract.Transact(opts, "setGasConfigEcotone", _basefeeScalar, _blobbasefeeScalar) +} + +// SetGasConfigEcotone is a paid mutator transaction binding the contract method 0x21d7fde5. +// +// Solidity: function setGasConfigEcotone(uint32 _basefeeScalar, uint32 _blobbasefeeScalar) returns() +func (_SystemConfig *SystemConfigSession) SetGasConfigEcotone(_basefeeScalar uint32, _blobbasefeeScalar uint32) (*types.Transaction, error) { + return _SystemConfig.Contract.SetGasConfigEcotone(&_SystemConfig.TransactOpts, _basefeeScalar, _blobbasefeeScalar) +} + +// SetGasConfigEcotone is a paid mutator transaction binding the contract method 0x21d7fde5. +// +// Solidity: function setGasConfigEcotone(uint32 _basefeeScalar, uint32 _blobbasefeeScalar) returns() +func (_SystemConfig *SystemConfigTransactorSession) SetGasConfigEcotone(_basefeeScalar uint32, _blobbasefeeScalar uint32) (*types.Transaction, error) { + return _SystemConfig.Contract.SetGasConfigEcotone(&_SystemConfig.TransactOpts, _basefeeScalar, _blobbasefeeScalar) +} + +// SetGasLimit is a paid mutator transaction binding the contract method 0xb40a817c. +// +// Solidity: function setGasLimit(uint64 _gasLimit) returns() +func (_SystemConfig *SystemConfigTransactor) SetGasLimit(opts *bind.TransactOpts, _gasLimit uint64) (*types.Transaction, error) { + return _SystemConfig.contract.Transact(opts, "setGasLimit", _gasLimit) +} + +// SetGasLimit is a paid mutator transaction binding the contract method 0xb40a817c. +// +// Solidity: function setGasLimit(uint64 _gasLimit) returns() +func (_SystemConfig *SystemConfigSession) SetGasLimit(_gasLimit uint64) (*types.Transaction, error) { + return _SystemConfig.Contract.SetGasLimit(&_SystemConfig.TransactOpts, _gasLimit) +} + +// SetGasLimit is a paid mutator transaction binding the contract method 0xb40a817c. +// +// Solidity: function setGasLimit(uint64 _gasLimit) returns() +func (_SystemConfig *SystemConfigTransactorSession) SetGasLimit(_gasLimit uint64) (*types.Transaction, error) { + return _SystemConfig.Contract.SetGasLimit(&_SystemConfig.TransactOpts, _gasLimit) +} + +// SetUnsafeBlockSigner is a paid mutator transaction binding the contract method 0x18d13918. +// +// Solidity: function setUnsafeBlockSigner(address _unsafeBlockSigner) returns() +func (_SystemConfig *SystemConfigTransactor) SetUnsafeBlockSigner(opts *bind.TransactOpts, _unsafeBlockSigner common.Address) (*types.Transaction, error) { + return _SystemConfig.contract.Transact(opts, "setUnsafeBlockSigner", _unsafeBlockSigner) +} + +// SetUnsafeBlockSigner is a paid mutator transaction binding the contract method 0x18d13918. +// +// Solidity: function setUnsafeBlockSigner(address _unsafeBlockSigner) returns() +func (_SystemConfig *SystemConfigSession) SetUnsafeBlockSigner(_unsafeBlockSigner common.Address) (*types.Transaction, error) { + return _SystemConfig.Contract.SetUnsafeBlockSigner(&_SystemConfig.TransactOpts, _unsafeBlockSigner) +} + +// SetUnsafeBlockSigner is a paid mutator transaction binding the contract method 0x18d13918. +// +// Solidity: function setUnsafeBlockSigner(address _unsafeBlockSigner) returns() +func (_SystemConfig *SystemConfigTransactorSession) SetUnsafeBlockSigner(_unsafeBlockSigner common.Address) (*types.Transaction, error) { + return _SystemConfig.Contract.SetUnsafeBlockSigner(&_SystemConfig.TransactOpts, _unsafeBlockSigner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_SystemConfig *SystemConfigTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _SystemConfig.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_SystemConfig *SystemConfigSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _SystemConfig.Contract.TransferOwnership(&_SystemConfig.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_SystemConfig *SystemConfigTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _SystemConfig.Contract.TransferOwnership(&_SystemConfig.TransactOpts, newOwner) +} + +// SystemConfigConfigUpdateIterator is returned from FilterConfigUpdate and is used to iterate over the raw logs and unpacked data for ConfigUpdate events raised by the SystemConfig contract. +type SystemConfigConfigUpdateIterator struct { + Event *SystemConfigConfigUpdate // 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 *SystemConfigConfigUpdateIterator) 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(SystemConfigConfigUpdate) + 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(SystemConfigConfigUpdate) + 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 *SystemConfigConfigUpdateIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SystemConfigConfigUpdateIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SystemConfigConfigUpdate represents a ConfigUpdate event raised by the SystemConfig contract. +type SystemConfigConfigUpdate struct { + Version *big.Int + UpdateType uint8 + Data []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterConfigUpdate is a free log retrieval operation binding the contract event 0x1d2b0bda21d56b8bd12d4f94ebacffdfb35f5e226f84b461103bb8beab6353be. +// +// Solidity: event ConfigUpdate(uint256 indexed version, uint8 indexed updateType, bytes data) +func (_SystemConfig *SystemConfigFilterer) FilterConfigUpdate(opts *bind.FilterOpts, version []*big.Int, updateType []uint8) (*SystemConfigConfigUpdateIterator, error) { + + var versionRule []interface{} + for _, versionItem := range version { + versionRule = append(versionRule, versionItem) + } + var updateTypeRule []interface{} + for _, updateTypeItem := range updateType { + updateTypeRule = append(updateTypeRule, updateTypeItem) + } + + logs, sub, err := _SystemConfig.contract.FilterLogs(opts, "ConfigUpdate", versionRule, updateTypeRule) + if err != nil { + return nil, err + } + return &SystemConfigConfigUpdateIterator{contract: _SystemConfig.contract, event: "ConfigUpdate", logs: logs, sub: sub}, nil +} + +// WatchConfigUpdate is a free log subscription operation binding the contract event 0x1d2b0bda21d56b8bd12d4f94ebacffdfb35f5e226f84b461103bb8beab6353be. +// +// Solidity: event ConfigUpdate(uint256 indexed version, uint8 indexed updateType, bytes data) +func (_SystemConfig *SystemConfigFilterer) WatchConfigUpdate(opts *bind.WatchOpts, sink chan<- *SystemConfigConfigUpdate, version []*big.Int, updateType []uint8) (event.Subscription, error) { + + var versionRule []interface{} + for _, versionItem := range version { + versionRule = append(versionRule, versionItem) + } + var updateTypeRule []interface{} + for _, updateTypeItem := range updateType { + updateTypeRule = append(updateTypeRule, updateTypeItem) + } + + logs, sub, err := _SystemConfig.contract.WatchLogs(opts, "ConfigUpdate", versionRule, updateTypeRule) + 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(SystemConfigConfigUpdate) + if err := _SystemConfig.contract.UnpackLog(event, "ConfigUpdate", 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 +} + +// ParseConfigUpdate is a log parse operation binding the contract event 0x1d2b0bda21d56b8bd12d4f94ebacffdfb35f5e226f84b461103bb8beab6353be. +// +// Solidity: event ConfigUpdate(uint256 indexed version, uint8 indexed updateType, bytes data) +func (_SystemConfig *SystemConfigFilterer) ParseConfigUpdate(log types.Log) (*SystemConfigConfigUpdate, error) { + event := new(SystemConfigConfigUpdate) + if err := _SystemConfig.contract.UnpackLog(event, "ConfigUpdate", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SystemConfigInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the SystemConfig contract. +type SystemConfigInitializedIterator struct { + Event *SystemConfigInitialized // 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 *SystemConfigInitializedIterator) 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(SystemConfigInitialized) + 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(SystemConfigInitialized) + 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 *SystemConfigInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SystemConfigInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SystemConfigInitialized represents a Initialized event raised by the SystemConfig contract. +type SystemConfigInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_SystemConfig *SystemConfigFilterer) FilterInitialized(opts *bind.FilterOpts) (*SystemConfigInitializedIterator, error) { + + logs, sub, err := _SystemConfig.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &SystemConfigInitializedIterator{contract: _SystemConfig.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_SystemConfig *SystemConfigFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *SystemConfigInitialized) (event.Subscription, error) { + + logs, sub, err := _SystemConfig.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SystemConfigInitialized) + if err := _SystemConfig.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_SystemConfig *SystemConfigFilterer) ParseInitialized(log types.Log) (*SystemConfigInitialized, error) { + event := new(SystemConfigInitialized) + if err := _SystemConfig.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SystemConfigOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the SystemConfig contract. +type SystemConfigOwnershipTransferredIterator struct { + Event *SystemConfigOwnershipTransferred // 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 *SystemConfigOwnershipTransferredIterator) 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(SystemConfigOwnershipTransferred) + 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(SystemConfigOwnershipTransferred) + 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 *SystemConfigOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SystemConfigOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SystemConfigOwnershipTransferred represents a OwnershipTransferred event raised by the SystemConfig contract. +type SystemConfigOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_SystemConfig *SystemConfigFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*SystemConfigOwnershipTransferredIterator, 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 := _SystemConfig.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &SystemConfigOwnershipTransferredIterator{contract: _SystemConfig.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_SystemConfig *SystemConfigFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *SystemConfigOwnershipTransferred, 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 := _SystemConfig.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SystemConfigOwnershipTransferred) + if err := _SystemConfig.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_SystemConfig *SystemConfigFilterer) ParseOwnershipTransferred(log types.Log) (*SystemConfigOwnershipTransferred, error) { + event := new(SystemConfigOwnershipTransferred) + if err := _SystemConfig.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/op-chain-ops/opbnb-upgrades/old-contracts/L1CrossDomainMessenger.json b/op-chain-ops/opbnb-upgrades/old-contracts/L1CrossDomainMessenger.json new file mode 100644 index 000000000..ddbb5d04a --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/old-contracts/L1CrossDomainMessenger.json @@ -0,0 +1,407 @@ +[ + { + "type": "constructor", + "inputs": [ + { + "name": "_portal", + "type": "address", + "internalType": "contract OptimismPortal" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "MESSAGE_VERSION", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint16", + "internalType": "uint16" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "MIN_GAS_CALLDATA_OVERHEAD", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "OTHER_MESSENGER", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "PORTAL", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract OptimismPortal" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "RELAY_CALL_OVERHEAD", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "RELAY_CONSTANT_OVERHEAD", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "RELAY_GAS_CHECK_BUFFER", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "RELAY_RESERVED_GAS", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "baseGas", + "inputs": [ + { + "name": "_message", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "_minGasLimit", + "type": "uint32", + "internalType": "uint32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "failedMessages", + "inputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "messageNonce", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "relayMessage", + "inputs": [ + { + "name": "_nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_sender", + "type": "address", + "internalType": "address" + }, + { + "name": "_target", + "type": "address", + "internalType": "address" + }, + { + "name": "_value", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_minGasLimit", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_message", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "sendMessage", + "inputs": [ + { + "name": "_target", + "type": "address", + "internalType": "address" + }, + { + "name": "_message", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "_minGasLimit", + "type": "uint32", + "internalType": "uint32" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "successfulMessages", + "inputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "version", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "xDomainMessageSender", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "FailedRelayedMessage", + "inputs": [ + { + "name": "msgHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RelayedMessage", + "inputs": [ + { + "name": "msgHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SentMessage", + "inputs": [ + { + "name": "target", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "message", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "messageNonce", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "gasLimit", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SentMessageExtension1", + "inputs": [ + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + } +] diff --git a/op-chain-ops/opbnb-upgrades/old-contracts/L1ERC721Bridge.json b/op-chain-ops/opbnb-upgrades/old-contracts/L1ERC721Bridge.json new file mode 100644 index 000000000..dc2268838 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/old-contracts/L1ERC721Bridge.json @@ -0,0 +1,307 @@ +[ + { + "type": "constructor", + "inputs": [ + { + "name": "_messenger", + "type": "address", + "internalType": "address" + }, + { + "name": "_otherBridge", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "MESSENGER", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract CrossDomainMessenger" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "OTHER_BRIDGE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "bridgeERC721", + "inputs": [ + { + "name": "_localToken", + "type": "address", + "internalType": "address" + }, + { + "name": "_remoteToken", + "type": "address", + "internalType": "address" + }, + { + "name": "_tokenId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_minGasLimit", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "_extraData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "bridgeERC721To", + "inputs": [ + { + "name": "_localToken", + "type": "address", + "internalType": "address" + }, + { + "name": "_remoteToken", + "type": "address", + "internalType": "address" + }, + { + "name": "_to", + "type": "address", + "internalType": "address" + }, + { + "name": "_tokenId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_minGasLimit", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "_extraData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "deposits", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "finalizeBridgeERC721", + "inputs": [ + { + "name": "_localToken", + "type": "address", + "internalType": "address" + }, + { + "name": "_remoteToken", + "type": "address", + "internalType": "address" + }, + { + "name": "_from", + "type": "address", + "internalType": "address" + }, + { + "name": "_to", + "type": "address", + "internalType": "address" + }, + { + "name": "_tokenId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_extraData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "messenger", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract CrossDomainMessenger" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "otherBridge", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "version", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "ERC721BridgeFinalized", + "inputs": [ + { + "name": "localToken", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "remoteToken", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "tokenId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "extraData", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ERC721BridgeInitiated", + "inputs": [ + { + "name": "localToken", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "remoteToken", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "tokenId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "extraData", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + } + ], + "anonymous": false + } +] diff --git a/op-chain-ops/opbnb-upgrades/old-contracts/L1StandardBridge.json b/op-chain-ops/opbnb-upgrades/old-contracts/L1StandardBridge.json new file mode 100644 index 000000000..0bafc2a70 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/old-contracts/L1StandardBridge.json @@ -0,0 +1,758 @@ +[ + { + "type": "constructor", + "inputs": [ + { + "name": "_messenger", + "type": "address", + "internalType": "address payable" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "MESSENGER", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract CrossDomainMessenger" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "OTHER_BRIDGE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract StandardBridge" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "bridgeERC20", + "inputs": [ + { + "name": "_localToken", + "type": "address", + "internalType": "address" + }, + { + "name": "_remoteToken", + "type": "address", + "internalType": "address" + }, + { + "name": "_amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_minGasLimit", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "_extraData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "bridgeERC20To", + "inputs": [ + { + "name": "_localToken", + "type": "address", + "internalType": "address" + }, + { + "name": "_remoteToken", + "type": "address", + "internalType": "address" + }, + { + "name": "_to", + "type": "address", + "internalType": "address" + }, + { + "name": "_amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_minGasLimit", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "_extraData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "bridgeETH", + "inputs": [ + { + "name": "_minGasLimit", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "_extraData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "bridgeETHTo", + "inputs": [ + { + "name": "_to", + "type": "address", + "internalType": "address" + }, + { + "name": "_minGasLimit", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "_extraData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "depositERC20", + "inputs": [ + { + "name": "_l1Token", + "type": "address", + "internalType": "address" + }, + { + "name": "_l2Token", + "type": "address", + "internalType": "address" + }, + { + "name": "_amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_minGasLimit", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "_extraData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositERC20To", + "inputs": [ + { + "name": "_l1Token", + "type": "address", + "internalType": "address" + }, + { + "name": "_l2Token", + "type": "address", + "internalType": "address" + }, + { + "name": "_to", + "type": "address", + "internalType": "address" + }, + { + "name": "_amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_minGasLimit", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "_extraData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositETH", + "inputs": [ + { + "name": "_minGasLimit", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "_extraData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "depositETHTo", + "inputs": [ + { + "name": "_to", + "type": "address", + "internalType": "address" + }, + { + "name": "_minGasLimit", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "_extraData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "deposits", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "finalizeBridgeERC20", + "inputs": [ + { + "name": "_localToken", + "type": "address", + "internalType": "address" + }, + { + "name": "_remoteToken", + "type": "address", + "internalType": "address" + }, + { + "name": "_from", + "type": "address", + "internalType": "address" + }, + { + "name": "_to", + "type": "address", + "internalType": "address" + }, + { + "name": "_amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_extraData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "finalizeBridgeETH", + "inputs": [ + { + "name": "_from", + "type": "address", + "internalType": "address" + }, + { + "name": "_to", + "type": "address", + "internalType": "address" + }, + { + "name": "_amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_extraData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "finalizeERC20Withdrawal", + "inputs": [ + { + "name": "_l1Token", + "type": "address", + "internalType": "address" + }, + { + "name": "_l2Token", + "type": "address", + "internalType": "address" + }, + { + "name": "_from", + "type": "address", + "internalType": "address" + }, + { + "name": "_to", + "type": "address", + "internalType": "address" + }, + { + "name": "_amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_extraData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "finalizeETHWithdrawal", + "inputs": [ + { + "name": "_from", + "type": "address", + "internalType": "address" + }, + { + "name": "_to", + "type": "address", + "internalType": "address" + }, + { + "name": "_amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_extraData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "l2TokenBridge", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "messenger", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract CrossDomainMessenger" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "version", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "ERC20BridgeFinalized", + "inputs": [ + { + "name": "localToken", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "remoteToken", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "extraData", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ERC20BridgeInitiated", + "inputs": [ + { + "name": "localToken", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "remoteToken", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "extraData", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ERC20DepositInitiated", + "inputs": [ + { + "name": "l1Token", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "l2Token", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "extraData", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ERC20WithdrawalFinalized", + "inputs": [ + { + "name": "l1Token", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "l2Token", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "extraData", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ETHBridgeFinalized", + "inputs": [ + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "extraData", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ETHBridgeInitiated", + "inputs": [ + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "extraData", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ETHDepositInitiated", + "inputs": [ + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "extraData", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ETHWithdrawalFinalized", + "inputs": [ + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "extraData", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + } + ], + "anonymous": false + } +] diff --git a/op-chain-ops/opbnb-upgrades/old-contracts/L2OutputOracle.json b/op-chain-ops/opbnb-upgrades/old-contracts/L2OutputOracle.json new file mode 100644 index 000000000..e5244f952 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/old-contracts/L2OutputOracle.json @@ -0,0 +1,431 @@ +[ + { + "type": "constructor", + "inputs": [ + { + "name": "_submissionInterval", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_l2BlockTime", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_startingBlockNumber", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_startingTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_proposer", + "type": "address", + "internalType": "address" + }, + { + "name": "_challenger", + "type": "address", + "internalType": "address" + }, + { + "name": "_finalizationPeriodSeconds", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "CHALLENGER", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "FINALIZATION_PERIOD_SECONDS", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "L2_BLOCK_TIME", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "PROPOSER", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "SUBMISSION_INTERVAL", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "computeL2Timestamp", + "inputs": [ + { + "name": "_l2BlockNumber", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deleteL2Outputs", + "inputs": [ + { + "name": "_l2OutputIndex", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getL2Output", + "inputs": [ + { + "name": "_l2OutputIndex", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct Types.OutputProposal", + "components": [ + { + "name": "outputRoot", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "timestamp", + "type": "uint128", + "internalType": "uint128" + }, + { + "name": "l2BlockNumber", + "type": "uint128", + "internalType": "uint128" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getL2OutputAfter", + "inputs": [ + { + "name": "_l2BlockNumber", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct Types.OutputProposal", + "components": [ + { + "name": "outputRoot", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "timestamp", + "type": "uint128", + "internalType": "uint128" + }, + { + "name": "l2BlockNumber", + "type": "uint128", + "internalType": "uint128" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getL2OutputIndexAfter", + "inputs": [ + { + "name": "_l2BlockNumber", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "_startingBlockNumber", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_startingTimestamp", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "latestBlockNumber", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "latestOutputIndex", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "nextBlockNumber", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "nextOutputIndex", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "proposeL2Output", + "inputs": [ + { + "name": "_outputRoot", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "_l2BlockNumber", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_l1BlockHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "_l1BlockNumber", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "startingBlockNumber", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "startingTimestamp", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "version", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OutputProposed", + "inputs": [ + { + "name": "outputRoot", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "l2OutputIndex", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "l2BlockNumber", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "l1Timestamp", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OutputsDeleted", + "inputs": [ + { + "name": "prevNextOutputIndex", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "newNextOutputIndex", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + } +] diff --git a/op-chain-ops/opbnb-upgrades/old-contracts/OptimismMintableERC20Factory.json b/op-chain-ops/opbnb-upgrades/old-contracts/OptimismMintableERC20Factory.json new file mode 100644 index 000000000..881cb6337 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/old-contracts/OptimismMintableERC20Factory.json @@ -0,0 +1,141 @@ +[ + { + "type": "constructor", + "inputs": [ + { + "name": "_bridge", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "BRIDGE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "createOptimismMintableERC20", + "inputs": [ + { + "name": "_remoteToken", + "type": "address", + "internalType": "address" + }, + { + "name": "_name", + "type": "string", + "internalType": "string" + }, + { + "name": "_symbol", + "type": "string", + "internalType": "string" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "createStandardL2Token", + "inputs": [ + { + "name": "_remoteToken", + "type": "address", + "internalType": "address" + }, + { + "name": "_name", + "type": "string", + "internalType": "string" + }, + { + "name": "_symbol", + "type": "string", + "internalType": "string" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "version", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "OptimismMintableERC20Created", + "inputs": [ + { + "name": "localToken", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "remoteToken", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "deployer", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "StandardL2TokenCreated", + "inputs": [ + { + "name": "remoteToken", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "localToken", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + } +] diff --git a/op-chain-ops/opbnb-upgrades/old-contracts/OptimismPortal.json b/op-chain-ops/opbnb-upgrades/old-contracts/OptimismPortal.json new file mode 100644 index 000000000..63320abc1 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/old-contracts/OptimismPortal.json @@ -0,0 +1,527 @@ +[ + { + "type": "constructor", + "inputs": [ + { + "name": "_l2Oracle", + "type": "address", + "internalType": "contract L2OutputOracle" + }, + { + "name": "_guardian", + "type": "address", + "internalType": "address" + }, + { + "name": "_paused", + "type": "bool", + "internalType": "bool" + }, + { + "name": "_config", + "type": "address", + "internalType": "contract SystemConfig" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "GUARDIAN", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "L2_ORACLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract L2OutputOracle" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "SYSTEM_CONFIG", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract SystemConfig" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "depositTransaction", + "inputs": [ + { + "name": "_to", + "type": "address", + "internalType": "address" + }, + { + "name": "_value", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_gasLimit", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "_isCreation", + "type": "bool", + "internalType": "bool" + }, + { + "name": "_data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "donateETH", + "inputs": [], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "finalizeWithdrawalTransaction", + "inputs": [ + { + "name": "_tx", + "type": "tuple", + "internalType": "struct Types.WithdrawalTransaction", + "components": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "target", + "type": "address", + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "gasLimit", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "finalizedWithdrawals", + "inputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "_paused", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isOutputFinalized", + "inputs": [ + { + "name": "_l2OutputIndex", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "l2Sender", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "minimumGasLimit", + "inputs": [ + { + "name": "_byteCount", + "type": "uint64", + "internalType": "uint64" + } + ], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "params", + "inputs": [], + "outputs": [ + { + "name": "prevBaseFee", + "type": "uint128", + "internalType": "uint128" + }, + { + "name": "prevBoughtGas", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "prevBlockNum", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "proveWithdrawalTransaction", + "inputs": [ + { + "name": "_tx", + "type": "tuple", + "internalType": "struct Types.WithdrawalTransaction", + "components": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "target", + "type": "address", + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "gasLimit", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "_l2OutputIndex", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_outputRootProof", + "type": "tuple", + "internalType": "struct Types.OutputRootProof", + "components": [ + { + "name": "version", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "stateRoot", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "messagePasserStorageRoot", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "latestBlockhash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "name": "_withdrawalProof", + "type": "bytes[]", + "internalType": "bytes[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "provenWithdrawals", + "inputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "outputRoot", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "timestamp", + "type": "uint128", + "internalType": "uint128" + }, + { + "name": "l2OutputIndex", + "type": "uint128", + "internalType": "uint128" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "version", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TransactionDeposited", + "inputs": [ + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "version", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "opaqueData", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "WithdrawalFinalized", + "inputs": [ + { + "name": "withdrawalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "success", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "WithdrawalProven", + "inputs": [ + { + "name": "withdrawalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + } +] diff --git a/op-chain-ops/opbnb-upgrades/old-contracts/ProxyAdmin.json b/op-chain-ops/opbnb-upgrades/old-contracts/ProxyAdmin.json new file mode 100644 index 000000000..8b2bbc10e --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/old-contracts/ProxyAdmin.json @@ -0,0 +1,306 @@ +[ + { + "type": "constructor", + "inputs": [ + { + "name": "_owner", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "addressManager", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract AddressManager" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "changeProxyAdmin", + "inputs": [ + { + "name": "_proxy", + "type": "address", + "internalType": "address payable" + }, + { + "name": "_newAdmin", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getProxyAdmin", + "inputs": [ + { + "name": "_proxy", + "type": "address", + "internalType": "address payable" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getProxyImplementation", + "inputs": [ + { + "name": "_proxy", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "implementationName", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isUpgrading", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "proxyType", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint8", + "internalType": "enum ProxyAdmin.ProxyType" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setAddress", + "inputs": [ + { + "name": "_name", + "type": "string", + "internalType": "string" + }, + { + "name": "_address", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setAddressManager", + "inputs": [ + { + "name": "_address", + "type": "address", + "internalType": "contract AddressManager" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setImplementationName", + "inputs": [ + { + "name": "_address", + "type": "address", + "internalType": "address" + }, + { + "name": "_name", + "type": "string", + "internalType": "string" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setProxyType", + "inputs": [ + { + "name": "_address", + "type": "address", + "internalType": "address" + }, + { + "name": "_type", + "type": "uint8", + "internalType": "enum ProxyAdmin.ProxyType" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setUpgrading", + "inputs": [ + { + "name": "_upgrading", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgrade", + "inputs": [ + { + "name": "_proxy", + "type": "address", + "internalType": "address payable" + }, + { + "name": "_implementation", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeAndCall", + "inputs": [ + { + "name": "_proxy", + "type": "address", + "internalType": "address payable" + }, + { + "name": "_implementation", + "type": "address", + "internalType": "address" + }, + { + "name": "_data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + } +] diff --git a/op-chain-ops/opbnb-upgrades/old-contracts/Semver.json b/op-chain-ops/opbnb-upgrades/old-contracts/Semver.json new file mode 100644 index 000000000..d9ec14cfd --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/old-contracts/Semver.json @@ -0,0 +1,36 @@ +[ + { + "type": "constructor", + "inputs": [ + { + "name": "_major", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_minor", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_patch", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "version", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + } +] diff --git a/op-chain-ops/opbnb-upgrades/old-contracts/SystemConfig.json b/op-chain-ops/opbnb-upgrades/old-contracts/SystemConfig.json new file mode 100644 index 000000000..be11e8727 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/old-contracts/SystemConfig.json @@ -0,0 +1,504 @@ +[ + { + "type": "constructor", + "inputs": [ + { + "name": "_owner", + "type": "address", + "internalType": "address" + }, + { + "name": "_overhead", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_scalar", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_batcherHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "_gasLimit", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "_unsafeBlockSigner", + "type": "address", + "internalType": "address" + }, + { + "name": "_config", + "type": "tuple", + "internalType": "struct ResourceMetering.ResourceConfig", + "components": [ + { + "name": "maxResourceLimit", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "elasticityMultiplier", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "baseFeeMaxChangeDenominator", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minimumBaseFee", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "systemTxMaxGas", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "maximumBaseFee", + "type": "uint128", + "internalType": "uint128" + } + ] + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "UNSAFE_BLOCK_SIGNER_SLOT", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "VERSION", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "batcherHash", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "gasLimit", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "_owner", + "type": "address", + "internalType": "address" + }, + { + "name": "_overhead", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_scalar", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_batcherHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "_gasLimit", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "_unsafeBlockSigner", + "type": "address", + "internalType": "address" + }, + { + "name": "_config", + "type": "tuple", + "internalType": "struct ResourceMetering.ResourceConfig", + "components": [ + { + "name": "maxResourceLimit", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "elasticityMultiplier", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "baseFeeMaxChangeDenominator", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minimumBaseFee", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "systemTxMaxGas", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "maximumBaseFee", + "type": "uint128", + "internalType": "uint128" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "minimumGasLimit", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "overhead", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "resourceConfig", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct ResourceMetering.ResourceConfig", + "components": [ + { + "name": "maxResourceLimit", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "elasticityMultiplier", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "baseFeeMaxChangeDenominator", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minimumBaseFee", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "systemTxMaxGas", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "maximumBaseFee", + "type": "uint128", + "internalType": "uint128" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "scalar", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "setBatcherHash", + "inputs": [ + { + "name": "_batcherHash", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setGasConfig", + "inputs": [ + { + "name": "_overhead", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_scalar", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setGasLimit", + "inputs": [ + { + "name": "_gasLimit", + "type": "uint64", + "internalType": "uint64" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setResourceConfig", + "inputs": [ + { + "name": "_config", + "type": "tuple", + "internalType": "struct ResourceMetering.ResourceConfig", + "components": [ + { + "name": "maxResourceLimit", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "elasticityMultiplier", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "baseFeeMaxChangeDenominator", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minimumBaseFee", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "systemTxMaxGas", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "maximumBaseFee", + "type": "uint128", + "internalType": "uint128" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setUnsafeBlockSigner", + "inputs": [ + { + "name": "_unsafeBlockSigner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "unsafeBlockSigner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "version", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "ConfigUpdate", + "inputs": [ + { + "name": "version", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "updateType", + "type": "uint8", + "indexed": true, + "internalType": "enum SystemConfig.UpdateType" + }, + { + "name": "data", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + } +] diff --git a/op-chain-ops/opbnb-upgrades/old-contracts/bindings/L1CrossDomainMessenger.go b/op-chain-ops/opbnb-upgrades/old-contracts/bindings/L1CrossDomainMessenger.go new file mode 100644 index 000000000..fc130d401 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/old-contracts/bindings/L1CrossDomainMessenger.go @@ -0,0 +1,1455 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// L1CrossDomainMessengerMetaData contains all meta data concerning the L1CrossDomainMessenger contract. +var L1CrossDomainMessengerMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_portal\",\"type\":\"address\",\"internalType\":\"contractOptimismPortal\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"MESSAGE_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MIN_GAS_CALLDATA_OVERHEAD\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"OTHER_MESSENGER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PORTAL\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractOptimismPortal\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"RELAY_CALL_OVERHEAD\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"RELAY_CONSTANT_OVERHEAD\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"RELAY_GAS_CHECK_BUFFER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"RELAY_RESERVED_GAS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"baseGas\",\"inputs\":[{\"name\":\"_message\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"_minGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"failedMessages\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"messageNonce\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"relayMessage\",\"inputs\":[{\"name\":\"_nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_target\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minGasLimit\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_message\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"sendMessage\",\"inputs\":[{\"name\":\"_target\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_message\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"_minGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"successfulMessages\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"xDomainMessageSender\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"FailedRelayedMessage\",\"inputs\":[{\"name\":\"msgHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RelayedMessage\",\"inputs\":[{\"name\":\"msgHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SentMessage\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"sender\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"message\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"messageNonce\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"gasLimit\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SentMessageExtension1\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false}]", +} + +// L1CrossDomainMessengerABI is the input ABI used to generate the binding from. +// Deprecated: Use L1CrossDomainMessengerMetaData.ABI instead. +var L1CrossDomainMessengerABI = L1CrossDomainMessengerMetaData.ABI + +// L1CrossDomainMessenger is an auto generated Go binding around an Ethereum contract. +type L1CrossDomainMessenger struct { + L1CrossDomainMessengerCaller // Read-only binding to the contract + L1CrossDomainMessengerTransactor // Write-only binding to the contract + L1CrossDomainMessengerFilterer // Log filterer for contract events +} + +// L1CrossDomainMessengerCaller is an auto generated read-only Go binding around an Ethereum contract. +type L1CrossDomainMessengerCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L1CrossDomainMessengerTransactor is an auto generated write-only Go binding around an Ethereum contract. +type L1CrossDomainMessengerTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L1CrossDomainMessengerFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type L1CrossDomainMessengerFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L1CrossDomainMessengerSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type L1CrossDomainMessengerSession struct { + Contract *L1CrossDomainMessenger // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// L1CrossDomainMessengerCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type L1CrossDomainMessengerCallerSession struct { + Contract *L1CrossDomainMessengerCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// L1CrossDomainMessengerTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type L1CrossDomainMessengerTransactorSession struct { + Contract *L1CrossDomainMessengerTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// L1CrossDomainMessengerRaw is an auto generated low-level Go binding around an Ethereum contract. +type L1CrossDomainMessengerRaw struct { + Contract *L1CrossDomainMessenger // Generic contract binding to access the raw methods on +} + +// L1CrossDomainMessengerCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type L1CrossDomainMessengerCallerRaw struct { + Contract *L1CrossDomainMessengerCaller // Generic read-only contract binding to access the raw methods on +} + +// L1CrossDomainMessengerTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type L1CrossDomainMessengerTransactorRaw struct { + Contract *L1CrossDomainMessengerTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewL1CrossDomainMessenger creates a new instance of L1CrossDomainMessenger, bound to a specific deployed contract. +func NewL1CrossDomainMessenger(address common.Address, backend bind.ContractBackend) (*L1CrossDomainMessenger, error) { + contract, err := bindL1CrossDomainMessenger(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &L1CrossDomainMessenger{L1CrossDomainMessengerCaller: L1CrossDomainMessengerCaller{contract: contract}, L1CrossDomainMessengerTransactor: L1CrossDomainMessengerTransactor{contract: contract}, L1CrossDomainMessengerFilterer: L1CrossDomainMessengerFilterer{contract: contract}}, nil +} + +// NewL1CrossDomainMessengerCaller creates a new read-only instance of L1CrossDomainMessenger, bound to a specific deployed contract. +func NewL1CrossDomainMessengerCaller(address common.Address, caller bind.ContractCaller) (*L1CrossDomainMessengerCaller, error) { + contract, err := bindL1CrossDomainMessenger(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &L1CrossDomainMessengerCaller{contract: contract}, nil +} + +// NewL1CrossDomainMessengerTransactor creates a new write-only instance of L1CrossDomainMessenger, bound to a specific deployed contract. +func NewL1CrossDomainMessengerTransactor(address common.Address, transactor bind.ContractTransactor) (*L1CrossDomainMessengerTransactor, error) { + contract, err := bindL1CrossDomainMessenger(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &L1CrossDomainMessengerTransactor{contract: contract}, nil +} + +// NewL1CrossDomainMessengerFilterer creates a new log filterer instance of L1CrossDomainMessenger, bound to a specific deployed contract. +func NewL1CrossDomainMessengerFilterer(address common.Address, filterer bind.ContractFilterer) (*L1CrossDomainMessengerFilterer, error) { + contract, err := bindL1CrossDomainMessenger(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &L1CrossDomainMessengerFilterer{contract: contract}, nil +} + +// bindL1CrossDomainMessenger binds a generic wrapper to an already deployed contract. +func bindL1CrossDomainMessenger(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := L1CrossDomainMessengerMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_L1CrossDomainMessenger *L1CrossDomainMessengerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _L1CrossDomainMessenger.Contract.L1CrossDomainMessengerCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_L1CrossDomainMessenger *L1CrossDomainMessengerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _L1CrossDomainMessenger.Contract.L1CrossDomainMessengerTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_L1CrossDomainMessenger *L1CrossDomainMessengerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _L1CrossDomainMessenger.Contract.L1CrossDomainMessengerTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _L1CrossDomainMessenger.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_L1CrossDomainMessenger *L1CrossDomainMessengerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _L1CrossDomainMessenger.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_L1CrossDomainMessenger *L1CrossDomainMessengerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _L1CrossDomainMessenger.Contract.contract.Transact(opts, method, params...) +} + +// MESSAGEVERSION is a free data retrieval call binding the contract method 0x3f827a5a. +// +// Solidity: function MESSAGE_VERSION() view returns(uint16) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MESSAGEVERSION(opts *bind.CallOpts) (uint16, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "MESSAGE_VERSION") + + if err != nil { + return *new(uint16), err + } + + out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16) + + return out0, err + +} + +// MESSAGEVERSION is a free data retrieval call binding the contract method 0x3f827a5a. +// +// Solidity: function MESSAGE_VERSION() view returns(uint16) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) MESSAGEVERSION() (uint16, error) { + return _L1CrossDomainMessenger.Contract.MESSAGEVERSION(&_L1CrossDomainMessenger.CallOpts) +} + +// MESSAGEVERSION is a free data retrieval call binding the contract method 0x3f827a5a. +// +// Solidity: function MESSAGE_VERSION() view returns(uint16) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) MESSAGEVERSION() (uint16, error) { + return _L1CrossDomainMessenger.Contract.MESSAGEVERSION(&_L1CrossDomainMessenger.CallOpts) +} + +// MINGASCALLDATAOVERHEAD is a free data retrieval call binding the contract method 0x028f85f7. +// +// Solidity: function MIN_GAS_CALLDATA_OVERHEAD() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MINGASCALLDATAOVERHEAD(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "MIN_GAS_CALLDATA_OVERHEAD") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// MINGASCALLDATAOVERHEAD is a free data retrieval call binding the contract method 0x028f85f7. +// +// Solidity: function MIN_GAS_CALLDATA_OVERHEAD() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) MINGASCALLDATAOVERHEAD() (uint64, error) { + return _L1CrossDomainMessenger.Contract.MINGASCALLDATAOVERHEAD(&_L1CrossDomainMessenger.CallOpts) +} + +// MINGASCALLDATAOVERHEAD is a free data retrieval call binding the contract method 0x028f85f7. +// +// Solidity: function MIN_GAS_CALLDATA_OVERHEAD() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) MINGASCALLDATAOVERHEAD() (uint64, error) { + return _L1CrossDomainMessenger.Contract.MINGASCALLDATAOVERHEAD(&_L1CrossDomainMessenger.CallOpts) +} + +// MINGASDYNAMICOVERHEADDENOMINATOR is a free data retrieval call binding the contract method 0x0c568498. +// +// Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MINGASDYNAMICOVERHEADDENOMINATOR(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// MINGASDYNAMICOVERHEADDENOMINATOR is a free data retrieval call binding the contract method 0x0c568498. +// +// Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) MINGASDYNAMICOVERHEADDENOMINATOR() (uint64, error) { + return _L1CrossDomainMessenger.Contract.MINGASDYNAMICOVERHEADDENOMINATOR(&_L1CrossDomainMessenger.CallOpts) +} + +// MINGASDYNAMICOVERHEADDENOMINATOR is a free data retrieval call binding the contract method 0x0c568498. +// +// Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) MINGASDYNAMICOVERHEADDENOMINATOR() (uint64, error) { + return _L1CrossDomainMessenger.Contract.MINGASDYNAMICOVERHEADDENOMINATOR(&_L1CrossDomainMessenger.CallOpts) +} + +// MINGASDYNAMICOVERHEADNUMERATOR is a free data retrieval call binding the contract method 0x2828d7e8. +// +// Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MINGASDYNAMICOVERHEADNUMERATOR(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// MINGASDYNAMICOVERHEADNUMERATOR is a free data retrieval call binding the contract method 0x2828d7e8. +// +// Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) MINGASDYNAMICOVERHEADNUMERATOR() (uint64, error) { + return _L1CrossDomainMessenger.Contract.MINGASDYNAMICOVERHEADNUMERATOR(&_L1CrossDomainMessenger.CallOpts) +} + +// MINGASDYNAMICOVERHEADNUMERATOR is a free data retrieval call binding the contract method 0x2828d7e8. +// +// Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) MINGASDYNAMICOVERHEADNUMERATOR() (uint64, error) { + return _L1CrossDomainMessenger.Contract.MINGASDYNAMICOVERHEADNUMERATOR(&_L1CrossDomainMessenger.CallOpts) +} + +// OTHERMESSENGER is a free data retrieval call binding the contract method 0x9fce812c. +// +// Solidity: function OTHER_MESSENGER() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) OTHERMESSENGER(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "OTHER_MESSENGER") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// OTHERMESSENGER is a free data retrieval call binding the contract method 0x9fce812c. +// +// Solidity: function OTHER_MESSENGER() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) OTHERMESSENGER() (common.Address, error) { + return _L1CrossDomainMessenger.Contract.OTHERMESSENGER(&_L1CrossDomainMessenger.CallOpts) +} + +// OTHERMESSENGER is a free data retrieval call binding the contract method 0x9fce812c. +// +// Solidity: function OTHER_MESSENGER() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) OTHERMESSENGER() (common.Address, error) { + return _L1CrossDomainMessenger.Contract.OTHERMESSENGER(&_L1CrossDomainMessenger.CallOpts) +} + +// PORTAL is a free data retrieval call binding the contract method 0x0ff754ea. +// +// Solidity: function PORTAL() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) PORTAL(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "PORTAL") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// PORTAL is a free data retrieval call binding the contract method 0x0ff754ea. +// +// Solidity: function PORTAL() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) PORTAL() (common.Address, error) { + return _L1CrossDomainMessenger.Contract.PORTAL(&_L1CrossDomainMessenger.CallOpts) +} + +// PORTAL is a free data retrieval call binding the contract method 0x0ff754ea. +// +// Solidity: function PORTAL() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) PORTAL() (common.Address, error) { + return _L1CrossDomainMessenger.Contract.PORTAL(&_L1CrossDomainMessenger.CallOpts) +} + +// RELAYCALLOVERHEAD is a free data retrieval call binding the contract method 0x4c1d6a69. +// +// Solidity: function RELAY_CALL_OVERHEAD() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) RELAYCALLOVERHEAD(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "RELAY_CALL_OVERHEAD") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// RELAYCALLOVERHEAD is a free data retrieval call binding the contract method 0x4c1d6a69. +// +// Solidity: function RELAY_CALL_OVERHEAD() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) RELAYCALLOVERHEAD() (uint64, error) { + return _L1CrossDomainMessenger.Contract.RELAYCALLOVERHEAD(&_L1CrossDomainMessenger.CallOpts) +} + +// RELAYCALLOVERHEAD is a free data retrieval call binding the contract method 0x4c1d6a69. +// +// Solidity: function RELAY_CALL_OVERHEAD() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) RELAYCALLOVERHEAD() (uint64, error) { + return _L1CrossDomainMessenger.Contract.RELAYCALLOVERHEAD(&_L1CrossDomainMessenger.CallOpts) +} + +// RELAYCONSTANTOVERHEAD is a free data retrieval call binding the contract method 0x83a74074. +// +// Solidity: function RELAY_CONSTANT_OVERHEAD() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) RELAYCONSTANTOVERHEAD(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "RELAY_CONSTANT_OVERHEAD") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// RELAYCONSTANTOVERHEAD is a free data retrieval call binding the contract method 0x83a74074. +// +// Solidity: function RELAY_CONSTANT_OVERHEAD() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) RELAYCONSTANTOVERHEAD() (uint64, error) { + return _L1CrossDomainMessenger.Contract.RELAYCONSTANTOVERHEAD(&_L1CrossDomainMessenger.CallOpts) +} + +// RELAYCONSTANTOVERHEAD is a free data retrieval call binding the contract method 0x83a74074. +// +// Solidity: function RELAY_CONSTANT_OVERHEAD() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) RELAYCONSTANTOVERHEAD() (uint64, error) { + return _L1CrossDomainMessenger.Contract.RELAYCONSTANTOVERHEAD(&_L1CrossDomainMessenger.CallOpts) +} + +// RELAYGASCHECKBUFFER is a free data retrieval call binding the contract method 0x5644cfdf. +// +// Solidity: function RELAY_GAS_CHECK_BUFFER() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) RELAYGASCHECKBUFFER(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "RELAY_GAS_CHECK_BUFFER") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// RELAYGASCHECKBUFFER is a free data retrieval call binding the contract method 0x5644cfdf. +// +// Solidity: function RELAY_GAS_CHECK_BUFFER() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) RELAYGASCHECKBUFFER() (uint64, error) { + return _L1CrossDomainMessenger.Contract.RELAYGASCHECKBUFFER(&_L1CrossDomainMessenger.CallOpts) +} + +// RELAYGASCHECKBUFFER is a free data retrieval call binding the contract method 0x5644cfdf. +// +// Solidity: function RELAY_GAS_CHECK_BUFFER() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) RELAYGASCHECKBUFFER() (uint64, error) { + return _L1CrossDomainMessenger.Contract.RELAYGASCHECKBUFFER(&_L1CrossDomainMessenger.CallOpts) +} + +// RELAYRESERVEDGAS is a free data retrieval call binding the contract method 0x8cbeeef2. +// +// Solidity: function RELAY_RESERVED_GAS() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) RELAYRESERVEDGAS(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "RELAY_RESERVED_GAS") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// RELAYRESERVEDGAS is a free data retrieval call binding the contract method 0x8cbeeef2. +// +// Solidity: function RELAY_RESERVED_GAS() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) RELAYRESERVEDGAS() (uint64, error) { + return _L1CrossDomainMessenger.Contract.RELAYRESERVEDGAS(&_L1CrossDomainMessenger.CallOpts) +} + +// RELAYRESERVEDGAS is a free data retrieval call binding the contract method 0x8cbeeef2. +// +// Solidity: function RELAY_RESERVED_GAS() view returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) RELAYRESERVEDGAS() (uint64, error) { + return _L1CrossDomainMessenger.Contract.RELAYRESERVEDGAS(&_L1CrossDomainMessenger.CallOpts) +} + +// BaseGas is a free data retrieval call binding the contract method 0xb28ade25. +// +// Solidity: function baseGas(bytes _message, uint32 _minGasLimit) pure returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) BaseGas(opts *bind.CallOpts, _message []byte, _minGasLimit uint32) (uint64, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "baseGas", _message, _minGasLimit) + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// BaseGas is a free data retrieval call binding the contract method 0xb28ade25. +// +// Solidity: function baseGas(bytes _message, uint32 _minGasLimit) pure returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) BaseGas(_message []byte, _minGasLimit uint32) (uint64, error) { + return _L1CrossDomainMessenger.Contract.BaseGas(&_L1CrossDomainMessenger.CallOpts, _message, _minGasLimit) +} + +// BaseGas is a free data retrieval call binding the contract method 0xb28ade25. +// +// Solidity: function baseGas(bytes _message, uint32 _minGasLimit) pure returns(uint64) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) BaseGas(_message []byte, _minGasLimit uint32) (uint64, error) { + return _L1CrossDomainMessenger.Contract.BaseGas(&_L1CrossDomainMessenger.CallOpts, _message, _minGasLimit) +} + +// FailedMessages is a free data retrieval call binding the contract method 0xa4e7f8bd. +// +// Solidity: function failedMessages(bytes32 ) view returns(bool) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) FailedMessages(opts *bind.CallOpts, arg0 [32]byte) (bool, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "failedMessages", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// FailedMessages is a free data retrieval call binding the contract method 0xa4e7f8bd. +// +// Solidity: function failedMessages(bytes32 ) view returns(bool) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) FailedMessages(arg0 [32]byte) (bool, error) { + return _L1CrossDomainMessenger.Contract.FailedMessages(&_L1CrossDomainMessenger.CallOpts, arg0) +} + +// FailedMessages is a free data retrieval call binding the contract method 0xa4e7f8bd. +// +// Solidity: function failedMessages(bytes32 ) view returns(bool) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) FailedMessages(arg0 [32]byte) (bool, error) { + return _L1CrossDomainMessenger.Contract.FailedMessages(&_L1CrossDomainMessenger.CallOpts, arg0) +} + +// MessageNonce is a free data retrieval call binding the contract method 0xecc70428. +// +// Solidity: function messageNonce() view returns(uint256) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MessageNonce(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "messageNonce") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MessageNonce is a free data retrieval call binding the contract method 0xecc70428. +// +// Solidity: function messageNonce() view returns(uint256) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) MessageNonce() (*big.Int, error) { + return _L1CrossDomainMessenger.Contract.MessageNonce(&_L1CrossDomainMessenger.CallOpts) +} + +// MessageNonce is a free data retrieval call binding the contract method 0xecc70428. +// +// Solidity: function messageNonce() view returns(uint256) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) MessageNonce() (*big.Int, error) { + return _L1CrossDomainMessenger.Contract.MessageNonce(&_L1CrossDomainMessenger.CallOpts) +} + +// SuccessfulMessages is a free data retrieval call binding the contract method 0xb1b1b209. +// +// Solidity: function successfulMessages(bytes32 ) view returns(bool) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) SuccessfulMessages(opts *bind.CallOpts, arg0 [32]byte) (bool, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "successfulMessages", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// SuccessfulMessages is a free data retrieval call binding the contract method 0xb1b1b209. +// +// Solidity: function successfulMessages(bytes32 ) view returns(bool) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) SuccessfulMessages(arg0 [32]byte) (bool, error) { + return _L1CrossDomainMessenger.Contract.SuccessfulMessages(&_L1CrossDomainMessenger.CallOpts, arg0) +} + +// SuccessfulMessages is a free data retrieval call binding the contract method 0xb1b1b209. +// +// Solidity: function successfulMessages(bytes32 ) view returns(bool) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) SuccessfulMessages(arg0 [32]byte) (bool, error) { + return _L1CrossDomainMessenger.Contract.SuccessfulMessages(&_L1CrossDomainMessenger.CallOpts, arg0) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) Version(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "version") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) Version() (string, error) { + return _L1CrossDomainMessenger.Contract.Version(&_L1CrossDomainMessenger.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) Version() (string, error) { + return _L1CrossDomainMessenger.Contract.Version(&_L1CrossDomainMessenger.CallOpts) +} + +// XDomainMessageSender is a free data retrieval call binding the contract method 0x6e296e45. +// +// Solidity: function xDomainMessageSender() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) XDomainMessageSender(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1CrossDomainMessenger.contract.Call(opts, &out, "xDomainMessageSender") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// XDomainMessageSender is a free data retrieval call binding the contract method 0x6e296e45. +// +// Solidity: function xDomainMessageSender() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) XDomainMessageSender() (common.Address, error) { + return _L1CrossDomainMessenger.Contract.XDomainMessageSender(&_L1CrossDomainMessenger.CallOpts) +} + +// XDomainMessageSender is a free data retrieval call binding the contract method 0x6e296e45. +// +// Solidity: function xDomainMessageSender() view returns(address) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) XDomainMessageSender() (common.Address, error) { + return _L1CrossDomainMessenger.Contract.XDomainMessageSender(&_L1CrossDomainMessenger.CallOpts) +} + +// Initialize is a paid mutator transaction binding the contract method 0x8129fc1c. +// +// Solidity: function initialize() returns() +func (_L1CrossDomainMessenger *L1CrossDomainMessengerTransactor) Initialize(opts *bind.TransactOpts) (*types.Transaction, error) { + return _L1CrossDomainMessenger.contract.Transact(opts, "initialize") +} + +// Initialize is a paid mutator transaction binding the contract method 0x8129fc1c. +// +// Solidity: function initialize() returns() +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) Initialize() (*types.Transaction, error) { + return _L1CrossDomainMessenger.Contract.Initialize(&_L1CrossDomainMessenger.TransactOpts) +} + +// Initialize is a paid mutator transaction binding the contract method 0x8129fc1c. +// +// Solidity: function initialize() returns() +func (_L1CrossDomainMessenger *L1CrossDomainMessengerTransactorSession) Initialize() (*types.Transaction, error) { + return _L1CrossDomainMessenger.Contract.Initialize(&_L1CrossDomainMessenger.TransactOpts) +} + +// RelayMessage is a paid mutator transaction binding the contract method 0xd764ad0b. +// +// Solidity: function relayMessage(uint256 _nonce, address _sender, address _target, uint256 _value, uint256 _minGasLimit, bytes _message) payable returns() +func (_L1CrossDomainMessenger *L1CrossDomainMessengerTransactor) RelayMessage(opts *bind.TransactOpts, _nonce *big.Int, _sender common.Address, _target common.Address, _value *big.Int, _minGasLimit *big.Int, _message []byte) (*types.Transaction, error) { + return _L1CrossDomainMessenger.contract.Transact(opts, "relayMessage", _nonce, _sender, _target, _value, _minGasLimit, _message) +} + +// RelayMessage is a paid mutator transaction binding the contract method 0xd764ad0b. +// +// Solidity: function relayMessage(uint256 _nonce, address _sender, address _target, uint256 _value, uint256 _minGasLimit, bytes _message) payable returns() +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) RelayMessage(_nonce *big.Int, _sender common.Address, _target common.Address, _value *big.Int, _minGasLimit *big.Int, _message []byte) (*types.Transaction, error) { + return _L1CrossDomainMessenger.Contract.RelayMessage(&_L1CrossDomainMessenger.TransactOpts, _nonce, _sender, _target, _value, _minGasLimit, _message) +} + +// RelayMessage is a paid mutator transaction binding the contract method 0xd764ad0b. +// +// Solidity: function relayMessage(uint256 _nonce, address _sender, address _target, uint256 _value, uint256 _minGasLimit, bytes _message) payable returns() +func (_L1CrossDomainMessenger *L1CrossDomainMessengerTransactorSession) RelayMessage(_nonce *big.Int, _sender common.Address, _target common.Address, _value *big.Int, _minGasLimit *big.Int, _message []byte) (*types.Transaction, error) { + return _L1CrossDomainMessenger.Contract.RelayMessage(&_L1CrossDomainMessenger.TransactOpts, _nonce, _sender, _target, _value, _minGasLimit, _message) +} + +// SendMessage is a paid mutator transaction binding the contract method 0x3dbb202b. +// +// Solidity: function sendMessage(address _target, bytes _message, uint32 _minGasLimit) payable returns() +func (_L1CrossDomainMessenger *L1CrossDomainMessengerTransactor) SendMessage(opts *bind.TransactOpts, _target common.Address, _message []byte, _minGasLimit uint32) (*types.Transaction, error) { + return _L1CrossDomainMessenger.contract.Transact(opts, "sendMessage", _target, _message, _minGasLimit) +} + +// SendMessage is a paid mutator transaction binding the contract method 0x3dbb202b. +// +// Solidity: function sendMessage(address _target, bytes _message, uint32 _minGasLimit) payable returns() +func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) SendMessage(_target common.Address, _message []byte, _minGasLimit uint32) (*types.Transaction, error) { + return _L1CrossDomainMessenger.Contract.SendMessage(&_L1CrossDomainMessenger.TransactOpts, _target, _message, _minGasLimit) +} + +// SendMessage is a paid mutator transaction binding the contract method 0x3dbb202b. +// +// Solidity: function sendMessage(address _target, bytes _message, uint32 _minGasLimit) payable returns() +func (_L1CrossDomainMessenger *L1CrossDomainMessengerTransactorSession) SendMessage(_target common.Address, _message []byte, _minGasLimit uint32) (*types.Transaction, error) { + return _L1CrossDomainMessenger.Contract.SendMessage(&_L1CrossDomainMessenger.TransactOpts, _target, _message, _minGasLimit) +} + +// L1CrossDomainMessengerFailedRelayedMessageIterator is returned from FilterFailedRelayedMessage and is used to iterate over the raw logs and unpacked data for FailedRelayedMessage events raised by the L1CrossDomainMessenger contract. +type L1CrossDomainMessengerFailedRelayedMessageIterator struct { + Event *L1CrossDomainMessengerFailedRelayedMessage // 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 *L1CrossDomainMessengerFailedRelayedMessageIterator) 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(L1CrossDomainMessengerFailedRelayedMessage) + 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(L1CrossDomainMessengerFailedRelayedMessage) + 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 *L1CrossDomainMessengerFailedRelayedMessageIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1CrossDomainMessengerFailedRelayedMessageIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1CrossDomainMessengerFailedRelayedMessage represents a FailedRelayedMessage event raised by the L1CrossDomainMessenger contract. +type L1CrossDomainMessengerFailedRelayedMessage struct { + MsgHash [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFailedRelayedMessage is a free log retrieval operation binding the contract event 0x99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f. +// +// Solidity: event FailedRelayedMessage(bytes32 indexed msgHash) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) FilterFailedRelayedMessage(opts *bind.FilterOpts, msgHash [][32]byte) (*L1CrossDomainMessengerFailedRelayedMessageIterator, error) { + + var msgHashRule []interface{} + for _, msgHashItem := range msgHash { + msgHashRule = append(msgHashRule, msgHashItem) + } + + logs, sub, err := _L1CrossDomainMessenger.contract.FilterLogs(opts, "FailedRelayedMessage", msgHashRule) + if err != nil { + return nil, err + } + return &L1CrossDomainMessengerFailedRelayedMessageIterator{contract: _L1CrossDomainMessenger.contract, event: "FailedRelayedMessage", logs: logs, sub: sub}, nil +} + +// WatchFailedRelayedMessage is a free log subscription operation binding the contract event 0x99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f. +// +// Solidity: event FailedRelayedMessage(bytes32 indexed msgHash) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) WatchFailedRelayedMessage(opts *bind.WatchOpts, sink chan<- *L1CrossDomainMessengerFailedRelayedMessage, msgHash [][32]byte) (event.Subscription, error) { + + var msgHashRule []interface{} + for _, msgHashItem := range msgHash { + msgHashRule = append(msgHashRule, msgHashItem) + } + + logs, sub, err := _L1CrossDomainMessenger.contract.WatchLogs(opts, "FailedRelayedMessage", msgHashRule) + 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(L1CrossDomainMessengerFailedRelayedMessage) + if err := _L1CrossDomainMessenger.contract.UnpackLog(event, "FailedRelayedMessage", 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 +} + +// ParseFailedRelayedMessage is a log parse operation binding the contract event 0x99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f. +// +// Solidity: event FailedRelayedMessage(bytes32 indexed msgHash) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) ParseFailedRelayedMessage(log types.Log) (*L1CrossDomainMessengerFailedRelayedMessage, error) { + event := new(L1CrossDomainMessengerFailedRelayedMessage) + if err := _L1CrossDomainMessenger.contract.UnpackLog(event, "FailedRelayedMessage", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1CrossDomainMessengerInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the L1CrossDomainMessenger contract. +type L1CrossDomainMessengerInitializedIterator struct { + Event *L1CrossDomainMessengerInitialized // 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 *L1CrossDomainMessengerInitializedIterator) 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(L1CrossDomainMessengerInitialized) + 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(L1CrossDomainMessengerInitialized) + 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 *L1CrossDomainMessengerInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1CrossDomainMessengerInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1CrossDomainMessengerInitialized represents a Initialized event raised by the L1CrossDomainMessenger contract. +type L1CrossDomainMessengerInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) FilterInitialized(opts *bind.FilterOpts) (*L1CrossDomainMessengerInitializedIterator, error) { + + logs, sub, err := _L1CrossDomainMessenger.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &L1CrossDomainMessengerInitializedIterator{contract: _L1CrossDomainMessenger.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *L1CrossDomainMessengerInitialized) (event.Subscription, error) { + + logs, sub, err := _L1CrossDomainMessenger.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(L1CrossDomainMessengerInitialized) + if err := _L1CrossDomainMessenger.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) ParseInitialized(log types.Log) (*L1CrossDomainMessengerInitialized, error) { + event := new(L1CrossDomainMessengerInitialized) + if err := _L1CrossDomainMessenger.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1CrossDomainMessengerRelayedMessageIterator is returned from FilterRelayedMessage and is used to iterate over the raw logs and unpacked data for RelayedMessage events raised by the L1CrossDomainMessenger contract. +type L1CrossDomainMessengerRelayedMessageIterator struct { + Event *L1CrossDomainMessengerRelayedMessage // 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 *L1CrossDomainMessengerRelayedMessageIterator) 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(L1CrossDomainMessengerRelayedMessage) + 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(L1CrossDomainMessengerRelayedMessage) + 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 *L1CrossDomainMessengerRelayedMessageIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1CrossDomainMessengerRelayedMessageIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1CrossDomainMessengerRelayedMessage represents a RelayedMessage event raised by the L1CrossDomainMessenger contract. +type L1CrossDomainMessengerRelayedMessage struct { + MsgHash [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRelayedMessage is a free log retrieval operation binding the contract event 0x4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c. +// +// Solidity: event RelayedMessage(bytes32 indexed msgHash) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) FilterRelayedMessage(opts *bind.FilterOpts, msgHash [][32]byte) (*L1CrossDomainMessengerRelayedMessageIterator, error) { + + var msgHashRule []interface{} + for _, msgHashItem := range msgHash { + msgHashRule = append(msgHashRule, msgHashItem) + } + + logs, sub, err := _L1CrossDomainMessenger.contract.FilterLogs(opts, "RelayedMessage", msgHashRule) + if err != nil { + return nil, err + } + return &L1CrossDomainMessengerRelayedMessageIterator{contract: _L1CrossDomainMessenger.contract, event: "RelayedMessage", logs: logs, sub: sub}, nil +} + +// WatchRelayedMessage is a free log subscription operation binding the contract event 0x4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c. +// +// Solidity: event RelayedMessage(bytes32 indexed msgHash) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) WatchRelayedMessage(opts *bind.WatchOpts, sink chan<- *L1CrossDomainMessengerRelayedMessage, msgHash [][32]byte) (event.Subscription, error) { + + var msgHashRule []interface{} + for _, msgHashItem := range msgHash { + msgHashRule = append(msgHashRule, msgHashItem) + } + + logs, sub, err := _L1CrossDomainMessenger.contract.WatchLogs(opts, "RelayedMessage", msgHashRule) + 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(L1CrossDomainMessengerRelayedMessage) + if err := _L1CrossDomainMessenger.contract.UnpackLog(event, "RelayedMessage", 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 +} + +// ParseRelayedMessage is a log parse operation binding the contract event 0x4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c. +// +// Solidity: event RelayedMessage(bytes32 indexed msgHash) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) ParseRelayedMessage(log types.Log) (*L1CrossDomainMessengerRelayedMessage, error) { + event := new(L1CrossDomainMessengerRelayedMessage) + if err := _L1CrossDomainMessenger.contract.UnpackLog(event, "RelayedMessage", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1CrossDomainMessengerSentMessageIterator is returned from FilterSentMessage and is used to iterate over the raw logs and unpacked data for SentMessage events raised by the L1CrossDomainMessenger contract. +type L1CrossDomainMessengerSentMessageIterator struct { + Event *L1CrossDomainMessengerSentMessage // 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 *L1CrossDomainMessengerSentMessageIterator) 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(L1CrossDomainMessengerSentMessage) + 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(L1CrossDomainMessengerSentMessage) + 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 *L1CrossDomainMessengerSentMessageIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1CrossDomainMessengerSentMessageIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1CrossDomainMessengerSentMessage represents a SentMessage event raised by the L1CrossDomainMessenger contract. +type L1CrossDomainMessengerSentMessage struct { + Target common.Address + Sender common.Address + Message []byte + MessageNonce *big.Int + GasLimit *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSentMessage is a free log retrieval operation binding the contract event 0xcb0f7ffd78f9aee47a248fae8db181db6eee833039123e026dcbff529522e52a. +// +// Solidity: event SentMessage(address indexed target, address sender, bytes message, uint256 messageNonce, uint256 gasLimit) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) FilterSentMessage(opts *bind.FilterOpts, target []common.Address) (*L1CrossDomainMessengerSentMessageIterator, error) { + + var targetRule []interface{} + for _, targetItem := range target { + targetRule = append(targetRule, targetItem) + } + + logs, sub, err := _L1CrossDomainMessenger.contract.FilterLogs(opts, "SentMessage", targetRule) + if err != nil { + return nil, err + } + return &L1CrossDomainMessengerSentMessageIterator{contract: _L1CrossDomainMessenger.contract, event: "SentMessage", logs: logs, sub: sub}, nil +} + +// WatchSentMessage is a free log subscription operation binding the contract event 0xcb0f7ffd78f9aee47a248fae8db181db6eee833039123e026dcbff529522e52a. +// +// Solidity: event SentMessage(address indexed target, address sender, bytes message, uint256 messageNonce, uint256 gasLimit) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) WatchSentMessage(opts *bind.WatchOpts, sink chan<- *L1CrossDomainMessengerSentMessage, target []common.Address) (event.Subscription, error) { + + var targetRule []interface{} + for _, targetItem := range target { + targetRule = append(targetRule, targetItem) + } + + logs, sub, err := _L1CrossDomainMessenger.contract.WatchLogs(opts, "SentMessage", targetRule) + 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(L1CrossDomainMessengerSentMessage) + if err := _L1CrossDomainMessenger.contract.UnpackLog(event, "SentMessage", 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 +} + +// ParseSentMessage is a log parse operation binding the contract event 0xcb0f7ffd78f9aee47a248fae8db181db6eee833039123e026dcbff529522e52a. +// +// Solidity: event SentMessage(address indexed target, address sender, bytes message, uint256 messageNonce, uint256 gasLimit) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) ParseSentMessage(log types.Log) (*L1CrossDomainMessengerSentMessage, error) { + event := new(L1CrossDomainMessengerSentMessage) + if err := _L1CrossDomainMessenger.contract.UnpackLog(event, "SentMessage", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1CrossDomainMessengerSentMessageExtension1Iterator is returned from FilterSentMessageExtension1 and is used to iterate over the raw logs and unpacked data for SentMessageExtension1 events raised by the L1CrossDomainMessenger contract. +type L1CrossDomainMessengerSentMessageExtension1Iterator struct { + Event *L1CrossDomainMessengerSentMessageExtension1 // 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 *L1CrossDomainMessengerSentMessageExtension1Iterator) 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(L1CrossDomainMessengerSentMessageExtension1) + 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(L1CrossDomainMessengerSentMessageExtension1) + 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 *L1CrossDomainMessengerSentMessageExtension1Iterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1CrossDomainMessengerSentMessageExtension1Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1CrossDomainMessengerSentMessageExtension1 represents a SentMessageExtension1 event raised by the L1CrossDomainMessenger contract. +type L1CrossDomainMessengerSentMessageExtension1 struct { + Sender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSentMessageExtension1 is a free log retrieval operation binding the contract event 0x8ebb2ec2465bdb2a06a66fc37a0963af8a2a6a1479d81d56fdb8cbb98096d546. +// +// Solidity: event SentMessageExtension1(address indexed sender, uint256 value) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) FilterSentMessageExtension1(opts *bind.FilterOpts, sender []common.Address) (*L1CrossDomainMessengerSentMessageExtension1Iterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _L1CrossDomainMessenger.contract.FilterLogs(opts, "SentMessageExtension1", senderRule) + if err != nil { + return nil, err + } + return &L1CrossDomainMessengerSentMessageExtension1Iterator{contract: _L1CrossDomainMessenger.contract, event: "SentMessageExtension1", logs: logs, sub: sub}, nil +} + +// WatchSentMessageExtension1 is a free log subscription operation binding the contract event 0x8ebb2ec2465bdb2a06a66fc37a0963af8a2a6a1479d81d56fdb8cbb98096d546. +// +// Solidity: event SentMessageExtension1(address indexed sender, uint256 value) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) WatchSentMessageExtension1(opts *bind.WatchOpts, sink chan<- *L1CrossDomainMessengerSentMessageExtension1, sender []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _L1CrossDomainMessenger.contract.WatchLogs(opts, "SentMessageExtension1", senderRule) + 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(L1CrossDomainMessengerSentMessageExtension1) + if err := _L1CrossDomainMessenger.contract.UnpackLog(event, "SentMessageExtension1", 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 +} + +// ParseSentMessageExtension1 is a log parse operation binding the contract event 0x8ebb2ec2465bdb2a06a66fc37a0963af8a2a6a1479d81d56fdb8cbb98096d546. +// +// Solidity: event SentMessageExtension1(address indexed sender, uint256 value) +func (_L1CrossDomainMessenger *L1CrossDomainMessengerFilterer) ParseSentMessageExtension1(log types.Log) (*L1CrossDomainMessengerSentMessageExtension1, error) { + event := new(L1CrossDomainMessengerSentMessageExtension1) + if err := _L1CrossDomainMessenger.contract.UnpackLog(event, "SentMessageExtension1", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/op-chain-ops/opbnb-upgrades/old-contracts/bindings/L1ERC721Bridge.go b/op-chain-ops/opbnb-upgrades/old-contracts/bindings/L1ERC721Bridge.go new file mode 100644 index 000000000..3889f9afe --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/old-contracts/bindings/L1ERC721Bridge.go @@ -0,0 +1,760 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// L1ERC721BridgeMetaData contains all meta data concerning the L1ERC721Bridge contract. +var L1ERC721BridgeMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_messenger\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_otherBridge\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"MESSENGER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractCrossDomainMessenger\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"OTHER_BRIDGE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"bridgeERC721\",\"inputs\":[{\"name\":\"_localToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_remoteToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_tokenId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"bridgeERC721To\",\"inputs\":[{\"name\":\"_localToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_remoteToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_tokenId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"deposits\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"finalizeBridgeERC721\",\"inputs\":[{\"name\":\"_localToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_remoteToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_tokenId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"messenger\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractCrossDomainMessenger\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"otherBridge\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"ERC721BridgeFinalized\",\"inputs\":[{\"name\":\"localToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"remoteToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"extraData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ERC721BridgeInitiated\",\"inputs\":[{\"name\":\"localToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"remoteToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"extraData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false}]", +} + +// L1ERC721BridgeABI is the input ABI used to generate the binding from. +// Deprecated: Use L1ERC721BridgeMetaData.ABI instead. +var L1ERC721BridgeABI = L1ERC721BridgeMetaData.ABI + +// L1ERC721Bridge is an auto generated Go binding around an Ethereum contract. +type L1ERC721Bridge struct { + L1ERC721BridgeCaller // Read-only binding to the contract + L1ERC721BridgeTransactor // Write-only binding to the contract + L1ERC721BridgeFilterer // Log filterer for contract events +} + +// L1ERC721BridgeCaller is an auto generated read-only Go binding around an Ethereum contract. +type L1ERC721BridgeCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L1ERC721BridgeTransactor is an auto generated write-only Go binding around an Ethereum contract. +type L1ERC721BridgeTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L1ERC721BridgeFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type L1ERC721BridgeFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L1ERC721BridgeSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type L1ERC721BridgeSession struct { + Contract *L1ERC721Bridge // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// L1ERC721BridgeCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type L1ERC721BridgeCallerSession struct { + Contract *L1ERC721BridgeCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// L1ERC721BridgeTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type L1ERC721BridgeTransactorSession struct { + Contract *L1ERC721BridgeTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// L1ERC721BridgeRaw is an auto generated low-level Go binding around an Ethereum contract. +type L1ERC721BridgeRaw struct { + Contract *L1ERC721Bridge // Generic contract binding to access the raw methods on +} + +// L1ERC721BridgeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type L1ERC721BridgeCallerRaw struct { + Contract *L1ERC721BridgeCaller // Generic read-only contract binding to access the raw methods on +} + +// L1ERC721BridgeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type L1ERC721BridgeTransactorRaw struct { + Contract *L1ERC721BridgeTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewL1ERC721Bridge creates a new instance of L1ERC721Bridge, bound to a specific deployed contract. +func NewL1ERC721Bridge(address common.Address, backend bind.ContractBackend) (*L1ERC721Bridge, error) { + contract, err := bindL1ERC721Bridge(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &L1ERC721Bridge{L1ERC721BridgeCaller: L1ERC721BridgeCaller{contract: contract}, L1ERC721BridgeTransactor: L1ERC721BridgeTransactor{contract: contract}, L1ERC721BridgeFilterer: L1ERC721BridgeFilterer{contract: contract}}, nil +} + +// NewL1ERC721BridgeCaller creates a new read-only instance of L1ERC721Bridge, bound to a specific deployed contract. +func NewL1ERC721BridgeCaller(address common.Address, caller bind.ContractCaller) (*L1ERC721BridgeCaller, error) { + contract, err := bindL1ERC721Bridge(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &L1ERC721BridgeCaller{contract: contract}, nil +} + +// NewL1ERC721BridgeTransactor creates a new write-only instance of L1ERC721Bridge, bound to a specific deployed contract. +func NewL1ERC721BridgeTransactor(address common.Address, transactor bind.ContractTransactor) (*L1ERC721BridgeTransactor, error) { + contract, err := bindL1ERC721Bridge(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &L1ERC721BridgeTransactor{contract: contract}, nil +} + +// NewL1ERC721BridgeFilterer creates a new log filterer instance of L1ERC721Bridge, bound to a specific deployed contract. +func NewL1ERC721BridgeFilterer(address common.Address, filterer bind.ContractFilterer) (*L1ERC721BridgeFilterer, error) { + contract, err := bindL1ERC721Bridge(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &L1ERC721BridgeFilterer{contract: contract}, nil +} + +// bindL1ERC721Bridge binds a generic wrapper to an already deployed contract. +func bindL1ERC721Bridge(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := L1ERC721BridgeMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_L1ERC721Bridge *L1ERC721BridgeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _L1ERC721Bridge.Contract.L1ERC721BridgeCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_L1ERC721Bridge *L1ERC721BridgeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _L1ERC721Bridge.Contract.L1ERC721BridgeTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_L1ERC721Bridge *L1ERC721BridgeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _L1ERC721Bridge.Contract.L1ERC721BridgeTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_L1ERC721Bridge *L1ERC721BridgeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _L1ERC721Bridge.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_L1ERC721Bridge *L1ERC721BridgeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _L1ERC721Bridge.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_L1ERC721Bridge *L1ERC721BridgeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _L1ERC721Bridge.Contract.contract.Transact(opts, method, params...) +} + +// MESSENGER is a free data retrieval call binding the contract method 0x927ede2d. +// +// Solidity: function MESSENGER() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeCaller) MESSENGER(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1ERC721Bridge.contract.Call(opts, &out, "MESSENGER") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// MESSENGER is a free data retrieval call binding the contract method 0x927ede2d. +// +// Solidity: function MESSENGER() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeSession) MESSENGER() (common.Address, error) { + return _L1ERC721Bridge.Contract.MESSENGER(&_L1ERC721Bridge.CallOpts) +} + +// MESSENGER is a free data retrieval call binding the contract method 0x927ede2d. +// +// Solidity: function MESSENGER() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeCallerSession) MESSENGER() (common.Address, error) { + return _L1ERC721Bridge.Contract.MESSENGER(&_L1ERC721Bridge.CallOpts) +} + +// OTHERBRIDGE is a free data retrieval call binding the contract method 0x7f46ddb2. +// +// Solidity: function OTHER_BRIDGE() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeCaller) OTHERBRIDGE(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1ERC721Bridge.contract.Call(opts, &out, "OTHER_BRIDGE") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// OTHERBRIDGE is a free data retrieval call binding the contract method 0x7f46ddb2. +// +// Solidity: function OTHER_BRIDGE() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeSession) OTHERBRIDGE() (common.Address, error) { + return _L1ERC721Bridge.Contract.OTHERBRIDGE(&_L1ERC721Bridge.CallOpts) +} + +// OTHERBRIDGE is a free data retrieval call binding the contract method 0x7f46ddb2. +// +// Solidity: function OTHER_BRIDGE() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeCallerSession) OTHERBRIDGE() (common.Address, error) { + return _L1ERC721Bridge.Contract.OTHERBRIDGE(&_L1ERC721Bridge.CallOpts) +} + +// Deposits is a free data retrieval call binding the contract method 0x5d93a3fc. +// +// Solidity: function deposits(address , address , uint256 ) view returns(bool) +func (_L1ERC721Bridge *L1ERC721BridgeCaller) Deposits(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address, arg2 *big.Int) (bool, error) { + var out []interface{} + err := _L1ERC721Bridge.contract.Call(opts, &out, "deposits", arg0, arg1, arg2) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Deposits is a free data retrieval call binding the contract method 0x5d93a3fc. +// +// Solidity: function deposits(address , address , uint256 ) view returns(bool) +func (_L1ERC721Bridge *L1ERC721BridgeSession) Deposits(arg0 common.Address, arg1 common.Address, arg2 *big.Int) (bool, error) { + return _L1ERC721Bridge.Contract.Deposits(&_L1ERC721Bridge.CallOpts, arg0, arg1, arg2) +} + +// Deposits is a free data retrieval call binding the contract method 0x5d93a3fc. +// +// Solidity: function deposits(address , address , uint256 ) view returns(bool) +func (_L1ERC721Bridge *L1ERC721BridgeCallerSession) Deposits(arg0 common.Address, arg1 common.Address, arg2 *big.Int) (bool, error) { + return _L1ERC721Bridge.Contract.Deposits(&_L1ERC721Bridge.CallOpts, arg0, arg1, arg2) +} + +// Messenger is a free data retrieval call binding the contract method 0x3cb747bf. +// +// Solidity: function messenger() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeCaller) Messenger(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1ERC721Bridge.contract.Call(opts, &out, "messenger") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Messenger is a free data retrieval call binding the contract method 0x3cb747bf. +// +// Solidity: function messenger() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeSession) Messenger() (common.Address, error) { + return _L1ERC721Bridge.Contract.Messenger(&_L1ERC721Bridge.CallOpts) +} + +// Messenger is a free data retrieval call binding the contract method 0x3cb747bf. +// +// Solidity: function messenger() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeCallerSession) Messenger() (common.Address, error) { + return _L1ERC721Bridge.Contract.Messenger(&_L1ERC721Bridge.CallOpts) +} + +// OtherBridge is a free data retrieval call binding the contract method 0xc89701a2. +// +// Solidity: function otherBridge() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeCaller) OtherBridge(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1ERC721Bridge.contract.Call(opts, &out, "otherBridge") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// OtherBridge is a free data retrieval call binding the contract method 0xc89701a2. +// +// Solidity: function otherBridge() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeSession) OtherBridge() (common.Address, error) { + return _L1ERC721Bridge.Contract.OtherBridge(&_L1ERC721Bridge.CallOpts) +} + +// OtherBridge is a free data retrieval call binding the contract method 0xc89701a2. +// +// Solidity: function otherBridge() view returns(address) +func (_L1ERC721Bridge *L1ERC721BridgeCallerSession) OtherBridge() (common.Address, error) { + return _L1ERC721Bridge.Contract.OtherBridge(&_L1ERC721Bridge.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L1ERC721Bridge *L1ERC721BridgeCaller) Version(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _L1ERC721Bridge.contract.Call(opts, &out, "version") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L1ERC721Bridge *L1ERC721BridgeSession) Version() (string, error) { + return _L1ERC721Bridge.Contract.Version(&_L1ERC721Bridge.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L1ERC721Bridge *L1ERC721BridgeCallerSession) Version() (string, error) { + return _L1ERC721Bridge.Contract.Version(&_L1ERC721Bridge.CallOpts) +} + +// BridgeERC721 is a paid mutator transaction binding the contract method 0x3687011a. +// +// Solidity: function bridgeERC721(address _localToken, address _remoteToken, uint256 _tokenId, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1ERC721Bridge *L1ERC721BridgeTransactor) BridgeERC721(opts *bind.TransactOpts, _localToken common.Address, _remoteToken common.Address, _tokenId *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1ERC721Bridge.contract.Transact(opts, "bridgeERC721", _localToken, _remoteToken, _tokenId, _minGasLimit, _extraData) +} + +// BridgeERC721 is a paid mutator transaction binding the contract method 0x3687011a. +// +// Solidity: function bridgeERC721(address _localToken, address _remoteToken, uint256 _tokenId, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1ERC721Bridge *L1ERC721BridgeSession) BridgeERC721(_localToken common.Address, _remoteToken common.Address, _tokenId *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1ERC721Bridge.Contract.BridgeERC721(&_L1ERC721Bridge.TransactOpts, _localToken, _remoteToken, _tokenId, _minGasLimit, _extraData) +} + +// BridgeERC721 is a paid mutator transaction binding the contract method 0x3687011a. +// +// Solidity: function bridgeERC721(address _localToken, address _remoteToken, uint256 _tokenId, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1ERC721Bridge *L1ERC721BridgeTransactorSession) BridgeERC721(_localToken common.Address, _remoteToken common.Address, _tokenId *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1ERC721Bridge.Contract.BridgeERC721(&_L1ERC721Bridge.TransactOpts, _localToken, _remoteToken, _tokenId, _minGasLimit, _extraData) +} + +// BridgeERC721To is a paid mutator transaction binding the contract method 0xaa557452. +// +// Solidity: function bridgeERC721To(address _localToken, address _remoteToken, address _to, uint256 _tokenId, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1ERC721Bridge *L1ERC721BridgeTransactor) BridgeERC721To(opts *bind.TransactOpts, _localToken common.Address, _remoteToken common.Address, _to common.Address, _tokenId *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1ERC721Bridge.contract.Transact(opts, "bridgeERC721To", _localToken, _remoteToken, _to, _tokenId, _minGasLimit, _extraData) +} + +// BridgeERC721To is a paid mutator transaction binding the contract method 0xaa557452. +// +// Solidity: function bridgeERC721To(address _localToken, address _remoteToken, address _to, uint256 _tokenId, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1ERC721Bridge *L1ERC721BridgeSession) BridgeERC721To(_localToken common.Address, _remoteToken common.Address, _to common.Address, _tokenId *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1ERC721Bridge.Contract.BridgeERC721To(&_L1ERC721Bridge.TransactOpts, _localToken, _remoteToken, _to, _tokenId, _minGasLimit, _extraData) +} + +// BridgeERC721To is a paid mutator transaction binding the contract method 0xaa557452. +// +// Solidity: function bridgeERC721To(address _localToken, address _remoteToken, address _to, uint256 _tokenId, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1ERC721Bridge *L1ERC721BridgeTransactorSession) BridgeERC721To(_localToken common.Address, _remoteToken common.Address, _to common.Address, _tokenId *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1ERC721Bridge.Contract.BridgeERC721To(&_L1ERC721Bridge.TransactOpts, _localToken, _remoteToken, _to, _tokenId, _minGasLimit, _extraData) +} + +// FinalizeBridgeERC721 is a paid mutator transaction binding the contract method 0x761f4493. +// +// Solidity: function finalizeBridgeERC721(address _localToken, address _remoteToken, address _from, address _to, uint256 _tokenId, bytes _extraData) returns() +func (_L1ERC721Bridge *L1ERC721BridgeTransactor) FinalizeBridgeERC721(opts *bind.TransactOpts, _localToken common.Address, _remoteToken common.Address, _from common.Address, _to common.Address, _tokenId *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1ERC721Bridge.contract.Transact(opts, "finalizeBridgeERC721", _localToken, _remoteToken, _from, _to, _tokenId, _extraData) +} + +// FinalizeBridgeERC721 is a paid mutator transaction binding the contract method 0x761f4493. +// +// Solidity: function finalizeBridgeERC721(address _localToken, address _remoteToken, address _from, address _to, uint256 _tokenId, bytes _extraData) returns() +func (_L1ERC721Bridge *L1ERC721BridgeSession) FinalizeBridgeERC721(_localToken common.Address, _remoteToken common.Address, _from common.Address, _to common.Address, _tokenId *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1ERC721Bridge.Contract.FinalizeBridgeERC721(&_L1ERC721Bridge.TransactOpts, _localToken, _remoteToken, _from, _to, _tokenId, _extraData) +} + +// FinalizeBridgeERC721 is a paid mutator transaction binding the contract method 0x761f4493. +// +// Solidity: function finalizeBridgeERC721(address _localToken, address _remoteToken, address _from, address _to, uint256 _tokenId, bytes _extraData) returns() +func (_L1ERC721Bridge *L1ERC721BridgeTransactorSession) FinalizeBridgeERC721(_localToken common.Address, _remoteToken common.Address, _from common.Address, _to common.Address, _tokenId *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1ERC721Bridge.Contract.FinalizeBridgeERC721(&_L1ERC721Bridge.TransactOpts, _localToken, _remoteToken, _from, _to, _tokenId, _extraData) +} + +// L1ERC721BridgeERC721BridgeFinalizedIterator is returned from FilterERC721BridgeFinalized and is used to iterate over the raw logs and unpacked data for ERC721BridgeFinalized events raised by the L1ERC721Bridge contract. +type L1ERC721BridgeERC721BridgeFinalizedIterator struct { + Event *L1ERC721BridgeERC721BridgeFinalized // 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 *L1ERC721BridgeERC721BridgeFinalizedIterator) 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(L1ERC721BridgeERC721BridgeFinalized) + 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(L1ERC721BridgeERC721BridgeFinalized) + 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 *L1ERC721BridgeERC721BridgeFinalizedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1ERC721BridgeERC721BridgeFinalizedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1ERC721BridgeERC721BridgeFinalized represents a ERC721BridgeFinalized event raised by the L1ERC721Bridge contract. +type L1ERC721BridgeERC721BridgeFinalized struct { + LocalToken common.Address + RemoteToken common.Address + From common.Address + To common.Address + TokenId *big.Int + ExtraData []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterERC721BridgeFinalized is a free log retrieval operation binding the contract event 0x1f39bf6707b5d608453e0ae4c067b562bcc4c85c0f562ef5d2c774d2e7f131ac. +// +// Solidity: event ERC721BridgeFinalized(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 tokenId, bytes extraData) +func (_L1ERC721Bridge *L1ERC721BridgeFilterer) FilterERC721BridgeFinalized(opts *bind.FilterOpts, localToken []common.Address, remoteToken []common.Address, from []common.Address) (*L1ERC721BridgeERC721BridgeFinalizedIterator, error) { + + var localTokenRule []interface{} + for _, localTokenItem := range localToken { + localTokenRule = append(localTokenRule, localTokenItem) + } + var remoteTokenRule []interface{} + for _, remoteTokenItem := range remoteToken { + remoteTokenRule = append(remoteTokenRule, remoteTokenItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _L1ERC721Bridge.contract.FilterLogs(opts, "ERC721BridgeFinalized", localTokenRule, remoteTokenRule, fromRule) + if err != nil { + return nil, err + } + return &L1ERC721BridgeERC721BridgeFinalizedIterator{contract: _L1ERC721Bridge.contract, event: "ERC721BridgeFinalized", logs: logs, sub: sub}, nil +} + +// WatchERC721BridgeFinalized is a free log subscription operation binding the contract event 0x1f39bf6707b5d608453e0ae4c067b562bcc4c85c0f562ef5d2c774d2e7f131ac. +// +// Solidity: event ERC721BridgeFinalized(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 tokenId, bytes extraData) +func (_L1ERC721Bridge *L1ERC721BridgeFilterer) WatchERC721BridgeFinalized(opts *bind.WatchOpts, sink chan<- *L1ERC721BridgeERC721BridgeFinalized, localToken []common.Address, remoteToken []common.Address, from []common.Address) (event.Subscription, error) { + + var localTokenRule []interface{} + for _, localTokenItem := range localToken { + localTokenRule = append(localTokenRule, localTokenItem) + } + var remoteTokenRule []interface{} + for _, remoteTokenItem := range remoteToken { + remoteTokenRule = append(remoteTokenRule, remoteTokenItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _L1ERC721Bridge.contract.WatchLogs(opts, "ERC721BridgeFinalized", localTokenRule, remoteTokenRule, fromRule) + 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(L1ERC721BridgeERC721BridgeFinalized) + if err := _L1ERC721Bridge.contract.UnpackLog(event, "ERC721BridgeFinalized", 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 +} + +// ParseERC721BridgeFinalized is a log parse operation binding the contract event 0x1f39bf6707b5d608453e0ae4c067b562bcc4c85c0f562ef5d2c774d2e7f131ac. +// +// Solidity: event ERC721BridgeFinalized(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 tokenId, bytes extraData) +func (_L1ERC721Bridge *L1ERC721BridgeFilterer) ParseERC721BridgeFinalized(log types.Log) (*L1ERC721BridgeERC721BridgeFinalized, error) { + event := new(L1ERC721BridgeERC721BridgeFinalized) + if err := _L1ERC721Bridge.contract.UnpackLog(event, "ERC721BridgeFinalized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1ERC721BridgeERC721BridgeInitiatedIterator is returned from FilterERC721BridgeInitiated and is used to iterate over the raw logs and unpacked data for ERC721BridgeInitiated events raised by the L1ERC721Bridge contract. +type L1ERC721BridgeERC721BridgeInitiatedIterator struct { + Event *L1ERC721BridgeERC721BridgeInitiated // 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 *L1ERC721BridgeERC721BridgeInitiatedIterator) 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(L1ERC721BridgeERC721BridgeInitiated) + 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(L1ERC721BridgeERC721BridgeInitiated) + 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 *L1ERC721BridgeERC721BridgeInitiatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1ERC721BridgeERC721BridgeInitiatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1ERC721BridgeERC721BridgeInitiated represents a ERC721BridgeInitiated event raised by the L1ERC721Bridge contract. +type L1ERC721BridgeERC721BridgeInitiated struct { + LocalToken common.Address + RemoteToken common.Address + From common.Address + To common.Address + TokenId *big.Int + ExtraData []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterERC721BridgeInitiated is a free log retrieval operation binding the contract event 0xb7460e2a880f256ebef3406116ff3eee0cee51ebccdc2a40698f87ebb2e9c1a5. +// +// Solidity: event ERC721BridgeInitiated(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 tokenId, bytes extraData) +func (_L1ERC721Bridge *L1ERC721BridgeFilterer) FilterERC721BridgeInitiated(opts *bind.FilterOpts, localToken []common.Address, remoteToken []common.Address, from []common.Address) (*L1ERC721BridgeERC721BridgeInitiatedIterator, error) { + + var localTokenRule []interface{} + for _, localTokenItem := range localToken { + localTokenRule = append(localTokenRule, localTokenItem) + } + var remoteTokenRule []interface{} + for _, remoteTokenItem := range remoteToken { + remoteTokenRule = append(remoteTokenRule, remoteTokenItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _L1ERC721Bridge.contract.FilterLogs(opts, "ERC721BridgeInitiated", localTokenRule, remoteTokenRule, fromRule) + if err != nil { + return nil, err + } + return &L1ERC721BridgeERC721BridgeInitiatedIterator{contract: _L1ERC721Bridge.contract, event: "ERC721BridgeInitiated", logs: logs, sub: sub}, nil +} + +// WatchERC721BridgeInitiated is a free log subscription operation binding the contract event 0xb7460e2a880f256ebef3406116ff3eee0cee51ebccdc2a40698f87ebb2e9c1a5. +// +// Solidity: event ERC721BridgeInitiated(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 tokenId, bytes extraData) +func (_L1ERC721Bridge *L1ERC721BridgeFilterer) WatchERC721BridgeInitiated(opts *bind.WatchOpts, sink chan<- *L1ERC721BridgeERC721BridgeInitiated, localToken []common.Address, remoteToken []common.Address, from []common.Address) (event.Subscription, error) { + + var localTokenRule []interface{} + for _, localTokenItem := range localToken { + localTokenRule = append(localTokenRule, localTokenItem) + } + var remoteTokenRule []interface{} + for _, remoteTokenItem := range remoteToken { + remoteTokenRule = append(remoteTokenRule, remoteTokenItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _L1ERC721Bridge.contract.WatchLogs(opts, "ERC721BridgeInitiated", localTokenRule, remoteTokenRule, fromRule) + 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(L1ERC721BridgeERC721BridgeInitiated) + if err := _L1ERC721Bridge.contract.UnpackLog(event, "ERC721BridgeInitiated", 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 +} + +// ParseERC721BridgeInitiated is a log parse operation binding the contract event 0xb7460e2a880f256ebef3406116ff3eee0cee51ebccdc2a40698f87ebb2e9c1a5. +// +// Solidity: event ERC721BridgeInitiated(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 tokenId, bytes extraData) +func (_L1ERC721Bridge *L1ERC721BridgeFilterer) ParseERC721BridgeInitiated(log types.Log) (*L1ERC721BridgeERC721BridgeInitiated, error) { + event := new(L1ERC721BridgeERC721BridgeInitiated) + if err := _L1ERC721Bridge.contract.UnpackLog(event, "ERC721BridgeInitiated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/op-chain-ops/opbnb-upgrades/old-contracts/bindings/L1StandardBridge.go b/op-chain-ops/opbnb-upgrades/old-contracts/bindings/L1StandardBridge.go new file mode 100644 index 000000000..94fbc9812 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/old-contracts/bindings/L1StandardBridge.go @@ -0,0 +1,1920 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// L1StandardBridgeMetaData contains all meta data concerning the L1StandardBridge contract. +var L1StandardBridgeMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_messenger\",\"type\":\"address\",\"internalType\":\"addresspayable\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"MESSENGER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractCrossDomainMessenger\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"OTHER_BRIDGE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractStandardBridge\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"bridgeERC20\",\"inputs\":[{\"name\":\"_localToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_remoteToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"bridgeERC20To\",\"inputs\":[{\"name\":\"_localToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_remoteToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"bridgeETH\",\"inputs\":[{\"name\":\"_minGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"bridgeETHTo\",\"inputs\":[{\"name\":\"_to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_minGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"depositERC20\",\"inputs\":[{\"name\":\"_l1Token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_l2Token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"depositERC20To\",\"inputs\":[{\"name\":\"_l1Token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_l2Token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"depositETH\",\"inputs\":[{\"name\":\"_minGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"depositETHTo\",\"inputs\":[{\"name\":\"_to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_minGasLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"deposits\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"finalizeBridgeERC20\",\"inputs\":[{\"name\":\"_localToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_remoteToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"finalizeBridgeETH\",\"inputs\":[{\"name\":\"_from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"finalizeERC20Withdrawal\",\"inputs\":[{\"name\":\"_l1Token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_l2Token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"finalizeETHWithdrawal\",\"inputs\":[{\"name\":\"_from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"l2TokenBridge\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"messenger\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractCrossDomainMessenger\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"ERC20BridgeFinalized\",\"inputs\":[{\"name\":\"localToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"remoteToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"extraData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ERC20BridgeInitiated\",\"inputs\":[{\"name\":\"localToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"remoteToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"extraData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ERC20DepositInitiated\",\"inputs\":[{\"name\":\"l1Token\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"l2Token\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"extraData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ERC20WithdrawalFinalized\",\"inputs\":[{\"name\":\"l1Token\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"l2Token\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"extraData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ETHBridgeFinalized\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"extraData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ETHBridgeInitiated\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"extraData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ETHDepositInitiated\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"extraData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ETHWithdrawalFinalized\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"extraData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false}]", +} + +// L1StandardBridgeABI is the input ABI used to generate the binding from. +// Deprecated: Use L1StandardBridgeMetaData.ABI instead. +var L1StandardBridgeABI = L1StandardBridgeMetaData.ABI + +// L1StandardBridge is an auto generated Go binding around an Ethereum contract. +type L1StandardBridge struct { + L1StandardBridgeCaller // Read-only binding to the contract + L1StandardBridgeTransactor // Write-only binding to the contract + L1StandardBridgeFilterer // Log filterer for contract events +} + +// L1StandardBridgeCaller is an auto generated read-only Go binding around an Ethereum contract. +type L1StandardBridgeCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L1StandardBridgeTransactor is an auto generated write-only Go binding around an Ethereum contract. +type L1StandardBridgeTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L1StandardBridgeFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type L1StandardBridgeFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L1StandardBridgeSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type L1StandardBridgeSession struct { + Contract *L1StandardBridge // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// L1StandardBridgeCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type L1StandardBridgeCallerSession struct { + Contract *L1StandardBridgeCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// L1StandardBridgeTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type L1StandardBridgeTransactorSession struct { + Contract *L1StandardBridgeTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// L1StandardBridgeRaw is an auto generated low-level Go binding around an Ethereum contract. +type L1StandardBridgeRaw struct { + Contract *L1StandardBridge // Generic contract binding to access the raw methods on +} + +// L1StandardBridgeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type L1StandardBridgeCallerRaw struct { + Contract *L1StandardBridgeCaller // Generic read-only contract binding to access the raw methods on +} + +// L1StandardBridgeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type L1StandardBridgeTransactorRaw struct { + Contract *L1StandardBridgeTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewL1StandardBridge creates a new instance of L1StandardBridge, bound to a specific deployed contract. +func NewL1StandardBridge(address common.Address, backend bind.ContractBackend) (*L1StandardBridge, error) { + contract, err := bindL1StandardBridge(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &L1StandardBridge{L1StandardBridgeCaller: L1StandardBridgeCaller{contract: contract}, L1StandardBridgeTransactor: L1StandardBridgeTransactor{contract: contract}, L1StandardBridgeFilterer: L1StandardBridgeFilterer{contract: contract}}, nil +} + +// NewL1StandardBridgeCaller creates a new read-only instance of L1StandardBridge, bound to a specific deployed contract. +func NewL1StandardBridgeCaller(address common.Address, caller bind.ContractCaller) (*L1StandardBridgeCaller, error) { + contract, err := bindL1StandardBridge(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &L1StandardBridgeCaller{contract: contract}, nil +} + +// NewL1StandardBridgeTransactor creates a new write-only instance of L1StandardBridge, bound to a specific deployed contract. +func NewL1StandardBridgeTransactor(address common.Address, transactor bind.ContractTransactor) (*L1StandardBridgeTransactor, error) { + contract, err := bindL1StandardBridge(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &L1StandardBridgeTransactor{contract: contract}, nil +} + +// NewL1StandardBridgeFilterer creates a new log filterer instance of L1StandardBridge, bound to a specific deployed contract. +func NewL1StandardBridgeFilterer(address common.Address, filterer bind.ContractFilterer) (*L1StandardBridgeFilterer, error) { + contract, err := bindL1StandardBridge(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &L1StandardBridgeFilterer{contract: contract}, nil +} + +// bindL1StandardBridge binds a generic wrapper to an already deployed contract. +func bindL1StandardBridge(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := L1StandardBridgeMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_L1StandardBridge *L1StandardBridgeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _L1StandardBridge.Contract.L1StandardBridgeCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_L1StandardBridge *L1StandardBridgeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _L1StandardBridge.Contract.L1StandardBridgeTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_L1StandardBridge *L1StandardBridgeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _L1StandardBridge.Contract.L1StandardBridgeTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_L1StandardBridge *L1StandardBridgeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _L1StandardBridge.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_L1StandardBridge *L1StandardBridgeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _L1StandardBridge.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_L1StandardBridge *L1StandardBridgeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _L1StandardBridge.Contract.contract.Transact(opts, method, params...) +} + +// MESSENGER is a free data retrieval call binding the contract method 0x927ede2d. +// +// Solidity: function MESSENGER() view returns(address) +func (_L1StandardBridge *L1StandardBridgeCaller) MESSENGER(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1StandardBridge.contract.Call(opts, &out, "MESSENGER") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// MESSENGER is a free data retrieval call binding the contract method 0x927ede2d. +// +// Solidity: function MESSENGER() view returns(address) +func (_L1StandardBridge *L1StandardBridgeSession) MESSENGER() (common.Address, error) { + return _L1StandardBridge.Contract.MESSENGER(&_L1StandardBridge.CallOpts) +} + +// MESSENGER is a free data retrieval call binding the contract method 0x927ede2d. +// +// Solidity: function MESSENGER() view returns(address) +func (_L1StandardBridge *L1StandardBridgeCallerSession) MESSENGER() (common.Address, error) { + return _L1StandardBridge.Contract.MESSENGER(&_L1StandardBridge.CallOpts) +} + +// OTHERBRIDGE is a free data retrieval call binding the contract method 0x7f46ddb2. +// +// Solidity: function OTHER_BRIDGE() view returns(address) +func (_L1StandardBridge *L1StandardBridgeCaller) OTHERBRIDGE(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1StandardBridge.contract.Call(opts, &out, "OTHER_BRIDGE") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// OTHERBRIDGE is a free data retrieval call binding the contract method 0x7f46ddb2. +// +// Solidity: function OTHER_BRIDGE() view returns(address) +func (_L1StandardBridge *L1StandardBridgeSession) OTHERBRIDGE() (common.Address, error) { + return _L1StandardBridge.Contract.OTHERBRIDGE(&_L1StandardBridge.CallOpts) +} + +// OTHERBRIDGE is a free data retrieval call binding the contract method 0x7f46ddb2. +// +// Solidity: function OTHER_BRIDGE() view returns(address) +func (_L1StandardBridge *L1StandardBridgeCallerSession) OTHERBRIDGE() (common.Address, error) { + return _L1StandardBridge.Contract.OTHERBRIDGE(&_L1StandardBridge.CallOpts) +} + +// Deposits is a free data retrieval call binding the contract method 0x8f601f66. +// +// Solidity: function deposits(address , address ) view returns(uint256) +func (_L1StandardBridge *L1StandardBridgeCaller) Deposits(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (*big.Int, error) { + var out []interface{} + err := _L1StandardBridge.contract.Call(opts, &out, "deposits", arg0, arg1) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Deposits is a free data retrieval call binding the contract method 0x8f601f66. +// +// Solidity: function deposits(address , address ) view returns(uint256) +func (_L1StandardBridge *L1StandardBridgeSession) Deposits(arg0 common.Address, arg1 common.Address) (*big.Int, error) { + return _L1StandardBridge.Contract.Deposits(&_L1StandardBridge.CallOpts, arg0, arg1) +} + +// Deposits is a free data retrieval call binding the contract method 0x8f601f66. +// +// Solidity: function deposits(address , address ) view returns(uint256) +func (_L1StandardBridge *L1StandardBridgeCallerSession) Deposits(arg0 common.Address, arg1 common.Address) (*big.Int, error) { + return _L1StandardBridge.Contract.Deposits(&_L1StandardBridge.CallOpts, arg0, arg1) +} + +// L2TokenBridge is a free data retrieval call binding the contract method 0x91c49bf8. +// +// Solidity: function l2TokenBridge() view returns(address) +func (_L1StandardBridge *L1StandardBridgeCaller) L2TokenBridge(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1StandardBridge.contract.Call(opts, &out, "l2TokenBridge") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// L2TokenBridge is a free data retrieval call binding the contract method 0x91c49bf8. +// +// Solidity: function l2TokenBridge() view returns(address) +func (_L1StandardBridge *L1StandardBridgeSession) L2TokenBridge() (common.Address, error) { + return _L1StandardBridge.Contract.L2TokenBridge(&_L1StandardBridge.CallOpts) +} + +// L2TokenBridge is a free data retrieval call binding the contract method 0x91c49bf8. +// +// Solidity: function l2TokenBridge() view returns(address) +func (_L1StandardBridge *L1StandardBridgeCallerSession) L2TokenBridge() (common.Address, error) { + return _L1StandardBridge.Contract.L2TokenBridge(&_L1StandardBridge.CallOpts) +} + +// Messenger is a free data retrieval call binding the contract method 0x3cb747bf. +// +// Solidity: function messenger() view returns(address) +func (_L1StandardBridge *L1StandardBridgeCaller) Messenger(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L1StandardBridge.contract.Call(opts, &out, "messenger") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Messenger is a free data retrieval call binding the contract method 0x3cb747bf. +// +// Solidity: function messenger() view returns(address) +func (_L1StandardBridge *L1StandardBridgeSession) Messenger() (common.Address, error) { + return _L1StandardBridge.Contract.Messenger(&_L1StandardBridge.CallOpts) +} + +// Messenger is a free data retrieval call binding the contract method 0x3cb747bf. +// +// Solidity: function messenger() view returns(address) +func (_L1StandardBridge *L1StandardBridgeCallerSession) Messenger() (common.Address, error) { + return _L1StandardBridge.Contract.Messenger(&_L1StandardBridge.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L1StandardBridge *L1StandardBridgeCaller) Version(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _L1StandardBridge.contract.Call(opts, &out, "version") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L1StandardBridge *L1StandardBridgeSession) Version() (string, error) { + return _L1StandardBridge.Contract.Version(&_L1StandardBridge.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L1StandardBridge *L1StandardBridgeCallerSession) Version() (string, error) { + return _L1StandardBridge.Contract.Version(&_L1StandardBridge.CallOpts) +} + +// BridgeERC20 is a paid mutator transaction binding the contract method 0x87087623. +// +// Solidity: function bridgeERC20(address _localToken, address _remoteToken, uint256 _amount, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) BridgeERC20(opts *bind.TransactOpts, _localToken common.Address, _remoteToken common.Address, _amount *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.contract.Transact(opts, "bridgeERC20", _localToken, _remoteToken, _amount, _minGasLimit, _extraData) +} + +// BridgeERC20 is a paid mutator transaction binding the contract method 0x87087623. +// +// Solidity: function bridgeERC20(address _localToken, address _remoteToken, uint256 _amount, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeSession) BridgeERC20(_localToken common.Address, _remoteToken common.Address, _amount *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.BridgeERC20(&_L1StandardBridge.TransactOpts, _localToken, _remoteToken, _amount, _minGasLimit, _extraData) +} + +// BridgeERC20 is a paid mutator transaction binding the contract method 0x87087623. +// +// Solidity: function bridgeERC20(address _localToken, address _remoteToken, uint256 _amount, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) BridgeERC20(_localToken common.Address, _remoteToken common.Address, _amount *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.BridgeERC20(&_L1StandardBridge.TransactOpts, _localToken, _remoteToken, _amount, _minGasLimit, _extraData) +} + +// BridgeERC20To is a paid mutator transaction binding the contract method 0x540abf73. +// +// Solidity: function bridgeERC20To(address _localToken, address _remoteToken, address _to, uint256 _amount, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) BridgeERC20To(opts *bind.TransactOpts, _localToken common.Address, _remoteToken common.Address, _to common.Address, _amount *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.contract.Transact(opts, "bridgeERC20To", _localToken, _remoteToken, _to, _amount, _minGasLimit, _extraData) +} + +// BridgeERC20To is a paid mutator transaction binding the contract method 0x540abf73. +// +// Solidity: function bridgeERC20To(address _localToken, address _remoteToken, address _to, uint256 _amount, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeSession) BridgeERC20To(_localToken common.Address, _remoteToken common.Address, _to common.Address, _amount *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.BridgeERC20To(&_L1StandardBridge.TransactOpts, _localToken, _remoteToken, _to, _amount, _minGasLimit, _extraData) +} + +// BridgeERC20To is a paid mutator transaction binding the contract method 0x540abf73. +// +// Solidity: function bridgeERC20To(address _localToken, address _remoteToken, address _to, uint256 _amount, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) BridgeERC20To(_localToken common.Address, _remoteToken common.Address, _to common.Address, _amount *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.BridgeERC20To(&_L1StandardBridge.TransactOpts, _localToken, _remoteToken, _to, _amount, _minGasLimit, _extraData) +} + +// BridgeETH is a paid mutator transaction binding the contract method 0x09fc8843. +// +// Solidity: function bridgeETH(uint32 _minGasLimit, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) BridgeETH(opts *bind.TransactOpts, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.contract.Transact(opts, "bridgeETH", _minGasLimit, _extraData) +} + +// BridgeETH is a paid mutator transaction binding the contract method 0x09fc8843. +// +// Solidity: function bridgeETH(uint32 _minGasLimit, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeSession) BridgeETH(_minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.BridgeETH(&_L1StandardBridge.TransactOpts, _minGasLimit, _extraData) +} + +// BridgeETH is a paid mutator transaction binding the contract method 0x09fc8843. +// +// Solidity: function bridgeETH(uint32 _minGasLimit, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) BridgeETH(_minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.BridgeETH(&_L1StandardBridge.TransactOpts, _minGasLimit, _extraData) +} + +// BridgeETHTo is a paid mutator transaction binding the contract method 0xe11013dd. +// +// Solidity: function bridgeETHTo(address _to, uint32 _minGasLimit, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) BridgeETHTo(opts *bind.TransactOpts, _to common.Address, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.contract.Transact(opts, "bridgeETHTo", _to, _minGasLimit, _extraData) +} + +// BridgeETHTo is a paid mutator transaction binding the contract method 0xe11013dd. +// +// Solidity: function bridgeETHTo(address _to, uint32 _minGasLimit, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeSession) BridgeETHTo(_to common.Address, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.BridgeETHTo(&_L1StandardBridge.TransactOpts, _to, _minGasLimit, _extraData) +} + +// BridgeETHTo is a paid mutator transaction binding the contract method 0xe11013dd. +// +// Solidity: function bridgeETHTo(address _to, uint32 _minGasLimit, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) BridgeETHTo(_to common.Address, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.BridgeETHTo(&_L1StandardBridge.TransactOpts, _to, _minGasLimit, _extraData) +} + +// DepositERC20 is a paid mutator transaction binding the contract method 0x58a997f6. +// +// Solidity: function depositERC20(address _l1Token, address _l2Token, uint256 _amount, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) DepositERC20(opts *bind.TransactOpts, _l1Token common.Address, _l2Token common.Address, _amount *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.contract.Transact(opts, "depositERC20", _l1Token, _l2Token, _amount, _minGasLimit, _extraData) +} + +// DepositERC20 is a paid mutator transaction binding the contract method 0x58a997f6. +// +// Solidity: function depositERC20(address _l1Token, address _l2Token, uint256 _amount, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeSession) DepositERC20(_l1Token common.Address, _l2Token common.Address, _amount *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.DepositERC20(&_L1StandardBridge.TransactOpts, _l1Token, _l2Token, _amount, _minGasLimit, _extraData) +} + +// DepositERC20 is a paid mutator transaction binding the contract method 0x58a997f6. +// +// Solidity: function depositERC20(address _l1Token, address _l2Token, uint256 _amount, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) DepositERC20(_l1Token common.Address, _l2Token common.Address, _amount *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.DepositERC20(&_L1StandardBridge.TransactOpts, _l1Token, _l2Token, _amount, _minGasLimit, _extraData) +} + +// DepositERC20To is a paid mutator transaction binding the contract method 0x838b2520. +// +// Solidity: function depositERC20To(address _l1Token, address _l2Token, address _to, uint256 _amount, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) DepositERC20To(opts *bind.TransactOpts, _l1Token common.Address, _l2Token common.Address, _to common.Address, _amount *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.contract.Transact(opts, "depositERC20To", _l1Token, _l2Token, _to, _amount, _minGasLimit, _extraData) +} + +// DepositERC20To is a paid mutator transaction binding the contract method 0x838b2520. +// +// Solidity: function depositERC20To(address _l1Token, address _l2Token, address _to, uint256 _amount, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeSession) DepositERC20To(_l1Token common.Address, _l2Token common.Address, _to common.Address, _amount *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.DepositERC20To(&_L1StandardBridge.TransactOpts, _l1Token, _l2Token, _to, _amount, _minGasLimit, _extraData) +} + +// DepositERC20To is a paid mutator transaction binding the contract method 0x838b2520. +// +// Solidity: function depositERC20To(address _l1Token, address _l2Token, address _to, uint256 _amount, uint32 _minGasLimit, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) DepositERC20To(_l1Token common.Address, _l2Token common.Address, _to common.Address, _amount *big.Int, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.DepositERC20To(&_L1StandardBridge.TransactOpts, _l1Token, _l2Token, _to, _amount, _minGasLimit, _extraData) +} + +// DepositETH is a paid mutator transaction binding the contract method 0xb1a1a882. +// +// Solidity: function depositETH(uint32 _minGasLimit, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) DepositETH(opts *bind.TransactOpts, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.contract.Transact(opts, "depositETH", _minGasLimit, _extraData) +} + +// DepositETH is a paid mutator transaction binding the contract method 0xb1a1a882. +// +// Solidity: function depositETH(uint32 _minGasLimit, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeSession) DepositETH(_minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.DepositETH(&_L1StandardBridge.TransactOpts, _minGasLimit, _extraData) +} + +// DepositETH is a paid mutator transaction binding the contract method 0xb1a1a882. +// +// Solidity: function depositETH(uint32 _minGasLimit, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) DepositETH(_minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.DepositETH(&_L1StandardBridge.TransactOpts, _minGasLimit, _extraData) +} + +// DepositETHTo is a paid mutator transaction binding the contract method 0x9a2ac6d5. +// +// Solidity: function depositETHTo(address _to, uint32 _minGasLimit, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) DepositETHTo(opts *bind.TransactOpts, _to common.Address, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.contract.Transact(opts, "depositETHTo", _to, _minGasLimit, _extraData) +} + +// DepositETHTo is a paid mutator transaction binding the contract method 0x9a2ac6d5. +// +// Solidity: function depositETHTo(address _to, uint32 _minGasLimit, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeSession) DepositETHTo(_to common.Address, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.DepositETHTo(&_L1StandardBridge.TransactOpts, _to, _minGasLimit, _extraData) +} + +// DepositETHTo is a paid mutator transaction binding the contract method 0x9a2ac6d5. +// +// Solidity: function depositETHTo(address _to, uint32 _minGasLimit, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) DepositETHTo(_to common.Address, _minGasLimit uint32, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.DepositETHTo(&_L1StandardBridge.TransactOpts, _to, _minGasLimit, _extraData) +} + +// FinalizeBridgeERC20 is a paid mutator transaction binding the contract method 0x0166a07a. +// +// Solidity: function finalizeBridgeERC20(address _localToken, address _remoteToken, address _from, address _to, uint256 _amount, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) FinalizeBridgeERC20(opts *bind.TransactOpts, _localToken common.Address, _remoteToken common.Address, _from common.Address, _to common.Address, _amount *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.contract.Transact(opts, "finalizeBridgeERC20", _localToken, _remoteToken, _from, _to, _amount, _extraData) +} + +// FinalizeBridgeERC20 is a paid mutator transaction binding the contract method 0x0166a07a. +// +// Solidity: function finalizeBridgeERC20(address _localToken, address _remoteToken, address _from, address _to, uint256 _amount, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeSession) FinalizeBridgeERC20(_localToken common.Address, _remoteToken common.Address, _from common.Address, _to common.Address, _amount *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.FinalizeBridgeERC20(&_L1StandardBridge.TransactOpts, _localToken, _remoteToken, _from, _to, _amount, _extraData) +} + +// FinalizeBridgeERC20 is a paid mutator transaction binding the contract method 0x0166a07a. +// +// Solidity: function finalizeBridgeERC20(address _localToken, address _remoteToken, address _from, address _to, uint256 _amount, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) FinalizeBridgeERC20(_localToken common.Address, _remoteToken common.Address, _from common.Address, _to common.Address, _amount *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.FinalizeBridgeERC20(&_L1StandardBridge.TransactOpts, _localToken, _remoteToken, _from, _to, _amount, _extraData) +} + +// FinalizeBridgeETH is a paid mutator transaction binding the contract method 0x1635f5fd. +// +// Solidity: function finalizeBridgeETH(address _from, address _to, uint256 _amount, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) FinalizeBridgeETH(opts *bind.TransactOpts, _from common.Address, _to common.Address, _amount *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.contract.Transact(opts, "finalizeBridgeETH", _from, _to, _amount, _extraData) +} + +// FinalizeBridgeETH is a paid mutator transaction binding the contract method 0x1635f5fd. +// +// Solidity: function finalizeBridgeETH(address _from, address _to, uint256 _amount, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeSession) FinalizeBridgeETH(_from common.Address, _to common.Address, _amount *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.FinalizeBridgeETH(&_L1StandardBridge.TransactOpts, _from, _to, _amount, _extraData) +} + +// FinalizeBridgeETH is a paid mutator transaction binding the contract method 0x1635f5fd. +// +// Solidity: function finalizeBridgeETH(address _from, address _to, uint256 _amount, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) FinalizeBridgeETH(_from common.Address, _to common.Address, _amount *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.FinalizeBridgeETH(&_L1StandardBridge.TransactOpts, _from, _to, _amount, _extraData) +} + +// FinalizeERC20Withdrawal is a paid mutator transaction binding the contract method 0xa9f9e675. +// +// Solidity: function finalizeERC20Withdrawal(address _l1Token, address _l2Token, address _from, address _to, uint256 _amount, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) FinalizeERC20Withdrawal(opts *bind.TransactOpts, _l1Token common.Address, _l2Token common.Address, _from common.Address, _to common.Address, _amount *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.contract.Transact(opts, "finalizeERC20Withdrawal", _l1Token, _l2Token, _from, _to, _amount, _extraData) +} + +// FinalizeERC20Withdrawal is a paid mutator transaction binding the contract method 0xa9f9e675. +// +// Solidity: function finalizeERC20Withdrawal(address _l1Token, address _l2Token, address _from, address _to, uint256 _amount, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeSession) FinalizeERC20Withdrawal(_l1Token common.Address, _l2Token common.Address, _from common.Address, _to common.Address, _amount *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.FinalizeERC20Withdrawal(&_L1StandardBridge.TransactOpts, _l1Token, _l2Token, _from, _to, _amount, _extraData) +} + +// FinalizeERC20Withdrawal is a paid mutator transaction binding the contract method 0xa9f9e675. +// +// Solidity: function finalizeERC20Withdrawal(address _l1Token, address _l2Token, address _from, address _to, uint256 _amount, bytes _extraData) returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) FinalizeERC20Withdrawal(_l1Token common.Address, _l2Token common.Address, _from common.Address, _to common.Address, _amount *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.FinalizeERC20Withdrawal(&_L1StandardBridge.TransactOpts, _l1Token, _l2Token, _from, _to, _amount, _extraData) +} + +// FinalizeETHWithdrawal is a paid mutator transaction binding the contract method 0x1532ec34. +// +// Solidity: function finalizeETHWithdrawal(address _from, address _to, uint256 _amount, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) FinalizeETHWithdrawal(opts *bind.TransactOpts, _from common.Address, _to common.Address, _amount *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.contract.Transact(opts, "finalizeETHWithdrawal", _from, _to, _amount, _extraData) +} + +// FinalizeETHWithdrawal is a paid mutator transaction binding the contract method 0x1532ec34. +// +// Solidity: function finalizeETHWithdrawal(address _from, address _to, uint256 _amount, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeSession) FinalizeETHWithdrawal(_from common.Address, _to common.Address, _amount *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.FinalizeETHWithdrawal(&_L1StandardBridge.TransactOpts, _from, _to, _amount, _extraData) +} + +// FinalizeETHWithdrawal is a paid mutator transaction binding the contract method 0x1532ec34. +// +// Solidity: function finalizeETHWithdrawal(address _from, address _to, uint256 _amount, bytes _extraData) payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) FinalizeETHWithdrawal(_from common.Address, _to common.Address, _amount *big.Int, _extraData []byte) (*types.Transaction, error) { + return _L1StandardBridge.Contract.FinalizeETHWithdrawal(&_L1StandardBridge.TransactOpts, _from, _to, _amount, _extraData) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _L1StandardBridge.contract.RawTransact(opts, nil) // calldata is disallowed for receive function +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_L1StandardBridge *L1StandardBridgeSession) Receive() (*types.Transaction, error) { + return _L1StandardBridge.Contract.Receive(&_L1StandardBridge.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_L1StandardBridge *L1StandardBridgeTransactorSession) Receive() (*types.Transaction, error) { + return _L1StandardBridge.Contract.Receive(&_L1StandardBridge.TransactOpts) +} + +// L1StandardBridgeERC20BridgeFinalizedIterator is returned from FilterERC20BridgeFinalized and is used to iterate over the raw logs and unpacked data for ERC20BridgeFinalized events raised by the L1StandardBridge contract. +type L1StandardBridgeERC20BridgeFinalizedIterator struct { + Event *L1StandardBridgeERC20BridgeFinalized // 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 *L1StandardBridgeERC20BridgeFinalizedIterator) 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(L1StandardBridgeERC20BridgeFinalized) + 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(L1StandardBridgeERC20BridgeFinalized) + 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 *L1StandardBridgeERC20BridgeFinalizedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1StandardBridgeERC20BridgeFinalizedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1StandardBridgeERC20BridgeFinalized represents a ERC20BridgeFinalized event raised by the L1StandardBridge contract. +type L1StandardBridgeERC20BridgeFinalized struct { + LocalToken common.Address + RemoteToken common.Address + From common.Address + To common.Address + Amount *big.Int + ExtraData []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterERC20BridgeFinalized is a free log retrieval operation binding the contract event 0xd59c65b35445225835c83f50b6ede06a7be047d22e357073e250d9af537518cd. +// +// Solidity: event ERC20BridgeFinalized(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) FilterERC20BridgeFinalized(opts *bind.FilterOpts, localToken []common.Address, remoteToken []common.Address, from []common.Address) (*L1StandardBridgeERC20BridgeFinalizedIterator, error) { + + var localTokenRule []interface{} + for _, localTokenItem := range localToken { + localTokenRule = append(localTokenRule, localTokenItem) + } + var remoteTokenRule []interface{} + for _, remoteTokenItem := range remoteToken { + remoteTokenRule = append(remoteTokenRule, remoteTokenItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _L1StandardBridge.contract.FilterLogs(opts, "ERC20BridgeFinalized", localTokenRule, remoteTokenRule, fromRule) + if err != nil { + return nil, err + } + return &L1StandardBridgeERC20BridgeFinalizedIterator{contract: _L1StandardBridge.contract, event: "ERC20BridgeFinalized", logs: logs, sub: sub}, nil +} + +// WatchERC20BridgeFinalized is a free log subscription operation binding the contract event 0xd59c65b35445225835c83f50b6ede06a7be047d22e357073e250d9af537518cd. +// +// Solidity: event ERC20BridgeFinalized(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) WatchERC20BridgeFinalized(opts *bind.WatchOpts, sink chan<- *L1StandardBridgeERC20BridgeFinalized, localToken []common.Address, remoteToken []common.Address, from []common.Address) (event.Subscription, error) { + + var localTokenRule []interface{} + for _, localTokenItem := range localToken { + localTokenRule = append(localTokenRule, localTokenItem) + } + var remoteTokenRule []interface{} + for _, remoteTokenItem := range remoteToken { + remoteTokenRule = append(remoteTokenRule, remoteTokenItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _L1StandardBridge.contract.WatchLogs(opts, "ERC20BridgeFinalized", localTokenRule, remoteTokenRule, fromRule) + 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(L1StandardBridgeERC20BridgeFinalized) + if err := _L1StandardBridge.contract.UnpackLog(event, "ERC20BridgeFinalized", 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 +} + +// ParseERC20BridgeFinalized is a log parse operation binding the contract event 0xd59c65b35445225835c83f50b6ede06a7be047d22e357073e250d9af537518cd. +// +// Solidity: event ERC20BridgeFinalized(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) ParseERC20BridgeFinalized(log types.Log) (*L1StandardBridgeERC20BridgeFinalized, error) { + event := new(L1StandardBridgeERC20BridgeFinalized) + if err := _L1StandardBridge.contract.UnpackLog(event, "ERC20BridgeFinalized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1StandardBridgeERC20BridgeInitiatedIterator is returned from FilterERC20BridgeInitiated and is used to iterate over the raw logs and unpacked data for ERC20BridgeInitiated events raised by the L1StandardBridge contract. +type L1StandardBridgeERC20BridgeInitiatedIterator struct { + Event *L1StandardBridgeERC20BridgeInitiated // 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 *L1StandardBridgeERC20BridgeInitiatedIterator) 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(L1StandardBridgeERC20BridgeInitiated) + 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(L1StandardBridgeERC20BridgeInitiated) + 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 *L1StandardBridgeERC20BridgeInitiatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1StandardBridgeERC20BridgeInitiatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1StandardBridgeERC20BridgeInitiated represents a ERC20BridgeInitiated event raised by the L1StandardBridge contract. +type L1StandardBridgeERC20BridgeInitiated struct { + LocalToken common.Address + RemoteToken common.Address + From common.Address + To common.Address + Amount *big.Int + ExtraData []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterERC20BridgeInitiated is a free log retrieval operation binding the contract event 0x7ff126db8024424bbfd9826e8ab82ff59136289ea440b04b39a0df1b03b9cabf. +// +// Solidity: event ERC20BridgeInitiated(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) FilterERC20BridgeInitiated(opts *bind.FilterOpts, localToken []common.Address, remoteToken []common.Address, from []common.Address) (*L1StandardBridgeERC20BridgeInitiatedIterator, error) { + + var localTokenRule []interface{} + for _, localTokenItem := range localToken { + localTokenRule = append(localTokenRule, localTokenItem) + } + var remoteTokenRule []interface{} + for _, remoteTokenItem := range remoteToken { + remoteTokenRule = append(remoteTokenRule, remoteTokenItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _L1StandardBridge.contract.FilterLogs(opts, "ERC20BridgeInitiated", localTokenRule, remoteTokenRule, fromRule) + if err != nil { + return nil, err + } + return &L1StandardBridgeERC20BridgeInitiatedIterator{contract: _L1StandardBridge.contract, event: "ERC20BridgeInitiated", logs: logs, sub: sub}, nil +} + +// WatchERC20BridgeInitiated is a free log subscription operation binding the contract event 0x7ff126db8024424bbfd9826e8ab82ff59136289ea440b04b39a0df1b03b9cabf. +// +// Solidity: event ERC20BridgeInitiated(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) WatchERC20BridgeInitiated(opts *bind.WatchOpts, sink chan<- *L1StandardBridgeERC20BridgeInitiated, localToken []common.Address, remoteToken []common.Address, from []common.Address) (event.Subscription, error) { + + var localTokenRule []interface{} + for _, localTokenItem := range localToken { + localTokenRule = append(localTokenRule, localTokenItem) + } + var remoteTokenRule []interface{} + for _, remoteTokenItem := range remoteToken { + remoteTokenRule = append(remoteTokenRule, remoteTokenItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _L1StandardBridge.contract.WatchLogs(opts, "ERC20BridgeInitiated", localTokenRule, remoteTokenRule, fromRule) + 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(L1StandardBridgeERC20BridgeInitiated) + if err := _L1StandardBridge.contract.UnpackLog(event, "ERC20BridgeInitiated", 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 +} + +// ParseERC20BridgeInitiated is a log parse operation binding the contract event 0x7ff126db8024424bbfd9826e8ab82ff59136289ea440b04b39a0df1b03b9cabf. +// +// Solidity: event ERC20BridgeInitiated(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) ParseERC20BridgeInitiated(log types.Log) (*L1StandardBridgeERC20BridgeInitiated, error) { + event := new(L1StandardBridgeERC20BridgeInitiated) + if err := _L1StandardBridge.contract.UnpackLog(event, "ERC20BridgeInitiated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1StandardBridgeERC20DepositInitiatedIterator is returned from FilterERC20DepositInitiated and is used to iterate over the raw logs and unpacked data for ERC20DepositInitiated events raised by the L1StandardBridge contract. +type L1StandardBridgeERC20DepositInitiatedIterator struct { + Event *L1StandardBridgeERC20DepositInitiated // 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 *L1StandardBridgeERC20DepositInitiatedIterator) 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(L1StandardBridgeERC20DepositInitiated) + 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(L1StandardBridgeERC20DepositInitiated) + 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 *L1StandardBridgeERC20DepositInitiatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1StandardBridgeERC20DepositInitiatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1StandardBridgeERC20DepositInitiated represents a ERC20DepositInitiated event raised by the L1StandardBridge contract. +type L1StandardBridgeERC20DepositInitiated struct { + L1Token common.Address + L2Token common.Address + From common.Address + To common.Address + Amount *big.Int + ExtraData []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterERC20DepositInitiated is a free log retrieval operation binding the contract event 0x718594027abd4eaed59f95162563e0cc6d0e8d5b86b1c7be8b1b0ac3343d0396. +// +// Solidity: event ERC20DepositInitiated(address indexed l1Token, address indexed l2Token, address indexed from, address to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) FilterERC20DepositInitiated(opts *bind.FilterOpts, l1Token []common.Address, l2Token []common.Address, from []common.Address) (*L1StandardBridgeERC20DepositInitiatedIterator, error) { + + var l1TokenRule []interface{} + for _, l1TokenItem := range l1Token { + l1TokenRule = append(l1TokenRule, l1TokenItem) + } + var l2TokenRule []interface{} + for _, l2TokenItem := range l2Token { + l2TokenRule = append(l2TokenRule, l2TokenItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _L1StandardBridge.contract.FilterLogs(opts, "ERC20DepositInitiated", l1TokenRule, l2TokenRule, fromRule) + if err != nil { + return nil, err + } + return &L1StandardBridgeERC20DepositInitiatedIterator{contract: _L1StandardBridge.contract, event: "ERC20DepositInitiated", logs: logs, sub: sub}, nil +} + +// WatchERC20DepositInitiated is a free log subscription operation binding the contract event 0x718594027abd4eaed59f95162563e0cc6d0e8d5b86b1c7be8b1b0ac3343d0396. +// +// Solidity: event ERC20DepositInitiated(address indexed l1Token, address indexed l2Token, address indexed from, address to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) WatchERC20DepositInitiated(opts *bind.WatchOpts, sink chan<- *L1StandardBridgeERC20DepositInitiated, l1Token []common.Address, l2Token []common.Address, from []common.Address) (event.Subscription, error) { + + var l1TokenRule []interface{} + for _, l1TokenItem := range l1Token { + l1TokenRule = append(l1TokenRule, l1TokenItem) + } + var l2TokenRule []interface{} + for _, l2TokenItem := range l2Token { + l2TokenRule = append(l2TokenRule, l2TokenItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _L1StandardBridge.contract.WatchLogs(opts, "ERC20DepositInitiated", l1TokenRule, l2TokenRule, fromRule) + 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(L1StandardBridgeERC20DepositInitiated) + if err := _L1StandardBridge.contract.UnpackLog(event, "ERC20DepositInitiated", 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 +} + +// ParseERC20DepositInitiated is a log parse operation binding the contract event 0x718594027abd4eaed59f95162563e0cc6d0e8d5b86b1c7be8b1b0ac3343d0396. +// +// Solidity: event ERC20DepositInitiated(address indexed l1Token, address indexed l2Token, address indexed from, address to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) ParseERC20DepositInitiated(log types.Log) (*L1StandardBridgeERC20DepositInitiated, error) { + event := new(L1StandardBridgeERC20DepositInitiated) + if err := _L1StandardBridge.contract.UnpackLog(event, "ERC20DepositInitiated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1StandardBridgeERC20WithdrawalFinalizedIterator is returned from FilterERC20WithdrawalFinalized and is used to iterate over the raw logs and unpacked data for ERC20WithdrawalFinalized events raised by the L1StandardBridge contract. +type L1StandardBridgeERC20WithdrawalFinalizedIterator struct { + Event *L1StandardBridgeERC20WithdrawalFinalized // 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 *L1StandardBridgeERC20WithdrawalFinalizedIterator) 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(L1StandardBridgeERC20WithdrawalFinalized) + 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(L1StandardBridgeERC20WithdrawalFinalized) + 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 *L1StandardBridgeERC20WithdrawalFinalizedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1StandardBridgeERC20WithdrawalFinalizedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1StandardBridgeERC20WithdrawalFinalized represents a ERC20WithdrawalFinalized event raised by the L1StandardBridge contract. +type L1StandardBridgeERC20WithdrawalFinalized struct { + L1Token common.Address + L2Token common.Address + From common.Address + To common.Address + Amount *big.Int + ExtraData []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterERC20WithdrawalFinalized is a free log retrieval operation binding the contract event 0x3ceee06c1e37648fcbb6ed52e17b3e1f275a1f8c7b22a84b2b84732431e046b3. +// +// Solidity: event ERC20WithdrawalFinalized(address indexed l1Token, address indexed l2Token, address indexed from, address to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) FilterERC20WithdrawalFinalized(opts *bind.FilterOpts, l1Token []common.Address, l2Token []common.Address, from []common.Address) (*L1StandardBridgeERC20WithdrawalFinalizedIterator, error) { + + var l1TokenRule []interface{} + for _, l1TokenItem := range l1Token { + l1TokenRule = append(l1TokenRule, l1TokenItem) + } + var l2TokenRule []interface{} + for _, l2TokenItem := range l2Token { + l2TokenRule = append(l2TokenRule, l2TokenItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _L1StandardBridge.contract.FilterLogs(opts, "ERC20WithdrawalFinalized", l1TokenRule, l2TokenRule, fromRule) + if err != nil { + return nil, err + } + return &L1StandardBridgeERC20WithdrawalFinalizedIterator{contract: _L1StandardBridge.contract, event: "ERC20WithdrawalFinalized", logs: logs, sub: sub}, nil +} + +// WatchERC20WithdrawalFinalized is a free log subscription operation binding the contract event 0x3ceee06c1e37648fcbb6ed52e17b3e1f275a1f8c7b22a84b2b84732431e046b3. +// +// Solidity: event ERC20WithdrawalFinalized(address indexed l1Token, address indexed l2Token, address indexed from, address to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) WatchERC20WithdrawalFinalized(opts *bind.WatchOpts, sink chan<- *L1StandardBridgeERC20WithdrawalFinalized, l1Token []common.Address, l2Token []common.Address, from []common.Address) (event.Subscription, error) { + + var l1TokenRule []interface{} + for _, l1TokenItem := range l1Token { + l1TokenRule = append(l1TokenRule, l1TokenItem) + } + var l2TokenRule []interface{} + for _, l2TokenItem := range l2Token { + l2TokenRule = append(l2TokenRule, l2TokenItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _L1StandardBridge.contract.WatchLogs(opts, "ERC20WithdrawalFinalized", l1TokenRule, l2TokenRule, fromRule) + 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(L1StandardBridgeERC20WithdrawalFinalized) + if err := _L1StandardBridge.contract.UnpackLog(event, "ERC20WithdrawalFinalized", 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 +} + +// ParseERC20WithdrawalFinalized is a log parse operation binding the contract event 0x3ceee06c1e37648fcbb6ed52e17b3e1f275a1f8c7b22a84b2b84732431e046b3. +// +// Solidity: event ERC20WithdrawalFinalized(address indexed l1Token, address indexed l2Token, address indexed from, address to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) ParseERC20WithdrawalFinalized(log types.Log) (*L1StandardBridgeERC20WithdrawalFinalized, error) { + event := new(L1StandardBridgeERC20WithdrawalFinalized) + if err := _L1StandardBridge.contract.UnpackLog(event, "ERC20WithdrawalFinalized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1StandardBridgeETHBridgeFinalizedIterator is returned from FilterETHBridgeFinalized and is used to iterate over the raw logs and unpacked data for ETHBridgeFinalized events raised by the L1StandardBridge contract. +type L1StandardBridgeETHBridgeFinalizedIterator struct { + Event *L1StandardBridgeETHBridgeFinalized // 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 *L1StandardBridgeETHBridgeFinalizedIterator) 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(L1StandardBridgeETHBridgeFinalized) + 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(L1StandardBridgeETHBridgeFinalized) + 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 *L1StandardBridgeETHBridgeFinalizedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1StandardBridgeETHBridgeFinalizedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1StandardBridgeETHBridgeFinalized represents a ETHBridgeFinalized event raised by the L1StandardBridge contract. +type L1StandardBridgeETHBridgeFinalized struct { + From common.Address + To common.Address + Amount *big.Int + ExtraData []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterETHBridgeFinalized is a free log retrieval operation binding the contract event 0x31b2166ff604fc5672ea5df08a78081d2bc6d746cadce880747f3643d819e83d. +// +// Solidity: event ETHBridgeFinalized(address indexed from, address indexed to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) FilterETHBridgeFinalized(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*L1StandardBridgeETHBridgeFinalizedIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _L1StandardBridge.contract.FilterLogs(opts, "ETHBridgeFinalized", fromRule, toRule) + if err != nil { + return nil, err + } + return &L1StandardBridgeETHBridgeFinalizedIterator{contract: _L1StandardBridge.contract, event: "ETHBridgeFinalized", logs: logs, sub: sub}, nil +} + +// WatchETHBridgeFinalized is a free log subscription operation binding the contract event 0x31b2166ff604fc5672ea5df08a78081d2bc6d746cadce880747f3643d819e83d. +// +// Solidity: event ETHBridgeFinalized(address indexed from, address indexed to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) WatchETHBridgeFinalized(opts *bind.WatchOpts, sink chan<- *L1StandardBridgeETHBridgeFinalized, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _L1StandardBridge.contract.WatchLogs(opts, "ETHBridgeFinalized", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(L1StandardBridgeETHBridgeFinalized) + if err := _L1StandardBridge.contract.UnpackLog(event, "ETHBridgeFinalized", 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 +} + +// ParseETHBridgeFinalized is a log parse operation binding the contract event 0x31b2166ff604fc5672ea5df08a78081d2bc6d746cadce880747f3643d819e83d. +// +// Solidity: event ETHBridgeFinalized(address indexed from, address indexed to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) ParseETHBridgeFinalized(log types.Log) (*L1StandardBridgeETHBridgeFinalized, error) { + event := new(L1StandardBridgeETHBridgeFinalized) + if err := _L1StandardBridge.contract.UnpackLog(event, "ETHBridgeFinalized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1StandardBridgeETHBridgeInitiatedIterator is returned from FilterETHBridgeInitiated and is used to iterate over the raw logs and unpacked data for ETHBridgeInitiated events raised by the L1StandardBridge contract. +type L1StandardBridgeETHBridgeInitiatedIterator struct { + Event *L1StandardBridgeETHBridgeInitiated // 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 *L1StandardBridgeETHBridgeInitiatedIterator) 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(L1StandardBridgeETHBridgeInitiated) + 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(L1StandardBridgeETHBridgeInitiated) + 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 *L1StandardBridgeETHBridgeInitiatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1StandardBridgeETHBridgeInitiatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1StandardBridgeETHBridgeInitiated represents a ETHBridgeInitiated event raised by the L1StandardBridge contract. +type L1StandardBridgeETHBridgeInitiated struct { + From common.Address + To common.Address + Amount *big.Int + ExtraData []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterETHBridgeInitiated is a free log retrieval operation binding the contract event 0x2849b43074093a05396b6f2a937dee8565b15a48a7b3d4bffb732a5017380af5. +// +// Solidity: event ETHBridgeInitiated(address indexed from, address indexed to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) FilterETHBridgeInitiated(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*L1StandardBridgeETHBridgeInitiatedIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _L1StandardBridge.contract.FilterLogs(opts, "ETHBridgeInitiated", fromRule, toRule) + if err != nil { + return nil, err + } + return &L1StandardBridgeETHBridgeInitiatedIterator{contract: _L1StandardBridge.contract, event: "ETHBridgeInitiated", logs: logs, sub: sub}, nil +} + +// WatchETHBridgeInitiated is a free log subscription operation binding the contract event 0x2849b43074093a05396b6f2a937dee8565b15a48a7b3d4bffb732a5017380af5. +// +// Solidity: event ETHBridgeInitiated(address indexed from, address indexed to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) WatchETHBridgeInitiated(opts *bind.WatchOpts, sink chan<- *L1StandardBridgeETHBridgeInitiated, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _L1StandardBridge.contract.WatchLogs(opts, "ETHBridgeInitiated", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(L1StandardBridgeETHBridgeInitiated) + if err := _L1StandardBridge.contract.UnpackLog(event, "ETHBridgeInitiated", 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 +} + +// ParseETHBridgeInitiated is a log parse operation binding the contract event 0x2849b43074093a05396b6f2a937dee8565b15a48a7b3d4bffb732a5017380af5. +// +// Solidity: event ETHBridgeInitiated(address indexed from, address indexed to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) ParseETHBridgeInitiated(log types.Log) (*L1StandardBridgeETHBridgeInitiated, error) { + event := new(L1StandardBridgeETHBridgeInitiated) + if err := _L1StandardBridge.contract.UnpackLog(event, "ETHBridgeInitiated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1StandardBridgeETHDepositInitiatedIterator is returned from FilterETHDepositInitiated and is used to iterate over the raw logs and unpacked data for ETHDepositInitiated events raised by the L1StandardBridge contract. +type L1StandardBridgeETHDepositInitiatedIterator struct { + Event *L1StandardBridgeETHDepositInitiated // 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 *L1StandardBridgeETHDepositInitiatedIterator) 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(L1StandardBridgeETHDepositInitiated) + 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(L1StandardBridgeETHDepositInitiated) + 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 *L1StandardBridgeETHDepositInitiatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1StandardBridgeETHDepositInitiatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1StandardBridgeETHDepositInitiated represents a ETHDepositInitiated event raised by the L1StandardBridge contract. +type L1StandardBridgeETHDepositInitiated struct { + From common.Address + To common.Address + Amount *big.Int + ExtraData []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterETHDepositInitiated is a free log retrieval operation binding the contract event 0x35d79ab81f2b2017e19afb5c5571778877782d7a8786f5907f93b0f4702f4f23. +// +// Solidity: event ETHDepositInitiated(address indexed from, address indexed to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) FilterETHDepositInitiated(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*L1StandardBridgeETHDepositInitiatedIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _L1StandardBridge.contract.FilterLogs(opts, "ETHDepositInitiated", fromRule, toRule) + if err != nil { + return nil, err + } + return &L1StandardBridgeETHDepositInitiatedIterator{contract: _L1StandardBridge.contract, event: "ETHDepositInitiated", logs: logs, sub: sub}, nil +} + +// WatchETHDepositInitiated is a free log subscription operation binding the contract event 0x35d79ab81f2b2017e19afb5c5571778877782d7a8786f5907f93b0f4702f4f23. +// +// Solidity: event ETHDepositInitiated(address indexed from, address indexed to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) WatchETHDepositInitiated(opts *bind.WatchOpts, sink chan<- *L1StandardBridgeETHDepositInitiated, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _L1StandardBridge.contract.WatchLogs(opts, "ETHDepositInitiated", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(L1StandardBridgeETHDepositInitiated) + if err := _L1StandardBridge.contract.UnpackLog(event, "ETHDepositInitiated", 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 +} + +// ParseETHDepositInitiated is a log parse operation binding the contract event 0x35d79ab81f2b2017e19afb5c5571778877782d7a8786f5907f93b0f4702f4f23. +// +// Solidity: event ETHDepositInitiated(address indexed from, address indexed to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) ParseETHDepositInitiated(log types.Log) (*L1StandardBridgeETHDepositInitiated, error) { + event := new(L1StandardBridgeETHDepositInitiated) + if err := _L1StandardBridge.contract.UnpackLog(event, "ETHDepositInitiated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L1StandardBridgeETHWithdrawalFinalizedIterator is returned from FilterETHWithdrawalFinalized and is used to iterate over the raw logs and unpacked data for ETHWithdrawalFinalized events raised by the L1StandardBridge contract. +type L1StandardBridgeETHWithdrawalFinalizedIterator struct { + Event *L1StandardBridgeETHWithdrawalFinalized // 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 *L1StandardBridgeETHWithdrawalFinalizedIterator) 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(L1StandardBridgeETHWithdrawalFinalized) + 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(L1StandardBridgeETHWithdrawalFinalized) + 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 *L1StandardBridgeETHWithdrawalFinalizedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L1StandardBridgeETHWithdrawalFinalizedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L1StandardBridgeETHWithdrawalFinalized represents a ETHWithdrawalFinalized event raised by the L1StandardBridge contract. +type L1StandardBridgeETHWithdrawalFinalized struct { + From common.Address + To common.Address + Amount *big.Int + ExtraData []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterETHWithdrawalFinalized is a free log retrieval operation binding the contract event 0x2ac69ee804d9a7a0984249f508dfab7cb2534b465b6ce1580f99a38ba9c5e631. +// +// Solidity: event ETHWithdrawalFinalized(address indexed from, address indexed to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) FilterETHWithdrawalFinalized(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*L1StandardBridgeETHWithdrawalFinalizedIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _L1StandardBridge.contract.FilterLogs(opts, "ETHWithdrawalFinalized", fromRule, toRule) + if err != nil { + return nil, err + } + return &L1StandardBridgeETHWithdrawalFinalizedIterator{contract: _L1StandardBridge.contract, event: "ETHWithdrawalFinalized", logs: logs, sub: sub}, nil +} + +// WatchETHWithdrawalFinalized is a free log subscription operation binding the contract event 0x2ac69ee804d9a7a0984249f508dfab7cb2534b465b6ce1580f99a38ba9c5e631. +// +// Solidity: event ETHWithdrawalFinalized(address indexed from, address indexed to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) WatchETHWithdrawalFinalized(opts *bind.WatchOpts, sink chan<- *L1StandardBridgeETHWithdrawalFinalized, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _L1StandardBridge.contract.WatchLogs(opts, "ETHWithdrawalFinalized", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(L1StandardBridgeETHWithdrawalFinalized) + if err := _L1StandardBridge.contract.UnpackLog(event, "ETHWithdrawalFinalized", 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 +} + +// ParseETHWithdrawalFinalized is a log parse operation binding the contract event 0x2ac69ee804d9a7a0984249f508dfab7cb2534b465b6ce1580f99a38ba9c5e631. +// +// Solidity: event ETHWithdrawalFinalized(address indexed from, address indexed to, uint256 amount, bytes extraData) +func (_L1StandardBridge *L1StandardBridgeFilterer) ParseETHWithdrawalFinalized(log types.Log) (*L1StandardBridgeETHWithdrawalFinalized, error) { + event := new(L1StandardBridgeETHWithdrawalFinalized) + if err := _L1StandardBridge.contract.UnpackLog(event, "ETHWithdrawalFinalized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/op-chain-ops/opbnb-upgrades/old-contracts/bindings/L2OutputOracle.go b/op-chain-ops/opbnb-upgrades/old-contracts/bindings/L2OutputOracle.go new file mode 100644 index 000000000..8030b00ca --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/old-contracts/bindings/L2OutputOracle.go @@ -0,0 +1,1197 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// TypesOutputProposal is an auto generated low-level Go binding around an user-defined struct. +type TypesOutputProposal struct { + OutputRoot [32]byte + Timestamp *big.Int + L2BlockNumber *big.Int +} + +// L2OutputOracleMetaData contains all meta data concerning the L2OutputOracle contract. +var L2OutputOracleMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_submissionInterval\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_l2BlockTime\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_startingBlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_startingTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_proposer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_challenger\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_finalizationPeriodSeconds\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"CHALLENGER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"FINALIZATION_PERIOD_SECONDS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"L2_BLOCK_TIME\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PROPOSER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"SUBMISSION_INTERVAL\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"computeL2Timestamp\",\"inputs\":[{\"name\":\"_l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deleteL2Outputs\",\"inputs\":[{\"name\":\"_l2OutputIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getL2Output\",\"inputs\":[{\"name\":\"_l2OutputIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structTypes.OutputProposal\",\"components\":[{\"name\":\"outputRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"timestamp\",\"type\":\"uint128\",\"internalType\":\"uint128\"},{\"name\":\"l2BlockNumber\",\"type\":\"uint128\",\"internalType\":\"uint128\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getL2OutputAfter\",\"inputs\":[{\"name\":\"_l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structTypes.OutputProposal\",\"components\":[{\"name\":\"outputRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"timestamp\",\"type\":\"uint128\",\"internalType\":\"uint128\"},{\"name\":\"l2BlockNumber\",\"type\":\"uint128\",\"internalType\":\"uint128\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getL2OutputIndexAfter\",\"inputs\":[{\"name\":\"_l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_startingBlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_startingTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"latestBlockNumber\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestOutputIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nextBlockNumber\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nextOutputIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proposeL2Output\",\"inputs\":[{\"name\":\"_outputRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_l1BlockHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_l1BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"startingBlockNumber\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"startingTimestamp\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OutputProposed\",\"inputs\":[{\"name\":\"outputRoot\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"l2OutputIndex\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"l2BlockNumber\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"l1Timestamp\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OutputsDeleted\",\"inputs\":[{\"name\":\"prevNextOutputIndex\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"newNextOutputIndex\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false}]", +} + +// L2OutputOracleABI is the input ABI used to generate the binding from. +// Deprecated: Use L2OutputOracleMetaData.ABI instead. +var L2OutputOracleABI = L2OutputOracleMetaData.ABI + +// L2OutputOracle is an auto generated Go binding around an Ethereum contract. +type L2OutputOracle struct { + L2OutputOracleCaller // Read-only binding to the contract + L2OutputOracleTransactor // Write-only binding to the contract + L2OutputOracleFilterer // Log filterer for contract events +} + +// L2OutputOracleCaller is an auto generated read-only Go binding around an Ethereum contract. +type L2OutputOracleCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L2OutputOracleTransactor is an auto generated write-only Go binding around an Ethereum contract. +type L2OutputOracleTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L2OutputOracleFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type L2OutputOracleFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L2OutputOracleSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type L2OutputOracleSession struct { + Contract *L2OutputOracle // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// L2OutputOracleCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type L2OutputOracleCallerSession struct { + Contract *L2OutputOracleCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// L2OutputOracleTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type L2OutputOracleTransactorSession struct { + Contract *L2OutputOracleTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// L2OutputOracleRaw is an auto generated low-level Go binding around an Ethereum contract. +type L2OutputOracleRaw struct { + Contract *L2OutputOracle // Generic contract binding to access the raw methods on +} + +// L2OutputOracleCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type L2OutputOracleCallerRaw struct { + Contract *L2OutputOracleCaller // Generic read-only contract binding to access the raw methods on +} + +// L2OutputOracleTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type L2OutputOracleTransactorRaw struct { + Contract *L2OutputOracleTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewL2OutputOracle creates a new instance of L2OutputOracle, bound to a specific deployed contract. +func NewL2OutputOracle(address common.Address, backend bind.ContractBackend) (*L2OutputOracle, error) { + contract, err := bindL2OutputOracle(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &L2OutputOracle{L2OutputOracleCaller: L2OutputOracleCaller{contract: contract}, L2OutputOracleTransactor: L2OutputOracleTransactor{contract: contract}, L2OutputOracleFilterer: L2OutputOracleFilterer{contract: contract}}, nil +} + +// NewL2OutputOracleCaller creates a new read-only instance of L2OutputOracle, bound to a specific deployed contract. +func NewL2OutputOracleCaller(address common.Address, caller bind.ContractCaller) (*L2OutputOracleCaller, error) { + contract, err := bindL2OutputOracle(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &L2OutputOracleCaller{contract: contract}, nil +} + +// NewL2OutputOracleTransactor creates a new write-only instance of L2OutputOracle, bound to a specific deployed contract. +func NewL2OutputOracleTransactor(address common.Address, transactor bind.ContractTransactor) (*L2OutputOracleTransactor, error) { + contract, err := bindL2OutputOracle(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &L2OutputOracleTransactor{contract: contract}, nil +} + +// NewL2OutputOracleFilterer creates a new log filterer instance of L2OutputOracle, bound to a specific deployed contract. +func NewL2OutputOracleFilterer(address common.Address, filterer bind.ContractFilterer) (*L2OutputOracleFilterer, error) { + contract, err := bindL2OutputOracle(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &L2OutputOracleFilterer{contract: contract}, nil +} + +// bindL2OutputOracle binds a generic wrapper to an already deployed contract. +func bindL2OutputOracle(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := L2OutputOracleMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_L2OutputOracle *L2OutputOracleRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _L2OutputOracle.Contract.L2OutputOracleCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_L2OutputOracle *L2OutputOracleRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _L2OutputOracle.Contract.L2OutputOracleTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_L2OutputOracle *L2OutputOracleRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _L2OutputOracle.Contract.L2OutputOracleTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_L2OutputOracle *L2OutputOracleCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _L2OutputOracle.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_L2OutputOracle *L2OutputOracleTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _L2OutputOracle.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_L2OutputOracle *L2OutputOracleTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _L2OutputOracle.Contract.contract.Transact(opts, method, params...) +} + +// CHALLENGER is a free data retrieval call binding the contract method 0x6b4d98dd. +// +// Solidity: function CHALLENGER() view returns(address) +func (_L2OutputOracle *L2OutputOracleCaller) CHALLENGER(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "CHALLENGER") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// CHALLENGER is a free data retrieval call binding the contract method 0x6b4d98dd. +// +// Solidity: function CHALLENGER() view returns(address) +func (_L2OutputOracle *L2OutputOracleSession) CHALLENGER() (common.Address, error) { + return _L2OutputOracle.Contract.CHALLENGER(&_L2OutputOracle.CallOpts) +} + +// CHALLENGER is a free data retrieval call binding the contract method 0x6b4d98dd. +// +// Solidity: function CHALLENGER() view returns(address) +func (_L2OutputOracle *L2OutputOracleCallerSession) CHALLENGER() (common.Address, error) { + return _L2OutputOracle.Contract.CHALLENGER(&_L2OutputOracle.CallOpts) +} + +// FINALIZATIONPERIODSECONDS is a free data retrieval call binding the contract method 0xf4daa291. +// +// Solidity: function FINALIZATION_PERIOD_SECONDS() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCaller) FINALIZATIONPERIODSECONDS(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "FINALIZATION_PERIOD_SECONDS") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// FINALIZATIONPERIODSECONDS is a free data retrieval call binding the contract method 0xf4daa291. +// +// Solidity: function FINALIZATION_PERIOD_SECONDS() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleSession) FINALIZATIONPERIODSECONDS() (*big.Int, error) { + return _L2OutputOracle.Contract.FINALIZATIONPERIODSECONDS(&_L2OutputOracle.CallOpts) +} + +// FINALIZATIONPERIODSECONDS is a free data retrieval call binding the contract method 0xf4daa291. +// +// Solidity: function FINALIZATION_PERIOD_SECONDS() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCallerSession) FINALIZATIONPERIODSECONDS() (*big.Int, error) { + return _L2OutputOracle.Contract.FINALIZATIONPERIODSECONDS(&_L2OutputOracle.CallOpts) +} + +// L2BLOCKTIME is a free data retrieval call binding the contract method 0x002134cc. +// +// Solidity: function L2_BLOCK_TIME() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCaller) L2BLOCKTIME(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "L2_BLOCK_TIME") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// L2BLOCKTIME is a free data retrieval call binding the contract method 0x002134cc. +// +// Solidity: function L2_BLOCK_TIME() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleSession) L2BLOCKTIME() (*big.Int, error) { + return _L2OutputOracle.Contract.L2BLOCKTIME(&_L2OutputOracle.CallOpts) +} + +// L2BLOCKTIME is a free data retrieval call binding the contract method 0x002134cc. +// +// Solidity: function L2_BLOCK_TIME() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCallerSession) L2BLOCKTIME() (*big.Int, error) { + return _L2OutputOracle.Contract.L2BLOCKTIME(&_L2OutputOracle.CallOpts) +} + +// PROPOSER is a free data retrieval call binding the contract method 0xbffa7f0f. +// +// Solidity: function PROPOSER() view returns(address) +func (_L2OutputOracle *L2OutputOracleCaller) PROPOSER(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "PROPOSER") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// PROPOSER is a free data retrieval call binding the contract method 0xbffa7f0f. +// +// Solidity: function PROPOSER() view returns(address) +func (_L2OutputOracle *L2OutputOracleSession) PROPOSER() (common.Address, error) { + return _L2OutputOracle.Contract.PROPOSER(&_L2OutputOracle.CallOpts) +} + +// PROPOSER is a free data retrieval call binding the contract method 0xbffa7f0f. +// +// Solidity: function PROPOSER() view returns(address) +func (_L2OutputOracle *L2OutputOracleCallerSession) PROPOSER() (common.Address, error) { + return _L2OutputOracle.Contract.PROPOSER(&_L2OutputOracle.CallOpts) +} + +// SUBMISSIONINTERVAL is a free data retrieval call binding the contract method 0x529933df. +// +// Solidity: function SUBMISSION_INTERVAL() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCaller) SUBMISSIONINTERVAL(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "SUBMISSION_INTERVAL") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// SUBMISSIONINTERVAL is a free data retrieval call binding the contract method 0x529933df. +// +// Solidity: function SUBMISSION_INTERVAL() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleSession) SUBMISSIONINTERVAL() (*big.Int, error) { + return _L2OutputOracle.Contract.SUBMISSIONINTERVAL(&_L2OutputOracle.CallOpts) +} + +// SUBMISSIONINTERVAL is a free data retrieval call binding the contract method 0x529933df. +// +// Solidity: function SUBMISSION_INTERVAL() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCallerSession) SUBMISSIONINTERVAL() (*big.Int, error) { + return _L2OutputOracle.Contract.SUBMISSIONINTERVAL(&_L2OutputOracle.CallOpts) +} + +// ComputeL2Timestamp is a free data retrieval call binding the contract method 0xd1de856c. +// +// Solidity: function computeL2Timestamp(uint256 _l2BlockNumber) view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCaller) ComputeL2Timestamp(opts *bind.CallOpts, _l2BlockNumber *big.Int) (*big.Int, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "computeL2Timestamp", _l2BlockNumber) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// ComputeL2Timestamp is a free data retrieval call binding the contract method 0xd1de856c. +// +// Solidity: function computeL2Timestamp(uint256 _l2BlockNumber) view returns(uint256) +func (_L2OutputOracle *L2OutputOracleSession) ComputeL2Timestamp(_l2BlockNumber *big.Int) (*big.Int, error) { + return _L2OutputOracle.Contract.ComputeL2Timestamp(&_L2OutputOracle.CallOpts, _l2BlockNumber) +} + +// ComputeL2Timestamp is a free data retrieval call binding the contract method 0xd1de856c. +// +// Solidity: function computeL2Timestamp(uint256 _l2BlockNumber) view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCallerSession) ComputeL2Timestamp(_l2BlockNumber *big.Int) (*big.Int, error) { + return _L2OutputOracle.Contract.ComputeL2Timestamp(&_L2OutputOracle.CallOpts, _l2BlockNumber) +} + +// GetL2Output is a free data retrieval call binding the contract method 0xa25ae557. +// +// Solidity: function getL2Output(uint256 _l2OutputIndex) view returns((bytes32,uint128,uint128)) +func (_L2OutputOracle *L2OutputOracleCaller) GetL2Output(opts *bind.CallOpts, _l2OutputIndex *big.Int) (TypesOutputProposal, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "getL2Output", _l2OutputIndex) + + if err != nil { + return *new(TypesOutputProposal), err + } + + out0 := *abi.ConvertType(out[0], new(TypesOutputProposal)).(*TypesOutputProposal) + + return out0, err + +} + +// GetL2Output is a free data retrieval call binding the contract method 0xa25ae557. +// +// Solidity: function getL2Output(uint256 _l2OutputIndex) view returns((bytes32,uint128,uint128)) +func (_L2OutputOracle *L2OutputOracleSession) GetL2Output(_l2OutputIndex *big.Int) (TypesOutputProposal, error) { + return _L2OutputOracle.Contract.GetL2Output(&_L2OutputOracle.CallOpts, _l2OutputIndex) +} + +// GetL2Output is a free data retrieval call binding the contract method 0xa25ae557. +// +// Solidity: function getL2Output(uint256 _l2OutputIndex) view returns((bytes32,uint128,uint128)) +func (_L2OutputOracle *L2OutputOracleCallerSession) GetL2Output(_l2OutputIndex *big.Int) (TypesOutputProposal, error) { + return _L2OutputOracle.Contract.GetL2Output(&_L2OutputOracle.CallOpts, _l2OutputIndex) +} + +// GetL2OutputAfter is a free data retrieval call binding the contract method 0xcf8e5cf0. +// +// Solidity: function getL2OutputAfter(uint256 _l2BlockNumber) view returns((bytes32,uint128,uint128)) +func (_L2OutputOracle *L2OutputOracleCaller) GetL2OutputAfter(opts *bind.CallOpts, _l2BlockNumber *big.Int) (TypesOutputProposal, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "getL2OutputAfter", _l2BlockNumber) + + if err != nil { + return *new(TypesOutputProposal), err + } + + out0 := *abi.ConvertType(out[0], new(TypesOutputProposal)).(*TypesOutputProposal) + + return out0, err + +} + +// GetL2OutputAfter is a free data retrieval call binding the contract method 0xcf8e5cf0. +// +// Solidity: function getL2OutputAfter(uint256 _l2BlockNumber) view returns((bytes32,uint128,uint128)) +func (_L2OutputOracle *L2OutputOracleSession) GetL2OutputAfter(_l2BlockNumber *big.Int) (TypesOutputProposal, error) { + return _L2OutputOracle.Contract.GetL2OutputAfter(&_L2OutputOracle.CallOpts, _l2BlockNumber) +} + +// GetL2OutputAfter is a free data retrieval call binding the contract method 0xcf8e5cf0. +// +// Solidity: function getL2OutputAfter(uint256 _l2BlockNumber) view returns((bytes32,uint128,uint128)) +func (_L2OutputOracle *L2OutputOracleCallerSession) GetL2OutputAfter(_l2BlockNumber *big.Int) (TypesOutputProposal, error) { + return _L2OutputOracle.Contract.GetL2OutputAfter(&_L2OutputOracle.CallOpts, _l2BlockNumber) +} + +// GetL2OutputIndexAfter is a free data retrieval call binding the contract method 0x7f006420. +// +// Solidity: function getL2OutputIndexAfter(uint256 _l2BlockNumber) view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCaller) GetL2OutputIndexAfter(opts *bind.CallOpts, _l2BlockNumber *big.Int) (*big.Int, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "getL2OutputIndexAfter", _l2BlockNumber) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetL2OutputIndexAfter is a free data retrieval call binding the contract method 0x7f006420. +// +// Solidity: function getL2OutputIndexAfter(uint256 _l2BlockNumber) view returns(uint256) +func (_L2OutputOracle *L2OutputOracleSession) GetL2OutputIndexAfter(_l2BlockNumber *big.Int) (*big.Int, error) { + return _L2OutputOracle.Contract.GetL2OutputIndexAfter(&_L2OutputOracle.CallOpts, _l2BlockNumber) +} + +// GetL2OutputIndexAfter is a free data retrieval call binding the contract method 0x7f006420. +// +// Solidity: function getL2OutputIndexAfter(uint256 _l2BlockNumber) view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCallerSession) GetL2OutputIndexAfter(_l2BlockNumber *big.Int) (*big.Int, error) { + return _L2OutputOracle.Contract.GetL2OutputIndexAfter(&_L2OutputOracle.CallOpts, _l2BlockNumber) +} + +// LatestBlockNumber is a free data retrieval call binding the contract method 0x4599c788. +// +// Solidity: function latestBlockNumber() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCaller) LatestBlockNumber(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "latestBlockNumber") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// LatestBlockNumber is a free data retrieval call binding the contract method 0x4599c788. +// +// Solidity: function latestBlockNumber() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleSession) LatestBlockNumber() (*big.Int, error) { + return _L2OutputOracle.Contract.LatestBlockNumber(&_L2OutputOracle.CallOpts) +} + +// LatestBlockNumber is a free data retrieval call binding the contract method 0x4599c788. +// +// Solidity: function latestBlockNumber() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCallerSession) LatestBlockNumber() (*big.Int, error) { + return _L2OutputOracle.Contract.LatestBlockNumber(&_L2OutputOracle.CallOpts) +} + +// LatestOutputIndex is a free data retrieval call binding the contract method 0x69f16eec. +// +// Solidity: function latestOutputIndex() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCaller) LatestOutputIndex(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "latestOutputIndex") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// LatestOutputIndex is a free data retrieval call binding the contract method 0x69f16eec. +// +// Solidity: function latestOutputIndex() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleSession) LatestOutputIndex() (*big.Int, error) { + return _L2OutputOracle.Contract.LatestOutputIndex(&_L2OutputOracle.CallOpts) +} + +// LatestOutputIndex is a free data retrieval call binding the contract method 0x69f16eec. +// +// Solidity: function latestOutputIndex() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCallerSession) LatestOutputIndex() (*big.Int, error) { + return _L2OutputOracle.Contract.LatestOutputIndex(&_L2OutputOracle.CallOpts) +} + +// NextBlockNumber is a free data retrieval call binding the contract method 0xdcec3348. +// +// Solidity: function nextBlockNumber() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCaller) NextBlockNumber(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "nextBlockNumber") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// NextBlockNumber is a free data retrieval call binding the contract method 0xdcec3348. +// +// Solidity: function nextBlockNumber() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleSession) NextBlockNumber() (*big.Int, error) { + return _L2OutputOracle.Contract.NextBlockNumber(&_L2OutputOracle.CallOpts) +} + +// NextBlockNumber is a free data retrieval call binding the contract method 0xdcec3348. +// +// Solidity: function nextBlockNumber() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCallerSession) NextBlockNumber() (*big.Int, error) { + return _L2OutputOracle.Contract.NextBlockNumber(&_L2OutputOracle.CallOpts) +} + +// NextOutputIndex is a free data retrieval call binding the contract method 0x6abcf563. +// +// Solidity: function nextOutputIndex() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCaller) NextOutputIndex(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "nextOutputIndex") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// NextOutputIndex is a free data retrieval call binding the contract method 0x6abcf563. +// +// Solidity: function nextOutputIndex() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleSession) NextOutputIndex() (*big.Int, error) { + return _L2OutputOracle.Contract.NextOutputIndex(&_L2OutputOracle.CallOpts) +} + +// NextOutputIndex is a free data retrieval call binding the contract method 0x6abcf563. +// +// Solidity: function nextOutputIndex() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCallerSession) NextOutputIndex() (*big.Int, error) { + return _L2OutputOracle.Contract.NextOutputIndex(&_L2OutputOracle.CallOpts) +} + +// StartingBlockNumber is a free data retrieval call binding the contract method 0x70872aa5. +// +// Solidity: function startingBlockNumber() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCaller) StartingBlockNumber(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "startingBlockNumber") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// StartingBlockNumber is a free data retrieval call binding the contract method 0x70872aa5. +// +// Solidity: function startingBlockNumber() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleSession) StartingBlockNumber() (*big.Int, error) { + return _L2OutputOracle.Contract.StartingBlockNumber(&_L2OutputOracle.CallOpts) +} + +// StartingBlockNumber is a free data retrieval call binding the contract method 0x70872aa5. +// +// Solidity: function startingBlockNumber() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCallerSession) StartingBlockNumber() (*big.Int, error) { + return _L2OutputOracle.Contract.StartingBlockNumber(&_L2OutputOracle.CallOpts) +} + +// StartingTimestamp is a free data retrieval call binding the contract method 0x88786272. +// +// Solidity: function startingTimestamp() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCaller) StartingTimestamp(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "startingTimestamp") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// StartingTimestamp is a free data retrieval call binding the contract method 0x88786272. +// +// Solidity: function startingTimestamp() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleSession) StartingTimestamp() (*big.Int, error) { + return _L2OutputOracle.Contract.StartingTimestamp(&_L2OutputOracle.CallOpts) +} + +// StartingTimestamp is a free data retrieval call binding the contract method 0x88786272. +// +// Solidity: function startingTimestamp() view returns(uint256) +func (_L2OutputOracle *L2OutputOracleCallerSession) StartingTimestamp() (*big.Int, error) { + return _L2OutputOracle.Contract.StartingTimestamp(&_L2OutputOracle.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L2OutputOracle *L2OutputOracleCaller) Version(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _L2OutputOracle.contract.Call(opts, &out, "version") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L2OutputOracle *L2OutputOracleSession) Version() (string, error) { + return _L2OutputOracle.Contract.Version(&_L2OutputOracle.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L2OutputOracle *L2OutputOracleCallerSession) Version() (string, error) { + return _L2OutputOracle.Contract.Version(&_L2OutputOracle.CallOpts) +} + +// DeleteL2Outputs is a paid mutator transaction binding the contract method 0x89c44cbb. +// +// Solidity: function deleteL2Outputs(uint256 _l2OutputIndex) returns() +func (_L2OutputOracle *L2OutputOracleTransactor) DeleteL2Outputs(opts *bind.TransactOpts, _l2OutputIndex *big.Int) (*types.Transaction, error) { + return _L2OutputOracle.contract.Transact(opts, "deleteL2Outputs", _l2OutputIndex) +} + +// DeleteL2Outputs is a paid mutator transaction binding the contract method 0x89c44cbb. +// +// Solidity: function deleteL2Outputs(uint256 _l2OutputIndex) returns() +func (_L2OutputOracle *L2OutputOracleSession) DeleteL2Outputs(_l2OutputIndex *big.Int) (*types.Transaction, error) { + return _L2OutputOracle.Contract.DeleteL2Outputs(&_L2OutputOracle.TransactOpts, _l2OutputIndex) +} + +// DeleteL2Outputs is a paid mutator transaction binding the contract method 0x89c44cbb. +// +// Solidity: function deleteL2Outputs(uint256 _l2OutputIndex) returns() +func (_L2OutputOracle *L2OutputOracleTransactorSession) DeleteL2Outputs(_l2OutputIndex *big.Int) (*types.Transaction, error) { + return _L2OutputOracle.Contract.DeleteL2Outputs(&_L2OutputOracle.TransactOpts, _l2OutputIndex) +} + +// Initialize is a paid mutator transaction binding the contract method 0xe4a30116. +// +// Solidity: function initialize(uint256 _startingBlockNumber, uint256 _startingTimestamp) returns() +func (_L2OutputOracle *L2OutputOracleTransactor) Initialize(opts *bind.TransactOpts, _startingBlockNumber *big.Int, _startingTimestamp *big.Int) (*types.Transaction, error) { + return _L2OutputOracle.contract.Transact(opts, "initialize", _startingBlockNumber, _startingTimestamp) +} + +// Initialize is a paid mutator transaction binding the contract method 0xe4a30116. +// +// Solidity: function initialize(uint256 _startingBlockNumber, uint256 _startingTimestamp) returns() +func (_L2OutputOracle *L2OutputOracleSession) Initialize(_startingBlockNumber *big.Int, _startingTimestamp *big.Int) (*types.Transaction, error) { + return _L2OutputOracle.Contract.Initialize(&_L2OutputOracle.TransactOpts, _startingBlockNumber, _startingTimestamp) +} + +// Initialize is a paid mutator transaction binding the contract method 0xe4a30116. +// +// Solidity: function initialize(uint256 _startingBlockNumber, uint256 _startingTimestamp) returns() +func (_L2OutputOracle *L2OutputOracleTransactorSession) Initialize(_startingBlockNumber *big.Int, _startingTimestamp *big.Int) (*types.Transaction, error) { + return _L2OutputOracle.Contract.Initialize(&_L2OutputOracle.TransactOpts, _startingBlockNumber, _startingTimestamp) +} + +// ProposeL2Output is a paid mutator transaction binding the contract method 0x9aaab648. +// +// Solidity: function proposeL2Output(bytes32 _outputRoot, uint256 _l2BlockNumber, bytes32 _l1BlockHash, uint256 _l1BlockNumber) payable returns() +func (_L2OutputOracle *L2OutputOracleTransactor) ProposeL2Output(opts *bind.TransactOpts, _outputRoot [32]byte, _l2BlockNumber *big.Int, _l1BlockHash [32]byte, _l1BlockNumber *big.Int) (*types.Transaction, error) { + return _L2OutputOracle.contract.Transact(opts, "proposeL2Output", _outputRoot, _l2BlockNumber, _l1BlockHash, _l1BlockNumber) +} + +// ProposeL2Output is a paid mutator transaction binding the contract method 0x9aaab648. +// +// Solidity: function proposeL2Output(bytes32 _outputRoot, uint256 _l2BlockNumber, bytes32 _l1BlockHash, uint256 _l1BlockNumber) payable returns() +func (_L2OutputOracle *L2OutputOracleSession) ProposeL2Output(_outputRoot [32]byte, _l2BlockNumber *big.Int, _l1BlockHash [32]byte, _l1BlockNumber *big.Int) (*types.Transaction, error) { + return _L2OutputOracle.Contract.ProposeL2Output(&_L2OutputOracle.TransactOpts, _outputRoot, _l2BlockNumber, _l1BlockHash, _l1BlockNumber) +} + +// ProposeL2Output is a paid mutator transaction binding the contract method 0x9aaab648. +// +// Solidity: function proposeL2Output(bytes32 _outputRoot, uint256 _l2BlockNumber, bytes32 _l1BlockHash, uint256 _l1BlockNumber) payable returns() +func (_L2OutputOracle *L2OutputOracleTransactorSession) ProposeL2Output(_outputRoot [32]byte, _l2BlockNumber *big.Int, _l1BlockHash [32]byte, _l1BlockNumber *big.Int) (*types.Transaction, error) { + return _L2OutputOracle.Contract.ProposeL2Output(&_L2OutputOracle.TransactOpts, _outputRoot, _l2BlockNumber, _l1BlockHash, _l1BlockNumber) +} + +// L2OutputOracleInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the L2OutputOracle contract. +type L2OutputOracleInitializedIterator struct { + Event *L2OutputOracleInitialized // 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 *L2OutputOracleInitializedIterator) 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(L2OutputOracleInitialized) + 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(L2OutputOracleInitialized) + 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 *L2OutputOracleInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L2OutputOracleInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L2OutputOracleInitialized represents a Initialized event raised by the L2OutputOracle contract. +type L2OutputOracleInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_L2OutputOracle *L2OutputOracleFilterer) FilterInitialized(opts *bind.FilterOpts) (*L2OutputOracleInitializedIterator, error) { + + logs, sub, err := _L2OutputOracle.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &L2OutputOracleInitializedIterator{contract: _L2OutputOracle.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_L2OutputOracle *L2OutputOracleFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *L2OutputOracleInitialized) (event.Subscription, error) { + + logs, sub, err := _L2OutputOracle.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(L2OutputOracleInitialized) + if err := _L2OutputOracle.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_L2OutputOracle *L2OutputOracleFilterer) ParseInitialized(log types.Log) (*L2OutputOracleInitialized, error) { + event := new(L2OutputOracleInitialized) + if err := _L2OutputOracle.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L2OutputOracleOutputProposedIterator is returned from FilterOutputProposed and is used to iterate over the raw logs and unpacked data for OutputProposed events raised by the L2OutputOracle contract. +type L2OutputOracleOutputProposedIterator struct { + Event *L2OutputOracleOutputProposed // 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 *L2OutputOracleOutputProposedIterator) 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(L2OutputOracleOutputProposed) + 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(L2OutputOracleOutputProposed) + 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 *L2OutputOracleOutputProposedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L2OutputOracleOutputProposedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L2OutputOracleOutputProposed represents a OutputProposed event raised by the L2OutputOracle contract. +type L2OutputOracleOutputProposed struct { + OutputRoot [32]byte + L2OutputIndex *big.Int + L2BlockNumber *big.Int + L1Timestamp *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOutputProposed is a free log retrieval operation binding the contract event 0xa7aaf2512769da4e444e3de247be2564225c2e7a8f74cfe528e46e17d24868e2. +// +// Solidity: event OutputProposed(bytes32 indexed outputRoot, uint256 indexed l2OutputIndex, uint256 indexed l2BlockNumber, uint256 l1Timestamp) +func (_L2OutputOracle *L2OutputOracleFilterer) FilterOutputProposed(opts *bind.FilterOpts, outputRoot [][32]byte, l2OutputIndex []*big.Int, l2BlockNumber []*big.Int) (*L2OutputOracleOutputProposedIterator, error) { + + var outputRootRule []interface{} + for _, outputRootItem := range outputRoot { + outputRootRule = append(outputRootRule, outputRootItem) + } + var l2OutputIndexRule []interface{} + for _, l2OutputIndexItem := range l2OutputIndex { + l2OutputIndexRule = append(l2OutputIndexRule, l2OutputIndexItem) + } + var l2BlockNumberRule []interface{} + for _, l2BlockNumberItem := range l2BlockNumber { + l2BlockNumberRule = append(l2BlockNumberRule, l2BlockNumberItem) + } + + logs, sub, err := _L2OutputOracle.contract.FilterLogs(opts, "OutputProposed", outputRootRule, l2OutputIndexRule, l2BlockNumberRule) + if err != nil { + return nil, err + } + return &L2OutputOracleOutputProposedIterator{contract: _L2OutputOracle.contract, event: "OutputProposed", logs: logs, sub: sub}, nil +} + +// WatchOutputProposed is a free log subscription operation binding the contract event 0xa7aaf2512769da4e444e3de247be2564225c2e7a8f74cfe528e46e17d24868e2. +// +// Solidity: event OutputProposed(bytes32 indexed outputRoot, uint256 indexed l2OutputIndex, uint256 indexed l2BlockNumber, uint256 l1Timestamp) +func (_L2OutputOracle *L2OutputOracleFilterer) WatchOutputProposed(opts *bind.WatchOpts, sink chan<- *L2OutputOracleOutputProposed, outputRoot [][32]byte, l2OutputIndex []*big.Int, l2BlockNumber []*big.Int) (event.Subscription, error) { + + var outputRootRule []interface{} + for _, outputRootItem := range outputRoot { + outputRootRule = append(outputRootRule, outputRootItem) + } + var l2OutputIndexRule []interface{} + for _, l2OutputIndexItem := range l2OutputIndex { + l2OutputIndexRule = append(l2OutputIndexRule, l2OutputIndexItem) + } + var l2BlockNumberRule []interface{} + for _, l2BlockNumberItem := range l2BlockNumber { + l2BlockNumberRule = append(l2BlockNumberRule, l2BlockNumberItem) + } + + logs, sub, err := _L2OutputOracle.contract.WatchLogs(opts, "OutputProposed", outputRootRule, l2OutputIndexRule, l2BlockNumberRule) + 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(L2OutputOracleOutputProposed) + if err := _L2OutputOracle.contract.UnpackLog(event, "OutputProposed", 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 +} + +// ParseOutputProposed is a log parse operation binding the contract event 0xa7aaf2512769da4e444e3de247be2564225c2e7a8f74cfe528e46e17d24868e2. +// +// Solidity: event OutputProposed(bytes32 indexed outputRoot, uint256 indexed l2OutputIndex, uint256 indexed l2BlockNumber, uint256 l1Timestamp) +func (_L2OutputOracle *L2OutputOracleFilterer) ParseOutputProposed(log types.Log) (*L2OutputOracleOutputProposed, error) { + event := new(L2OutputOracleOutputProposed) + if err := _L2OutputOracle.contract.UnpackLog(event, "OutputProposed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L2OutputOracleOutputsDeletedIterator is returned from FilterOutputsDeleted and is used to iterate over the raw logs and unpacked data for OutputsDeleted events raised by the L2OutputOracle contract. +type L2OutputOracleOutputsDeletedIterator struct { + Event *L2OutputOracleOutputsDeleted // 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 *L2OutputOracleOutputsDeletedIterator) 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(L2OutputOracleOutputsDeleted) + 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(L2OutputOracleOutputsDeleted) + 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 *L2OutputOracleOutputsDeletedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L2OutputOracleOutputsDeletedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L2OutputOracleOutputsDeleted represents a OutputsDeleted event raised by the L2OutputOracle contract. +type L2OutputOracleOutputsDeleted struct { + PrevNextOutputIndex *big.Int + NewNextOutputIndex *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOutputsDeleted is a free log retrieval operation binding the contract event 0x4ee37ac2c786ec85e87592d3c5c8a1dd66f8496dda3f125d9ea8ca5f657629b6. +// +// Solidity: event OutputsDeleted(uint256 indexed prevNextOutputIndex, uint256 indexed newNextOutputIndex) +func (_L2OutputOracle *L2OutputOracleFilterer) FilterOutputsDeleted(opts *bind.FilterOpts, prevNextOutputIndex []*big.Int, newNextOutputIndex []*big.Int) (*L2OutputOracleOutputsDeletedIterator, error) { + + var prevNextOutputIndexRule []interface{} + for _, prevNextOutputIndexItem := range prevNextOutputIndex { + prevNextOutputIndexRule = append(prevNextOutputIndexRule, prevNextOutputIndexItem) + } + var newNextOutputIndexRule []interface{} + for _, newNextOutputIndexItem := range newNextOutputIndex { + newNextOutputIndexRule = append(newNextOutputIndexRule, newNextOutputIndexItem) + } + + logs, sub, err := _L2OutputOracle.contract.FilterLogs(opts, "OutputsDeleted", prevNextOutputIndexRule, newNextOutputIndexRule) + if err != nil { + return nil, err + } + return &L2OutputOracleOutputsDeletedIterator{contract: _L2OutputOracle.contract, event: "OutputsDeleted", logs: logs, sub: sub}, nil +} + +// WatchOutputsDeleted is a free log subscription operation binding the contract event 0x4ee37ac2c786ec85e87592d3c5c8a1dd66f8496dda3f125d9ea8ca5f657629b6. +// +// Solidity: event OutputsDeleted(uint256 indexed prevNextOutputIndex, uint256 indexed newNextOutputIndex) +func (_L2OutputOracle *L2OutputOracleFilterer) WatchOutputsDeleted(opts *bind.WatchOpts, sink chan<- *L2OutputOracleOutputsDeleted, prevNextOutputIndex []*big.Int, newNextOutputIndex []*big.Int) (event.Subscription, error) { + + var prevNextOutputIndexRule []interface{} + for _, prevNextOutputIndexItem := range prevNextOutputIndex { + prevNextOutputIndexRule = append(prevNextOutputIndexRule, prevNextOutputIndexItem) + } + var newNextOutputIndexRule []interface{} + for _, newNextOutputIndexItem := range newNextOutputIndex { + newNextOutputIndexRule = append(newNextOutputIndexRule, newNextOutputIndexItem) + } + + logs, sub, err := _L2OutputOracle.contract.WatchLogs(opts, "OutputsDeleted", prevNextOutputIndexRule, newNextOutputIndexRule) + 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(L2OutputOracleOutputsDeleted) + if err := _L2OutputOracle.contract.UnpackLog(event, "OutputsDeleted", 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 +} + +// ParseOutputsDeleted is a log parse operation binding the contract event 0x4ee37ac2c786ec85e87592d3c5c8a1dd66f8496dda3f125d9ea8ca5f657629b6. +// +// Solidity: event OutputsDeleted(uint256 indexed prevNextOutputIndex, uint256 indexed newNextOutputIndex) +func (_L2OutputOracle *L2OutputOracleFilterer) ParseOutputsDeleted(log types.Log) (*L2OutputOracleOutputsDeleted, error) { + event := new(L2OutputOracleOutputsDeleted) + if err := _L2OutputOracle.contract.UnpackLog(event, "OutputsDeleted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/op-chain-ops/opbnb-upgrades/old-contracts/bindings/OptimismMintableERC20Factory.go b/op-chain-ops/opbnb-upgrades/old-contracts/bindings/OptimismMintableERC20Factory.go new file mode 100644 index 000000000..d6f6324fe --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/old-contracts/bindings/OptimismMintableERC20Factory.go @@ -0,0 +1,592 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// OptimismMintableERC20FactoryMetaData contains all meta data concerning the OptimismMintableERC20Factory contract. +var OptimismMintableERC20FactoryMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_bridge\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"BRIDGE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"createOptimismMintableERC20\",\"inputs\":[{\"name\":\"_remoteToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_name\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_symbol\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createStandardL2Token\",\"inputs\":[{\"name\":\"_remoteToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_name\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_symbol\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"OptimismMintableERC20Created\",\"inputs\":[{\"name\":\"localToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"remoteToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"deployer\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StandardL2TokenCreated\",\"inputs\":[{\"name\":\"remoteToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"localToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false}]", +} + +// OptimismMintableERC20FactoryABI is the input ABI used to generate the binding from. +// Deprecated: Use OptimismMintableERC20FactoryMetaData.ABI instead. +var OptimismMintableERC20FactoryABI = OptimismMintableERC20FactoryMetaData.ABI + +// OptimismMintableERC20Factory is an auto generated Go binding around an Ethereum contract. +type OptimismMintableERC20Factory struct { + OptimismMintableERC20FactoryCaller // Read-only binding to the contract + OptimismMintableERC20FactoryTransactor // Write-only binding to the contract + OptimismMintableERC20FactoryFilterer // Log filterer for contract events +} + +// OptimismMintableERC20FactoryCaller is an auto generated read-only Go binding around an Ethereum contract. +type OptimismMintableERC20FactoryCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OptimismMintableERC20FactoryTransactor is an auto generated write-only Go binding around an Ethereum contract. +type OptimismMintableERC20FactoryTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OptimismMintableERC20FactoryFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type OptimismMintableERC20FactoryFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OptimismMintableERC20FactorySession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type OptimismMintableERC20FactorySession struct { + Contract *OptimismMintableERC20Factory // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OptimismMintableERC20FactoryCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type OptimismMintableERC20FactoryCallerSession struct { + Contract *OptimismMintableERC20FactoryCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// OptimismMintableERC20FactoryTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type OptimismMintableERC20FactoryTransactorSession struct { + Contract *OptimismMintableERC20FactoryTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OptimismMintableERC20FactoryRaw is an auto generated low-level Go binding around an Ethereum contract. +type OptimismMintableERC20FactoryRaw struct { + Contract *OptimismMintableERC20Factory // Generic contract binding to access the raw methods on +} + +// OptimismMintableERC20FactoryCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type OptimismMintableERC20FactoryCallerRaw struct { + Contract *OptimismMintableERC20FactoryCaller // Generic read-only contract binding to access the raw methods on +} + +// OptimismMintableERC20FactoryTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type OptimismMintableERC20FactoryTransactorRaw struct { + Contract *OptimismMintableERC20FactoryTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewOptimismMintableERC20Factory creates a new instance of OptimismMintableERC20Factory, bound to a specific deployed contract. +func NewOptimismMintableERC20Factory(address common.Address, backend bind.ContractBackend) (*OptimismMintableERC20Factory, error) { + contract, err := bindOptimismMintableERC20Factory(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &OptimismMintableERC20Factory{OptimismMintableERC20FactoryCaller: OptimismMintableERC20FactoryCaller{contract: contract}, OptimismMintableERC20FactoryTransactor: OptimismMintableERC20FactoryTransactor{contract: contract}, OptimismMintableERC20FactoryFilterer: OptimismMintableERC20FactoryFilterer{contract: contract}}, nil +} + +// NewOptimismMintableERC20FactoryCaller creates a new read-only instance of OptimismMintableERC20Factory, bound to a specific deployed contract. +func NewOptimismMintableERC20FactoryCaller(address common.Address, caller bind.ContractCaller) (*OptimismMintableERC20FactoryCaller, error) { + contract, err := bindOptimismMintableERC20Factory(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &OptimismMintableERC20FactoryCaller{contract: contract}, nil +} + +// NewOptimismMintableERC20FactoryTransactor creates a new write-only instance of OptimismMintableERC20Factory, bound to a specific deployed contract. +func NewOptimismMintableERC20FactoryTransactor(address common.Address, transactor bind.ContractTransactor) (*OptimismMintableERC20FactoryTransactor, error) { + contract, err := bindOptimismMintableERC20Factory(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &OptimismMintableERC20FactoryTransactor{contract: contract}, nil +} + +// NewOptimismMintableERC20FactoryFilterer creates a new log filterer instance of OptimismMintableERC20Factory, bound to a specific deployed contract. +func NewOptimismMintableERC20FactoryFilterer(address common.Address, filterer bind.ContractFilterer) (*OptimismMintableERC20FactoryFilterer, error) { + contract, err := bindOptimismMintableERC20Factory(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &OptimismMintableERC20FactoryFilterer{contract: contract}, nil +} + +// bindOptimismMintableERC20Factory binds a generic wrapper to an already deployed contract. +func bindOptimismMintableERC20Factory(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := OptimismMintableERC20FactoryMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _OptimismMintableERC20Factory.Contract.OptimismMintableERC20FactoryCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.Contract.OptimismMintableERC20FactoryTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.Contract.OptimismMintableERC20FactoryTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _OptimismMintableERC20Factory.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.Contract.contract.Transact(opts, method, params...) +} + +// BRIDGE is a free data retrieval call binding the contract method 0xee9a31a2. +// +// Solidity: function BRIDGE() view returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryCaller) BRIDGE(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _OptimismMintableERC20Factory.contract.Call(opts, &out, "BRIDGE") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// BRIDGE is a free data retrieval call binding the contract method 0xee9a31a2. +// +// Solidity: function BRIDGE() view returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactorySession) BRIDGE() (common.Address, error) { + return _OptimismMintableERC20Factory.Contract.BRIDGE(&_OptimismMintableERC20Factory.CallOpts) +} + +// BRIDGE is a free data retrieval call binding the contract method 0xee9a31a2. +// +// Solidity: function BRIDGE() view returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryCallerSession) BRIDGE() (common.Address, error) { + return _OptimismMintableERC20Factory.Contract.BRIDGE(&_OptimismMintableERC20Factory.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryCaller) Version(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _OptimismMintableERC20Factory.contract.Call(opts, &out, "version") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactorySession) Version() (string, error) { + return _OptimismMintableERC20Factory.Contract.Version(&_OptimismMintableERC20Factory.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryCallerSession) Version() (string, error) { + return _OptimismMintableERC20Factory.Contract.Version(&_OptimismMintableERC20Factory.CallOpts) +} + +// CreateOptimismMintableERC20 is a paid mutator transaction binding the contract method 0xce5ac90f. +// +// Solidity: function createOptimismMintableERC20(address _remoteToken, string _name, string _symbol) returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryTransactor) CreateOptimismMintableERC20(opts *bind.TransactOpts, _remoteToken common.Address, _name string, _symbol string) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.contract.Transact(opts, "createOptimismMintableERC20", _remoteToken, _name, _symbol) +} + +// CreateOptimismMintableERC20 is a paid mutator transaction binding the contract method 0xce5ac90f. +// +// Solidity: function createOptimismMintableERC20(address _remoteToken, string _name, string _symbol) returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactorySession) CreateOptimismMintableERC20(_remoteToken common.Address, _name string, _symbol string) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.Contract.CreateOptimismMintableERC20(&_OptimismMintableERC20Factory.TransactOpts, _remoteToken, _name, _symbol) +} + +// CreateOptimismMintableERC20 is a paid mutator transaction binding the contract method 0xce5ac90f. +// +// Solidity: function createOptimismMintableERC20(address _remoteToken, string _name, string _symbol) returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryTransactorSession) CreateOptimismMintableERC20(_remoteToken common.Address, _name string, _symbol string) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.Contract.CreateOptimismMintableERC20(&_OptimismMintableERC20Factory.TransactOpts, _remoteToken, _name, _symbol) +} + +// CreateStandardL2Token is a paid mutator transaction binding the contract method 0x896f93d1. +// +// Solidity: function createStandardL2Token(address _remoteToken, string _name, string _symbol) returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryTransactor) CreateStandardL2Token(opts *bind.TransactOpts, _remoteToken common.Address, _name string, _symbol string) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.contract.Transact(opts, "createStandardL2Token", _remoteToken, _name, _symbol) +} + +// CreateStandardL2Token is a paid mutator transaction binding the contract method 0x896f93d1. +// +// Solidity: function createStandardL2Token(address _remoteToken, string _name, string _symbol) returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactorySession) CreateStandardL2Token(_remoteToken common.Address, _name string, _symbol string) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.Contract.CreateStandardL2Token(&_OptimismMintableERC20Factory.TransactOpts, _remoteToken, _name, _symbol) +} + +// CreateStandardL2Token is a paid mutator transaction binding the contract method 0x896f93d1. +// +// Solidity: function createStandardL2Token(address _remoteToken, string _name, string _symbol) returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryTransactorSession) CreateStandardL2Token(_remoteToken common.Address, _name string, _symbol string) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.Contract.CreateStandardL2Token(&_OptimismMintableERC20Factory.TransactOpts, _remoteToken, _name, _symbol) +} + +// OptimismMintableERC20FactoryOptimismMintableERC20CreatedIterator is returned from FilterOptimismMintableERC20Created and is used to iterate over the raw logs and unpacked data for OptimismMintableERC20Created events raised by the OptimismMintableERC20Factory contract. +type OptimismMintableERC20FactoryOptimismMintableERC20CreatedIterator struct { + Event *OptimismMintableERC20FactoryOptimismMintableERC20Created // 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 *OptimismMintableERC20FactoryOptimismMintableERC20CreatedIterator) 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(OptimismMintableERC20FactoryOptimismMintableERC20Created) + 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(OptimismMintableERC20FactoryOptimismMintableERC20Created) + 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 *OptimismMintableERC20FactoryOptimismMintableERC20CreatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OptimismMintableERC20FactoryOptimismMintableERC20CreatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OptimismMintableERC20FactoryOptimismMintableERC20Created represents a OptimismMintableERC20Created event raised by the OptimismMintableERC20Factory contract. +type OptimismMintableERC20FactoryOptimismMintableERC20Created struct { + LocalToken common.Address + RemoteToken common.Address + Deployer common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOptimismMintableERC20Created is a free log retrieval operation binding the contract event 0x52fe89dd5930f343d25650b62fd367bae47088bcddffd2a88350a6ecdd620cdb. +// +// Solidity: event OptimismMintableERC20Created(address indexed localToken, address indexed remoteToken, address deployer) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryFilterer) FilterOptimismMintableERC20Created(opts *bind.FilterOpts, localToken []common.Address, remoteToken []common.Address) (*OptimismMintableERC20FactoryOptimismMintableERC20CreatedIterator, error) { + + var localTokenRule []interface{} + for _, localTokenItem := range localToken { + localTokenRule = append(localTokenRule, localTokenItem) + } + var remoteTokenRule []interface{} + for _, remoteTokenItem := range remoteToken { + remoteTokenRule = append(remoteTokenRule, remoteTokenItem) + } + + logs, sub, err := _OptimismMintableERC20Factory.contract.FilterLogs(opts, "OptimismMintableERC20Created", localTokenRule, remoteTokenRule) + if err != nil { + return nil, err + } + return &OptimismMintableERC20FactoryOptimismMintableERC20CreatedIterator{contract: _OptimismMintableERC20Factory.contract, event: "OptimismMintableERC20Created", logs: logs, sub: sub}, nil +} + +// WatchOptimismMintableERC20Created is a free log subscription operation binding the contract event 0x52fe89dd5930f343d25650b62fd367bae47088bcddffd2a88350a6ecdd620cdb. +// +// Solidity: event OptimismMintableERC20Created(address indexed localToken, address indexed remoteToken, address deployer) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryFilterer) WatchOptimismMintableERC20Created(opts *bind.WatchOpts, sink chan<- *OptimismMintableERC20FactoryOptimismMintableERC20Created, localToken []common.Address, remoteToken []common.Address) (event.Subscription, error) { + + var localTokenRule []interface{} + for _, localTokenItem := range localToken { + localTokenRule = append(localTokenRule, localTokenItem) + } + var remoteTokenRule []interface{} + for _, remoteTokenItem := range remoteToken { + remoteTokenRule = append(remoteTokenRule, remoteTokenItem) + } + + logs, sub, err := _OptimismMintableERC20Factory.contract.WatchLogs(opts, "OptimismMintableERC20Created", localTokenRule, remoteTokenRule) + 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(OptimismMintableERC20FactoryOptimismMintableERC20Created) + if err := _OptimismMintableERC20Factory.contract.UnpackLog(event, "OptimismMintableERC20Created", 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 +} + +// ParseOptimismMintableERC20Created is a log parse operation binding the contract event 0x52fe89dd5930f343d25650b62fd367bae47088bcddffd2a88350a6ecdd620cdb. +// +// Solidity: event OptimismMintableERC20Created(address indexed localToken, address indexed remoteToken, address deployer) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryFilterer) ParseOptimismMintableERC20Created(log types.Log) (*OptimismMintableERC20FactoryOptimismMintableERC20Created, error) { + event := new(OptimismMintableERC20FactoryOptimismMintableERC20Created) + if err := _OptimismMintableERC20Factory.contract.UnpackLog(event, "OptimismMintableERC20Created", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// OptimismMintableERC20FactoryStandardL2TokenCreatedIterator is returned from FilterStandardL2TokenCreated and is used to iterate over the raw logs and unpacked data for StandardL2TokenCreated events raised by the OptimismMintableERC20Factory contract. +type OptimismMintableERC20FactoryStandardL2TokenCreatedIterator struct { + Event *OptimismMintableERC20FactoryStandardL2TokenCreated // 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 *OptimismMintableERC20FactoryStandardL2TokenCreatedIterator) 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(OptimismMintableERC20FactoryStandardL2TokenCreated) + 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(OptimismMintableERC20FactoryStandardL2TokenCreated) + 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 *OptimismMintableERC20FactoryStandardL2TokenCreatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OptimismMintableERC20FactoryStandardL2TokenCreatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OptimismMintableERC20FactoryStandardL2TokenCreated represents a StandardL2TokenCreated event raised by the OptimismMintableERC20Factory contract. +type OptimismMintableERC20FactoryStandardL2TokenCreated struct { + RemoteToken common.Address + LocalToken common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterStandardL2TokenCreated is a free log retrieval operation binding the contract event 0xceeb8e7d520d7f3b65fc11a262b91066940193b05d4f93df07cfdced0eb551cf. +// +// Solidity: event StandardL2TokenCreated(address indexed remoteToken, address indexed localToken) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryFilterer) FilterStandardL2TokenCreated(opts *bind.FilterOpts, remoteToken []common.Address, localToken []common.Address) (*OptimismMintableERC20FactoryStandardL2TokenCreatedIterator, error) { + + var remoteTokenRule []interface{} + for _, remoteTokenItem := range remoteToken { + remoteTokenRule = append(remoteTokenRule, remoteTokenItem) + } + var localTokenRule []interface{} + for _, localTokenItem := range localToken { + localTokenRule = append(localTokenRule, localTokenItem) + } + + logs, sub, err := _OptimismMintableERC20Factory.contract.FilterLogs(opts, "StandardL2TokenCreated", remoteTokenRule, localTokenRule) + if err != nil { + return nil, err + } + return &OptimismMintableERC20FactoryStandardL2TokenCreatedIterator{contract: _OptimismMintableERC20Factory.contract, event: "StandardL2TokenCreated", logs: logs, sub: sub}, nil +} + +// WatchStandardL2TokenCreated is a free log subscription operation binding the contract event 0xceeb8e7d520d7f3b65fc11a262b91066940193b05d4f93df07cfdced0eb551cf. +// +// Solidity: event StandardL2TokenCreated(address indexed remoteToken, address indexed localToken) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryFilterer) WatchStandardL2TokenCreated(opts *bind.WatchOpts, sink chan<- *OptimismMintableERC20FactoryStandardL2TokenCreated, remoteToken []common.Address, localToken []common.Address) (event.Subscription, error) { + + var remoteTokenRule []interface{} + for _, remoteTokenItem := range remoteToken { + remoteTokenRule = append(remoteTokenRule, remoteTokenItem) + } + var localTokenRule []interface{} + for _, localTokenItem := range localToken { + localTokenRule = append(localTokenRule, localTokenItem) + } + + logs, sub, err := _OptimismMintableERC20Factory.contract.WatchLogs(opts, "StandardL2TokenCreated", remoteTokenRule, localTokenRule) + 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(OptimismMintableERC20FactoryStandardL2TokenCreated) + if err := _OptimismMintableERC20Factory.contract.UnpackLog(event, "StandardL2TokenCreated", 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 +} + +// ParseStandardL2TokenCreated is a log parse operation binding the contract event 0xceeb8e7d520d7f3b65fc11a262b91066940193b05d4f93df07cfdced0eb551cf. +// +// Solidity: event StandardL2TokenCreated(address indexed remoteToken, address indexed localToken) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryFilterer) ParseStandardL2TokenCreated(log types.Log) (*OptimismMintableERC20FactoryStandardL2TokenCreated, error) { + event := new(OptimismMintableERC20FactoryStandardL2TokenCreated) + if err := _OptimismMintableERC20Factory.contract.UnpackLog(event, "StandardL2TokenCreated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/op-chain-ops/opbnb-upgrades/old-contracts/bindings/OptimismPortal.go b/op-chain-ops/opbnb-upgrades/old-contracts/bindings/OptimismPortal.go new file mode 100644 index 000000000..bee63bedd --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/old-contracts/bindings/OptimismPortal.go @@ -0,0 +1,1618 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// TypesOutputRootProof is an auto generated low-level Go binding around an user-defined struct. +type TypesOutputRootProof struct { + Version [32]byte + StateRoot [32]byte + MessagePasserStorageRoot [32]byte + LatestBlockhash [32]byte +} + +// TypesWithdrawalTransaction is an auto generated low-level Go binding around an user-defined struct. +type TypesWithdrawalTransaction struct { + Nonce *big.Int + Sender common.Address + Target common.Address + Value *big.Int + GasLimit *big.Int + Data []byte +} + +// OptimismPortalMetaData contains all meta data concerning the OptimismPortal contract. +var OptimismPortalMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_l2Oracle\",\"type\":\"address\",\"internalType\":\"contractL2OutputOracle\"},{\"name\":\"_guardian\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_paused\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"_config\",\"type\":\"address\",\"internalType\":\"contractSystemConfig\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"GUARDIAN\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"L2_ORACLE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractL2OutputOracle\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"SYSTEM_CONFIG\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractSystemConfig\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"depositTransaction\",\"inputs\":[{\"name\":\"_to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_gasLimit\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_isCreation\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"_data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"donateETH\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"finalizeWithdrawalTransaction\",\"inputs\":[{\"name\":\"_tx\",\"type\":\"tuple\",\"internalType\":\"structTypes.WithdrawalTransaction\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"gasLimit\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"finalizedWithdrawals\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_paused\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isOutputFinalized\",\"inputs\":[{\"name\":\"_l2OutputIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"l2Sender\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"minimumGasLimit\",\"inputs\":[{\"name\":\"_byteCount\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"params\",\"inputs\":[],\"outputs\":[{\"name\":\"prevBaseFee\",\"type\":\"uint128\",\"internalType\":\"uint128\"},{\"name\":\"prevBoughtGas\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"prevBlockNum\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proveWithdrawalTransaction\",\"inputs\":[{\"name\":\"_tx\",\"type\":\"tuple\",\"internalType\":\"structTypes.WithdrawalTransaction\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"gasLimit\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"_l2OutputIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_outputRootProof\",\"type\":\"tuple\",\"internalType\":\"structTypes.OutputRootProof\",\"components\":[{\"name\":\"version\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stateRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"messagePasserStorageRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"latestBlockhash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"_withdrawalProof\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"provenWithdrawals\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"outputRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"timestamp\",\"type\":\"uint128\",\"internalType\":\"uint128\"},{\"name\":\"l2OutputIndex\",\"type\":\"uint128\",\"internalType\":\"uint128\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TransactionDeposited\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"version\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"opaqueData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawalFinalized\",\"inputs\":[{\"name\":\"withdrawalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"success\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawalProven\",\"inputs\":[{\"name\":\"withdrawalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false}]", +} + +// OptimismPortalABI is the input ABI used to generate the binding from. +// Deprecated: Use OptimismPortalMetaData.ABI instead. +var OptimismPortalABI = OptimismPortalMetaData.ABI + +// OptimismPortal is an auto generated Go binding around an Ethereum contract. +type OptimismPortal struct { + OptimismPortalCaller // Read-only binding to the contract + OptimismPortalTransactor // Write-only binding to the contract + OptimismPortalFilterer // Log filterer for contract events +} + +// OptimismPortalCaller is an auto generated read-only Go binding around an Ethereum contract. +type OptimismPortalCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OptimismPortalTransactor is an auto generated write-only Go binding around an Ethereum contract. +type OptimismPortalTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OptimismPortalFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type OptimismPortalFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OptimismPortalSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type OptimismPortalSession struct { + Contract *OptimismPortal // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OptimismPortalCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type OptimismPortalCallerSession struct { + Contract *OptimismPortalCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// OptimismPortalTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type OptimismPortalTransactorSession struct { + Contract *OptimismPortalTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OptimismPortalRaw is an auto generated low-level Go binding around an Ethereum contract. +type OptimismPortalRaw struct { + Contract *OptimismPortal // Generic contract binding to access the raw methods on +} + +// OptimismPortalCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type OptimismPortalCallerRaw struct { + Contract *OptimismPortalCaller // Generic read-only contract binding to access the raw methods on +} + +// OptimismPortalTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type OptimismPortalTransactorRaw struct { + Contract *OptimismPortalTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewOptimismPortal creates a new instance of OptimismPortal, bound to a specific deployed contract. +func NewOptimismPortal(address common.Address, backend bind.ContractBackend) (*OptimismPortal, error) { + contract, err := bindOptimismPortal(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &OptimismPortal{OptimismPortalCaller: OptimismPortalCaller{contract: contract}, OptimismPortalTransactor: OptimismPortalTransactor{contract: contract}, OptimismPortalFilterer: OptimismPortalFilterer{contract: contract}}, nil +} + +// NewOptimismPortalCaller creates a new read-only instance of OptimismPortal, bound to a specific deployed contract. +func NewOptimismPortalCaller(address common.Address, caller bind.ContractCaller) (*OptimismPortalCaller, error) { + contract, err := bindOptimismPortal(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &OptimismPortalCaller{contract: contract}, nil +} + +// NewOptimismPortalTransactor creates a new write-only instance of OptimismPortal, bound to a specific deployed contract. +func NewOptimismPortalTransactor(address common.Address, transactor bind.ContractTransactor) (*OptimismPortalTransactor, error) { + contract, err := bindOptimismPortal(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &OptimismPortalTransactor{contract: contract}, nil +} + +// NewOptimismPortalFilterer creates a new log filterer instance of OptimismPortal, bound to a specific deployed contract. +func NewOptimismPortalFilterer(address common.Address, filterer bind.ContractFilterer) (*OptimismPortalFilterer, error) { + contract, err := bindOptimismPortal(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &OptimismPortalFilterer{contract: contract}, nil +} + +// bindOptimismPortal binds a generic wrapper to an already deployed contract. +func bindOptimismPortal(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := OptimismPortalMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_OptimismPortal *OptimismPortalRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _OptimismPortal.Contract.OptimismPortalCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_OptimismPortal *OptimismPortalRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OptimismPortal.Contract.OptimismPortalTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_OptimismPortal *OptimismPortalRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _OptimismPortal.Contract.OptimismPortalTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_OptimismPortal *OptimismPortalCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _OptimismPortal.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_OptimismPortal *OptimismPortalTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OptimismPortal.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_OptimismPortal *OptimismPortalTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _OptimismPortal.Contract.contract.Transact(opts, method, params...) +} + +// GUARDIAN is a free data retrieval call binding the contract method 0x724c184c. +// +// Solidity: function GUARDIAN() view returns(address) +func (_OptimismPortal *OptimismPortalCaller) GUARDIAN(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _OptimismPortal.contract.Call(opts, &out, "GUARDIAN") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GUARDIAN is a free data retrieval call binding the contract method 0x724c184c. +// +// Solidity: function GUARDIAN() view returns(address) +func (_OptimismPortal *OptimismPortalSession) GUARDIAN() (common.Address, error) { + return _OptimismPortal.Contract.GUARDIAN(&_OptimismPortal.CallOpts) +} + +// GUARDIAN is a free data retrieval call binding the contract method 0x724c184c. +// +// Solidity: function GUARDIAN() view returns(address) +func (_OptimismPortal *OptimismPortalCallerSession) GUARDIAN() (common.Address, error) { + return _OptimismPortal.Contract.GUARDIAN(&_OptimismPortal.CallOpts) +} + +// L2ORACLE is a free data retrieval call binding the contract method 0x001c2ff6. +// +// Solidity: function L2_ORACLE() view returns(address) +func (_OptimismPortal *OptimismPortalCaller) L2ORACLE(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _OptimismPortal.contract.Call(opts, &out, "L2_ORACLE") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// L2ORACLE is a free data retrieval call binding the contract method 0x001c2ff6. +// +// Solidity: function L2_ORACLE() view returns(address) +func (_OptimismPortal *OptimismPortalSession) L2ORACLE() (common.Address, error) { + return _OptimismPortal.Contract.L2ORACLE(&_OptimismPortal.CallOpts) +} + +// L2ORACLE is a free data retrieval call binding the contract method 0x001c2ff6. +// +// Solidity: function L2_ORACLE() view returns(address) +func (_OptimismPortal *OptimismPortalCallerSession) L2ORACLE() (common.Address, error) { + return _OptimismPortal.Contract.L2ORACLE(&_OptimismPortal.CallOpts) +} + +// SYSTEMCONFIG is a free data retrieval call binding the contract method 0xf0498750. +// +// Solidity: function SYSTEM_CONFIG() view returns(address) +func (_OptimismPortal *OptimismPortalCaller) SYSTEMCONFIG(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _OptimismPortal.contract.Call(opts, &out, "SYSTEM_CONFIG") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// SYSTEMCONFIG is a free data retrieval call binding the contract method 0xf0498750. +// +// Solidity: function SYSTEM_CONFIG() view returns(address) +func (_OptimismPortal *OptimismPortalSession) SYSTEMCONFIG() (common.Address, error) { + return _OptimismPortal.Contract.SYSTEMCONFIG(&_OptimismPortal.CallOpts) +} + +// SYSTEMCONFIG is a free data retrieval call binding the contract method 0xf0498750. +// +// Solidity: function SYSTEM_CONFIG() view returns(address) +func (_OptimismPortal *OptimismPortalCallerSession) SYSTEMCONFIG() (common.Address, error) { + return _OptimismPortal.Contract.SYSTEMCONFIG(&_OptimismPortal.CallOpts) +} + +// FinalizedWithdrawals is a free data retrieval call binding the contract method 0xa14238e7. +// +// Solidity: function finalizedWithdrawals(bytes32 ) view returns(bool) +func (_OptimismPortal *OptimismPortalCaller) FinalizedWithdrawals(opts *bind.CallOpts, arg0 [32]byte) (bool, error) { + var out []interface{} + err := _OptimismPortal.contract.Call(opts, &out, "finalizedWithdrawals", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// FinalizedWithdrawals is a free data retrieval call binding the contract method 0xa14238e7. +// +// Solidity: function finalizedWithdrawals(bytes32 ) view returns(bool) +func (_OptimismPortal *OptimismPortalSession) FinalizedWithdrawals(arg0 [32]byte) (bool, error) { + return _OptimismPortal.Contract.FinalizedWithdrawals(&_OptimismPortal.CallOpts, arg0) +} + +// FinalizedWithdrawals is a free data retrieval call binding the contract method 0xa14238e7. +// +// Solidity: function finalizedWithdrawals(bytes32 ) view returns(bool) +func (_OptimismPortal *OptimismPortalCallerSession) FinalizedWithdrawals(arg0 [32]byte) (bool, error) { + return _OptimismPortal.Contract.FinalizedWithdrawals(&_OptimismPortal.CallOpts, arg0) +} + +// IsOutputFinalized is a free data retrieval call binding the contract method 0x6dbffb78. +// +// Solidity: function isOutputFinalized(uint256 _l2OutputIndex) view returns(bool) +func (_OptimismPortal *OptimismPortalCaller) IsOutputFinalized(opts *bind.CallOpts, _l2OutputIndex *big.Int) (bool, error) { + var out []interface{} + err := _OptimismPortal.contract.Call(opts, &out, "isOutputFinalized", _l2OutputIndex) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsOutputFinalized is a free data retrieval call binding the contract method 0x6dbffb78. +// +// Solidity: function isOutputFinalized(uint256 _l2OutputIndex) view returns(bool) +func (_OptimismPortal *OptimismPortalSession) IsOutputFinalized(_l2OutputIndex *big.Int) (bool, error) { + return _OptimismPortal.Contract.IsOutputFinalized(&_OptimismPortal.CallOpts, _l2OutputIndex) +} + +// IsOutputFinalized is a free data retrieval call binding the contract method 0x6dbffb78. +// +// Solidity: function isOutputFinalized(uint256 _l2OutputIndex) view returns(bool) +func (_OptimismPortal *OptimismPortalCallerSession) IsOutputFinalized(_l2OutputIndex *big.Int) (bool, error) { + return _OptimismPortal.Contract.IsOutputFinalized(&_OptimismPortal.CallOpts, _l2OutputIndex) +} + +// L2Sender is a free data retrieval call binding the contract method 0x9bf62d82. +// +// Solidity: function l2Sender() view returns(address) +func (_OptimismPortal *OptimismPortalCaller) L2Sender(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _OptimismPortal.contract.Call(opts, &out, "l2Sender") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// L2Sender is a free data retrieval call binding the contract method 0x9bf62d82. +// +// Solidity: function l2Sender() view returns(address) +func (_OptimismPortal *OptimismPortalSession) L2Sender() (common.Address, error) { + return _OptimismPortal.Contract.L2Sender(&_OptimismPortal.CallOpts) +} + +// L2Sender is a free data retrieval call binding the contract method 0x9bf62d82. +// +// Solidity: function l2Sender() view returns(address) +func (_OptimismPortal *OptimismPortalCallerSession) L2Sender() (common.Address, error) { + return _OptimismPortal.Contract.L2Sender(&_OptimismPortal.CallOpts) +} + +// MinimumGasLimit is a free data retrieval call binding the contract method 0xa35d99df. +// +// Solidity: function minimumGasLimit(uint64 _byteCount) pure returns(uint64) +func (_OptimismPortal *OptimismPortalCaller) MinimumGasLimit(opts *bind.CallOpts, _byteCount uint64) (uint64, error) { + var out []interface{} + err := _OptimismPortal.contract.Call(opts, &out, "minimumGasLimit", _byteCount) + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// MinimumGasLimit is a free data retrieval call binding the contract method 0xa35d99df. +// +// Solidity: function minimumGasLimit(uint64 _byteCount) pure returns(uint64) +func (_OptimismPortal *OptimismPortalSession) MinimumGasLimit(_byteCount uint64) (uint64, error) { + return _OptimismPortal.Contract.MinimumGasLimit(&_OptimismPortal.CallOpts, _byteCount) +} + +// MinimumGasLimit is a free data retrieval call binding the contract method 0xa35d99df. +// +// Solidity: function minimumGasLimit(uint64 _byteCount) pure returns(uint64) +func (_OptimismPortal *OptimismPortalCallerSession) MinimumGasLimit(_byteCount uint64) (uint64, error) { + return _OptimismPortal.Contract.MinimumGasLimit(&_OptimismPortal.CallOpts, _byteCount) +} + +// Params is a free data retrieval call binding the contract method 0xcff0ab96. +// +// Solidity: function params() view returns(uint128 prevBaseFee, uint64 prevBoughtGas, uint64 prevBlockNum) +func (_OptimismPortal *OptimismPortalCaller) Params(opts *bind.CallOpts) (struct { + PrevBaseFee *big.Int + PrevBoughtGas uint64 + PrevBlockNum uint64 +}, error) { + var out []interface{} + err := _OptimismPortal.contract.Call(opts, &out, "params") + + outstruct := new(struct { + PrevBaseFee *big.Int + PrevBoughtGas uint64 + PrevBlockNum uint64 + }) + if err != nil { + return *outstruct, err + } + + outstruct.PrevBaseFee = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.PrevBoughtGas = *abi.ConvertType(out[1], new(uint64)).(*uint64) + outstruct.PrevBlockNum = *abi.ConvertType(out[2], new(uint64)).(*uint64) + + return *outstruct, err + +} + +// Params is a free data retrieval call binding the contract method 0xcff0ab96. +// +// Solidity: function params() view returns(uint128 prevBaseFee, uint64 prevBoughtGas, uint64 prevBlockNum) +func (_OptimismPortal *OptimismPortalSession) Params() (struct { + PrevBaseFee *big.Int + PrevBoughtGas uint64 + PrevBlockNum uint64 +}, error) { + return _OptimismPortal.Contract.Params(&_OptimismPortal.CallOpts) +} + +// Params is a free data retrieval call binding the contract method 0xcff0ab96. +// +// Solidity: function params() view returns(uint128 prevBaseFee, uint64 prevBoughtGas, uint64 prevBlockNum) +func (_OptimismPortal *OptimismPortalCallerSession) Params() (struct { + PrevBaseFee *big.Int + PrevBoughtGas uint64 + PrevBlockNum uint64 +}, error) { + return _OptimismPortal.Contract.Params(&_OptimismPortal.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_OptimismPortal *OptimismPortalCaller) Paused(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _OptimismPortal.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_OptimismPortal *OptimismPortalSession) Paused() (bool, error) { + return _OptimismPortal.Contract.Paused(&_OptimismPortal.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_OptimismPortal *OptimismPortalCallerSession) Paused() (bool, error) { + return _OptimismPortal.Contract.Paused(&_OptimismPortal.CallOpts) +} + +// ProvenWithdrawals is a free data retrieval call binding the contract method 0xe965084c. +// +// Solidity: function provenWithdrawals(bytes32 ) view returns(bytes32 outputRoot, uint128 timestamp, uint128 l2OutputIndex) +func (_OptimismPortal *OptimismPortalCaller) ProvenWithdrawals(opts *bind.CallOpts, arg0 [32]byte) (struct { + OutputRoot [32]byte + Timestamp *big.Int + L2OutputIndex *big.Int +}, error) { + var out []interface{} + err := _OptimismPortal.contract.Call(opts, &out, "provenWithdrawals", arg0) + + outstruct := new(struct { + OutputRoot [32]byte + Timestamp *big.Int + L2OutputIndex *big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.OutputRoot = *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + outstruct.Timestamp = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.L2OutputIndex = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +// ProvenWithdrawals is a free data retrieval call binding the contract method 0xe965084c. +// +// Solidity: function provenWithdrawals(bytes32 ) view returns(bytes32 outputRoot, uint128 timestamp, uint128 l2OutputIndex) +func (_OptimismPortal *OptimismPortalSession) ProvenWithdrawals(arg0 [32]byte) (struct { + OutputRoot [32]byte + Timestamp *big.Int + L2OutputIndex *big.Int +}, error) { + return _OptimismPortal.Contract.ProvenWithdrawals(&_OptimismPortal.CallOpts, arg0) +} + +// ProvenWithdrawals is a free data retrieval call binding the contract method 0xe965084c. +// +// Solidity: function provenWithdrawals(bytes32 ) view returns(bytes32 outputRoot, uint128 timestamp, uint128 l2OutputIndex) +func (_OptimismPortal *OptimismPortalCallerSession) ProvenWithdrawals(arg0 [32]byte) (struct { + OutputRoot [32]byte + Timestamp *big.Int + L2OutputIndex *big.Int +}, error) { + return _OptimismPortal.Contract.ProvenWithdrawals(&_OptimismPortal.CallOpts, arg0) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_OptimismPortal *OptimismPortalCaller) Version(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _OptimismPortal.contract.Call(opts, &out, "version") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_OptimismPortal *OptimismPortalSession) Version() (string, error) { + return _OptimismPortal.Contract.Version(&_OptimismPortal.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_OptimismPortal *OptimismPortalCallerSession) Version() (string, error) { + return _OptimismPortal.Contract.Version(&_OptimismPortal.CallOpts) +} + +// DepositTransaction is a paid mutator transaction binding the contract method 0xe9e05c42. +// +// Solidity: function depositTransaction(address _to, uint256 _value, uint64 _gasLimit, bool _isCreation, bytes _data) payable returns() +func (_OptimismPortal *OptimismPortalTransactor) DepositTransaction(opts *bind.TransactOpts, _to common.Address, _value *big.Int, _gasLimit uint64, _isCreation bool, _data []byte) (*types.Transaction, error) { + return _OptimismPortal.contract.Transact(opts, "depositTransaction", _to, _value, _gasLimit, _isCreation, _data) +} + +// DepositTransaction is a paid mutator transaction binding the contract method 0xe9e05c42. +// +// Solidity: function depositTransaction(address _to, uint256 _value, uint64 _gasLimit, bool _isCreation, bytes _data) payable returns() +func (_OptimismPortal *OptimismPortalSession) DepositTransaction(_to common.Address, _value *big.Int, _gasLimit uint64, _isCreation bool, _data []byte) (*types.Transaction, error) { + return _OptimismPortal.Contract.DepositTransaction(&_OptimismPortal.TransactOpts, _to, _value, _gasLimit, _isCreation, _data) +} + +// DepositTransaction is a paid mutator transaction binding the contract method 0xe9e05c42. +// +// Solidity: function depositTransaction(address _to, uint256 _value, uint64 _gasLimit, bool _isCreation, bytes _data) payable returns() +func (_OptimismPortal *OptimismPortalTransactorSession) DepositTransaction(_to common.Address, _value *big.Int, _gasLimit uint64, _isCreation bool, _data []byte) (*types.Transaction, error) { + return _OptimismPortal.Contract.DepositTransaction(&_OptimismPortal.TransactOpts, _to, _value, _gasLimit, _isCreation, _data) +} + +// DonateETH is a paid mutator transaction binding the contract method 0x8b4c40b0. +// +// Solidity: function donateETH() payable returns() +func (_OptimismPortal *OptimismPortalTransactor) DonateETH(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OptimismPortal.contract.Transact(opts, "donateETH") +} + +// DonateETH is a paid mutator transaction binding the contract method 0x8b4c40b0. +// +// Solidity: function donateETH() payable returns() +func (_OptimismPortal *OptimismPortalSession) DonateETH() (*types.Transaction, error) { + return _OptimismPortal.Contract.DonateETH(&_OptimismPortal.TransactOpts) +} + +// DonateETH is a paid mutator transaction binding the contract method 0x8b4c40b0. +// +// Solidity: function donateETH() payable returns() +func (_OptimismPortal *OptimismPortalTransactorSession) DonateETH() (*types.Transaction, error) { + return _OptimismPortal.Contract.DonateETH(&_OptimismPortal.TransactOpts) +} + +// FinalizeWithdrawalTransaction is a paid mutator transaction binding the contract method 0x8c3152e9. +// +// Solidity: function finalizeWithdrawalTransaction((uint256,address,address,uint256,uint256,bytes) _tx) returns() +func (_OptimismPortal *OptimismPortalTransactor) FinalizeWithdrawalTransaction(opts *bind.TransactOpts, _tx TypesWithdrawalTransaction) (*types.Transaction, error) { + return _OptimismPortal.contract.Transact(opts, "finalizeWithdrawalTransaction", _tx) +} + +// FinalizeWithdrawalTransaction is a paid mutator transaction binding the contract method 0x8c3152e9. +// +// Solidity: function finalizeWithdrawalTransaction((uint256,address,address,uint256,uint256,bytes) _tx) returns() +func (_OptimismPortal *OptimismPortalSession) FinalizeWithdrawalTransaction(_tx TypesWithdrawalTransaction) (*types.Transaction, error) { + return _OptimismPortal.Contract.FinalizeWithdrawalTransaction(&_OptimismPortal.TransactOpts, _tx) +} + +// FinalizeWithdrawalTransaction is a paid mutator transaction binding the contract method 0x8c3152e9. +// +// Solidity: function finalizeWithdrawalTransaction((uint256,address,address,uint256,uint256,bytes) _tx) returns() +func (_OptimismPortal *OptimismPortalTransactorSession) FinalizeWithdrawalTransaction(_tx TypesWithdrawalTransaction) (*types.Transaction, error) { + return _OptimismPortal.Contract.FinalizeWithdrawalTransaction(&_OptimismPortal.TransactOpts, _tx) +} + +// Initialize is a paid mutator transaction binding the contract method 0xd53a822f. +// +// Solidity: function initialize(bool _paused) returns() +func (_OptimismPortal *OptimismPortalTransactor) Initialize(opts *bind.TransactOpts, _paused bool) (*types.Transaction, error) { + return _OptimismPortal.contract.Transact(opts, "initialize", _paused) +} + +// Initialize is a paid mutator transaction binding the contract method 0xd53a822f. +// +// Solidity: function initialize(bool _paused) returns() +func (_OptimismPortal *OptimismPortalSession) Initialize(_paused bool) (*types.Transaction, error) { + return _OptimismPortal.Contract.Initialize(&_OptimismPortal.TransactOpts, _paused) +} + +// Initialize is a paid mutator transaction binding the contract method 0xd53a822f. +// +// Solidity: function initialize(bool _paused) returns() +func (_OptimismPortal *OptimismPortalTransactorSession) Initialize(_paused bool) (*types.Transaction, error) { + return _OptimismPortal.Contract.Initialize(&_OptimismPortal.TransactOpts, _paused) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_OptimismPortal *OptimismPortalTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OptimismPortal.contract.Transact(opts, "pause") +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_OptimismPortal *OptimismPortalSession) Pause() (*types.Transaction, error) { + return _OptimismPortal.Contract.Pause(&_OptimismPortal.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_OptimismPortal *OptimismPortalTransactorSession) Pause() (*types.Transaction, error) { + return _OptimismPortal.Contract.Pause(&_OptimismPortal.TransactOpts) +} + +// ProveWithdrawalTransaction is a paid mutator transaction binding the contract method 0x4870496f. +// +// Solidity: function proveWithdrawalTransaction((uint256,address,address,uint256,uint256,bytes) _tx, uint256 _l2OutputIndex, (bytes32,bytes32,bytes32,bytes32) _outputRootProof, bytes[] _withdrawalProof) returns() +func (_OptimismPortal *OptimismPortalTransactor) ProveWithdrawalTransaction(opts *bind.TransactOpts, _tx TypesWithdrawalTransaction, _l2OutputIndex *big.Int, _outputRootProof TypesOutputRootProof, _withdrawalProof [][]byte) (*types.Transaction, error) { + return _OptimismPortal.contract.Transact(opts, "proveWithdrawalTransaction", _tx, _l2OutputIndex, _outputRootProof, _withdrawalProof) +} + +// ProveWithdrawalTransaction is a paid mutator transaction binding the contract method 0x4870496f. +// +// Solidity: function proveWithdrawalTransaction((uint256,address,address,uint256,uint256,bytes) _tx, uint256 _l2OutputIndex, (bytes32,bytes32,bytes32,bytes32) _outputRootProof, bytes[] _withdrawalProof) returns() +func (_OptimismPortal *OptimismPortalSession) ProveWithdrawalTransaction(_tx TypesWithdrawalTransaction, _l2OutputIndex *big.Int, _outputRootProof TypesOutputRootProof, _withdrawalProof [][]byte) (*types.Transaction, error) { + return _OptimismPortal.Contract.ProveWithdrawalTransaction(&_OptimismPortal.TransactOpts, _tx, _l2OutputIndex, _outputRootProof, _withdrawalProof) +} + +// ProveWithdrawalTransaction is a paid mutator transaction binding the contract method 0x4870496f. +// +// Solidity: function proveWithdrawalTransaction((uint256,address,address,uint256,uint256,bytes) _tx, uint256 _l2OutputIndex, (bytes32,bytes32,bytes32,bytes32) _outputRootProof, bytes[] _withdrawalProof) returns() +func (_OptimismPortal *OptimismPortalTransactorSession) ProveWithdrawalTransaction(_tx TypesWithdrawalTransaction, _l2OutputIndex *big.Int, _outputRootProof TypesOutputRootProof, _withdrawalProof [][]byte) (*types.Transaction, error) { + return _OptimismPortal.Contract.ProveWithdrawalTransaction(&_OptimismPortal.TransactOpts, _tx, _l2OutputIndex, _outputRootProof, _withdrawalProof) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_OptimismPortal *OptimismPortalTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OptimismPortal.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_OptimismPortal *OptimismPortalSession) Unpause() (*types.Transaction, error) { + return _OptimismPortal.Contract.Unpause(&_OptimismPortal.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_OptimismPortal *OptimismPortalTransactorSession) Unpause() (*types.Transaction, error) { + return _OptimismPortal.Contract.Unpause(&_OptimismPortal.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_OptimismPortal *OptimismPortalTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OptimismPortal.contract.RawTransact(opts, nil) // calldata is disallowed for receive function +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_OptimismPortal *OptimismPortalSession) Receive() (*types.Transaction, error) { + return _OptimismPortal.Contract.Receive(&_OptimismPortal.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_OptimismPortal *OptimismPortalTransactorSession) Receive() (*types.Transaction, error) { + return _OptimismPortal.Contract.Receive(&_OptimismPortal.TransactOpts) +} + +// OptimismPortalInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the OptimismPortal contract. +type OptimismPortalInitializedIterator struct { + Event *OptimismPortalInitialized // 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 *OptimismPortalInitializedIterator) 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(OptimismPortalInitialized) + 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(OptimismPortalInitialized) + 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 *OptimismPortalInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OptimismPortalInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OptimismPortalInitialized represents a Initialized event raised by the OptimismPortal contract. +type OptimismPortalInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_OptimismPortal *OptimismPortalFilterer) FilterInitialized(opts *bind.FilterOpts) (*OptimismPortalInitializedIterator, error) { + + logs, sub, err := _OptimismPortal.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &OptimismPortalInitializedIterator{contract: _OptimismPortal.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_OptimismPortal *OptimismPortalFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *OptimismPortalInitialized) (event.Subscription, error) { + + logs, sub, err := _OptimismPortal.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(OptimismPortalInitialized) + if err := _OptimismPortal.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_OptimismPortal *OptimismPortalFilterer) ParseInitialized(log types.Log) (*OptimismPortalInitialized, error) { + event := new(OptimismPortalInitialized) + if err := _OptimismPortal.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// OptimismPortalPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the OptimismPortal contract. +type OptimismPortalPausedIterator struct { + Event *OptimismPortalPaused // 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 *OptimismPortalPausedIterator) 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(OptimismPortalPaused) + 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(OptimismPortalPaused) + 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 *OptimismPortalPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OptimismPortalPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OptimismPortalPaused represents a Paused event raised by the OptimismPortal contract. +type OptimismPortalPaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_OptimismPortal *OptimismPortalFilterer) FilterPaused(opts *bind.FilterOpts) (*OptimismPortalPausedIterator, error) { + + logs, sub, err := _OptimismPortal.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &OptimismPortalPausedIterator{contract: _OptimismPortal.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 (_OptimismPortal *OptimismPortalFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *OptimismPortalPaused) (event.Subscription, error) { + + logs, sub, err := _OptimismPortal.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(OptimismPortalPaused) + if err := _OptimismPortal.contract.UnpackLog(event, "Paused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_OptimismPortal *OptimismPortalFilterer) ParsePaused(log types.Log) (*OptimismPortalPaused, error) { + event := new(OptimismPortalPaused) + if err := _OptimismPortal.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// OptimismPortalTransactionDepositedIterator is returned from FilterTransactionDeposited and is used to iterate over the raw logs and unpacked data for TransactionDeposited events raised by the OptimismPortal contract. +type OptimismPortalTransactionDepositedIterator struct { + Event *OptimismPortalTransactionDeposited // 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 *OptimismPortalTransactionDepositedIterator) 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(OptimismPortalTransactionDeposited) + 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(OptimismPortalTransactionDeposited) + 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 *OptimismPortalTransactionDepositedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OptimismPortalTransactionDepositedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OptimismPortalTransactionDeposited represents a TransactionDeposited event raised by the OptimismPortal contract. +type OptimismPortalTransactionDeposited struct { + From common.Address + To common.Address + Version *big.Int + OpaqueData []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransactionDeposited is a free log retrieval operation binding the contract event 0xb3813568d9991fc951961fcb4c784893574240a28925604d09fc577c55bb7c32. +// +// Solidity: event TransactionDeposited(address indexed from, address indexed to, uint256 indexed version, bytes opaqueData) +func (_OptimismPortal *OptimismPortalFilterer) FilterTransactionDeposited(opts *bind.FilterOpts, from []common.Address, to []common.Address, version []*big.Int) (*OptimismPortalTransactionDepositedIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + var versionRule []interface{} + for _, versionItem := range version { + versionRule = append(versionRule, versionItem) + } + + logs, sub, err := _OptimismPortal.contract.FilterLogs(opts, "TransactionDeposited", fromRule, toRule, versionRule) + if err != nil { + return nil, err + } + return &OptimismPortalTransactionDepositedIterator{contract: _OptimismPortal.contract, event: "TransactionDeposited", logs: logs, sub: sub}, nil +} + +// WatchTransactionDeposited is a free log subscription operation binding the contract event 0xb3813568d9991fc951961fcb4c784893574240a28925604d09fc577c55bb7c32. +// +// Solidity: event TransactionDeposited(address indexed from, address indexed to, uint256 indexed version, bytes opaqueData) +func (_OptimismPortal *OptimismPortalFilterer) WatchTransactionDeposited(opts *bind.WatchOpts, sink chan<- *OptimismPortalTransactionDeposited, from []common.Address, to []common.Address, version []*big.Int) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + var versionRule []interface{} + for _, versionItem := range version { + versionRule = append(versionRule, versionItem) + } + + logs, sub, err := _OptimismPortal.contract.WatchLogs(opts, "TransactionDeposited", fromRule, toRule, versionRule) + 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(OptimismPortalTransactionDeposited) + if err := _OptimismPortal.contract.UnpackLog(event, "TransactionDeposited", 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 +} + +// ParseTransactionDeposited is a log parse operation binding the contract event 0xb3813568d9991fc951961fcb4c784893574240a28925604d09fc577c55bb7c32. +// +// Solidity: event TransactionDeposited(address indexed from, address indexed to, uint256 indexed version, bytes opaqueData) +func (_OptimismPortal *OptimismPortalFilterer) ParseTransactionDeposited(log types.Log) (*OptimismPortalTransactionDeposited, error) { + event := new(OptimismPortalTransactionDeposited) + if err := _OptimismPortal.contract.UnpackLog(event, "TransactionDeposited", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// OptimismPortalUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the OptimismPortal contract. +type OptimismPortalUnpausedIterator struct { + Event *OptimismPortalUnpaused // 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 *OptimismPortalUnpausedIterator) 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(OptimismPortalUnpaused) + 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(OptimismPortalUnpaused) + 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 *OptimismPortalUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OptimismPortalUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OptimismPortalUnpaused represents a Unpaused event raised by the OptimismPortal contract. +type OptimismPortalUnpaused 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 (_OptimismPortal *OptimismPortalFilterer) FilterUnpaused(opts *bind.FilterOpts) (*OptimismPortalUnpausedIterator, error) { + + logs, sub, err := _OptimismPortal.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &OptimismPortalUnpausedIterator{contract: _OptimismPortal.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 (_OptimismPortal *OptimismPortalFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *OptimismPortalUnpaused) (event.Subscription, error) { + + logs, sub, err := _OptimismPortal.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(OptimismPortalUnpaused) + if err := _OptimismPortal.contract.UnpackLog(event, "Unpaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_OptimismPortal *OptimismPortalFilterer) ParseUnpaused(log types.Log) (*OptimismPortalUnpaused, error) { + event := new(OptimismPortalUnpaused) + if err := _OptimismPortal.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// OptimismPortalWithdrawalFinalizedIterator is returned from FilterWithdrawalFinalized and is used to iterate over the raw logs and unpacked data for WithdrawalFinalized events raised by the OptimismPortal contract. +type OptimismPortalWithdrawalFinalizedIterator struct { + Event *OptimismPortalWithdrawalFinalized // 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 *OptimismPortalWithdrawalFinalizedIterator) 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(OptimismPortalWithdrawalFinalized) + 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(OptimismPortalWithdrawalFinalized) + 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 *OptimismPortalWithdrawalFinalizedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OptimismPortalWithdrawalFinalizedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OptimismPortalWithdrawalFinalized represents a WithdrawalFinalized event raised by the OptimismPortal contract. +type OptimismPortalWithdrawalFinalized struct { + WithdrawalHash [32]byte + Success bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawalFinalized is a free log retrieval operation binding the contract event 0xdb5c7652857aa163daadd670e116628fb42e869d8ac4251ef8971d9e5727df1b. +// +// Solidity: event WithdrawalFinalized(bytes32 indexed withdrawalHash, bool success) +func (_OptimismPortal *OptimismPortalFilterer) FilterWithdrawalFinalized(opts *bind.FilterOpts, withdrawalHash [][32]byte) (*OptimismPortalWithdrawalFinalizedIterator, error) { + + var withdrawalHashRule []interface{} + for _, withdrawalHashItem := range withdrawalHash { + withdrawalHashRule = append(withdrawalHashRule, withdrawalHashItem) + } + + logs, sub, err := _OptimismPortal.contract.FilterLogs(opts, "WithdrawalFinalized", withdrawalHashRule) + if err != nil { + return nil, err + } + return &OptimismPortalWithdrawalFinalizedIterator{contract: _OptimismPortal.contract, event: "WithdrawalFinalized", logs: logs, sub: sub}, nil +} + +// WatchWithdrawalFinalized is a free log subscription operation binding the contract event 0xdb5c7652857aa163daadd670e116628fb42e869d8ac4251ef8971d9e5727df1b. +// +// Solidity: event WithdrawalFinalized(bytes32 indexed withdrawalHash, bool success) +func (_OptimismPortal *OptimismPortalFilterer) WatchWithdrawalFinalized(opts *bind.WatchOpts, sink chan<- *OptimismPortalWithdrawalFinalized, withdrawalHash [][32]byte) (event.Subscription, error) { + + var withdrawalHashRule []interface{} + for _, withdrawalHashItem := range withdrawalHash { + withdrawalHashRule = append(withdrawalHashRule, withdrawalHashItem) + } + + logs, sub, err := _OptimismPortal.contract.WatchLogs(opts, "WithdrawalFinalized", withdrawalHashRule) + 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(OptimismPortalWithdrawalFinalized) + if err := _OptimismPortal.contract.UnpackLog(event, "WithdrawalFinalized", 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 +} + +// ParseWithdrawalFinalized is a log parse operation binding the contract event 0xdb5c7652857aa163daadd670e116628fb42e869d8ac4251ef8971d9e5727df1b. +// +// Solidity: event WithdrawalFinalized(bytes32 indexed withdrawalHash, bool success) +func (_OptimismPortal *OptimismPortalFilterer) ParseWithdrawalFinalized(log types.Log) (*OptimismPortalWithdrawalFinalized, error) { + event := new(OptimismPortalWithdrawalFinalized) + if err := _OptimismPortal.contract.UnpackLog(event, "WithdrawalFinalized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// OptimismPortalWithdrawalProvenIterator is returned from FilterWithdrawalProven and is used to iterate over the raw logs and unpacked data for WithdrawalProven events raised by the OptimismPortal contract. +type OptimismPortalWithdrawalProvenIterator struct { + Event *OptimismPortalWithdrawalProven // 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 *OptimismPortalWithdrawalProvenIterator) 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(OptimismPortalWithdrawalProven) + 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(OptimismPortalWithdrawalProven) + 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 *OptimismPortalWithdrawalProvenIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OptimismPortalWithdrawalProvenIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OptimismPortalWithdrawalProven represents a WithdrawalProven event raised by the OptimismPortal contract. +type OptimismPortalWithdrawalProven struct { + WithdrawalHash [32]byte + From common.Address + To common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawalProven is a free log retrieval operation binding the contract event 0x67a6208cfcc0801d50f6cbe764733f4fddf66ac0b04442061a8a8c0cb6b63f62. +// +// Solidity: event WithdrawalProven(bytes32 indexed withdrawalHash, address indexed from, address indexed to) +func (_OptimismPortal *OptimismPortalFilterer) FilterWithdrawalProven(opts *bind.FilterOpts, withdrawalHash [][32]byte, from []common.Address, to []common.Address) (*OptimismPortalWithdrawalProvenIterator, error) { + + var withdrawalHashRule []interface{} + for _, withdrawalHashItem := range withdrawalHash { + withdrawalHashRule = append(withdrawalHashRule, withdrawalHashItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _OptimismPortal.contract.FilterLogs(opts, "WithdrawalProven", withdrawalHashRule, fromRule, toRule) + if err != nil { + return nil, err + } + return &OptimismPortalWithdrawalProvenIterator{contract: _OptimismPortal.contract, event: "WithdrawalProven", logs: logs, sub: sub}, nil +} + +// WatchWithdrawalProven is a free log subscription operation binding the contract event 0x67a6208cfcc0801d50f6cbe764733f4fddf66ac0b04442061a8a8c0cb6b63f62. +// +// Solidity: event WithdrawalProven(bytes32 indexed withdrawalHash, address indexed from, address indexed to) +func (_OptimismPortal *OptimismPortalFilterer) WatchWithdrawalProven(opts *bind.WatchOpts, sink chan<- *OptimismPortalWithdrawalProven, withdrawalHash [][32]byte, from []common.Address, to []common.Address) (event.Subscription, error) { + + var withdrawalHashRule []interface{} + for _, withdrawalHashItem := range withdrawalHash { + withdrawalHashRule = append(withdrawalHashRule, withdrawalHashItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _OptimismPortal.contract.WatchLogs(opts, "WithdrawalProven", withdrawalHashRule, fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(OptimismPortalWithdrawalProven) + if err := _OptimismPortal.contract.UnpackLog(event, "WithdrawalProven", 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 +} + +// ParseWithdrawalProven is a log parse operation binding the contract event 0x67a6208cfcc0801d50f6cbe764733f4fddf66ac0b04442061a8a8c0cb6b63f62. +// +// Solidity: event WithdrawalProven(bytes32 indexed withdrawalHash, address indexed from, address indexed to) +func (_OptimismPortal *OptimismPortalFilterer) ParseWithdrawalProven(log types.Log) (*OptimismPortalWithdrawalProven, error) { + event := new(OptimismPortalWithdrawalProven) + if err := _OptimismPortal.contract.UnpackLog(event, "WithdrawalProven", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/op-chain-ops/opbnb-upgrades/old-contracts/bindings/ProxyAdmin.go b/op-chain-ops/opbnb-upgrades/old-contracts/bindings/ProxyAdmin.go new file mode 100644 index 000000000..2697ec50f --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/old-contracts/bindings/ProxyAdmin.go @@ -0,0 +1,761 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// ProxyAdminMetaData contains all meta data concerning the ProxyAdmin contract. +var ProxyAdminMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addressManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractAddressManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"changeProxyAdmin\",\"inputs\":[{\"name\":\"_proxy\",\"type\":\"address\",\"internalType\":\"addresspayable\"},{\"name\":\"_newAdmin\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getProxyAdmin\",\"inputs\":[{\"name\":\"_proxy\",\"type\":\"address\",\"internalType\":\"addresspayable\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getProxyImplementation\",\"inputs\":[{\"name\":\"_proxy\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"implementationName\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isUpgrading\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proxyType\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumProxyAdmin.ProxyType\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAddress\",\"inputs\":[{\"name\":\"_name\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_address\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAddressManager\",\"inputs\":[{\"name\":\"_address\",\"type\":\"address\",\"internalType\":\"contractAddressManager\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setImplementationName\",\"inputs\":[{\"name\":\"_address\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_name\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setProxyType\",\"inputs\":[{\"name\":\"_address\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_type\",\"type\":\"uint8\",\"internalType\":\"enumProxyAdmin.ProxyType\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setUpgrading\",\"inputs\":[{\"name\":\"_upgrading\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"upgrade\",\"inputs\":[{\"name\":\"_proxy\",\"type\":\"address\",\"internalType\":\"addresspayable\"},{\"name\":\"_implementation\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"upgradeAndCall\",\"inputs\":[{\"name\":\"_proxy\",\"type\":\"address\",\"internalType\":\"addresspayable\"},{\"name\":\"_implementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false}]", +} + +// ProxyAdminABI is the input ABI used to generate the binding from. +// Deprecated: Use ProxyAdminMetaData.ABI instead. +var ProxyAdminABI = ProxyAdminMetaData.ABI + +// ProxyAdmin is an auto generated Go binding around an Ethereum contract. +type ProxyAdmin struct { + ProxyAdminCaller // Read-only binding to the contract + ProxyAdminTransactor // Write-only binding to the contract + ProxyAdminFilterer // Log filterer for contract events +} + +// ProxyAdminCaller is an auto generated read-only Go binding around an Ethereum contract. +type ProxyAdminCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ProxyAdminTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ProxyAdminTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ProxyAdminFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ProxyAdminFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ProxyAdminSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ProxyAdminSession struct { + Contract *ProxyAdmin // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ProxyAdminCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ProxyAdminCallerSession struct { + Contract *ProxyAdminCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ProxyAdminTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ProxyAdminTransactorSession struct { + Contract *ProxyAdminTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ProxyAdminRaw is an auto generated low-level Go binding around an Ethereum contract. +type ProxyAdminRaw struct { + Contract *ProxyAdmin // Generic contract binding to access the raw methods on +} + +// ProxyAdminCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ProxyAdminCallerRaw struct { + Contract *ProxyAdminCaller // Generic read-only contract binding to access the raw methods on +} + +// ProxyAdminTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ProxyAdminTransactorRaw struct { + Contract *ProxyAdminTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewProxyAdmin creates a new instance of ProxyAdmin, bound to a specific deployed contract. +func NewProxyAdmin(address common.Address, backend bind.ContractBackend) (*ProxyAdmin, error) { + contract, err := bindProxyAdmin(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ProxyAdmin{ProxyAdminCaller: ProxyAdminCaller{contract: contract}, ProxyAdminTransactor: ProxyAdminTransactor{contract: contract}, ProxyAdminFilterer: ProxyAdminFilterer{contract: contract}}, nil +} + +// NewProxyAdminCaller creates a new read-only instance of ProxyAdmin, bound to a specific deployed contract. +func NewProxyAdminCaller(address common.Address, caller bind.ContractCaller) (*ProxyAdminCaller, error) { + contract, err := bindProxyAdmin(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ProxyAdminCaller{contract: contract}, nil +} + +// NewProxyAdminTransactor creates a new write-only instance of ProxyAdmin, bound to a specific deployed contract. +func NewProxyAdminTransactor(address common.Address, transactor bind.ContractTransactor) (*ProxyAdminTransactor, error) { + contract, err := bindProxyAdmin(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ProxyAdminTransactor{contract: contract}, nil +} + +// NewProxyAdminFilterer creates a new log filterer instance of ProxyAdmin, bound to a specific deployed contract. +func NewProxyAdminFilterer(address common.Address, filterer bind.ContractFilterer) (*ProxyAdminFilterer, error) { + contract, err := bindProxyAdmin(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ProxyAdminFilterer{contract: contract}, nil +} + +// bindProxyAdmin binds a generic wrapper to an already deployed contract. +func bindProxyAdmin(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ProxyAdminMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ProxyAdmin *ProxyAdminRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ProxyAdmin.Contract.ProxyAdminCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ProxyAdmin *ProxyAdminRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ProxyAdmin.Contract.ProxyAdminTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ProxyAdmin *ProxyAdminRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ProxyAdmin.Contract.ProxyAdminTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ProxyAdmin *ProxyAdminCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ProxyAdmin.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ProxyAdmin *ProxyAdminTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ProxyAdmin.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ProxyAdmin *ProxyAdminTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ProxyAdmin.Contract.contract.Transact(opts, method, params...) +} + +// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f. +// +// Solidity: function addressManager() view returns(address) +func (_ProxyAdmin *ProxyAdminCaller) AddressManager(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ProxyAdmin.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 (_ProxyAdmin *ProxyAdminSession) AddressManager() (common.Address, error) { + return _ProxyAdmin.Contract.AddressManager(&_ProxyAdmin.CallOpts) +} + +// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f. +// +// Solidity: function addressManager() view returns(address) +func (_ProxyAdmin *ProxyAdminCallerSession) AddressManager() (common.Address, error) { + return _ProxyAdmin.Contract.AddressManager(&_ProxyAdmin.CallOpts) +} + +// GetProxyAdmin is a free data retrieval call binding the contract method 0xf3b7dead. +// +// Solidity: function getProxyAdmin(address _proxy) view returns(address) +func (_ProxyAdmin *ProxyAdminCaller) GetProxyAdmin(opts *bind.CallOpts, _proxy common.Address) (common.Address, error) { + var out []interface{} + err := _ProxyAdmin.contract.Call(opts, &out, "getProxyAdmin", _proxy) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetProxyAdmin is a free data retrieval call binding the contract method 0xf3b7dead. +// +// Solidity: function getProxyAdmin(address _proxy) view returns(address) +func (_ProxyAdmin *ProxyAdminSession) GetProxyAdmin(_proxy common.Address) (common.Address, error) { + return _ProxyAdmin.Contract.GetProxyAdmin(&_ProxyAdmin.CallOpts, _proxy) +} + +// GetProxyAdmin is a free data retrieval call binding the contract method 0xf3b7dead. +// +// Solidity: function getProxyAdmin(address _proxy) view returns(address) +func (_ProxyAdmin *ProxyAdminCallerSession) GetProxyAdmin(_proxy common.Address) (common.Address, error) { + return _ProxyAdmin.Contract.GetProxyAdmin(&_ProxyAdmin.CallOpts, _proxy) +} + +// GetProxyImplementation is a free data retrieval call binding the contract method 0x204e1c7a. +// +// Solidity: function getProxyImplementation(address _proxy) view returns(address) +func (_ProxyAdmin *ProxyAdminCaller) GetProxyImplementation(opts *bind.CallOpts, _proxy common.Address) (common.Address, error) { + var out []interface{} + err := _ProxyAdmin.contract.Call(opts, &out, "getProxyImplementation", _proxy) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetProxyImplementation is a free data retrieval call binding the contract method 0x204e1c7a. +// +// Solidity: function getProxyImplementation(address _proxy) view returns(address) +func (_ProxyAdmin *ProxyAdminSession) GetProxyImplementation(_proxy common.Address) (common.Address, error) { + return _ProxyAdmin.Contract.GetProxyImplementation(&_ProxyAdmin.CallOpts, _proxy) +} + +// GetProxyImplementation is a free data retrieval call binding the contract method 0x204e1c7a. +// +// Solidity: function getProxyImplementation(address _proxy) view returns(address) +func (_ProxyAdmin *ProxyAdminCallerSession) GetProxyImplementation(_proxy common.Address) (common.Address, error) { + return _ProxyAdmin.Contract.GetProxyImplementation(&_ProxyAdmin.CallOpts, _proxy) +} + +// ImplementationName is a free data retrieval call binding the contract method 0x238181ae. +// +// Solidity: function implementationName(address ) view returns(string) +func (_ProxyAdmin *ProxyAdminCaller) ImplementationName(opts *bind.CallOpts, arg0 common.Address) (string, error) { + var out []interface{} + err := _ProxyAdmin.contract.Call(opts, &out, "implementationName", arg0) + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// ImplementationName is a free data retrieval call binding the contract method 0x238181ae. +// +// Solidity: function implementationName(address ) view returns(string) +func (_ProxyAdmin *ProxyAdminSession) ImplementationName(arg0 common.Address) (string, error) { + return _ProxyAdmin.Contract.ImplementationName(&_ProxyAdmin.CallOpts, arg0) +} + +// ImplementationName is a free data retrieval call binding the contract method 0x238181ae. +// +// Solidity: function implementationName(address ) view returns(string) +func (_ProxyAdmin *ProxyAdminCallerSession) ImplementationName(arg0 common.Address) (string, error) { + return _ProxyAdmin.Contract.ImplementationName(&_ProxyAdmin.CallOpts, arg0) +} + +// IsUpgrading is a free data retrieval call binding the contract method 0xb7947262. +// +// Solidity: function isUpgrading() view returns(bool) +func (_ProxyAdmin *ProxyAdminCaller) IsUpgrading(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _ProxyAdmin.contract.Call(opts, &out, "isUpgrading") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsUpgrading is a free data retrieval call binding the contract method 0xb7947262. +// +// Solidity: function isUpgrading() view returns(bool) +func (_ProxyAdmin *ProxyAdminSession) IsUpgrading() (bool, error) { + return _ProxyAdmin.Contract.IsUpgrading(&_ProxyAdmin.CallOpts) +} + +// IsUpgrading is a free data retrieval call binding the contract method 0xb7947262. +// +// Solidity: function isUpgrading() view returns(bool) +func (_ProxyAdmin *ProxyAdminCallerSession) IsUpgrading() (bool, error) { + return _ProxyAdmin.Contract.IsUpgrading(&_ProxyAdmin.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_ProxyAdmin *ProxyAdminCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ProxyAdmin.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_ProxyAdmin *ProxyAdminSession) Owner() (common.Address, error) { + return _ProxyAdmin.Contract.Owner(&_ProxyAdmin.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_ProxyAdmin *ProxyAdminCallerSession) Owner() (common.Address, error) { + return _ProxyAdmin.Contract.Owner(&_ProxyAdmin.CallOpts) +} + +// ProxyType is a free data retrieval call binding the contract method 0x6bd9f516. +// +// Solidity: function proxyType(address ) view returns(uint8) +func (_ProxyAdmin *ProxyAdminCaller) ProxyType(opts *bind.CallOpts, arg0 common.Address) (uint8, error) { + var out []interface{} + err := _ProxyAdmin.contract.Call(opts, &out, "proxyType", arg0) + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// ProxyType is a free data retrieval call binding the contract method 0x6bd9f516. +// +// Solidity: function proxyType(address ) view returns(uint8) +func (_ProxyAdmin *ProxyAdminSession) ProxyType(arg0 common.Address) (uint8, error) { + return _ProxyAdmin.Contract.ProxyType(&_ProxyAdmin.CallOpts, arg0) +} + +// ProxyType is a free data retrieval call binding the contract method 0x6bd9f516. +// +// Solidity: function proxyType(address ) view returns(uint8) +func (_ProxyAdmin *ProxyAdminCallerSession) ProxyType(arg0 common.Address) (uint8, error) { + return _ProxyAdmin.Contract.ProxyType(&_ProxyAdmin.CallOpts, arg0) +} + +// ChangeProxyAdmin is a paid mutator transaction binding the contract method 0x7eff275e. +// +// Solidity: function changeProxyAdmin(address _proxy, address _newAdmin) returns() +func (_ProxyAdmin *ProxyAdminTransactor) ChangeProxyAdmin(opts *bind.TransactOpts, _proxy common.Address, _newAdmin common.Address) (*types.Transaction, error) { + return _ProxyAdmin.contract.Transact(opts, "changeProxyAdmin", _proxy, _newAdmin) +} + +// ChangeProxyAdmin is a paid mutator transaction binding the contract method 0x7eff275e. +// +// Solidity: function changeProxyAdmin(address _proxy, address _newAdmin) returns() +func (_ProxyAdmin *ProxyAdminSession) ChangeProxyAdmin(_proxy common.Address, _newAdmin common.Address) (*types.Transaction, error) { + return _ProxyAdmin.Contract.ChangeProxyAdmin(&_ProxyAdmin.TransactOpts, _proxy, _newAdmin) +} + +// ChangeProxyAdmin is a paid mutator transaction binding the contract method 0x7eff275e. +// +// Solidity: function changeProxyAdmin(address _proxy, address _newAdmin) returns() +func (_ProxyAdmin *ProxyAdminTransactorSession) ChangeProxyAdmin(_proxy common.Address, _newAdmin common.Address) (*types.Transaction, error) { + return _ProxyAdmin.Contract.ChangeProxyAdmin(&_ProxyAdmin.TransactOpts, _proxy, _newAdmin) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ProxyAdmin *ProxyAdminTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ProxyAdmin.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ProxyAdmin *ProxyAdminSession) RenounceOwnership() (*types.Transaction, error) { + return _ProxyAdmin.Contract.RenounceOwnership(&_ProxyAdmin.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ProxyAdmin *ProxyAdminTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _ProxyAdmin.Contract.RenounceOwnership(&_ProxyAdmin.TransactOpts) +} + +// SetAddress is a paid mutator transaction binding the contract method 0x9b2ea4bd. +// +// Solidity: function setAddress(string _name, address _address) returns() +func (_ProxyAdmin *ProxyAdminTransactor) SetAddress(opts *bind.TransactOpts, _name string, _address common.Address) (*types.Transaction, error) { + return _ProxyAdmin.contract.Transact(opts, "setAddress", _name, _address) +} + +// SetAddress is a paid mutator transaction binding the contract method 0x9b2ea4bd. +// +// Solidity: function setAddress(string _name, address _address) returns() +func (_ProxyAdmin *ProxyAdminSession) SetAddress(_name string, _address common.Address) (*types.Transaction, error) { + return _ProxyAdmin.Contract.SetAddress(&_ProxyAdmin.TransactOpts, _name, _address) +} + +// SetAddress is a paid mutator transaction binding the contract method 0x9b2ea4bd. +// +// Solidity: function setAddress(string _name, address _address) returns() +func (_ProxyAdmin *ProxyAdminTransactorSession) SetAddress(_name string, _address common.Address) (*types.Transaction, error) { + return _ProxyAdmin.Contract.SetAddress(&_ProxyAdmin.TransactOpts, _name, _address) +} + +// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a. +// +// Solidity: function setAddressManager(address _address) returns() +func (_ProxyAdmin *ProxyAdminTransactor) SetAddressManager(opts *bind.TransactOpts, _address common.Address) (*types.Transaction, error) { + return _ProxyAdmin.contract.Transact(opts, "setAddressManager", _address) +} + +// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a. +// +// Solidity: function setAddressManager(address _address) returns() +func (_ProxyAdmin *ProxyAdminSession) SetAddressManager(_address common.Address) (*types.Transaction, error) { + return _ProxyAdmin.Contract.SetAddressManager(&_ProxyAdmin.TransactOpts, _address) +} + +// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a. +// +// Solidity: function setAddressManager(address _address) returns() +func (_ProxyAdmin *ProxyAdminTransactorSession) SetAddressManager(_address common.Address) (*types.Transaction, error) { + return _ProxyAdmin.Contract.SetAddressManager(&_ProxyAdmin.TransactOpts, _address) +} + +// SetImplementationName is a paid mutator transaction binding the contract method 0x860f7cda. +// +// Solidity: function setImplementationName(address _address, string _name) returns() +func (_ProxyAdmin *ProxyAdminTransactor) SetImplementationName(opts *bind.TransactOpts, _address common.Address, _name string) (*types.Transaction, error) { + return _ProxyAdmin.contract.Transact(opts, "setImplementationName", _address, _name) +} + +// SetImplementationName is a paid mutator transaction binding the contract method 0x860f7cda. +// +// Solidity: function setImplementationName(address _address, string _name) returns() +func (_ProxyAdmin *ProxyAdminSession) SetImplementationName(_address common.Address, _name string) (*types.Transaction, error) { + return _ProxyAdmin.Contract.SetImplementationName(&_ProxyAdmin.TransactOpts, _address, _name) +} + +// SetImplementationName is a paid mutator transaction binding the contract method 0x860f7cda. +// +// Solidity: function setImplementationName(address _address, string _name) returns() +func (_ProxyAdmin *ProxyAdminTransactorSession) SetImplementationName(_address common.Address, _name string) (*types.Transaction, error) { + return _ProxyAdmin.Contract.SetImplementationName(&_ProxyAdmin.TransactOpts, _address, _name) +} + +// SetProxyType is a paid mutator transaction binding the contract method 0x8d52d4a0. +// +// Solidity: function setProxyType(address _address, uint8 _type) returns() +func (_ProxyAdmin *ProxyAdminTransactor) SetProxyType(opts *bind.TransactOpts, _address common.Address, _type uint8) (*types.Transaction, error) { + return _ProxyAdmin.contract.Transact(opts, "setProxyType", _address, _type) +} + +// SetProxyType is a paid mutator transaction binding the contract method 0x8d52d4a0. +// +// Solidity: function setProxyType(address _address, uint8 _type) returns() +func (_ProxyAdmin *ProxyAdminSession) SetProxyType(_address common.Address, _type uint8) (*types.Transaction, error) { + return _ProxyAdmin.Contract.SetProxyType(&_ProxyAdmin.TransactOpts, _address, _type) +} + +// SetProxyType is a paid mutator transaction binding the contract method 0x8d52d4a0. +// +// Solidity: function setProxyType(address _address, uint8 _type) returns() +func (_ProxyAdmin *ProxyAdminTransactorSession) SetProxyType(_address common.Address, _type uint8) (*types.Transaction, error) { + return _ProxyAdmin.Contract.SetProxyType(&_ProxyAdmin.TransactOpts, _address, _type) +} + +// SetUpgrading is a paid mutator transaction binding the contract method 0x07c8f7b0. +// +// Solidity: function setUpgrading(bool _upgrading) returns() +func (_ProxyAdmin *ProxyAdminTransactor) SetUpgrading(opts *bind.TransactOpts, _upgrading bool) (*types.Transaction, error) { + return _ProxyAdmin.contract.Transact(opts, "setUpgrading", _upgrading) +} + +// SetUpgrading is a paid mutator transaction binding the contract method 0x07c8f7b0. +// +// Solidity: function setUpgrading(bool _upgrading) returns() +func (_ProxyAdmin *ProxyAdminSession) SetUpgrading(_upgrading bool) (*types.Transaction, error) { + return _ProxyAdmin.Contract.SetUpgrading(&_ProxyAdmin.TransactOpts, _upgrading) +} + +// SetUpgrading is a paid mutator transaction binding the contract method 0x07c8f7b0. +// +// Solidity: function setUpgrading(bool _upgrading) returns() +func (_ProxyAdmin *ProxyAdminTransactorSession) SetUpgrading(_upgrading bool) (*types.Transaction, error) { + return _ProxyAdmin.Contract.SetUpgrading(&_ProxyAdmin.TransactOpts, _upgrading) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ProxyAdmin *ProxyAdminTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _ProxyAdmin.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ProxyAdmin *ProxyAdminSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _ProxyAdmin.Contract.TransferOwnership(&_ProxyAdmin.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ProxyAdmin *ProxyAdminTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _ProxyAdmin.Contract.TransferOwnership(&_ProxyAdmin.TransactOpts, newOwner) +} + +// Upgrade is a paid mutator transaction binding the contract method 0x99a88ec4. +// +// Solidity: function upgrade(address _proxy, address _implementation) returns() +func (_ProxyAdmin *ProxyAdminTransactor) Upgrade(opts *bind.TransactOpts, _proxy common.Address, _implementation common.Address) (*types.Transaction, error) { + return _ProxyAdmin.contract.Transact(opts, "upgrade", _proxy, _implementation) +} + +// Upgrade is a paid mutator transaction binding the contract method 0x99a88ec4. +// +// Solidity: function upgrade(address _proxy, address _implementation) returns() +func (_ProxyAdmin *ProxyAdminSession) Upgrade(_proxy common.Address, _implementation common.Address) (*types.Transaction, error) { + return _ProxyAdmin.Contract.Upgrade(&_ProxyAdmin.TransactOpts, _proxy, _implementation) +} + +// Upgrade is a paid mutator transaction binding the contract method 0x99a88ec4. +// +// Solidity: function upgrade(address _proxy, address _implementation) returns() +func (_ProxyAdmin *ProxyAdminTransactorSession) Upgrade(_proxy common.Address, _implementation common.Address) (*types.Transaction, error) { + return _ProxyAdmin.Contract.Upgrade(&_ProxyAdmin.TransactOpts, _proxy, _implementation) +} + +// UpgradeAndCall is a paid mutator transaction binding the contract method 0x9623609d. +// +// Solidity: function upgradeAndCall(address _proxy, address _implementation, bytes _data) payable returns() +func (_ProxyAdmin *ProxyAdminTransactor) UpgradeAndCall(opts *bind.TransactOpts, _proxy common.Address, _implementation common.Address, _data []byte) (*types.Transaction, error) { + return _ProxyAdmin.contract.Transact(opts, "upgradeAndCall", _proxy, _implementation, _data) +} + +// UpgradeAndCall is a paid mutator transaction binding the contract method 0x9623609d. +// +// Solidity: function upgradeAndCall(address _proxy, address _implementation, bytes _data) payable returns() +func (_ProxyAdmin *ProxyAdminSession) UpgradeAndCall(_proxy common.Address, _implementation common.Address, _data []byte) (*types.Transaction, error) { + return _ProxyAdmin.Contract.UpgradeAndCall(&_ProxyAdmin.TransactOpts, _proxy, _implementation, _data) +} + +// UpgradeAndCall is a paid mutator transaction binding the contract method 0x9623609d. +// +// Solidity: function upgradeAndCall(address _proxy, address _implementation, bytes _data) payable returns() +func (_ProxyAdmin *ProxyAdminTransactorSession) UpgradeAndCall(_proxy common.Address, _implementation common.Address, _data []byte) (*types.Transaction, error) { + return _ProxyAdmin.Contract.UpgradeAndCall(&_ProxyAdmin.TransactOpts, _proxy, _implementation, _data) +} + +// ProxyAdminOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the ProxyAdmin contract. +type ProxyAdminOwnershipTransferredIterator struct { + Event *ProxyAdminOwnershipTransferred // 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 *ProxyAdminOwnershipTransferredIterator) 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(ProxyAdminOwnershipTransferred) + 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(ProxyAdminOwnershipTransferred) + 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 *ProxyAdminOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ProxyAdminOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ProxyAdminOwnershipTransferred represents a OwnershipTransferred event raised by the ProxyAdmin contract. +type ProxyAdminOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_ProxyAdmin *ProxyAdminFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ProxyAdminOwnershipTransferredIterator, 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 := _ProxyAdmin.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &ProxyAdminOwnershipTransferredIterator{contract: _ProxyAdmin.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_ProxyAdmin *ProxyAdminFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ProxyAdminOwnershipTransferred, 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 := _ProxyAdmin.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ProxyAdminOwnershipTransferred) + if err := _ProxyAdmin.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_ProxyAdmin *ProxyAdminFilterer) ParseOwnershipTransferred(log types.Log) (*ProxyAdminOwnershipTransferred, error) { + event := new(ProxyAdminOwnershipTransferred) + if err := _ProxyAdmin.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/op-chain-ops/opbnb-upgrades/old-contracts/bindings/Semver.go b/op-chain-ops/opbnb-upgrades/old-contracts/bindings/Semver.go new file mode 100644 index 000000000..3a1c67241 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/old-contracts/bindings/Semver.go @@ -0,0 +1,212 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// SemverMetaData contains all meta data concerning the Semver contract. +var SemverMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_major\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minor\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_patch\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"}]", +} + +// SemverABI is the input ABI used to generate the binding from. +// Deprecated: Use SemverMetaData.ABI instead. +var SemverABI = SemverMetaData.ABI + +// Semver is an auto generated Go binding around an Ethereum contract. +type Semver struct { + SemverCaller // Read-only binding to the contract + SemverTransactor // Write-only binding to the contract + SemverFilterer // Log filterer for contract events +} + +// SemverCaller is an auto generated read-only Go binding around an Ethereum contract. +type SemverCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SemverTransactor is an auto generated write-only Go binding around an Ethereum contract. +type SemverTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SemverFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type SemverFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SemverSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type SemverSession struct { + Contract *Semver // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SemverCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type SemverCallerSession struct { + Contract *SemverCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// SemverTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type SemverTransactorSession struct { + Contract *SemverTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SemverRaw is an auto generated low-level Go binding around an Ethereum contract. +type SemverRaw struct { + Contract *Semver // Generic contract binding to access the raw methods on +} + +// SemverCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type SemverCallerRaw struct { + Contract *SemverCaller // Generic read-only contract binding to access the raw methods on +} + +// SemverTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type SemverTransactorRaw struct { + Contract *SemverTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewSemver creates a new instance of Semver, bound to a specific deployed contract. +func NewSemver(address common.Address, backend bind.ContractBackend) (*Semver, error) { + contract, err := bindSemver(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Semver{SemverCaller: SemverCaller{contract: contract}, SemverTransactor: SemverTransactor{contract: contract}, SemverFilterer: SemverFilterer{contract: contract}}, nil +} + +// NewSemverCaller creates a new read-only instance of Semver, bound to a specific deployed contract. +func NewSemverCaller(address common.Address, caller bind.ContractCaller) (*SemverCaller, error) { + contract, err := bindSemver(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &SemverCaller{contract: contract}, nil +} + +// NewSemverTransactor creates a new write-only instance of Semver, bound to a specific deployed contract. +func NewSemverTransactor(address common.Address, transactor bind.ContractTransactor) (*SemverTransactor, error) { + contract, err := bindSemver(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &SemverTransactor{contract: contract}, nil +} + +// NewSemverFilterer creates a new log filterer instance of Semver, bound to a specific deployed contract. +func NewSemverFilterer(address common.Address, filterer bind.ContractFilterer) (*SemverFilterer, error) { + contract, err := bindSemver(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &SemverFilterer{contract: contract}, nil +} + +// bindSemver binds a generic wrapper to an already deployed contract. +func bindSemver(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := SemverMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Semver *SemverRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Semver.Contract.SemverCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Semver *SemverRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Semver.Contract.SemverTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Semver *SemverRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Semver.Contract.SemverTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Semver *SemverCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Semver.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Semver *SemverTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Semver.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Semver *SemverTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Semver.Contract.contract.Transact(opts, method, params...) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_Semver *SemverCaller) Version(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _Semver.contract.Call(opts, &out, "version") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_Semver *SemverSession) Version() (string, error) { + return _Semver.Contract.Version(&_Semver.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_Semver *SemverCallerSession) Version() (string, error) { + return _Semver.Contract.Version(&_Semver.CallOpts) +} diff --git a/op-chain-ops/opbnb-upgrades/old-contracts/bindings/SystemConfig.go b/op-chain-ops/opbnb-upgrades/old-contracts/bindings/SystemConfig.go new file mode 100644 index 000000000..a81215d54 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/old-contracts/bindings/SystemConfig.go @@ -0,0 +1,1141 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// ResourceMeteringResourceConfig is an auto generated low-level Go binding around an user-defined struct. +type ResourceMeteringResourceConfig struct { + MaxResourceLimit uint32 + ElasticityMultiplier uint8 + BaseFeeMaxChangeDenominator uint8 + MinimumBaseFee uint32 + SystemTxMaxGas uint32 + MaximumBaseFee *big.Int +} + +// SystemConfigMetaData contains all meta data concerning the SystemConfig contract. +var SystemConfigMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_overhead\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_scalar\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_batcherHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_gasLimit\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_unsafeBlockSigner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_config\",\"type\":\"tuple\",\"internalType\":\"structResourceMetering.ResourceConfig\",\"components\":[{\"name\":\"maxResourceLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"elasticityMultiplier\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"baseFeeMaxChangeDenominator\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"minimumBaseFee\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"systemTxMaxGas\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"maximumBaseFee\",\"type\":\"uint128\",\"internalType\":\"uint128\"}]}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"UNSAFE_BLOCK_SIGNER_SLOT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"batcherHash\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"gasLimit\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_overhead\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_scalar\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_batcherHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_gasLimit\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_unsafeBlockSigner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_config\",\"type\":\"tuple\",\"internalType\":\"structResourceMetering.ResourceConfig\",\"components\":[{\"name\":\"maxResourceLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"elasticityMultiplier\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"baseFeeMaxChangeDenominator\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"minimumBaseFee\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"systemTxMaxGas\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"maximumBaseFee\",\"type\":\"uint128\",\"internalType\":\"uint128\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"minimumGasLimit\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"overhead\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"resourceConfig\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structResourceMetering.ResourceConfig\",\"components\":[{\"name\":\"maxResourceLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"elasticityMultiplier\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"baseFeeMaxChangeDenominator\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"minimumBaseFee\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"systemTxMaxGas\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"maximumBaseFee\",\"type\":\"uint128\",\"internalType\":\"uint128\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"scalar\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setBatcherHash\",\"inputs\":[{\"name\":\"_batcherHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setGasConfig\",\"inputs\":[{\"name\":\"_overhead\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_scalar\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setGasLimit\",\"inputs\":[{\"name\":\"_gasLimit\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setResourceConfig\",\"inputs\":[{\"name\":\"_config\",\"type\":\"tuple\",\"internalType\":\"structResourceMetering.ResourceConfig\",\"components\":[{\"name\":\"maxResourceLimit\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"elasticityMultiplier\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"baseFeeMaxChangeDenominator\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"minimumBaseFee\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"systemTxMaxGas\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"maximumBaseFee\",\"type\":\"uint128\",\"internalType\":\"uint128\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setUnsafeBlockSigner\",\"inputs\":[{\"name\":\"_unsafeBlockSigner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unsafeBlockSigner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"ConfigUpdate\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"updateType\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"enumSystemConfig.UpdateType\"},{\"name\":\"data\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false}]", +} + +// SystemConfigABI is the input ABI used to generate the binding from. +// Deprecated: Use SystemConfigMetaData.ABI instead. +var SystemConfigABI = SystemConfigMetaData.ABI + +// SystemConfig is an auto generated Go binding around an Ethereum contract. +type SystemConfig struct { + SystemConfigCaller // Read-only binding to the contract + SystemConfigTransactor // Write-only binding to the contract + SystemConfigFilterer // Log filterer for contract events +} + +// SystemConfigCaller is an auto generated read-only Go binding around an Ethereum contract. +type SystemConfigCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SystemConfigTransactor is an auto generated write-only Go binding around an Ethereum contract. +type SystemConfigTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SystemConfigFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type SystemConfigFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SystemConfigSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type SystemConfigSession struct { + Contract *SystemConfig // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SystemConfigCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type SystemConfigCallerSession struct { + Contract *SystemConfigCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// SystemConfigTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type SystemConfigTransactorSession struct { + Contract *SystemConfigTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SystemConfigRaw is an auto generated low-level Go binding around an Ethereum contract. +type SystemConfigRaw struct { + Contract *SystemConfig // Generic contract binding to access the raw methods on +} + +// SystemConfigCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type SystemConfigCallerRaw struct { + Contract *SystemConfigCaller // Generic read-only contract binding to access the raw methods on +} + +// SystemConfigTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type SystemConfigTransactorRaw struct { + Contract *SystemConfigTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewSystemConfig creates a new instance of SystemConfig, bound to a specific deployed contract. +func NewSystemConfig(address common.Address, backend bind.ContractBackend) (*SystemConfig, error) { + contract, err := bindSystemConfig(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &SystemConfig{SystemConfigCaller: SystemConfigCaller{contract: contract}, SystemConfigTransactor: SystemConfigTransactor{contract: contract}, SystemConfigFilterer: SystemConfigFilterer{contract: contract}}, nil +} + +// NewSystemConfigCaller creates a new read-only instance of SystemConfig, bound to a specific deployed contract. +func NewSystemConfigCaller(address common.Address, caller bind.ContractCaller) (*SystemConfigCaller, error) { + contract, err := bindSystemConfig(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &SystemConfigCaller{contract: contract}, nil +} + +// NewSystemConfigTransactor creates a new write-only instance of SystemConfig, bound to a specific deployed contract. +func NewSystemConfigTransactor(address common.Address, transactor bind.ContractTransactor) (*SystemConfigTransactor, error) { + contract, err := bindSystemConfig(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &SystemConfigTransactor{contract: contract}, nil +} + +// NewSystemConfigFilterer creates a new log filterer instance of SystemConfig, bound to a specific deployed contract. +func NewSystemConfigFilterer(address common.Address, filterer bind.ContractFilterer) (*SystemConfigFilterer, error) { + contract, err := bindSystemConfig(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &SystemConfigFilterer{contract: contract}, nil +} + +// bindSystemConfig binds a generic wrapper to an already deployed contract. +func bindSystemConfig(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := SystemConfigMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_SystemConfig *SystemConfigRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _SystemConfig.Contract.SystemConfigCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_SystemConfig *SystemConfigRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SystemConfig.Contract.SystemConfigTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SystemConfig *SystemConfigRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SystemConfig.Contract.SystemConfigTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_SystemConfig *SystemConfigCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _SystemConfig.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_SystemConfig *SystemConfigTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SystemConfig.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SystemConfig *SystemConfigTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SystemConfig.Contract.contract.Transact(opts, method, params...) +} + +// UNSAFEBLOCKSIGNERSLOT is a free data retrieval call binding the contract method 0x4f16540b. +// +// Solidity: function UNSAFE_BLOCK_SIGNER_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigCaller) UNSAFEBLOCKSIGNERSLOT(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "UNSAFE_BLOCK_SIGNER_SLOT") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// UNSAFEBLOCKSIGNERSLOT is a free data retrieval call binding the contract method 0x4f16540b. +// +// Solidity: function UNSAFE_BLOCK_SIGNER_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigSession) UNSAFEBLOCKSIGNERSLOT() ([32]byte, error) { + return _SystemConfig.Contract.UNSAFEBLOCKSIGNERSLOT(&_SystemConfig.CallOpts) +} + +// UNSAFEBLOCKSIGNERSLOT is a free data retrieval call binding the contract method 0x4f16540b. +// +// Solidity: function UNSAFE_BLOCK_SIGNER_SLOT() view returns(bytes32) +func (_SystemConfig *SystemConfigCallerSession) UNSAFEBLOCKSIGNERSLOT() ([32]byte, error) { + return _SystemConfig.Contract.UNSAFEBLOCKSIGNERSLOT(&_SystemConfig.CallOpts) +} + +// VERSION is a free data retrieval call binding the contract method 0xffa1ad74. +// +// Solidity: function VERSION() view returns(uint256) +func (_SystemConfig *SystemConfigCaller) VERSION(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "VERSION") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// VERSION is a free data retrieval call binding the contract method 0xffa1ad74. +// +// Solidity: function VERSION() view returns(uint256) +func (_SystemConfig *SystemConfigSession) VERSION() (*big.Int, error) { + return _SystemConfig.Contract.VERSION(&_SystemConfig.CallOpts) +} + +// VERSION is a free data retrieval call binding the contract method 0xffa1ad74. +// +// Solidity: function VERSION() view returns(uint256) +func (_SystemConfig *SystemConfigCallerSession) VERSION() (*big.Int, error) { + return _SystemConfig.Contract.VERSION(&_SystemConfig.CallOpts) +} + +// BatcherHash is a free data retrieval call binding the contract method 0xe81b2c6d. +// +// Solidity: function batcherHash() view returns(bytes32) +func (_SystemConfig *SystemConfigCaller) BatcherHash(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "batcherHash") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// BatcherHash is a free data retrieval call binding the contract method 0xe81b2c6d. +// +// Solidity: function batcherHash() view returns(bytes32) +func (_SystemConfig *SystemConfigSession) BatcherHash() ([32]byte, error) { + return _SystemConfig.Contract.BatcherHash(&_SystemConfig.CallOpts) +} + +// BatcherHash is a free data retrieval call binding the contract method 0xe81b2c6d. +// +// Solidity: function batcherHash() view returns(bytes32) +func (_SystemConfig *SystemConfigCallerSession) BatcherHash() ([32]byte, error) { + return _SystemConfig.Contract.BatcherHash(&_SystemConfig.CallOpts) +} + +// GasLimit is a free data retrieval call binding the contract method 0xf68016b7. +// +// Solidity: function gasLimit() view returns(uint64) +func (_SystemConfig *SystemConfigCaller) GasLimit(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "gasLimit") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// GasLimit is a free data retrieval call binding the contract method 0xf68016b7. +// +// Solidity: function gasLimit() view returns(uint64) +func (_SystemConfig *SystemConfigSession) GasLimit() (uint64, error) { + return _SystemConfig.Contract.GasLimit(&_SystemConfig.CallOpts) +} + +// GasLimit is a free data retrieval call binding the contract method 0xf68016b7. +// +// Solidity: function gasLimit() view returns(uint64) +func (_SystemConfig *SystemConfigCallerSession) GasLimit() (uint64, error) { + return _SystemConfig.Contract.GasLimit(&_SystemConfig.CallOpts) +} + +// MinimumGasLimit is a free data retrieval call binding the contract method 0x4add321d. +// +// Solidity: function minimumGasLimit() view returns(uint64) +func (_SystemConfig *SystemConfigCaller) MinimumGasLimit(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "minimumGasLimit") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// MinimumGasLimit is a free data retrieval call binding the contract method 0x4add321d. +// +// Solidity: function minimumGasLimit() view returns(uint64) +func (_SystemConfig *SystemConfigSession) MinimumGasLimit() (uint64, error) { + return _SystemConfig.Contract.MinimumGasLimit(&_SystemConfig.CallOpts) +} + +// MinimumGasLimit is a free data retrieval call binding the contract method 0x4add321d. +// +// Solidity: function minimumGasLimit() view returns(uint64) +func (_SystemConfig *SystemConfigCallerSession) MinimumGasLimit() (uint64, error) { + return _SystemConfig.Contract.MinimumGasLimit(&_SystemConfig.CallOpts) +} + +// Overhead is a free data retrieval call binding the contract method 0x0c18c162. +// +// Solidity: function overhead() view returns(uint256) +func (_SystemConfig *SystemConfigCaller) Overhead(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "overhead") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Overhead is a free data retrieval call binding the contract method 0x0c18c162. +// +// Solidity: function overhead() view returns(uint256) +func (_SystemConfig *SystemConfigSession) Overhead() (*big.Int, error) { + return _SystemConfig.Contract.Overhead(&_SystemConfig.CallOpts) +} + +// Overhead is a free data retrieval call binding the contract method 0x0c18c162. +// +// Solidity: function overhead() view returns(uint256) +func (_SystemConfig *SystemConfigCallerSession) Overhead() (*big.Int, error) { + return _SystemConfig.Contract.Overhead(&_SystemConfig.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_SystemConfig *SystemConfigCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_SystemConfig *SystemConfigSession) Owner() (common.Address, error) { + return _SystemConfig.Contract.Owner(&_SystemConfig.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_SystemConfig *SystemConfigCallerSession) Owner() (common.Address, error) { + return _SystemConfig.Contract.Owner(&_SystemConfig.CallOpts) +} + +// ResourceConfig is a free data retrieval call binding the contract method 0xcc731b02. +// +// Solidity: function resourceConfig() view returns((uint32,uint8,uint8,uint32,uint32,uint128)) +func (_SystemConfig *SystemConfigCaller) ResourceConfig(opts *bind.CallOpts) (ResourceMeteringResourceConfig, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "resourceConfig") + + if err != nil { + return *new(ResourceMeteringResourceConfig), err + } + + out0 := *abi.ConvertType(out[0], new(ResourceMeteringResourceConfig)).(*ResourceMeteringResourceConfig) + + return out0, err + +} + +// ResourceConfig is a free data retrieval call binding the contract method 0xcc731b02. +// +// Solidity: function resourceConfig() view returns((uint32,uint8,uint8,uint32,uint32,uint128)) +func (_SystemConfig *SystemConfigSession) ResourceConfig() (ResourceMeteringResourceConfig, error) { + return _SystemConfig.Contract.ResourceConfig(&_SystemConfig.CallOpts) +} + +// ResourceConfig is a free data retrieval call binding the contract method 0xcc731b02. +// +// Solidity: function resourceConfig() view returns((uint32,uint8,uint8,uint32,uint32,uint128)) +func (_SystemConfig *SystemConfigCallerSession) ResourceConfig() (ResourceMeteringResourceConfig, error) { + return _SystemConfig.Contract.ResourceConfig(&_SystemConfig.CallOpts) +} + +// Scalar is a free data retrieval call binding the contract method 0xf45e65d8. +// +// Solidity: function scalar() view returns(uint256) +func (_SystemConfig *SystemConfigCaller) Scalar(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "scalar") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Scalar is a free data retrieval call binding the contract method 0xf45e65d8. +// +// Solidity: function scalar() view returns(uint256) +func (_SystemConfig *SystemConfigSession) Scalar() (*big.Int, error) { + return _SystemConfig.Contract.Scalar(&_SystemConfig.CallOpts) +} + +// Scalar is a free data retrieval call binding the contract method 0xf45e65d8. +// +// Solidity: function scalar() view returns(uint256) +func (_SystemConfig *SystemConfigCallerSession) Scalar() (*big.Int, error) { + return _SystemConfig.Contract.Scalar(&_SystemConfig.CallOpts) +} + +// UnsafeBlockSigner is a free data retrieval call binding the contract method 0x1fd19ee1. +// +// Solidity: function unsafeBlockSigner() view returns(address) +func (_SystemConfig *SystemConfigCaller) UnsafeBlockSigner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "unsafeBlockSigner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// UnsafeBlockSigner is a free data retrieval call binding the contract method 0x1fd19ee1. +// +// Solidity: function unsafeBlockSigner() view returns(address) +func (_SystemConfig *SystemConfigSession) UnsafeBlockSigner() (common.Address, error) { + return _SystemConfig.Contract.UnsafeBlockSigner(&_SystemConfig.CallOpts) +} + +// UnsafeBlockSigner is a free data retrieval call binding the contract method 0x1fd19ee1. +// +// Solidity: function unsafeBlockSigner() view returns(address) +func (_SystemConfig *SystemConfigCallerSession) UnsafeBlockSigner() (common.Address, error) { + return _SystemConfig.Contract.UnsafeBlockSigner(&_SystemConfig.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_SystemConfig *SystemConfigCaller) Version(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _SystemConfig.contract.Call(opts, &out, "version") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_SystemConfig *SystemConfigSession) Version() (string, error) { + return _SystemConfig.Contract.Version(&_SystemConfig.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_SystemConfig *SystemConfigCallerSession) Version() (string, error) { + return _SystemConfig.Contract.Version(&_SystemConfig.CallOpts) +} + +// Initialize is a paid mutator transaction binding the contract method 0xf975e925. +// +// Solidity: function initialize(address _owner, uint256 _overhead, uint256 _scalar, bytes32 _batcherHash, uint64 _gasLimit, address _unsafeBlockSigner, (uint32,uint8,uint8,uint32,uint32,uint128) _config) returns() +func (_SystemConfig *SystemConfigTransactor) Initialize(opts *bind.TransactOpts, _owner common.Address, _overhead *big.Int, _scalar *big.Int, _batcherHash [32]byte, _gasLimit uint64, _unsafeBlockSigner common.Address, _config ResourceMeteringResourceConfig) (*types.Transaction, error) { + return _SystemConfig.contract.Transact(opts, "initialize", _owner, _overhead, _scalar, _batcherHash, _gasLimit, _unsafeBlockSigner, _config) +} + +// Initialize is a paid mutator transaction binding the contract method 0xf975e925. +// +// Solidity: function initialize(address _owner, uint256 _overhead, uint256 _scalar, bytes32 _batcherHash, uint64 _gasLimit, address _unsafeBlockSigner, (uint32,uint8,uint8,uint32,uint32,uint128) _config) returns() +func (_SystemConfig *SystemConfigSession) Initialize(_owner common.Address, _overhead *big.Int, _scalar *big.Int, _batcherHash [32]byte, _gasLimit uint64, _unsafeBlockSigner common.Address, _config ResourceMeteringResourceConfig) (*types.Transaction, error) { + return _SystemConfig.Contract.Initialize(&_SystemConfig.TransactOpts, _owner, _overhead, _scalar, _batcherHash, _gasLimit, _unsafeBlockSigner, _config) +} + +// Initialize is a paid mutator transaction binding the contract method 0xf975e925. +// +// Solidity: function initialize(address _owner, uint256 _overhead, uint256 _scalar, bytes32 _batcherHash, uint64 _gasLimit, address _unsafeBlockSigner, (uint32,uint8,uint8,uint32,uint32,uint128) _config) returns() +func (_SystemConfig *SystemConfigTransactorSession) Initialize(_owner common.Address, _overhead *big.Int, _scalar *big.Int, _batcherHash [32]byte, _gasLimit uint64, _unsafeBlockSigner common.Address, _config ResourceMeteringResourceConfig) (*types.Transaction, error) { + return _SystemConfig.Contract.Initialize(&_SystemConfig.TransactOpts, _owner, _overhead, _scalar, _batcherHash, _gasLimit, _unsafeBlockSigner, _config) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_SystemConfig *SystemConfigTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SystemConfig.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_SystemConfig *SystemConfigSession) RenounceOwnership() (*types.Transaction, error) { + return _SystemConfig.Contract.RenounceOwnership(&_SystemConfig.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_SystemConfig *SystemConfigTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _SystemConfig.Contract.RenounceOwnership(&_SystemConfig.TransactOpts) +} + +// SetBatcherHash is a paid mutator transaction binding the contract method 0xc9b26f61. +// +// Solidity: function setBatcherHash(bytes32 _batcherHash) returns() +func (_SystemConfig *SystemConfigTransactor) SetBatcherHash(opts *bind.TransactOpts, _batcherHash [32]byte) (*types.Transaction, error) { + return _SystemConfig.contract.Transact(opts, "setBatcherHash", _batcherHash) +} + +// SetBatcherHash is a paid mutator transaction binding the contract method 0xc9b26f61. +// +// Solidity: function setBatcherHash(bytes32 _batcherHash) returns() +func (_SystemConfig *SystemConfigSession) SetBatcherHash(_batcherHash [32]byte) (*types.Transaction, error) { + return _SystemConfig.Contract.SetBatcherHash(&_SystemConfig.TransactOpts, _batcherHash) +} + +// SetBatcherHash is a paid mutator transaction binding the contract method 0xc9b26f61. +// +// Solidity: function setBatcherHash(bytes32 _batcherHash) returns() +func (_SystemConfig *SystemConfigTransactorSession) SetBatcherHash(_batcherHash [32]byte) (*types.Transaction, error) { + return _SystemConfig.Contract.SetBatcherHash(&_SystemConfig.TransactOpts, _batcherHash) +} + +// SetGasConfig is a paid mutator transaction binding the contract method 0x935f029e. +// +// Solidity: function setGasConfig(uint256 _overhead, uint256 _scalar) returns() +func (_SystemConfig *SystemConfigTransactor) SetGasConfig(opts *bind.TransactOpts, _overhead *big.Int, _scalar *big.Int) (*types.Transaction, error) { + return _SystemConfig.contract.Transact(opts, "setGasConfig", _overhead, _scalar) +} + +// SetGasConfig is a paid mutator transaction binding the contract method 0x935f029e. +// +// Solidity: function setGasConfig(uint256 _overhead, uint256 _scalar) returns() +func (_SystemConfig *SystemConfigSession) SetGasConfig(_overhead *big.Int, _scalar *big.Int) (*types.Transaction, error) { + return _SystemConfig.Contract.SetGasConfig(&_SystemConfig.TransactOpts, _overhead, _scalar) +} + +// SetGasConfig is a paid mutator transaction binding the contract method 0x935f029e. +// +// Solidity: function setGasConfig(uint256 _overhead, uint256 _scalar) returns() +func (_SystemConfig *SystemConfigTransactorSession) SetGasConfig(_overhead *big.Int, _scalar *big.Int) (*types.Transaction, error) { + return _SystemConfig.Contract.SetGasConfig(&_SystemConfig.TransactOpts, _overhead, _scalar) +} + +// SetGasLimit is a paid mutator transaction binding the contract method 0xb40a817c. +// +// Solidity: function setGasLimit(uint64 _gasLimit) returns() +func (_SystemConfig *SystemConfigTransactor) SetGasLimit(opts *bind.TransactOpts, _gasLimit uint64) (*types.Transaction, error) { + return _SystemConfig.contract.Transact(opts, "setGasLimit", _gasLimit) +} + +// SetGasLimit is a paid mutator transaction binding the contract method 0xb40a817c. +// +// Solidity: function setGasLimit(uint64 _gasLimit) returns() +func (_SystemConfig *SystemConfigSession) SetGasLimit(_gasLimit uint64) (*types.Transaction, error) { + return _SystemConfig.Contract.SetGasLimit(&_SystemConfig.TransactOpts, _gasLimit) +} + +// SetGasLimit is a paid mutator transaction binding the contract method 0xb40a817c. +// +// Solidity: function setGasLimit(uint64 _gasLimit) returns() +func (_SystemConfig *SystemConfigTransactorSession) SetGasLimit(_gasLimit uint64) (*types.Transaction, error) { + return _SystemConfig.Contract.SetGasLimit(&_SystemConfig.TransactOpts, _gasLimit) +} + +// SetResourceConfig is a paid mutator transaction binding the contract method 0xc71973f6. +// +// Solidity: function setResourceConfig((uint32,uint8,uint8,uint32,uint32,uint128) _config) returns() +func (_SystemConfig *SystemConfigTransactor) SetResourceConfig(opts *bind.TransactOpts, _config ResourceMeteringResourceConfig) (*types.Transaction, error) { + return _SystemConfig.contract.Transact(opts, "setResourceConfig", _config) +} + +// SetResourceConfig is a paid mutator transaction binding the contract method 0xc71973f6. +// +// Solidity: function setResourceConfig((uint32,uint8,uint8,uint32,uint32,uint128) _config) returns() +func (_SystemConfig *SystemConfigSession) SetResourceConfig(_config ResourceMeteringResourceConfig) (*types.Transaction, error) { + return _SystemConfig.Contract.SetResourceConfig(&_SystemConfig.TransactOpts, _config) +} + +// SetResourceConfig is a paid mutator transaction binding the contract method 0xc71973f6. +// +// Solidity: function setResourceConfig((uint32,uint8,uint8,uint32,uint32,uint128) _config) returns() +func (_SystemConfig *SystemConfigTransactorSession) SetResourceConfig(_config ResourceMeteringResourceConfig) (*types.Transaction, error) { + return _SystemConfig.Contract.SetResourceConfig(&_SystemConfig.TransactOpts, _config) +} + +// SetUnsafeBlockSigner is a paid mutator transaction binding the contract method 0x18d13918. +// +// Solidity: function setUnsafeBlockSigner(address _unsafeBlockSigner) returns() +func (_SystemConfig *SystemConfigTransactor) SetUnsafeBlockSigner(opts *bind.TransactOpts, _unsafeBlockSigner common.Address) (*types.Transaction, error) { + return _SystemConfig.contract.Transact(opts, "setUnsafeBlockSigner", _unsafeBlockSigner) +} + +// SetUnsafeBlockSigner is a paid mutator transaction binding the contract method 0x18d13918. +// +// Solidity: function setUnsafeBlockSigner(address _unsafeBlockSigner) returns() +func (_SystemConfig *SystemConfigSession) SetUnsafeBlockSigner(_unsafeBlockSigner common.Address) (*types.Transaction, error) { + return _SystemConfig.Contract.SetUnsafeBlockSigner(&_SystemConfig.TransactOpts, _unsafeBlockSigner) +} + +// SetUnsafeBlockSigner is a paid mutator transaction binding the contract method 0x18d13918. +// +// Solidity: function setUnsafeBlockSigner(address _unsafeBlockSigner) returns() +func (_SystemConfig *SystemConfigTransactorSession) SetUnsafeBlockSigner(_unsafeBlockSigner common.Address) (*types.Transaction, error) { + return _SystemConfig.Contract.SetUnsafeBlockSigner(&_SystemConfig.TransactOpts, _unsafeBlockSigner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_SystemConfig *SystemConfigTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _SystemConfig.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_SystemConfig *SystemConfigSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _SystemConfig.Contract.TransferOwnership(&_SystemConfig.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_SystemConfig *SystemConfigTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _SystemConfig.Contract.TransferOwnership(&_SystemConfig.TransactOpts, newOwner) +} + +// SystemConfigConfigUpdateIterator is returned from FilterConfigUpdate and is used to iterate over the raw logs and unpacked data for ConfigUpdate events raised by the SystemConfig contract. +type SystemConfigConfigUpdateIterator struct { + Event *SystemConfigConfigUpdate // 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 *SystemConfigConfigUpdateIterator) 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(SystemConfigConfigUpdate) + 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(SystemConfigConfigUpdate) + 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 *SystemConfigConfigUpdateIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SystemConfigConfigUpdateIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SystemConfigConfigUpdate represents a ConfigUpdate event raised by the SystemConfig contract. +type SystemConfigConfigUpdate struct { + Version *big.Int + UpdateType uint8 + Data []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterConfigUpdate is a free log retrieval operation binding the contract event 0x1d2b0bda21d56b8bd12d4f94ebacffdfb35f5e226f84b461103bb8beab6353be. +// +// Solidity: event ConfigUpdate(uint256 indexed version, uint8 indexed updateType, bytes data) +func (_SystemConfig *SystemConfigFilterer) FilterConfigUpdate(opts *bind.FilterOpts, version []*big.Int, updateType []uint8) (*SystemConfigConfigUpdateIterator, error) { + + var versionRule []interface{} + for _, versionItem := range version { + versionRule = append(versionRule, versionItem) + } + var updateTypeRule []interface{} + for _, updateTypeItem := range updateType { + updateTypeRule = append(updateTypeRule, updateTypeItem) + } + + logs, sub, err := _SystemConfig.contract.FilterLogs(opts, "ConfigUpdate", versionRule, updateTypeRule) + if err != nil { + return nil, err + } + return &SystemConfigConfigUpdateIterator{contract: _SystemConfig.contract, event: "ConfigUpdate", logs: logs, sub: sub}, nil +} + +// WatchConfigUpdate is a free log subscription operation binding the contract event 0x1d2b0bda21d56b8bd12d4f94ebacffdfb35f5e226f84b461103bb8beab6353be. +// +// Solidity: event ConfigUpdate(uint256 indexed version, uint8 indexed updateType, bytes data) +func (_SystemConfig *SystemConfigFilterer) WatchConfigUpdate(opts *bind.WatchOpts, sink chan<- *SystemConfigConfigUpdate, version []*big.Int, updateType []uint8) (event.Subscription, error) { + + var versionRule []interface{} + for _, versionItem := range version { + versionRule = append(versionRule, versionItem) + } + var updateTypeRule []interface{} + for _, updateTypeItem := range updateType { + updateTypeRule = append(updateTypeRule, updateTypeItem) + } + + logs, sub, err := _SystemConfig.contract.WatchLogs(opts, "ConfigUpdate", versionRule, updateTypeRule) + 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(SystemConfigConfigUpdate) + if err := _SystemConfig.contract.UnpackLog(event, "ConfigUpdate", 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 +} + +// ParseConfigUpdate is a log parse operation binding the contract event 0x1d2b0bda21d56b8bd12d4f94ebacffdfb35f5e226f84b461103bb8beab6353be. +// +// Solidity: event ConfigUpdate(uint256 indexed version, uint8 indexed updateType, bytes data) +func (_SystemConfig *SystemConfigFilterer) ParseConfigUpdate(log types.Log) (*SystemConfigConfigUpdate, error) { + event := new(SystemConfigConfigUpdate) + if err := _SystemConfig.contract.UnpackLog(event, "ConfigUpdate", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SystemConfigInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the SystemConfig contract. +type SystemConfigInitializedIterator struct { + Event *SystemConfigInitialized // 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 *SystemConfigInitializedIterator) 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(SystemConfigInitialized) + 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(SystemConfigInitialized) + 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 *SystemConfigInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SystemConfigInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SystemConfigInitialized represents a Initialized event raised by the SystemConfig contract. +type SystemConfigInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_SystemConfig *SystemConfigFilterer) FilterInitialized(opts *bind.FilterOpts) (*SystemConfigInitializedIterator, error) { + + logs, sub, err := _SystemConfig.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &SystemConfigInitializedIterator{contract: _SystemConfig.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_SystemConfig *SystemConfigFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *SystemConfigInitialized) (event.Subscription, error) { + + logs, sub, err := _SystemConfig.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SystemConfigInitialized) + if err := _SystemConfig.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_SystemConfig *SystemConfigFilterer) ParseInitialized(log types.Log) (*SystemConfigInitialized, error) { + event := new(SystemConfigInitialized) + if err := _SystemConfig.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SystemConfigOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the SystemConfig contract. +type SystemConfigOwnershipTransferredIterator struct { + Event *SystemConfigOwnershipTransferred // 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 *SystemConfigOwnershipTransferredIterator) 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(SystemConfigOwnershipTransferred) + 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(SystemConfigOwnershipTransferred) + 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 *SystemConfigOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SystemConfigOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SystemConfigOwnershipTransferred represents a OwnershipTransferred event raised by the SystemConfig contract. +type SystemConfigOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_SystemConfig *SystemConfigFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*SystemConfigOwnershipTransferredIterator, 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 := _SystemConfig.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &SystemConfigOwnershipTransferredIterator{contract: _SystemConfig.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_SystemConfig *SystemConfigFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *SystemConfigOwnershipTransferred, 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 := _SystemConfig.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SystemConfigOwnershipTransferred) + if err := _SystemConfig.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_SystemConfig *SystemConfigFilterer) ParseOwnershipTransferred(log types.Log) (*SystemConfigOwnershipTransferred, error) { + event := new(SystemConfigOwnershipTransferred) + if err := _SystemConfig.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/op-chain-ops/opbnb-upgrades/testnet/testnet_new_contracts_addrs.json b/op-chain-ops/opbnb-upgrades/testnet/testnet_new_contracts_addrs.json new file mode 100644 index 000000000..4ee52ba51 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/testnet/testnet_new_contracts_addrs.json @@ -0,0 +1,12 @@ +{ + "L1CrossDomainMessenger": "0xc25C60b8f38AF900F520E19aA9eCeaBAF6501906", + "L1ERC721Bridge": "0x7d68a6F2B21B28Bc058837Cd1Fb67f36D717e554", + "L1StandardBridge": "0xCC3E823575e77B2E47c50C86800bdCcDb73d4185", + "L2OutputOracle": "0xe80A6945CD3b32eA2d05702772232A056a218D13", + "OptimismMintableERC20Factory": "0x21751BDb682A73036B3dB0Fa5faB1Ec629b29941", + "OptimismPortal": "0x2Dc5fAB884EC606b196381feb5743C9390b899F0", + "StorageSetter": "0x14C1079C7F0e436d76D5fbBe6a212da7244D8244", + "SuperchainConfig": "0x80E480e226F38c11f33A4cf7744EE92C90224B83", + "SuperchainConfigProxy": "0xb19bFAC32Aa9aADEc286E2c918FF949bc0e59218", + "SystemConfig": "0x218E3dCdf2E0f29E569b6934fef6Ad50bbDe785C" +} diff --git a/op-chain-ops/opbnb-upgrades/testnet/testnet_new_contracts_info.json b/op-chain-ops/opbnb-upgrades/testnet/testnet_new_contracts_info.json new file mode 100644 index 000000000..af447479d --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/testnet/testnet_new_contracts_info.json @@ -0,0 +1,95 @@ +[ + { + "L1CrossDomainMessengerInfo": "", + "Name": "L1CrossDomainMessenger", + "Address": "0xD506952e78eeCd5d4424B1990a0c99B1568E7c2C", + "Version": "2.4.0", + "OtherMessenger": "0x4200000000000000000000000000000000000007", + "Portal": "0x4386C8ABf2009aC0c263462Da568DD9d46e52a31", + "SuperChainConfig": "0xb19bFAC32Aa9aADEc286E2c918FF949bc0e59218", + "SystemConfig": "0x406aC857817708eAf4ca3A82317eF4ae3D1EA23B" + }, + { + "L1ERC721BridgeInfo": "", + "Name": "L1ERC721Bridge", + "Address": "0x17e1454015bFb3377c75bE7b6d47B236fd2ddbE7", + "Version": "2.1.0", + "OtherMessenger": "0xD506952e78eeCd5d4424B1990a0c99B1568E7c2C", + "OtherBridge": "0x4200000000000000000000000000000000000014", + "SuperChainConfig": "0xb19bFAC32Aa9aADEc286E2c918FF949bc0e59218" + }, + { + "L1StandardBridgeInfo": "", + "Name": "L1StandardBridge", + "Address": "0x677311Fd2cCc511Bbc0f581E8d9a07B033D5E840", + "Version": "2.2.0", + "OtherMessenger": "0xD506952e78eeCd5d4424B1990a0c99B1568E7c2C", + "OtherBridge": "0x4200000000000000000000000000000000000010", + "SuperChainConfig": "0xb19bFAC32Aa9aADEc286E2c918FF949bc0e59218", + "SystemConfig": "0x406aC857817708eAf4ca3A82317eF4ae3D1EA23B" + }, + { + "L2OutputOracleInfo": "", + "Name": "L2OutputOracle", + "Address": "0xFf2394Bb843012562f4349C6632a0EcB92fC8810", + "Version": "1.8.0", + "SubmissionInterval": "240", + "L2BlockTime": "1", + "Challenger": "0x9e1A970683f6Cf53a4e3F13faCFaDC1c7E37D9bc", + "Proposer": "0x4aE49f1f57358c13A5732cb12e656Cf8C8D986DF", + "FinalizationPeriodSeconds": "3", + "StartingBlockNumber": "0", + "StartingTimestamp": "1686878506" + }, + { + "OptimismMintableERC20FactoryInfo": "", + "Name": "OptimismMintableERC20Factory", + "Address": "", + "Version": "1.9.0", + "Bridge": "0x677311Fd2cCc511Bbc0f581E8d9a07B033D5E840" + }, + { + "OptimismPortalInfo": "", + "Name": "OptimismPortal", + "Address": "0x4386C8ABf2009aC0c263462Da568DD9d46e52a31", + "Version": "2.8.1-beta.1", + "L2Oracle": "0xFf2394Bb843012562f4349C6632a0EcB92fC8810", + "L2Sender": "0x000000000000000000000000000000000000dEaD", + "SystemConfig": "0x406aC857817708eAf4ca3A82317eF4ae3D1EA23B", + "Guardian": "0x9e1A970683f6Cf53a4e3F13faCFaDC1c7E37D9bc", + "SuperChainConfig": "0xb19bFAC32Aa9aADEc286E2c918FF949bc0e59218", + "Balance": "282922683113123490106393" + }, + { + "SystemConfigInfo": "", + "Name": "SystemConfig", + "Address": "0x406aC857817708eAf4ca3A82317eF4ae3D1EA23B", + "Version": "2.3.0-beta.2", + "Owner": "0x9e1A970683f6Cf53a4e3F13faCFaDC1c7E37D9bc", + "UnsafeBlockSigner": "0x23264E1F3C04efBe84108E666a187D240DDAfcED", + "Overhead": "0", + "Scalar": "452312848583266388373324160190187140051835877600158453279134000734489610656", + "BatcherHash": "0000000000000000000000001fd6a75cc72f39147756a663f3ef1fc95ef89495", + "GasLimit": "100000000", + "ResourceConfig": { + "MaxResourceLimit": 80000000, + "ElasticityMultiplier": 2, + "BaseFeeMaxChangeDenominator": 8, + "MinimumBaseFee": 1000000000, + "SystemTxMaxGas": 1000000, + "MaximumBaseFee": "340282366920938463463374607431768211455" + }, + "StartBlock": "30727847", + "BaseFeeScalar": "68000", + "BlobBaseFeeScalar": "655000", + "BatcherInbox": "0xfF00000000000000000000000000000000005611", + "L1CrossDomainMessengerAddress": "0xD506952e78eeCd5d4424B1990a0c99B1568E7c2C", + "L1ERC721BridgeAddress": "0x17e1454015bFb3377c75bE7b6d47B236fd2ddbE7", + "L1StandardBridgeAddress": "0x677311Fd2cCc511Bbc0f581E8d9a07B033D5E840", + "DisputeGameFactoryAddress": "0x0000000000000000000000000000000000000000", + "OptimismPortalAddress": "0x4386C8ABf2009aC0c263462Da568DD9d46e52a31", + "OptimismMintableERC20FactoryAddress": "0x182cE4305791744202BB4F802C155B94cb66163B", + "GasPayingTokenAddress": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" + } +] + diff --git a/op-chain-ops/opbnb-upgrades/testnet/testnet_old_contracts_info.json b/op-chain-ops/opbnb-upgrades/testnet/testnet_old_contracts_info.json new file mode 100644 index 000000000..a01c7f5a5 --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/testnet/testnet_old_contracts_info.json @@ -0,0 +1,95 @@ +[ + { + "L1CrossDomainMessengerInfo": "", + "Name": "L1CrossDomainMessenger", + "Address": "0xD506952e78eeCd5d4424B1990a0c99B1568E7c2C", + "Version": "1.4.0", + "OtherMessenger": "0x4200000000000000000000000000000000000007", + "Portal": "0x4386C8ABf2009aC0c263462Da568DD9d46e52a31", + "SuperChainConfig": "", + "SystemConfig": "" + }, + { + "L1ERC721BridgeInfo": "", + "Name": "L1ERC721Bridge", + "Address": "0x17e1454015bFb3377c75bE7b6d47B236fd2ddbE7", + "Version": "1.1.1", + "OtherMessenger": "0xD506952e78eeCd5d4424B1990a0c99B1568E7c2C", + "OtherBridge": "0x4200000000000000000000000000000000000014", + "SuperChainConfig": "" + }, + { + "L1StandardBridgeInfo": "", + "Name": "L1StandardBridge", + "Address": "0x677311Fd2cCc511Bbc0f581E8d9a07B033D5E840", + "Version": "1.1.0", + "OtherMessenger": "0xD506952e78eeCd5d4424B1990a0c99B1568E7c2C", + "OtherBridge": "0x4200000000000000000000000000000000000010", + "SuperChainConfig": "", + "SystemConfig": "" + }, + { + "L2OutputOracleInfo": "", + "Name": "L2OutputOracle", + "Address": "0xFf2394Bb843012562f4349C6632a0EcB92fC8810", + "Version": "1.3.0", + "SubmissionInterval": "240", + "L2BlockTime": "1", + "Challenger": "0x9e1A970683f6Cf53a4e3F13faCFaDC1c7E37D9bc", + "Proposer": "0x4aE49f1f57358c13A5732cb12e656Cf8C8D986DF", + "FinalizationPeriodSeconds": "3", + "StartingBlockNumber": "0", + "StartingTimestamp": "1686878506" + }, + { + "OptimismMintableERC20FactoryInfo": "", + "Name": "OptimismMintableERC20Factory", + "Address": "", + "Version": "1.1.0", + "Bridge": "0x677311Fd2cCc511Bbc0f581E8d9a07B033D5E840" + }, + { + "OptimismPortalInfo": "", + "Name": "OptimismPortal", + "Address": "0x4386C8ABf2009aC0c263462Da568DD9d46e52a31", + "Version": "1.6.0", + "L2Oracle": "0xFf2394Bb843012562f4349C6632a0EcB92fC8810", + "L2Sender": "0x000000000000000000000000000000000000dEaD", + "SystemConfig": "0x406aC857817708eAf4ca3A82317eF4ae3D1EA23B", + "Guardian": "0x9e1A970683f6Cf53a4e3F13faCFaDC1c7E37D9bc", + "SuperChainConfig": "", + "Balance": "282865745286885175611178" + }, + { + "SystemConfigInfo": "", + "Name": "SystemConfig", + "Address": "0x406aC857817708eAf4ca3A82317eF4ae3D1EA23B", + "Version": "1.3.0", + "Owner": "0x9e1A970683f6Cf53a4e3F13faCFaDC1c7E37D9bc", + "UnsafeBlockSigner": "0x23264E1F3C04efBe84108E666a187D240DDAfcED", + "Overhead": "0", + "Scalar": "452312848583266388373324160190187140051835877600158453279134000734489610656", + "BatcherHash": "0000000000000000000000001fd6a75cc72f39147756a663f3ef1fc95ef89495", + "GasLimit": "100000000", + "ResourceConfig": { + "MaxResourceLimit": 80000000, + "ElasticityMultiplier": 2, + "BaseFeeMaxChangeDenominator": 8, + "MinimumBaseFee": 1000000000, + "SystemTxMaxGas": 1000000, + "MaximumBaseFee": "340282366920938463463374607431768211455" + }, + "StartBlock": "", + "BaseFeeScalar": "", + "BlobBaseFeeScalar": "", + "BatcherInbox": "", + "L1CrossDomainMessengerAddress": "", + "L1ERC721BridgeAddress": "", + "L1StandardBridgeAddress": "", + "DisputeGameFactoryAddress": "", + "OptimismPortalAddress": "", + "OptimismMintableERC20FactoryAddress": "", + "GasPayingTokenAddress": "" + } +] + diff --git a/op-chain-ops/opbnb-upgrades/testnet/testnet_upgrade_input.json b/op-chain-ops/opbnb-upgrades/testnet/testnet_upgrade_input.json new file mode 100644 index 000000000..55774416b --- /dev/null +++ b/op-chain-ops/opbnb-upgrades/testnet/testnet_upgrade_input.json @@ -0,0 +1,510 @@ +{ + "version": "", + "chainId": null, + "createdAt": 0, + "meta": { + "createdFromSafeAddress": "", + "createdFromOwnerAddress": "", + "name": "", + "description": "" + }, + "transactions": [ + { + "to": "0xE4925bD8Ac30b2d4e2bD7b8Ba495a5c92d4c5156", + "value": "0", + "data": "0x9623609d000000000000000000000000b19bfac32aa9aadec286e2c918ff949bc0e5921800000000000000000000000014c1079c7f0e436d76d5fbbe6a212da7244d8244000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000840528afe2000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "contractMethod": { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "payable": false + }, + "contractInputsValues": { + "_data": "0x0528afe20000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "_implementation": "0x14C1079C7F0e436d76D5fbBe6a212da7244D8244", + "_proxy": "0xb19bFAC32Aa9aADEc286E2c918FF949bc0e59218" + } + }, + { + "to": "0xE4925bD8Ac30b2d4e2bD7b8Ba495a5c92d4c5156", + "value": "0", + "data": "0x9623609d000000000000000000000000b19bfac32aa9aadec286e2c918ff949bc0e5921800000000000000000000000080e480e226f38c11f33a4cf7744ee92c90224b8300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044400ada750000000000000000000000009e1a970683f6cf53a4e3f13facfadc1c7e37d9bc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "contractMethod": { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "payable": false + }, + "contractInputsValues": { + "_data": "0x400ada750000000000000000000000009e1a970683f6cf53a4e3f13facfadc1c7e37d9bc0000000000000000000000000000000000000000000000000000000000000000", + "_implementation": "0x80E480e226F38c11f33A4cf7744EE92C90224B83", + "_proxy": "0xb19bFAC32Aa9aADEc286E2c918FF949bc0e59218" + } + }, + { + "to": "0xE4925bD8Ac30b2d4e2bD7b8Ba495a5c92d4c5156", + "value": "0", + "data": "0x9623609d000000000000000000000000d506952e78eecd5d4424b1990a0c99b1568e7c2c00000000000000000000000014c1079c7f0e436d76d5fbbe6a212da7244d8244000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000840528afe2000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "contractMethod": { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "payable": false + }, + "contractInputsValues": { + "_data": "0x0528afe20000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "_implementation": "0x14C1079C7F0e436d76D5fbBe6a212da7244D8244", + "_proxy": "0xD506952e78eeCd5d4424B1990a0c99B1568E7c2C" + } + }, + { + "to": "0xE4925bD8Ac30b2d4e2bD7b8Ba495a5c92d4c5156", + "value": "0", + "data": "0x9623609d000000000000000000000000d506952e78eecd5d4424b1990a0c99b1568e7c2c000000000000000000000000c25c60b8f38af900f520e19aa9eceabaf650190600000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000064c0c53b8b000000000000000000000000b19bfac32aa9aadec286e2c918ff949bc0e592180000000000000000000000004386c8abf2009ac0c263462da568dd9d46e52a31000000000000000000000000406ac857817708eaf4ca3a82317ef4ae3d1ea23b00000000000000000000000000000000000000000000000000000000", + "contractMethod": { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "payable": false + }, + "contractInputsValues": { + "_data": "0xc0c53b8b000000000000000000000000b19bfac32aa9aadec286e2c918ff949bc0e592180000000000000000000000004386c8abf2009ac0c263462da568dd9d46e52a31000000000000000000000000406ac857817708eaf4ca3a82317ef4ae3d1ea23b", + "_implementation": "0xc25C60b8f38AF900F520E19aA9eCeaBAF6501906", + "_proxy": "0xD506952e78eeCd5d4424B1990a0c99B1568E7c2C" + } + }, + { + "to": "0xE4925bD8Ac30b2d4e2bD7b8Ba495a5c92d4c5156", + "value": "0", + "data": "0x9623609d00000000000000000000000017e1454015bfb3377c75be7b6d47b236fd2ddbe700000000000000000000000014c1079c7f0e436d76d5fbbe6a212da7244d8244000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000840528afe2000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "contractMethod": { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "payable": false + }, + "contractInputsValues": { + "_data": "0x0528afe20000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "_implementation": "0x14C1079C7F0e436d76D5fbBe6a212da7244D8244", + "_proxy": "0x17e1454015bFb3377c75bE7b6d47B236fd2ddbE7" + } + }, + { + "to": "0xE4925bD8Ac30b2d4e2bD7b8Ba495a5c92d4c5156", + "value": "0", + "data": "0x9623609d00000000000000000000000017e1454015bfb3377c75be7b6d47b236fd2ddbe70000000000000000000000007d68a6f2b21b28bc058837cd1fb67f36d717e55400000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044485cc955000000000000000000000000d506952e78eecd5d4424b1990a0c99b1568e7c2c000000000000000000000000b19bfac32aa9aadec286e2c918ff949bc0e5921800000000000000000000000000000000000000000000000000000000", + "contractMethod": { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "payable": false + }, + "contractInputsValues": { + "_data": "0x485cc955000000000000000000000000d506952e78eecd5d4424b1990a0c99b1568e7c2c000000000000000000000000b19bfac32aa9aadec286e2c918ff949bc0e59218", + "_implementation": "0x7d68a6F2B21B28Bc058837Cd1Fb67f36D717e554", + "_proxy": "0x17e1454015bFb3377c75bE7b6d47B236fd2ddbE7" + } + }, + { + "to": "0xE4925bD8Ac30b2d4e2bD7b8Ba495a5c92d4c5156", + "value": "0", + "data": "0x9623609d000000000000000000000000677311fd2ccc511bbc0f581e8d9a07b033d5e84000000000000000000000000014c1079c7f0e436d76d5fbbe6a212da7244d8244000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000840528afe2000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "contractMethod": { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "payable": false + }, + "contractInputsValues": { + "_data": "0x0528afe20000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "_implementation": "0x14C1079C7F0e436d76D5fbBe6a212da7244D8244", + "_proxy": "0x677311Fd2cCc511Bbc0f581E8d9a07B033D5E840" + } + }, + { + "to": "0xE4925bD8Ac30b2d4e2bD7b8Ba495a5c92d4c5156", + "value": "0", + "data": "0x9623609d000000000000000000000000677311fd2ccc511bbc0f581e8d9a07b033d5e840000000000000000000000000cc3e823575e77b2e47c50c86800bdccdb73d418500000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000064c0c53b8b000000000000000000000000d506952e78eecd5d4424b1990a0c99b1568e7c2c000000000000000000000000b19bfac32aa9aadec286e2c918ff949bc0e59218000000000000000000000000406ac857817708eaf4ca3a82317ef4ae3d1ea23b00000000000000000000000000000000000000000000000000000000", + "contractMethod": { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "payable": false + }, + "contractInputsValues": { + "_data": "0xc0c53b8b000000000000000000000000d506952e78eecd5d4424b1990a0c99b1568e7c2c000000000000000000000000b19bfac32aa9aadec286e2c918ff949bc0e59218000000000000000000000000406ac857817708eaf4ca3a82317ef4ae3d1ea23b", + "_implementation": "0xCC3E823575e77B2E47c50C86800bdCcDb73d4185", + "_proxy": "0x677311Fd2cCc511Bbc0f581E8d9a07B033D5E840" + } + }, + { + "to": "0xE4925bD8Ac30b2d4e2bD7b8Ba495a5c92d4c5156", + "value": "0", + "data": "0x9623609d000000000000000000000000ff2394bb843012562f4349c6632a0ecb92fc881000000000000000000000000014c1079c7f0e436d76d5fbbe6a212da7244d8244000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000840528afe2000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "contractMethod": { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "payable": false + }, + "contractInputsValues": { + "_data": "0x0528afe20000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "_implementation": "0x14C1079C7F0e436d76D5fbBe6a212da7244D8244", + "_proxy": "0xFf2394Bb843012562f4349C6632a0EcB92fC8810" + } + }, + { + "to": "0xE4925bD8Ac30b2d4e2bD7b8Ba495a5c92d4c5156", + "value": "0", + "data": "0x9623609d000000000000000000000000ff2394bb843012562f4349c6632a0ecb92fc8810000000000000000000000000e80a6945cd3b32ea2d05702772232a056a218d13000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e41c89c97d00000000000000000000000000000000000000000000000000000000000000f00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000648bb92a0000000000000000000000004ae49f1f57358c13a5732cb12e656cf8c8d986df0000000000000000000000009e1a970683f6cf53a4e3f13facfadc1c7e37d9bc000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000", + "contractMethod": { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "payable": false + }, + "contractInputsValues": { + "_data": "0x1c89c97d00000000000000000000000000000000000000000000000000000000000000f00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000648bb92a0000000000000000000000004ae49f1f57358c13a5732cb12e656cf8c8d986df0000000000000000000000009e1a970683f6cf53a4e3f13facfadc1c7e37d9bc0000000000000000000000000000000000000000000000000000000000000003", + "_implementation": "0xe80A6945CD3b32eA2d05702772232A056a218D13", + "_proxy": "0xFf2394Bb843012562f4349C6632a0EcB92fC8810" + } + }, + { + "to": "0xE4925bD8Ac30b2d4e2bD7b8Ba495a5c92d4c5156", + "value": "0", + "data": "0x9623609d000000000000000000000000182ce4305791744202bb4f802c155b94cb66163b00000000000000000000000014c1079c7f0e436d76d5fbbe6a212da7244d8244000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000840528afe2000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "contractMethod": { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "payable": false + }, + "contractInputsValues": { + "_data": "0x0528afe20000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "_implementation": "0x14C1079C7F0e436d76D5fbBe6a212da7244D8244", + "_proxy": "0x182cE4305791744202BB4F802C155B94cb66163B" + } + }, + { + "to": "0xE4925bD8Ac30b2d4e2bD7b8Ba495a5c92d4c5156", + "value": "0", + "data": "0x9623609d000000000000000000000000182ce4305791744202bb4f802c155b94cb66163b00000000000000000000000021751bdb682a73036b3db0fa5fab1ec629b2994100000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000024c4d66de8000000000000000000000000677311fd2ccc511bbc0f581e8d9a07b033d5e84000000000000000000000000000000000000000000000000000000000", + "contractMethod": { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "payable": false + }, + "contractInputsValues": { + "_data": "0xc4d66de8000000000000000000000000677311fd2ccc511bbc0f581e8d9a07b033d5e840", + "_implementation": "0x21751BDb682A73036B3dB0Fa5faB1Ec629b29941", + "_proxy": "0x182cE4305791744202BB4F802C155B94cb66163B" + } + }, + { + "to": "0xE4925bD8Ac30b2d4e2bD7b8Ba495a5c92d4c5156", + "value": "0", + "data": "0x9623609d0000000000000000000000004386c8abf2009ac0c263462da568dd9d46e52a3100000000000000000000000014c1079c7f0e436d76d5fbbe6a212da7244d8244000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000840528afe2000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "contractMethod": { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "payable": false + }, + "contractInputsValues": { + "_data": "0x0528afe20000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "_implementation": "0x14C1079C7F0e436d76D5fbBe6a212da7244D8244", + "_proxy": "0x4386C8ABf2009aC0c263462Da568DD9d46e52a31" + } + }, + { + "to": "0xE4925bD8Ac30b2d4e2bD7b8Ba495a5c92d4c5156", + "value": "0", + "data": "0x9623609d0000000000000000000000004386c8abf2009ac0c263462da568dd9d46e52a310000000000000000000000002dc5fab884ec606b196381feb5743c9390b899f000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000064c0c53b8b000000000000000000000000ff2394bb843012562f4349c6632a0ecb92fc8810000000000000000000000000406ac857817708eaf4ca3a82317ef4ae3d1ea23b000000000000000000000000b19bfac32aa9aadec286e2c918ff949bc0e5921800000000000000000000000000000000000000000000000000000000", + "contractMethod": { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "payable": false + }, + "contractInputsValues": { + "_data": "0xc0c53b8b000000000000000000000000ff2394bb843012562f4349c6632a0ecb92fc8810000000000000000000000000406ac857817708eaf4ca3a82317ef4ae3d1ea23b000000000000000000000000b19bfac32aa9aadec286e2c918ff949bc0e59218", + "_implementation": "0x2Dc5fAB884EC606b196381feb5743C9390b899F0", + "_proxy": "0x4386C8ABf2009aC0c263462Da568DD9d46e52a31" + } + }, + { + "to": "0xE4925bD8Ac30b2d4e2bD7b8Ba495a5c92d4c5156", + "value": "0", + "data": "0x9623609d000000000000000000000000406ac857817708eaf4ca3a82317ef4ae3d1ea23b00000000000000000000000014c1079c7f0e436d76d5fbbe6a212da7244d8244000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c40528afe20000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a11ee3ab75b40e88a0105e935d17cd36c8faee0138320d776c411291bdbbb19f0000000000000000000000000000000000000000000000000000000001d4dea700000000000000000000000000000000000000000000000000000000", + "contractMethod": { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "payable": false + }, + "contractInputsValues": { + "_data": "0x0528afe20000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a11ee3ab75b40e88a0105e935d17cd36c8faee0138320d776c411291bdbbb19f0000000000000000000000000000000000000000000000000000000001d4dea7", + "_implementation": "0x14C1079C7F0e436d76D5fbBe6a212da7244D8244", + "_proxy": "0x406aC857817708eAf4ca3A82317eF4ae3D1EA23B" + } + }, + { + "to": "0xE4925bD8Ac30b2d4e2bD7b8Ba495a5c92d4c5156", + "value": "0", + "data": "0x9623609d000000000000000000000000406ac857817708eaf4ca3a82317ef4ae3d1ea23b000000000000000000000000218e3dcdf2e0f29e569b6934fef6ad50bbde785c00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000284db9040fa0000000000000000000000009e1a970683f6cf53a4e3f13facfadc1c7e37d9bc00000000000000000000000000000000000000000000000000000000000109a0000000000000000000000000000000000000000000000000000000000009fe980000000000000000000000001fd6a75cc72f39147756a663f3ef1fc95ef894950000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000023264e1f3c04efbe84108e666a187d240ddafced0000000000000000000000000000000000000000000000000000000004c4b40000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000003b9aca0000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000ffffffffffffffffffffffffffffffff000000000000000000000000ff00000000000000000000000000000000005611000000000000000000000000d506952e78eecd5d4424b1990a0c99b1568e7c2c00000000000000000000000017e1454015bfb3377c75be7b6d47b236fd2ddbe7000000000000000000000000677311fd2ccc511bbc0f581e8d9a07b033d5e84000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004386c8abf2009ac0c263462da568dd9d46e52a31000000000000000000000000182ce4305791744202bb4f802c155b94cb66163b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "contractMethod": { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "payable": false + }, + "contractInputsValues": { + "_data": "0xdb9040fa0000000000000000000000009e1a970683f6cf53a4e3f13facfadc1c7e37d9bc00000000000000000000000000000000000000000000000000000000000109a0000000000000000000000000000000000000000000000000000000000009fe980000000000000000000000001fd6a75cc72f39147756a663f3ef1fc95ef894950000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000023264e1f3c04efbe84108e666a187d240ddafced0000000000000000000000000000000000000000000000000000000004c4b40000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000003b9aca0000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000ffffffffffffffffffffffffffffffff000000000000000000000000ff00000000000000000000000000000000005611000000000000000000000000d506952e78eecd5d4424b1990a0c99b1568e7c2c00000000000000000000000017e1454015bfb3377c75be7b6d47b236fd2ddbe7000000000000000000000000677311fd2ccc511bbc0f581e8d9a07b033d5e84000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004386c8abf2009ac0c263462da568dd9d46e52a31000000000000000000000000182ce4305791744202bb4f802c155b94cb66163b0000000000000000000000000000000000000000000000000000000000000000", + "_implementation": "0x218E3dCdf2E0f29E569b6934fef6Ad50bbDe785C", + "_proxy": "0x406aC857817708eAf4ca3A82317eF4ae3D1EA23B" + } + } + ] +} + diff --git a/packages/contracts-bedrock/scripts/BuildDataFromJson.s.sol b/packages/contracts-bedrock/scripts/BuildDataFromJson.s.sol new file mode 100644 index 000000000..463b50613 --- /dev/null +++ b/packages/contracts-bedrock/scripts/BuildDataFromJson.s.sol @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.15; + +import {IGnosisSafe, Enum} from "scripts/interfaces/IGnosisSafe.sol"; +import {IMulticall3} from "forge-std/interfaces/IMulticall3.sol"; +import {stdJson} from "forge-std/StdJson.sol"; +import {console} from "forge-std/console.sol"; +import {Vm, VmSafe} from "forge-std/Vm.sol"; +import {CommonBase} from "forge-std/Base.sol"; + +contract BuildDataFromJson is CommonBase { + + string json; + + IMulticall3 internal constant multicall = IMulticall3(MULTICALL3_ADDRESS); + + function _loadJson(string memory _path) internal { + console.log("Reading transaction bundle %s", _path); + json = vm.readFile(_path); + } + + function _buildCalls() internal view returns (IMulticall3.Call3[] memory) { + return _buildCallsFromJson(json); + } + + function _buildCallsFromJson(string memory jsonContent) internal pure returns (IMulticall3.Call3[] memory) { + // A hacky way to get the total number of elements in a JSON + // object array because Forge does not support this natively. + uint256 MAX_LENGTH_SUPPORTED = 999; + uint256 transaction_count = MAX_LENGTH_SUPPORTED; + for (uint256 i = 0; transaction_count == MAX_LENGTH_SUPPORTED; i++) { + require( + i < MAX_LENGTH_SUPPORTED, + "Transaction list longer than MAX_LENGTH_SUPPORTED is not " + "supported, to support it, simply bump the value of " "MAX_LENGTH_SUPPORTED to a bigger one." + ); + try vm.parseJsonAddress(jsonContent, string(abi.encodePacked("$.transactions[", vm.toString(i), "].to"))) + returns (address) {} catch { + transaction_count = i; + } + } + + IMulticall3.Call3[] memory calls = new IMulticall3.Call3[](transaction_count); + + for (uint256 i = 0; i < transaction_count; i++) { + calls[i] = IMulticall3.Call3({ + target: stdJson.readAddress( + jsonContent, string(abi.encodePacked("$.transactions[", vm.toString(i), "].to")) + ), + allowFailure: false, + callData: stdJson.readBytes( + jsonContent, string(abi.encodePacked("$.transactions[", vm.toString(i), "].data")) + ) + }); + } + + return calls; + } + + function rawInputData(string memory _path) public { + _loadJson(_path); + IMulticall3.Call3[] memory calls = _buildCalls(); + bytes memory data = abi.encodeCall(IMulticall3.aggregate3, (calls)); + bytes memory txData = abi.encodeCall(IGnosisSafe.execTransaction, + ( + address(multicall), + 0, + data, + Enum.Operation.DelegateCall, + 0, + 0, + 0, + address(0), + payable(address(0)), + prevalidatedSignature(msg.sender) + ) + ); + console.log("raw input data:"); + console.log(vm.toString(txData)); + } + + function prevalidatedSignature(address _address) internal pure returns (bytes memory) { + uint8 v = 1; + bytes32 s = bytes32(0); + bytes32 r = bytes32(uint256(uint160(_address))); + return abi.encodePacked(r, s, v); + } +} diff --git a/packages/contracts-bedrock/scripts/Chains.sol b/packages/contracts-bedrock/scripts/Chains.sol index 592501c81..8be0e18d8 100644 --- a/packages/contracts-bedrock/scripts/Chains.sol +++ b/packages/contracts-bedrock/scripts/Chains.sol @@ -14,4 +14,8 @@ library Chains { uint256 internal constant GethDevnet = 1337; uint256 internal constant Hardhat = 31337; uint256 internal constant BscDevnet = 714; + uint256 internal constant BscTestnet = 97; + uint256 internal constant BscMainnet = 56; + // TODO update for test + uint256 internal constant BscQAnet = 1; } diff --git a/packages/contracts-bedrock/scripts/DeployUpgrades.s.sol b/packages/contracts-bedrock/scripts/DeployUpgrades.s.sol new file mode 100644 index 000000000..5a9c1e623 --- /dev/null +++ b/packages/contracts-bedrock/scripts/DeployUpgrades.s.sol @@ -0,0 +1,361 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { VmSafe } from "forge-std/Vm.sol"; +import { Script } from "forge-std/Script.sol"; + +import { console2 as console } from "forge-std/console2.sol"; +import { stdJson } from "forge-std/StdJson.sol"; + +import { Deployer } from "scripts/Deployer.sol"; + +import { Proxy } from "src/universal/Proxy.sol"; +import { L1StandardBridge } from "src/L1/L1StandardBridge.sol"; +import { StandardBridge } from "src/universal/StandardBridge.sol"; +import { OptimismPortal } from "src/L1/OptimismPortal.sol"; +import { L1CrossDomainMessenger } from "src/L1/L1CrossDomainMessenger.sol"; +import { L2OutputOracle } from "src/L1/L2OutputOracle.sol"; +import { OptimismMintableERC20Factory } from "src/universal/OptimismMintableERC20Factory.sol"; +import { SuperchainConfig } from "src/L1/SuperchainConfig.sol"; +import { SystemConfig } from "src/L1/SystemConfig.sol"; +import { ResourceMetering } from "src/L1/ResourceMetering.sol"; +import { Constants } from "src/libraries/Constants.sol"; +import { L1ERC721Bridge } from "src/L1/L1ERC721Bridge.sol"; +import { ProtocolVersions, ProtocolVersion } from "src/L1/ProtocolVersions.sol"; +import { StorageSetter } from "src/universal/StorageSetter.sol"; +import { Predeploys } from "src/libraries/Predeploys.sol"; +import { Chains } from "scripts/Chains.sol"; +import { Config } from "scripts/Config.sol"; + +import { ChainAssertions } from "scripts/ChainAssertions.sol"; +import { Types } from "scripts/Types.sol"; +import { LibStateDiff } from "scripts/libraries/LibStateDiff.sol"; +import { EIP1967Helper } from "test/mocks/EIP1967Helper.sol"; +import { ForgeArtifacts } from "scripts/ForgeArtifacts.sol"; +import { Process } from "scripts/libraries/Process.sol"; + +/// @title Deploy +/// @notice Script used to deploy a bedrock system. The entire system is deployed within the `run` function. +/// To add a new contract to the system, add a public function that deploys that individual contract. +/// Then add a call to that function inside of `run`. Be sure to call the `save` function after each +/// deployment so that hardhat-deploy style artifacts can be generated using a call to `sync()`. +/// The `CONTRACT_ADDRESSES_PATH` environment variable can be set to a path that contains a JSON file full of +/// contract name to address pairs. That enables this script to be much more flexible in the way it is used. +/// This contract must not have constructor logic because it is set into state using `etch`. +contract Deploy is Deployer { + using stdJson for string; + + //////////////////////////////////////////////////////////////// + // Modifiers // + //////////////////////////////////////////////////////////////// + + /// @notice Modifier that wraps a function in broadcasting. + modifier broadcast() { + vm.startBroadcast(msg.sender); + _; + vm.stopBroadcast(); + } + + //////////////////////////////////////////////////////////////// + // Accessors // + //////////////////////////////////////////////////////////////// + + /// @notice The create2 salt used for deployment of the contract implementations. + /// Using this helps to reduce config across networks as the implementation + /// addresses will be the same across networks when deployed with create2. + function _implSalt() internal view returns (bytes32) { + return keccak256(bytes(Config.implSalt())); + } + + /// @notice Returns the proxy addresses, not reverting if any are unset. + function _proxiesUnstrict() internal view returns (Types.ContractSet memory proxies_) { + proxies_ = Types.ContractSet({ + L1CrossDomainMessenger: getAddress("L1CrossDomainMessengerProxy"), + L1StandardBridge: getAddress("L1StandardBridgeProxy"), + L2OutputOracle: getAddress("L2OutputOracleProxy"), + DisputeGameFactory: getAddress("DisputeGameFactoryProxy"), + DelayedWETH: getAddress("DelayedWETHProxy"), + AnchorStateRegistry: getAddress("AnchorStateRegistryProxy"), + OptimismMintableERC20Factory: getAddress("OptimismMintableERC20FactoryProxy"), + OptimismPortal: getAddress("OptimismPortalProxy"), + OptimismPortal2: getAddress("OptimismPortalProxy"), + SystemConfig: getAddress("SystemConfigProxy"), + L1ERC721Bridge: getAddress("L1ERC721BridgeProxy"), + ProtocolVersions: getAddress("ProtocolVersionsProxy"), + SuperchainConfig: getAddress("SuperchainConfigProxy") + }); + } + + //////////////////////////////////////////////////////////////// + // SetUp and Run // + //////////////////////////////////////////////////////////////// + + /// @notice Deploy all of the L1 contracts necessary for a full Superchain with a single Op Chain. + function run() public { + console.log("Deploying a fresh OP Stack including SuperchainConfig"); + _run(); + } + + /// @notice Internal function containing the deploy logic. + function _run() internal virtual { + console.log("start of L1 Deploy!"); + setupSuperchain(); + console.log("set up superchain!"); + setupOpChain(); + console.log("set up op chain!"); + deployStorageSetter(); + console.log("set up StorageSetter!"); + } + + //////////////////////////////////////////////////////////////// + // High Level Deployment Functions // + //////////////////////////////////////////////////////////////// + + /// @notice Deploy a full system with a new SuperchainConfig + /// The Superchain system has 2 singleton contracts which lie outside of an OP Chain: + /// 1. The SuperchainConfig contract + /// 2. The ProtocolVersions contract + function setupSuperchain() public { + console.log("Setting up Superchain"); + deployERC1967Proxy("SuperchainConfigProxy"); + deploySuperchainConfig(); + } + + /// @notice Deploy a new OP Chain, with an existing SuperchainConfig provided + function setupOpChain() public { + console.log("Deploying OP Chain"); + + // Ensure that the requisite contracts are deployed + mustGetAddress("SuperchainConfigProxy"); + deployImplementations(); + } + + /// @notice Deploy all of the implementations + function deployImplementations() public { + console.log("Deploying implementations"); + deployL1CrossDomainMessenger(); + deployOptimismMintableERC20Factory(); + deploySystemConfig(); + deployL1StandardBridge(); + deployL1ERC721Bridge(); + deployOptimismPortal(); + deployL2OutputOracle(); + } + + //////////////////////////////////////////////////////////////// + // Non-Proxied Deployment Functions // + //////////////////////////////////////////////////////////////// + + + /// @notice Deploy the StorageSetter contract, used for upgrades. + function deployStorageSetter() public broadcast returns (address addr_) { + console.log("Deploying StorageSetter"); + StorageSetter setter = new StorageSetter{ salt: _implSalt() }(); + console.log("StorageSetter deployed at: %s", address(setter)); + string memory version = setter.version(); + console.log("StorageSetter version: %s", version); + save("StorageSetter", address(setter)); + addr_ = address(setter); + } + + //////////////////////////////////////////////////////////////// + // Proxy Deployment Functions // + //////////////////////////////////////////////////////////////// + + /// @notice Deploys an ERC1967Proxy contract with the ProxyAdmin as the owner. + /// @param _name The name of the proxy contract to be deployed. + /// @return addr_ The address of the deployed proxy contract. + function deployERC1967Proxy(string memory _name) public returns (address addr_) { + uint256 chainid = block.chainid; + address proxyAdmin = Constants.BSCQANET_PROXY_ADMIN; + if (chainid == Chains.BscTestnet) { + proxyAdmin = Constants.BSCTESTNET_PROXY_ADMIN; + } else if (chainid == Chains.BscMainnet) { + proxyAdmin = Constants.BSCMAINNET_PROXY_ADMIN; + } + console.log("superChainConfig proxyAdmin at %s", address(proxyAdmin)); + addr_ = deployERC1967ProxyWithOwner(_name, proxyAdmin); + } + + /// @notice Deploys an ERC1967Proxy contract with a specified owner. + /// @param _name The name of the proxy contract to be deployed. + /// @param _proxyOwner The address of the owner of the proxy contract. + /// @return addr_ The address of the deployed proxy contract. + function deployERC1967ProxyWithOwner( + string memory _name, + address _proxyOwner + ) + public + broadcast + returns (address addr_) + { + console.log(string.concat("Deploying ERC1967 proxy for ", _name)); + Proxy proxy = new Proxy({ _admin: _proxyOwner }); + + require(EIP1967Helper.getAdmin(address(proxy)) == _proxyOwner); + + save(_name, address(proxy)); + console.log(" at %s", address(proxy)); + addr_ = address(proxy); + } + + //////////////////////////////////////////////////////////////// + // Implementation Deployment Functions // + //////////////////////////////////////////////////////////////// + + /// @notice Deploy the SuperchainConfig contract + function deploySuperchainConfig() public broadcast { + SuperchainConfig superchainConfig = new SuperchainConfig{ salt: _implSalt() }(); + + require(superchainConfig.guardian() == address(0)); + bytes32 initialized = vm.load(address(superchainConfig), bytes32(0)); + require(initialized != 0); + + save("SuperchainConfig", address(superchainConfig)); + console.log("SuperchainConfig deployed at %s", address(superchainConfig)); + } + + /// @notice Deploy the L1CrossDomainMessenger + function deployL1CrossDomainMessenger() public broadcast returns (address addr_) { + console.log("Deploying L1CrossDomainMessenger implementation"); + L1CrossDomainMessenger messenger = new L1CrossDomainMessenger{ salt: _implSalt() }(); + + save("L1CrossDomainMessenger", address(messenger)); + console.log("L1CrossDomainMessenger deployed at %s", address(messenger)); + + // Override the `L1CrossDomainMessenger` contract to the deployed implementation. This is necessary + // to check the `L1CrossDomainMessenger` implementation alongside dependent contracts, which + // are always proxies. + Types.ContractSet memory contracts = _proxiesUnstrict(); + contracts.L1CrossDomainMessenger = address(messenger); + ChainAssertions.checkL1CrossDomainMessenger({ _contracts: contracts, _vm: vm, _isProxy: false }); + + addr_ = address(messenger); + } + + /// @notice Deploy the OptimismPortal + function deployOptimismPortal() public broadcast returns (address addr_) { + console.log("Deploying OptimismPortal implementation"); + addr_ = address(new OptimismPortal{ salt: _implSalt() }()); + save("OptimismPortal", addr_); + console.log("OptimismPortal deployed at %s", addr_); + + // Override the `OptimismPortal` contract to the deployed implementation. This is necessary + // to check the `OptimismPortal` implementation alongside dependent contracts, which + // are always proxies. + Types.ContractSet memory contracts = _proxiesUnstrict(); + contracts.OptimismPortal = addr_; + ChainAssertions.checkOptimismPortal({ _contracts: contracts, _cfg: cfg, _isProxy: false }); + } + + /// @notice Deploy the L2OutputOracle + function deployL2OutputOracle() public broadcast returns (address addr_) { + console.log("Deploying L2OutputOracle implementation"); + L2OutputOracle oracle = new L2OutputOracle{ salt: _implSalt() }(); + + save("L2OutputOracle", address(oracle)); + console.log("L2OutputOracle deployed at %s", address(oracle)); + + // Override the `L2OutputOracle` contract to the deployed implementation. This is necessary + // to check the `L2OutputOracle` implementation alongside dependent contracts, which + // are always proxies. + Types.ContractSet memory contracts = _proxiesUnstrict(); + contracts.L2OutputOracle = address(oracle); + ChainAssertions.checkL2OutputOracle({ + _contracts: contracts, + _cfg: cfg, + _l2OutputOracleStartingTimestamp: 0, + _isProxy: false + }); + + addr_ = address(oracle); + } + + /// @notice Deploy the OptimismMintableERC20Factory + function deployOptimismMintableERC20Factory() public broadcast returns (address addr_) { + console.log("Deploying OptimismMintableERC20Factory implementation"); + OptimismMintableERC20Factory factory = new OptimismMintableERC20Factory{ salt: _implSalt() }(); + + save("OptimismMintableERC20Factory", address(factory)); + console.log("OptimismMintableERC20Factory deployed at %s", address(factory)); + + // Override the `OptimismMintableERC20Factory` contract to the deployed implementation. This is necessary + // to check the `OptimismMintableERC20Factory` implementation alongside dependent contracts, which + // are always proxies. + Types.ContractSet memory contracts = _proxiesUnstrict(); + contracts.OptimismMintableERC20Factory = address(factory); + ChainAssertions.checkOptimismMintableERC20Factory({ _contracts: contracts, _isProxy: false }); + + addr_ = address(factory); + } + + /// @notice Deploy the ProtocolVersions + function deployProtocolVersions() public broadcast returns (address addr_) { + console.log("Deploying ProtocolVersions implementation"); + ProtocolVersions versions = new ProtocolVersions{ salt: _implSalt() }(); + save("ProtocolVersions", address(versions)); + console.log("ProtocolVersions deployed at %s", address(versions)); + + // Override the `ProtocolVersions` contract to the deployed implementation. This is necessary + // to check the `ProtocolVersions` implementation alongside dependent contracts, which + // are always proxies. + Types.ContractSet memory contracts = _proxiesUnstrict(); + contracts.ProtocolVersions = address(versions); + ChainAssertions.checkProtocolVersions({ _contracts: contracts, _cfg: cfg, _isProxy: false }); + + addr_ = address(versions); + } + + /// @notice Deploy the SystemConfig + function deploySystemConfig() public broadcast returns (address addr_) { + console.log("Deploying SystemConfig implementation"); + addr_ = address(new SystemConfig{ salt: _implSalt() }()); + save("SystemConfig", addr_); + console.log("SystemConfig deployed at %s", addr_); + + // Override the `SystemConfig` contract to the deployed implementation. This is necessary + // to check the `SystemConfig` implementation alongside dependent contracts, which + // are always proxies. + Types.ContractSet memory contracts = _proxiesUnstrict(); + contracts.SystemConfig = addr_; + ChainAssertions.checkSystemConfig({ _contracts: contracts, _cfg: cfg, _isProxy: false }); + } + + /// @notice Deploy the L1StandardBridge + function deployL1StandardBridge() public broadcast returns (address addr_) { + console.log("Deploying L1StandardBridge implementation"); + + L1StandardBridge bridge = new L1StandardBridge{ salt: _implSalt() }(); + + save("L1StandardBridge", address(bridge)); + console.log("L1StandardBridge deployed at %s", address(bridge)); + + // Override the `L1StandardBridge` contract to the deployed implementation. This is necessary + // to check the `L1StandardBridge` implementation alongside dependent contracts, which + // are always proxies. + Types.ContractSet memory contracts = _proxiesUnstrict(); + contracts.L1StandardBridge = address(bridge); + ChainAssertions.checkL1StandardBridge({ _contracts: contracts, _isProxy: false }); + + addr_ = address(bridge); + } + + /// @notice Deploy the L1ERC721Bridge + function deployL1ERC721Bridge() public broadcast returns (address addr_) { + console.log("Deploying L1ERC721Bridge implementation"); + L1ERC721Bridge bridge = new L1ERC721Bridge{ salt: _implSalt() }(); + + save("L1ERC721Bridge", address(bridge)); + console.log("L1ERC721Bridge deployed at %s", address(bridge)); + + // Override the `L1ERC721Bridge` contract to the deployed implementation. This is necessary + // to check the `L1ERC721Bridge` implementation alongside dependent contracts, which + // are always proxies. + Types.ContractSet memory contracts = _proxiesUnstrict(); + contracts.L1ERC721Bridge = address(bridge); + + ChainAssertions.checkL1ERC721Bridge({ _contracts: contracts, _isProxy: false }); + + addr_ = address(bridge); + } +} diff --git a/packages/contracts-bedrock/src/libraries/Constants.sol b/packages/contracts-bedrock/src/libraries/Constants.sol index e86010421..5c4fd44f9 100644 --- a/packages/contracts-bedrock/src/libraries/Constants.sol +++ b/packages/contracts-bedrock/src/libraries/Constants.sol @@ -37,6 +37,13 @@ library Constants { /// transactions. address internal constant DEPOSITOR_ACCOUNT = 0xDeaDDEaDDeAdDeAdDEAdDEaddeAddEAdDEAd0001; + address internal constant BSCTESTNET_PROXY_ADMIN = 0xE4925bD8Ac30b2d4e2bD7b8Ba495a5c92d4c5156; + + address internal constant BSCMAINNET_PROXY_ADMIN = 0x27a591Ec09AAfEEb39d7533AEf7C64E0305D1576; + + address internal constant BSCQANET_PROXY_ADMIN = 0xD7A103C65D65F0CEecFc4Abd2E534e0665938531; + + /// @notice Returns the default values for the ResourceConfig. These are the recommended values /// for a production network. function DEFAULT_RESOURCE_CONFIG() internal pure returns (ResourceMetering.ResourceConfig memory) {