Commit d3698f6d authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge branch 'develop' into zhwrd/endpoint-monitor-ci

parents 2859af15 51075f34
---
'@eth-optimism/contracts-bedrock': patch
---
Use uint64 for arithmetic in XDM's baseGas
---
'@eth-optimism/contracts-bedrock': patch
'@eth-optimism/sdk': patch
---
Rename the event emitted in the L2ToL1MessagePasser
---
'@eth-optimism/l2geth': patch
---
add --rpc.evmtimeout flag to configure timeout for eth_call
---
"@eth-optimism/contracts-periphery": patch
---
mainnet nft bridge deployments
---
'@eth-optimism/ci-builder': patch
---
Install slither from a specific commit hash
...@@ -26,7 +26,7 @@ pull_request_rules: ...@@ -26,7 +26,7 @@ pull_request_rules:
actions: actions:
queue: queue:
name: default name: default
method: squash method: merge
- name: Add merge train label - name: Add merge train label
conditions: conditions:
- "queue-position >= 0" - "queue-position >= 0"
......
...@@ -188,6 +188,7 @@ var ( ...@@ -188,6 +188,7 @@ var (
utils.IPCPathFlag, utils.IPCPathFlag,
utils.InsecureUnlockAllowedFlag, utils.InsecureUnlockAllowedFlag,
utils.RPCGlobalGasCap, utils.RPCGlobalGasCap,
utils.RPCGlobalEVMTimeoutFlag,
} }
whisperFlags = []cli.Flag{ whisperFlags = []cli.Flag{
......
...@@ -178,6 +178,7 @@ var AppHelpFlagGroups = []flagGroup{ ...@@ -178,6 +178,7 @@ var AppHelpFlagGroups = []flagGroup{
utils.RPCPortFlag, utils.RPCPortFlag,
utils.RPCApiFlag, utils.RPCApiFlag,
utils.RPCGlobalGasCap, utils.RPCGlobalGasCap,
utils.RPCGlobalEVMTimeoutFlag,
utils.RPCCORSDomainFlag, utils.RPCCORSDomainFlag,
utils.RPCVirtualHostsFlag, utils.RPCVirtualHostsFlag,
utils.WSEnabledFlag, utils.WSEnabledFlag,
......
...@@ -518,6 +518,11 @@ var ( ...@@ -518,6 +518,11 @@ var (
Name: "rpc.gascap", Name: "rpc.gascap",
Usage: "Sets a cap on gas that can be used in eth_call/estimateGas", Usage: "Sets a cap on gas that can be used in eth_call/estimateGas",
} }
RPCGlobalEVMTimeoutFlag = &cli.DurationFlag{
Name: "rpc.evmtimeout",
Usage: "Sets a timeout used for eth_call (0=infinite)",
Value: eth.DefaultConfig.RPCEVMTimeout,
}
// Logging and debug settings // Logging and debug settings
EthStatsURLFlag = cli.StringFlag{ EthStatsURLFlag = cli.StringFlag{
Name: "ethstats", Name: "ethstats",
...@@ -1660,6 +1665,9 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) { ...@@ -1660,6 +1665,9 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
if ctx.GlobalIsSet(RPCGlobalGasCap.Name) { if ctx.GlobalIsSet(RPCGlobalGasCap.Name) {
cfg.RPCGasCap = new(big.Int).SetUint64(ctx.GlobalUint64(RPCGlobalGasCap.Name)) cfg.RPCGasCap = new(big.Int).SetUint64(ctx.GlobalUint64(RPCGlobalGasCap.Name))
} }
if ctx.GlobalIsSet(RPCGlobalEVMTimeoutFlag.Name) {
cfg.RPCEVMTimeout = ctx.Duration(RPCGlobalEVMTimeoutFlag.Name)
}
// Override any default configs for hard coded networks. // Override any default configs for hard coded networks.
switch { switch {
......
...@@ -21,6 +21,7 @@ import ( ...@@ -21,6 +21,7 @@ import (
"errors" "errors"
"fmt" "fmt"
"math/big" "math/big"
"time"
"github.com/ethereum-optimism/optimism/l2geth/accounts" "github.com/ethereum-optimism/optimism/l2geth/accounts"
"github.com/ethereum-optimism/optimism/l2geth/common" "github.com/ethereum-optimism/optimism/l2geth/common"
...@@ -400,6 +401,10 @@ func (b *EthAPIBackend) RPCGasCap() *big.Int { ...@@ -400,6 +401,10 @@ func (b *EthAPIBackend) RPCGasCap() *big.Int {
return b.eth.config.RPCGasCap return b.eth.config.RPCGasCap
} }
func (b *EthAPIBackend) RPCEVMTimeout() time.Duration {
return b.eth.config.RPCEVMTimeout
}
func (b *EthAPIBackend) BloomStatus() (uint64, uint64) { func (b *EthAPIBackend) BloomStatus() (uint64, uint64) {
sections, _, _ := b.eth.bloomIndexer.Sections() sections, _, _ := b.eth.bloomIndexer.Sections()
return params.BloomBitsBlocks, sections return params.BloomBitsBlocks, sections
......
...@@ -57,7 +57,8 @@ var DefaultConfig = Config{ ...@@ -57,7 +57,8 @@ var DefaultConfig = Config{
GasPrice: big.NewInt(params.GWei), GasPrice: big.NewInt(params.GWei),
Recommit: 3 * time.Second, Recommit: 3 * time.Second,
}, },
TxPool: core.DefaultTxPoolConfig, TxPool: core.DefaultTxPoolConfig,
RPCEVMTimeout: 5 * time.Second,
GPO: gasprice.Config{ GPO: gasprice.Config{
Blocks: 20, Blocks: 20,
Percentile: 60, Percentile: 60,
...@@ -169,6 +170,9 @@ type Config struct { ...@@ -169,6 +170,9 @@ type Config struct {
// RPCGasCap is the global gas cap for eth-call variants. // RPCGasCap is the global gas cap for eth-call variants.
RPCGasCap *big.Int `toml:",omitempty"` RPCGasCap *big.Int `toml:",omitempty"`
// RPCEVMTimeout is the global timeout for eth-call. (0=infinite)
RPCEVMTimeout time.Duration
// Checkpoint is a hardcoded checkpoint which can be nil. // Checkpoint is a hardcoded checkpoint which can be nil.
Checkpoint *params.TrustedCheckpoint `toml:",omitempty"` Checkpoint *params.TrustedCheckpoint `toml:",omitempty"`
......
...@@ -20,7 +20,6 @@ package graphql ...@@ -20,7 +20,6 @@ package graphql
import ( import (
"context" "context"
"errors" "errors"
"time"
ethereum "github.com/ethereum-optimism/optimism/l2geth" ethereum "github.com/ethereum-optimism/optimism/l2geth"
"github.com/ethereum-optimism/optimism/l2geth/common" "github.com/ethereum-optimism/optimism/l2geth/common"
...@@ -776,7 +775,7 @@ func (b *Block) Call(ctx context.Context, args struct { ...@@ -776,7 +775,7 @@ func (b *Block) Call(ctx context.Context, args struct {
return nil, err return nil, err
} }
} }
result, gas, failed, err := ethapi.DoCall(ctx, b.backend, args.Data, *b.numberOrHash, nil, &vm.Config{}, 5*time.Second, b.backend.RPCGasCap()) result, gas, failed, err := ethapi.DoCall(ctx, b.backend, args.Data, *b.numberOrHash, nil, &vm.Config{}, b.backend.RPCEVMTimeout(), b.backend.RPCGasCap())
status := hexutil.Uint64(1) status := hexutil.Uint64(1)
if failed { if failed {
status = 0 status = 0
...@@ -842,7 +841,7 @@ func (p *Pending) Call(ctx context.Context, args struct { ...@@ -842,7 +841,7 @@ func (p *Pending) Call(ctx context.Context, args struct {
Data ethapi.CallArgs Data ethapi.CallArgs
}) (*CallResult, error) { }) (*CallResult, error) {
pendingBlockNr := rpc.BlockNumberOrHashWithNumber(rpc.PendingBlockNumber) pendingBlockNr := rpc.BlockNumberOrHashWithNumber(rpc.PendingBlockNumber)
result, gas, failed, err := ethapi.DoCall(ctx, p.backend, args.Data, pendingBlockNr, nil, &vm.Config{}, 5*time.Second, p.backend.RPCGasCap()) result, gas, failed, err := ethapi.DoCall(ctx, p.backend, args.Data, pendingBlockNr, nil, &vm.Config{}, p.backend.RPCEVMTimeout(), p.backend.RPCGasCap())
status := hexutil.Uint64(1) status := hexutil.Uint64(1)
if failed { if failed {
status = 0 status = 0
......
...@@ -963,7 +963,7 @@ func (s *PublicBlockChainAPI) Call(ctx context.Context, args CallArgs, blockNrOr ...@@ -963,7 +963,7 @@ func (s *PublicBlockChainAPI) Call(ctx context.Context, args CallArgs, blockNrOr
if overrides != nil { if overrides != nil {
accounts = *overrides accounts = *overrides
} }
result, _, failed, err := DoCall(ctx, s.b, args, blockNrOrHash, accounts, &vm.Config{}, 5*time.Second, s.b.RPCGasCap()) result, _, failed, err := DoCall(ctx, s.b, args, blockNrOrHash, accounts, &vm.Config{}, s.b.RPCEVMTimeout(), s.b.RPCGasCap())
if err != nil { if err != nil {
return nil, err return nil, err
} }
......
...@@ -20,6 +20,7 @@ package ethapi ...@@ -20,6 +20,7 @@ package ethapi
import ( import (
"context" "context"
"math/big" "math/big"
"time"
"github.com/ethereum-optimism/optimism/l2geth/accounts" "github.com/ethereum-optimism/optimism/l2geth/accounts"
"github.com/ethereum-optimism/optimism/l2geth/common" "github.com/ethereum-optimism/optimism/l2geth/common"
...@@ -45,7 +46,8 @@ type Backend interface { ...@@ -45,7 +46,8 @@ type Backend interface {
ChainDb() ethdb.Database ChainDb() ethdb.Database
AccountManager() *accounts.Manager AccountManager() *accounts.Manager
ExtRPCEnabled() bool ExtRPCEnabled() bool
RPCGasCap() *big.Int // global gas cap for eth_call over rpc: DoS protection RPCGasCap() *big.Int // global gas cap for eth_call over rpc: DoS protection
RPCEVMTimeout() time.Duration // global timeout (0=infinite) for eth_call over rpc: DoS protection
// Blockchain API // Blockchain API
SetHead(number uint64) SetHead(number uint64)
......
...@@ -20,6 +20,7 @@ import ( ...@@ -20,6 +20,7 @@ import (
"context" "context"
"errors" "errors"
"math/big" "math/big"
"time"
"github.com/ethereum-optimism/optimism/l2geth/accounts" "github.com/ethereum-optimism/optimism/l2geth/accounts"
"github.com/ethereum-optimism/optimism/l2geth/common" "github.com/ethereum-optimism/optimism/l2geth/common"
...@@ -316,6 +317,10 @@ func (b *LesApiBackend) RPCGasCap() *big.Int { ...@@ -316,6 +317,10 @@ func (b *LesApiBackend) RPCGasCap() *big.Int {
return b.eth.config.RPCGasCap return b.eth.config.RPCGasCap
} }
func (b *LesApiBackend) RPCEVMTimeout() time.Duration {
return b.eth.config.RPCEVMTimeout
}
func (b *LesApiBackend) BloomStatus() (uint64, uint64) { func (b *LesApiBackend) BloomStatus() (uint64, uint64) {
if b.eth.bloomIndexer == nil { if b.eth.bloomIndexer == nil {
return 0, 0 return 0, 0
......
...@@ -3,9 +3,9 @@ module github.com/ethereum-optimism/optimism/op-batcher ...@@ -3,9 +3,9 @@ module github.com/ethereum-optimism/optimism/op-batcher
go 1.18 go 1.18
require ( require (
github.com/ethereum-optimism/optimism/op-node v0.8.9 github.com/ethereum-optimism/optimism/op-node v0.8.10
github.com/ethereum-optimism/optimism/op-proposer v0.8.9 github.com/ethereum-optimism/optimism/op-proposer v0.8.10
github.com/ethereum-optimism/optimism/op-service v0.8.9 github.com/ethereum-optimism/optimism/op-service v0.8.10
github.com/ethereum/go-ethereum v1.10.23 github.com/ethereum/go-ethereum v1.10.23
github.com/miguelmota/go-ethereum-hdwallet v0.1.1 github.com/miguelmota/go-ethereum-hdwallet v0.1.1
github.com/urfave/cli v1.22.9 github.com/urfave/cli v1.22.9
...@@ -22,7 +22,7 @@ require ( ...@@ -22,7 +22,7 @@ require (
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/deckarep/golang-set v1.8.0 // indirect github.com/deckarep/golang-set v1.8.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
github.com/ethereum-optimism/optimism/op-bindings v0.8.9 // indirect github.com/ethereum-optimism/optimism/op-bindings v0.8.10 // indirect
github.com/fjl/memsize v0.0.1 // indirect github.com/fjl/memsize v0.0.1 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-stack/stack v1.8.1 // indirect github.com/go-stack/stack v1.8.1 // indirect
......
...@@ -149,14 +149,14 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m ...@@ -149,14 +149,14 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/ethereum-optimism/op-geth v0.0.0-20220926184707-53d23c240afd h1:NchOnosWOkH9wlix8QevGHE+6vuRa+OMGvDNsczv2kQ= github.com/ethereum-optimism/op-geth v0.0.0-20220926184707-53d23c240afd h1:NchOnosWOkH9wlix8QevGHE+6vuRa+OMGvDNsczv2kQ=
github.com/ethereum-optimism/op-geth v0.0.0-20220926184707-53d23c240afd/go.mod h1:/6CsT5Ceen2WPLI/oCA3xMcZ5sWMF/D46SjM/ayY0Oo= github.com/ethereum-optimism/op-geth v0.0.0-20220926184707-53d23c240afd/go.mod h1:/6CsT5Ceen2WPLI/oCA3xMcZ5sWMF/D46SjM/ayY0Oo=
github.com/ethereum-optimism/optimism/op-bindings v0.8.9 h1:QeYLhgZP0QkDLxyXhkWLj/iHDFkMNI18abgrHL4I9TE= github.com/ethereum-optimism/optimism/op-bindings v0.8.10 h1:aSAWCQwBQnbmv03Gvtuvn3qfTWrZu/sTlRAWrpQhiHc=
github.com/ethereum-optimism/optimism/op-bindings v0.8.9/go.mod h1:pyTCbh2o/SY+5/AL2Qo5GgAao3Gtt9Ff6tfK9Pa9emM= github.com/ethereum-optimism/optimism/op-bindings v0.8.10/go.mod h1:pyTCbh2o/SY+5/AL2Qo5GgAao3Gtt9Ff6tfK9Pa9emM=
github.com/ethereum-optimism/optimism/op-node v0.8.9 h1:wUxvjeHB1nQtnsxbNxqHthSS+Uune7Xb17NWXDBdSXI= github.com/ethereum-optimism/optimism/op-node v0.8.10 h1:1Gc4FtR5B+HgfQ+byNn3P+tiJarpMZSYjj5iLvA3YtU=
github.com/ethereum-optimism/optimism/op-node v0.8.9/go.mod h1:ETNw9UP6sy/pWf6aoNHEgQKrXN2ca0Fm0OqIbCEghYk= github.com/ethereum-optimism/optimism/op-node v0.8.10/go.mod h1:6NkgIThuQbPY6fA9lI2A52DaeLM2FvrcwGCBVEY2fS8=
github.com/ethereum-optimism/optimism/op-proposer v0.8.9 h1:affd05NB0zxYJA/aCXEwDtaH1kcZfu3b3mnJTn94v74= github.com/ethereum-optimism/optimism/op-proposer v0.8.10 h1:dLzbYmaoMBViqCPlIUFB+bagSuwsd173P8kDhUMbBTQ=
github.com/ethereum-optimism/optimism/op-proposer v0.8.9/go.mod h1:00UGw9VkWSv/0TyltXqU2NGsp4QaWVPzLZ4zvpUGbhU= github.com/ethereum-optimism/optimism/op-proposer v0.8.10/go.mod h1:tdUw40bNis2G1uDT3jNv7BWWM+FzTar+fS5zv6o2YPA=
github.com/ethereum-optimism/optimism/op-service v0.8.9 h1:YdMBcgXi+NHqX3pKR6UhjGHtBeF8AQK6kLmwpv7LzJM= github.com/ethereum-optimism/optimism/op-service v0.8.10 h1:K3IABHI1b0MDrDXALvTKTbzy6IogGD6NgmbqfKEcEwM=
github.com/ethereum-optimism/optimism/op-service v0.8.9/go.mod h1:K0uybOhICTc2yfhrRj0cD1m7aPkOf5C9e6bUmvf4rGA= github.com/ethereum-optimism/optimism/op-service v0.8.10/go.mod h1:K0uybOhICTc2yfhrRj0cD1m7aPkOf5C9e6bUmvf4rGA=
github.com/ethereum/go-ethereum v1.10.4/go.mod h1:nEE0TP5MtxGzOMd7egIrbPJMQBnhVU3ELNxhBglIzhg= github.com/ethereum/go-ethereum v1.10.4/go.mod h1:nEE0TP5MtxGzOMd7egIrbPJMQBnhVU3ELNxhBglIzhg=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0=
......
...@@ -9,7 +9,7 @@ import ( ...@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc" "github.com/ethereum-optimism/optimism/op-bindings/solc"
) )
const GasPriceOracleStorageLayoutJSON = "{\"storage\":[{\"astId\":27806,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":1754,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer_1_0_32\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"},{\"astId\":1757,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer_2_0_32\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":1760,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"overhead\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_uint256\"},{\"astId\":1763,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"scalar\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_uint256\"},{\"astId\":1766,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"decimals\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_uint256\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"}}}" const GasPriceOracleStorageLayoutJSON = "{\"storage\":[{\"astId\":27829,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":1754,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer_1_0_32\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"},{\"astId\":1757,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer_2_0_32\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":1760,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"overhead\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_uint256\"},{\"astId\":1763,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"scalar\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_uint256\"},{\"astId\":1766,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"decimals\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_uint256\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"}}}"
var GasPriceOracleStorageLayout = new(solc.StorageLayout) var GasPriceOracleStorageLayout = new(solc.StorageLayout)
......
...@@ -9,7 +9,7 @@ import ( ...@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc" "github.com/ethereum-optimism/optimism/op-bindings/solc"
) )
const GovernanceTokenStorageLayoutJSON = "{\"storage\":[{\"astId\":28005,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_balances\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":28011,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_allowances\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"},{\"astId\":28013,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_totalSupply\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":28015,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_name\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_string_storage\"},{\"astId\":28017,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_symbol\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_string_storage\"},{\"astId\":29382,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_nonces\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_mapping(t_address,t_struct(Counter)30171_storage)\"},{\"astId\":29390,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_PERMIT_TYPEHASH_DEPRECATED_SLOT\",\"offset\":0,\"slot\":\"6\",\"type\":\"t_bytes32\"},{\"astId\":28723,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_delegates\",\"offset\":0,\"slot\":\"7\",\"type\":\"t_mapping(t_address,t_address)\"},{\"astId\":28729,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_checkpoints\",\"offset\":0,\"slot\":\"8\",\"type\":\"t_mapping(t_address,t_array(t_struct(Checkpoint)28714_storage)dyn_storage)\"},{\"astId\":28733,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_totalSupplyCheckpoints\",\"offset\":0,\"slot\":\"9\",\"type\":\"t_array(t_struct(Checkpoint)28714_storage)dyn_storage\"},{\"astId\":27806,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"10\",\"type\":\"t_address\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_struct(Checkpoint)28714_storage)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"struct ERC20Votes.Checkpoint[]\",\"numberOfBytes\":\"32\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_mapping(t_address,t_address)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e address)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_address\"},\"t_mapping(t_address,t_array(t_struct(Checkpoint)28714_storage)dyn_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct ERC20Votes.Checkpoint[])\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_array(t_struct(Checkpoint)28714_storage)dyn_storage\"},\"t_mapping(t_address,t_mapping(t_address,t_uint256))\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e mapping(address =\u003e uint256))\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_mapping(t_address,t_uint256)\"},\"t_mapping(t_address,t_struct(Counter)30171_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct Counters.Counter)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_struct(Counter)30171_storage\"},\"t_mapping(t_address,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_uint256\"},\"t_string_storage\":{\"encoding\":\"bytes\",\"label\":\"string\",\"numberOfBytes\":\"32\"},\"t_struct(Checkpoint)28714_storage\":{\"encoding\":\"inplace\",\"label\":\"struct ERC20Votes.Checkpoint\",\"numberOfBytes\":\"32\"},\"t_struct(Counter)30171_storage\":{\"encoding\":\"inplace\",\"label\":\"struct Counters.Counter\",\"numberOfBytes\":\"32\"},\"t_uint224\":{\"encoding\":\"inplace\",\"label\":\"uint224\",\"numberOfBytes\":\"28\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint32\":{\"encoding\":\"inplace\",\"label\":\"uint32\",\"numberOfBytes\":\"4\"}}}" const GovernanceTokenStorageLayoutJSON = "{\"storage\":[{\"astId\":28179,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_balances\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":28185,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_allowances\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"},{\"astId\":28187,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_totalSupply\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":28189,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_name\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_string_storage\"},{\"astId\":28191,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_symbol\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_string_storage\"},{\"astId\":29556,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_nonces\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_mapping(t_address,t_struct(Counter)30345_storage)\"},{\"astId\":29564,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_PERMIT_TYPEHASH_DEPRECATED_SLOT\",\"offset\":0,\"slot\":\"6\",\"type\":\"t_bytes32\"},{\"astId\":28897,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_delegates\",\"offset\":0,\"slot\":\"7\",\"type\":\"t_mapping(t_address,t_address)\"},{\"astId\":28903,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_checkpoints\",\"offset\":0,\"slot\":\"8\",\"type\":\"t_mapping(t_address,t_array(t_struct(Checkpoint)28888_storage)dyn_storage)\"},{\"astId\":28907,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_totalSupplyCheckpoints\",\"offset\":0,\"slot\":\"9\",\"type\":\"t_array(t_struct(Checkpoint)28888_storage)dyn_storage\"},{\"astId\":27829,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"10\",\"type\":\"t_address\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_struct(Checkpoint)28888_storage)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"struct ERC20Votes.Checkpoint[]\",\"numberOfBytes\":\"32\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_mapping(t_address,t_address)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e address)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_address\"},\"t_mapping(t_address,t_array(t_struct(Checkpoint)28888_storage)dyn_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct ERC20Votes.Checkpoint[])\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_array(t_struct(Checkpoint)28888_storage)dyn_storage\"},\"t_mapping(t_address,t_mapping(t_address,t_uint256))\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e mapping(address =\u003e uint256))\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_mapping(t_address,t_uint256)\"},\"t_mapping(t_address,t_struct(Counter)30345_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct Counters.Counter)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_struct(Counter)30345_storage\"},\"t_mapping(t_address,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_uint256\"},\"t_string_storage\":{\"encoding\":\"bytes\",\"label\":\"string\",\"numberOfBytes\":\"32\"},\"t_struct(Checkpoint)28888_storage\":{\"encoding\":\"inplace\",\"label\":\"struct ERC20Votes.Checkpoint\",\"numberOfBytes\":\"32\"},\"t_struct(Counter)30345_storage\":{\"encoding\":\"inplace\",\"label\":\"struct Counters.Counter\",\"numberOfBytes\":\"32\"},\"t_uint224\":{\"encoding\":\"inplace\",\"label\":\"uint224\",\"numberOfBytes\":\"28\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint32\":{\"encoding\":\"inplace\",\"label\":\"uint32\",\"numberOfBytes\":\"4\"}}}"
var GovernanceTokenStorageLayout = new(solc.StorageLayout) var GovernanceTokenStorageLayout = new(solc.StorageLayout)
......
...@@ -30,8 +30,8 @@ var ( ...@@ -30,8 +30,8 @@ var (
// L1CrossDomainMessengerMetaData contains all meta data concerning the L1CrossDomainMessenger contract. // L1CrossDomainMessengerMetaData contains all meta data concerning the L1CrossDomainMessenger contract.
var L1CrossDomainMessengerMetaData = &bind.MetaData{ var L1CrossDomainMessengerMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[{\"internalType\":\"contractOptimismPortal\",\"name\":\"_portal\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"FailedRelayedMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"RelayedMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"messageNonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"SentMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SentMessageExtension1\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MESSAGE_VERSION\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_GAS_CALLDATA_OVERHEAD\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_GAS_CONSTANT_OVERHEAD\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"}],\"name\":\"baseGas\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"otherMessenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"portal\",\"outputs\":[{\"internalType\":\"contractOptimismPortal\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"receivedMessages\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"relayMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"successfulMessages\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"xDomainMessageSender\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", ABI: "[{\"inputs\":[{\"internalType\":\"contractOptimismPortal\",\"name\":\"_portal\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"FailedRelayedMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"RelayedMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"messageNonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"SentMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SentMessageExtension1\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MESSAGE_VERSION\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_GAS_CALLDATA_OVERHEAD\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_GAS_CONSTANT_OVERHEAD\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"}],\"name\":\"baseGas\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"otherMessenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"portal\",\"outputs\":[{\"internalType\":\"contractOptimismPortal\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"receivedMessages\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"relayMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"successfulMessages\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"xDomainMessageSender\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
Bin: "0x6101206040523480156200001257600080fd5b50604051620029413803806200294183398101604081905262000035916200045b565b734200000000000000000000000000000000000007608052600060a081905260c052600160e0526001600160a01b03811661010052620000746200007b565b506200048d565b600054600160a81b900460ff1615808015620000a457506000546001600160a01b90910460ff16105b80620000db5750620000c130620001c860201b6200125d1760201c565b158015620000db5750600054600160a01b900460ff166001145b620001445760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff60a01b1916600160a01b179055801562000172576000805460ff60a81b1916600160a81b1790555b6200017c620001d7565b8015620001c5576000805460ff60a81b19169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6001600160a01b03163b151590565b600054600160a81b900460ff16620002355760405162461bcd60e51b815260206004820152602b60248201526000805160206200292183398151915260448201526a6e697469616c697a696e6760a81b60648201526084016200013b565b60cc80546001600160a01b03191661dead1790556200025362000273565b6200025d620002d1565b620002676200033a565b62000271620003a4565b565b600054600160a81b900460ff16620002715760405162461bcd60e51b815260206004820152602b60248201526000805160206200292183398151915260448201526a6e697469616c697a696e6760a81b60648201526084016200013b565b600054600160a81b900460ff166200032f5760405162461bcd60e51b815260206004820152602b60248201526000805160206200292183398151915260448201526a6e697469616c697a696e6760a81b60648201526084016200013b565b620002713362000409565b600054600160a81b900460ff16620003985760405162461bcd60e51b815260206004820152602b60248201526000805160206200292183398151915260448201526a6e697469616c697a696e6760a81b60648201526084016200013b565b6065805460ff19169055565b600054600160a81b900460ff16620004025760405162461bcd60e51b815260206004820152602b60248201526000805160206200292183398151915260448201526a6e697469616c697a696e6760a81b60648201526084016200013b565b6001609755565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000602082840312156200046e57600080fd5b81516001600160a01b03811681146200048657600080fd5b9392505050565b60805160a05160c05160e05161010051612425620004fc6000396000818161027f015281816112b6015281816117d40152818161183501526119010152600061077d015260006107540152600061072b0152600081816103d1015281816104ad01526117fe01526124256000f3fe6080604052600436106101755760003560e01c80637dea7cc3116100cb578063b28ade251161007f578063ecc7042811610059578063ecc70428146103f3578063f2fde38b14610458578063f69f81511461047857600080fd5b8063b28ade251461038c578063d764ad0b146103ac578063db505d80146103bf57600080fd5b80638456cb59116100b05780638456cb591461031c5780638da5cb5b14610331578063b1b1b2091461035c57600080fd5b80637dea7cc3146102f05780638129fc1c1461030757600080fd5b80633f827a5a1161012d5780636425666b116101075780636425666b1461026d5780636e296e45146102c6578063715018a6146102db57600080fd5b80633f827a5a146101ff57806354fd4d50146102275780635c975abb1461024957600080fd5b80632828d7e81161015e5780632828d7e8146101bf5780633dbb202b146101d55780633f4ba83a146101ea57600080fd5b8063028f85f71461017a5780630c568498146101a9575b600080fd5b34801561018657600080fd5b5061018f601081565b60405163ffffffff90911681526020015b60405180910390f35b3480156101b557600080fd5b5061018f6103e881565b3480156101cb57600080fd5b5061018f6103f881565b6101e86101e3366004611de4565b6104a8565b005b3480156101f657600080fd5b506101e8610712565b34801561020b57600080fd5b50610214600181565b60405161ffff90911681526020016101a0565b34801561023357600080fd5b5061023c610724565b6040516101a09190611ec5565b34801561025557600080fd5b5060655460ff165b60405190151581526020016101a0565b34801561027957600080fd5b506102a17f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a0565b3480156102d257600080fd5b506102a16107c7565b3480156102e757600080fd5b506101e86108b3565b3480156102fc57600080fd5b5061018f62030d4081565b34801561031357600080fd5b506101e86108c5565b34801561032857600080fd5b506101e8610ac2565b34801561033d57600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff166102a1565b34801561036857600080fd5b5061025d610377366004611edf565b60cb6020526000908152604090205460ff1681565b34801561039857600080fd5b5061018f6103a7366004611ef8565b610ad2565b6101e86103ba366004611f4c565b610b18565b3480156103cb57600080fd5b506102a17f000000000000000000000000000000000000000000000000000000000000000081565b3480156103ff57600080fd5b5061044a60cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b6040519081526020016101a0565b34801561046457600080fd5b506101e8610473366004611fd2565b6111a9565b34801561048457600080fd5b5061025d610493366004611edf565b60ce6020526000908152604090205460ff1681565b6105e77f00000000000000000000000000000000000000000000000000000000000000006104d7858585610ad2565b63ffffffff16347fd764ad0b0000000000000000000000000000000000000000000000000000000061054960cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b338a34898c8c6040516024016105659796959493929190612038565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611279565b8373ffffffffffffffffffffffffffffffffffffffff167fcb0f7ffd78f9aee47a248fae8db181db6eee833039123e026dcbff529522e52a33858561066c60cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b8660405161067e959493929190612097565b60405180910390a260405134815233907f8ebb2ec2465bdb2a06a66fc37a0963af8a2a6a1479d81d56fdb8cbb98096d5469060200160405180910390a2505060cd80547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808216600101167fffff0000000000000000000000000000000000000000000000000000000000009091161790555050565b61071a61132e565b6107226113af565b565b606061074f7f000000000000000000000000000000000000000000000000000000000000000061142c565b6107787f000000000000000000000000000000000000000000000000000000000000000061142c565b6107a17f000000000000000000000000000000000000000000000000000000000000000061142c565b6040516020016107b3939291906120e5565b604051602081830303815290604052905090565b60cc5460009073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff215301610896576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f43726f7373446f6d61696e4d657373656e6765723a2078446f6d61696e4d657360448201527f7361676553656e646572206973206e6f7420736574000000000000000000000060648201526084015b60405180910390fd5b5060cc5473ffffffffffffffffffffffffffffffffffffffff1690565b6108bb61132e565b6107226000611561565b6000547501000000000000000000000000000000000000000000900460ff1615808015610910575060005460017401000000000000000000000000000000000000000090910460ff16105b806109425750303b158015610942575060005474010000000000000000000000000000000000000000900460ff166001145b6109ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161088d565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790558015610a5457600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790555b610a5c6115d8565b8015610abf57600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b610aca61132e565b6107226116cf565b600062030d40610ae360108561218a565b6103e8610af26103f88661218a565b610afc91906121e5565b610b069190612208565b610b109190612208565b949350505050565b600260975403610b84576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161088d565b6002609755610b9161172a565b60f087901c60018114610c4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605560248201527f43726f7373446f6d61696e4d657373656e6765723a206f6e6c7920766572736960448201527f6f6e2031206d657373616765732061726520737570706f72746564206166746560648201527f722074686520426564726f636b20757067726164650000000000000000000000608482015260a40161088d565b6000610c92898989898989898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061179792505050565b9050610c9c6117ba565b15610cb557853414610cb057610cb0612230565b610e07565b3415610d69576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605060248201527f43726f7373446f6d61696e4d657373656e6765723a2076616c7565206d75737460448201527f206265207a65726f20756e6c657373206d6573736167652069732066726f6d2060648201527f612073797374656d206164647265737300000000000000000000000000000000608482015260a40161088d565b600081815260ce602052604090205460ff16610e07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520636160448201527f6e6e6f74206265207265706c6179656400000000000000000000000000000000606482015260840161088d565b610e10876118de565b15610ec3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f43726f7373446f6d61696e4d657373656e6765723a2063616e6e6f742073656e60448201527f64206d65737361676520746f20626c6f636b65642073797374656d206164647260648201527f6573730000000000000000000000000000000000000000000000000000000000608482015260a40161088d565b600081815260cb602052604090205460ff1615610f62576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520686160448201527f7320616c7265616479206265656e2072656c6179656400000000000000000000606482015260840161088d565b610f6e61afc88661225f565b5a1015610ffd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f43726f7373446f6d61696e4d657373656e6765723a20696e737566666963696560448201527f6e742067617320746f2072656c6179206d657373616765000000000000000000606482015260840161088d565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8a1617905560006110998861105161138861afc8612277565b5a61105c9190612277565b8988888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061195592505050565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055905080151560010361113457600082815260cb602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c91a2611193565b600082815260ce602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f91a25b505060016097555050505050505050565b905090565b6111b161132e565b73ffffffffffffffffffffffffffffffffffffffff8116611254576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161088d565b610abf81611561565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6040517fe9e05c4200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e9e05c429084906112f690889083908990600090899060040161228e565b6000604051808303818588803b15801561130f57600080fd5b505af1158015611323573d6000803e3d6000fd5b505050505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610722576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161088d565b6113b761196f565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60608160000361146f57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156114995780611483816122e6565b91506114929050600a8361231e565b9150611473565b60008167ffffffffffffffff8111156114b4576114b4612332565b6040519080825280601f01601f1916602001820160405280156114de576020820181803683370190505b5090505b8415610b10576114f3600183612277565b9150611500600a86612361565b61150b90603061225f565b60f81b81838151811061152057611520612375565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061155a600a8661231e565b94506114e2565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000547501000000000000000000000000000000000000000000900460ff16611683576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088d565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead1790556116b76119db565b6116bf611a86565b6116c7611b3a565b610722611c0f565b6116d761172a565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586114023390565b60655460ff1615610722576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161088d565b60006117a7878787878787611cc1565b8051906020012090509695505050505050565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161480156111a457507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16639bf62d826040518163ffffffff1660e01b8152600401602060405180830381865afa15801561189e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118c291906123a4565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b600073ffffffffffffffffffffffffffffffffffffffff821630148061194f57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b92915050565b600080600080845160208601878a8af19695505050505050565b60655460ff16610722576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015260640161088d565b6000547501000000000000000000000000000000000000000000900460ff16610722576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088d565b6000547501000000000000000000000000000000000000000000900460ff16611b31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088d565b61072233611561565b6000547501000000000000000000000000000000000000000000900460ff16611be5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088d565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b6000547501000000000000000000000000000000000000000000900460ff16611cba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088d565b6001609755565b6060868686868686604051602401611cde969594939291906123c1565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd764ad0b0000000000000000000000000000000000000000000000000000000017905290509695505050505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610abf57600080fd5b60008083601f840112611d9457600080fd5b50813567ffffffffffffffff811115611dac57600080fd5b602083019150836020828501011115611dc457600080fd5b9250929050565b803563ffffffff81168114611ddf57600080fd5b919050565b60008060008060608587031215611dfa57600080fd5b8435611e0581611d60565b9350602085013567ffffffffffffffff811115611e2157600080fd5b611e2d87828801611d82565b9094509250611e40905060408601611dcb565b905092959194509250565b60005b83811015611e66578181015183820152602001611e4e565b83811115611e75576000848401525b50505050565b60008151808452611e93816020860160208601611e4b565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611ed86020830184611e7b565b9392505050565b600060208284031215611ef157600080fd5b5035919050565b600080600060408486031215611f0d57600080fd5b833567ffffffffffffffff811115611f2457600080fd5b611f3086828701611d82565b9094509250611f43905060208501611dcb565b90509250925092565b600080600080600080600060c0888a031215611f6757600080fd5b873596506020880135611f7981611d60565b95506040880135611f8981611d60565b9450606088013593506080880135925060a088013567ffffffffffffffff811115611fb357600080fd5b611fbf8a828b01611d82565b989b979a50959850939692959293505050565b600060208284031215611fe457600080fd5b8135611ed881611d60565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b878152600073ffffffffffffffffffffffffffffffffffffffff808916602084015280881660408401525085606083015263ffffffff8516608083015260c060a083015261208a60c083018486611fef565b9998505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff861681526080602082015260006120c7608083018688611fef565b905083604083015263ffffffff831660608301529695505050505050565b600084516120f7818460208901611e4b565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551612133816001850160208a01611e4b565b6001920191820152835161214e816002840160208801611e4b565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff808316818516818304811182151516156121ad576121ad61215b565b02949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600063ffffffff808416806121fc576121fc6121b6565b92169190910492915050565b600063ffffffff8083168185168083038211156122275761222761215b565b01949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b600082198211156122725761227261215b565b500190565b6000828210156122895761228961215b565b500390565b73ffffffffffffffffffffffffffffffffffffffff8616815284602082015267ffffffffffffffff84166040820152821515606082015260a0608082015260006122db60a0830184611e7b565b979650505050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036123175761231761215b565b5060010190565b60008261232d5761232d6121b6565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082612370576123706121b6565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156123b657600080fd5b8151611ed881611d60565b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a083015261240c60c0830184611e7b565b9897505050505050505056fea164736f6c634300080f000a496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", Bin: "0x6101206040523480156200001257600080fd5b50604051620029513803806200295183398101604081905262000035916200045b565b734200000000000000000000000000000000000007608052600060a081905260c052600160e0526001600160a01b03811661010052620000746200007b565b506200048d565b600054600160a81b900460ff1615808015620000a457506000546001600160a01b90910460ff16105b80620000db5750620000c130620001c860201b620012611760201c565b158015620000db5750600054600160a01b900460ff166001145b620001445760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff60a01b1916600160a01b179055801562000172576000805460ff60a81b1916600160a81b1790555b6200017c620001d7565b8015620001c5576000805460ff60a81b19169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6001600160a01b03163b151590565b600054600160a81b900460ff16620002355760405162461bcd60e51b815260206004820152602b60248201526000805160206200293183398151915260448201526a6e697469616c697a696e6760a81b60648201526084016200013b565b60cc80546001600160a01b03191661dead1790556200025362000273565b6200025d620002d1565b620002676200033a565b62000271620003a4565b565b600054600160a81b900460ff16620002715760405162461bcd60e51b815260206004820152602b60248201526000805160206200293183398151915260448201526a6e697469616c697a696e6760a81b60648201526084016200013b565b600054600160a81b900460ff166200032f5760405162461bcd60e51b815260206004820152602b60248201526000805160206200293183398151915260448201526a6e697469616c697a696e6760a81b60648201526084016200013b565b620002713362000409565b600054600160a81b900460ff16620003985760405162461bcd60e51b815260206004820152602b60248201526000805160206200293183398151915260448201526a6e697469616c697a696e6760a81b60648201526084016200013b565b6065805460ff19169055565b600054600160a81b900460ff16620004025760405162461bcd60e51b815260206004820152602b60248201526000805160206200293183398151915260448201526a6e697469616c697a696e6760a81b60648201526084016200013b565b6001609755565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000602082840312156200046e57600080fd5b81516001600160a01b03811681146200048657600080fd5b9392505050565b60805160a05160c05160e05161010051612435620004fc60003960008181610283015281816112ba015281816117d80152818161183901526119050152600061077b01526000610752015260006107290152600081816103d5015281816104b1015261180201526124356000f3fe6080604052600436106101755760003560e01c80637dea7cc3116100cb578063b28ade251161007f578063ecc7042811610059578063ecc70428146103f7578063f2fde38b1461045c578063f69f81511461047c57600080fd5b8063b28ade2514610390578063d764ad0b146103b0578063db505d80146103c357600080fd5b80638456cb59116100b05780638456cb59146103205780638da5cb5b14610335578063b1b1b2091461036057600080fd5b80637dea7cc3146102f45780638129fc1c1461030b57600080fd5b80633f827a5a1161012d5780636425666b116101075780636425666b146102715780636e296e45146102ca578063715018a6146102df57600080fd5b80633f827a5a1461020357806354fd4d501461022b5780635c975abb1461024d57600080fd5b80632828d7e81161015e5780632828d7e8146101c35780633dbb202b146101d95780633f4ba83a146101ee57600080fd5b8063028f85f71461017a5780630c568498146101ad575b600080fd5b34801561018657600080fd5b5061018f601081565b60405167ffffffffffffffff90911681526020015b60405180910390f35b3480156101b957600080fd5b5061018f6103e881565b3480156101cf57600080fd5b5061018f6103f881565b6101ec6101e7366004611de8565b6104ac565b005b3480156101fa57600080fd5b506101ec610710565b34801561020f57600080fd5b50610218600181565b60405161ffff90911681526020016101a4565b34801561023757600080fd5b50610240610722565b6040516101a49190611ec9565b34801561025957600080fd5b5060655460ff165b60405190151581526020016101a4565b34801561027d57600080fd5b506102a57f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a4565b3480156102d657600080fd5b506102a56107c5565b3480156102eb57600080fd5b506101ec6108b1565b34801561030057600080fd5b5061018f62030d4081565b34801561031757600080fd5b506101ec6108c3565b34801561032c57600080fd5b506101ec610ac0565b34801561034157600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff166102a5565b34801561036c57600080fd5b5061026161037b366004611ee3565b60cb6020526000908152604090205460ff1681565b34801561039c57600080fd5b5061018f6103ab366004611efc565b610ad0565b6101ec6103be366004611f50565b610b1c565b3480156103cf57600080fd5b506102a57f000000000000000000000000000000000000000000000000000000000000000081565b34801561040357600080fd5b5061044e60cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b6040519081526020016101a4565b34801561046857600080fd5b506101ec610477366004611fd6565b6111ad565b34801561048857600080fd5b50610261610497366004611ee3565b60ce6020526000908152604090205460ff1681565b6105e57f00000000000000000000000000000000000000000000000000000000000000006104db858585610ad0565b347fd764ad0b0000000000000000000000000000000000000000000000000000000061054760cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b338a34898c8c604051602401610563979695949392919061203c565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261127d565b8373ffffffffffffffffffffffffffffffffffffffff167fcb0f7ffd78f9aee47a248fae8db181db6eee833039123e026dcbff529522e52a33858561066a60cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b8660405161067c95949392919061209b565b60405180910390a260405134815233907f8ebb2ec2465bdb2a06a66fc37a0963af8a2a6a1479d81d56fdb8cbb98096d5469060200160405180910390a2505060cd80547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808216600101167fffff0000000000000000000000000000000000000000000000000000000000009091161790555050565b610718611332565b6107206113b3565b565b606061074d7f0000000000000000000000000000000000000000000000000000000000000000611430565b6107767f0000000000000000000000000000000000000000000000000000000000000000611430565b61079f7f0000000000000000000000000000000000000000000000000000000000000000611430565b6040516020016107b1939291906120e9565b604051602081830303815290604052905090565b60cc5460009073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff215301610894576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f43726f7373446f6d61696e4d657373656e6765723a2078446f6d61696e4d657360448201527f7361676553656e646572206973206e6f7420736574000000000000000000000060648201526084015b60405180910390fd5b5060cc5473ffffffffffffffffffffffffffffffffffffffff1690565b6108b9611332565b6107206000611565565b6000547501000000000000000000000000000000000000000000900460ff161580801561090e575060005460017401000000000000000000000000000000000000000090910460ff16105b806109405750303b158015610940575060005474010000000000000000000000000000000000000000900460ff166001145b6109cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161088b565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790558015610a5257600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790555b610a5a6115dc565b8015610abd57600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b610ac8611332565b6107206116d3565b600062030d40610ae160108561218e565b6103e8610af66103f863ffffffff871661218e565b610b0091906121ed565b610b0a9190612214565b610b149190612214565b949350505050565b600260975403610b88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161088b565b6002609755610b9561172e565b60f087901c60018114610c50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605560248201527f43726f7373446f6d61696e4d657373656e6765723a206f6e6c7920766572736960448201527f6f6e2031206d657373616765732061726520737570706f72746564206166746560648201527f722074686520426564726f636b20757067726164650000000000000000000000608482015260a40161088b565b6000610c96898989898989898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061179b92505050565b9050610ca06117be565b15610cb957853414610cb457610cb4612240565b610e0b565b3415610d6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605060248201527f43726f7373446f6d61696e4d657373656e6765723a2076616c7565206d75737460448201527f206265207a65726f20756e6c657373206d6573736167652069732066726f6d2060648201527f612073797374656d206164647265737300000000000000000000000000000000608482015260a40161088b565b600081815260ce602052604090205460ff16610e0b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520636160448201527f6e6e6f74206265207265706c6179656400000000000000000000000000000000606482015260840161088b565b610e14876118e2565b15610ec7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f43726f7373446f6d61696e4d657373656e6765723a2063616e6e6f742073656e60448201527f64206d65737361676520746f20626c6f636b65642073797374656d206164647260648201527f6573730000000000000000000000000000000000000000000000000000000000608482015260a40161088b565b600081815260cb602052604090205460ff1615610f66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520686160448201527f7320616c7265616479206265656e2072656c6179656400000000000000000000606482015260840161088b565b610f7261afc88661226f565b5a1015611001576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f43726f7373446f6d61696e4d657373656e6765723a20696e737566666963696560448201527f6e742067617320746f2072656c6179206d657373616765000000000000000000606482015260840161088b565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8a16179055600061109d8861105561138861afc8612287565b5a6110609190612287565b8988888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061195992505050565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055905080151560010361113857600082815260cb602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c91a2611197565b600082815260ce602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f91a25b505060016097555050505050505050565b905090565b6111b5611332565b73ffffffffffffffffffffffffffffffffffffffff8116611258576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161088b565b610abd81611565565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6040517fe9e05c4200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e9e05c429084906112fa90889083908990600090899060040161229e565b6000604051808303818588803b15801561131357600080fd5b505af1158015611327573d6000803e3d6000fd5b505050505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610720576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161088b565b6113bb611973565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60608160000361147357505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b811561149d5780611487816122f6565b91506114969050600a8361232e565b9150611477565b60008167ffffffffffffffff8111156114b8576114b8612342565b6040519080825280601f01601f1916602001820160405280156114e2576020820181803683370190505b5090505b8415610b14576114f7600183612287565b9150611504600a86612371565b61150f90603061226f565b60f81b81838151811061152457611524612385565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061155e600a8661232e565b94506114e6565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000547501000000000000000000000000000000000000000000900460ff16611687576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088b565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead1790556116bb6119df565b6116c3611a8a565b6116cb611b3e565b610720611c13565b6116db61172e565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586114063390565b60655460ff1615610720576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161088b565b60006117ab878787878787611cc5565b8051906020012090509695505050505050565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161480156111a857507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16639bf62d826040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118c691906123b4565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b600073ffffffffffffffffffffffffffffffffffffffff821630148061195357507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b92915050565b600080600080845160208601878a8af19695505050505050565b60655460ff16610720576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015260640161088b565b6000547501000000000000000000000000000000000000000000900460ff16610720576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088b565b6000547501000000000000000000000000000000000000000000900460ff16611b35576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088b565b61072033611565565b6000547501000000000000000000000000000000000000000000900460ff16611be9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088b565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b6000547501000000000000000000000000000000000000000000900460ff16611cbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088b565b6001609755565b6060868686868686604051602401611ce2969594939291906123d1565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd764ad0b0000000000000000000000000000000000000000000000000000000017905290509695505050505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610abd57600080fd5b60008083601f840112611d9857600080fd5b50813567ffffffffffffffff811115611db057600080fd5b602083019150836020828501011115611dc857600080fd5b9250929050565b803563ffffffff81168114611de357600080fd5b919050565b60008060008060608587031215611dfe57600080fd5b8435611e0981611d64565b9350602085013567ffffffffffffffff811115611e2557600080fd5b611e3187828801611d86565b9094509250611e44905060408601611dcf565b905092959194509250565b60005b83811015611e6a578181015183820152602001611e52565b83811115611e79576000848401525b50505050565b60008151808452611e97816020860160208601611e4f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611edc6020830184611e7f565b9392505050565b600060208284031215611ef557600080fd5b5035919050565b600080600060408486031215611f1157600080fd5b833567ffffffffffffffff811115611f2857600080fd5b611f3486828701611d86565b9094509250611f47905060208501611dcf565b90509250925092565b600080600080600080600060c0888a031215611f6b57600080fd5b873596506020880135611f7d81611d64565b95506040880135611f8d81611d64565b9450606088013593506080880135925060a088013567ffffffffffffffff811115611fb757600080fd5b611fc38a828b01611d86565b989b979a50959850939692959293505050565b600060208284031215611fe857600080fd5b8135611edc81611d64565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b878152600073ffffffffffffffffffffffffffffffffffffffff808916602084015280881660408401525085606083015263ffffffff8516608083015260c060a083015261208e60c083018486611ff3565b9998505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff861681526080602082015260006120cb608083018688611ff3565b905083604083015263ffffffff831660608301529695505050505050565b600084516120fb818460208901611e4f565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551612137816001850160208a01611e4f565b60019201918201528351612152816002840160208801611e4f565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600067ffffffffffffffff808316818516818304811182151516156121b5576121b561215f565b02949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600067ffffffffffffffff80841680612208576122086121be565b92169190910492915050565b600067ffffffffffffffff8083168185168083038211156122375761223761215f565b01949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b600082198211156122825761228261215f565b500190565b6000828210156122995761229961215f565b500390565b73ffffffffffffffffffffffffffffffffffffffff8616815284602082015267ffffffffffffffff84166040820152821515606082015260a0608082015260006122eb60a0830184611e7f565b979650505050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036123275761232761215f565b5060010190565b60008261233d5761233d6121be565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082612380576123806121be565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156123c657600080fd5b8151611edc81611d64565b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a083015261241c60c0830184611e7f565b9897505050505050505056fea164736f6c634300080f000a496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069",
} }
// L1CrossDomainMessengerABI is the input ABI used to generate the binding from. // L1CrossDomainMessengerABI is the input ABI used to generate the binding from.
...@@ -234,16 +234,16 @@ func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) MESSAGEVERSI ...@@ -234,16 +234,16 @@ func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) MESSAGEVERSI
// MINGASCALLDATAOVERHEAD is a free data retrieval call binding the contract method 0x028f85f7. // MINGASCALLDATAOVERHEAD is a free data retrieval call binding the contract method 0x028f85f7.
// //
// Solidity: function MIN_GAS_CALLDATA_OVERHEAD() view returns(uint32) // Solidity: function MIN_GAS_CALLDATA_OVERHEAD() view returns(uint64)
func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MINGASCALLDATAOVERHEAD(opts *bind.CallOpts) (uint32, error) { func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MINGASCALLDATAOVERHEAD(opts *bind.CallOpts) (uint64, error) {
var out []interface{} var out []interface{}
err := _L1CrossDomainMessenger.contract.Call(opts, &out, "MIN_GAS_CALLDATA_OVERHEAD") err := _L1CrossDomainMessenger.contract.Call(opts, &out, "MIN_GAS_CALLDATA_OVERHEAD")
if err != nil { if err != nil {
return *new(uint32), err return *new(uint64), err
} }
out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64)
return out0, err return out0, err
...@@ -251,30 +251,30 @@ func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MINGASCALLDATAOVERH ...@@ -251,30 +251,30 @@ func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MINGASCALLDATAOVERH
// MINGASCALLDATAOVERHEAD is a free data retrieval call binding the contract method 0x028f85f7. // MINGASCALLDATAOVERHEAD is a free data retrieval call binding the contract method 0x028f85f7.
// //
// Solidity: function MIN_GAS_CALLDATA_OVERHEAD() view returns(uint32) // Solidity: function MIN_GAS_CALLDATA_OVERHEAD() view returns(uint64)
func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) MINGASCALLDATAOVERHEAD() (uint32, error) { func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) MINGASCALLDATAOVERHEAD() (uint64, error) {
return _L1CrossDomainMessenger.Contract.MINGASCALLDATAOVERHEAD(&_L1CrossDomainMessenger.CallOpts) return _L1CrossDomainMessenger.Contract.MINGASCALLDATAOVERHEAD(&_L1CrossDomainMessenger.CallOpts)
} }
// MINGASCALLDATAOVERHEAD is a free data retrieval call binding the contract method 0x028f85f7. // MINGASCALLDATAOVERHEAD is a free data retrieval call binding the contract method 0x028f85f7.
// //
// Solidity: function MIN_GAS_CALLDATA_OVERHEAD() view returns(uint32) // Solidity: function MIN_GAS_CALLDATA_OVERHEAD() view returns(uint64)
func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) MINGASCALLDATAOVERHEAD() (uint32, error) { func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) MINGASCALLDATAOVERHEAD() (uint64, error) {
return _L1CrossDomainMessenger.Contract.MINGASCALLDATAOVERHEAD(&_L1CrossDomainMessenger.CallOpts) return _L1CrossDomainMessenger.Contract.MINGASCALLDATAOVERHEAD(&_L1CrossDomainMessenger.CallOpts)
} }
// MINGASCONSTANTOVERHEAD is a free data retrieval call binding the contract method 0x7dea7cc3. // MINGASCONSTANTOVERHEAD is a free data retrieval call binding the contract method 0x7dea7cc3.
// //
// Solidity: function MIN_GAS_CONSTANT_OVERHEAD() view returns(uint32) // Solidity: function MIN_GAS_CONSTANT_OVERHEAD() view returns(uint64)
func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MINGASCONSTANTOVERHEAD(opts *bind.CallOpts) (uint32, error) { func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MINGASCONSTANTOVERHEAD(opts *bind.CallOpts) (uint64, error) {
var out []interface{} var out []interface{}
err := _L1CrossDomainMessenger.contract.Call(opts, &out, "MIN_GAS_CONSTANT_OVERHEAD") err := _L1CrossDomainMessenger.contract.Call(opts, &out, "MIN_GAS_CONSTANT_OVERHEAD")
if err != nil { if err != nil {
return *new(uint32), err return *new(uint64), err
} }
out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64)
return out0, err return out0, err
...@@ -282,30 +282,30 @@ func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MINGASCONSTANTOVERH ...@@ -282,30 +282,30 @@ func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MINGASCONSTANTOVERH
// MINGASCONSTANTOVERHEAD is a free data retrieval call binding the contract method 0x7dea7cc3. // MINGASCONSTANTOVERHEAD is a free data retrieval call binding the contract method 0x7dea7cc3.
// //
// Solidity: function MIN_GAS_CONSTANT_OVERHEAD() view returns(uint32) // Solidity: function MIN_GAS_CONSTANT_OVERHEAD() view returns(uint64)
func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) MINGASCONSTANTOVERHEAD() (uint32, error) { func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) MINGASCONSTANTOVERHEAD() (uint64, error) {
return _L1CrossDomainMessenger.Contract.MINGASCONSTANTOVERHEAD(&_L1CrossDomainMessenger.CallOpts) return _L1CrossDomainMessenger.Contract.MINGASCONSTANTOVERHEAD(&_L1CrossDomainMessenger.CallOpts)
} }
// MINGASCONSTANTOVERHEAD is a free data retrieval call binding the contract method 0x7dea7cc3. // MINGASCONSTANTOVERHEAD is a free data retrieval call binding the contract method 0x7dea7cc3.
// //
// Solidity: function MIN_GAS_CONSTANT_OVERHEAD() view returns(uint32) // Solidity: function MIN_GAS_CONSTANT_OVERHEAD() view returns(uint64)
func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) MINGASCONSTANTOVERHEAD() (uint32, error) { func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) MINGASCONSTANTOVERHEAD() (uint64, error) {
return _L1CrossDomainMessenger.Contract.MINGASCONSTANTOVERHEAD(&_L1CrossDomainMessenger.CallOpts) return _L1CrossDomainMessenger.Contract.MINGASCONSTANTOVERHEAD(&_L1CrossDomainMessenger.CallOpts)
} }
// MINGASDYNAMICOVERHEADDENOMINATOR is a free data retrieval call binding the contract method 0x0c568498. // MINGASDYNAMICOVERHEADDENOMINATOR is a free data retrieval call binding the contract method 0x0c568498.
// //
// Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR() view returns(uint32) // Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR() view returns(uint64)
func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MINGASDYNAMICOVERHEADDENOMINATOR(opts *bind.CallOpts) (uint32, error) { func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MINGASDYNAMICOVERHEADDENOMINATOR(opts *bind.CallOpts) (uint64, error) {
var out []interface{} var out []interface{}
err := _L1CrossDomainMessenger.contract.Call(opts, &out, "MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR") err := _L1CrossDomainMessenger.contract.Call(opts, &out, "MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR")
if err != nil { if err != nil {
return *new(uint32), err return *new(uint64), err
} }
out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64)
return out0, err return out0, err
...@@ -313,30 +313,30 @@ func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MINGASDYNAMICOVERHE ...@@ -313,30 +313,30 @@ func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MINGASDYNAMICOVERHE
// MINGASDYNAMICOVERHEADDENOMINATOR is a free data retrieval call binding the contract method 0x0c568498. // MINGASDYNAMICOVERHEADDENOMINATOR is a free data retrieval call binding the contract method 0x0c568498.
// //
// Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR() view returns(uint32) // Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR() view returns(uint64)
func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) MINGASDYNAMICOVERHEADDENOMINATOR() (uint32, error) { func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) MINGASDYNAMICOVERHEADDENOMINATOR() (uint64, error) {
return _L1CrossDomainMessenger.Contract.MINGASDYNAMICOVERHEADDENOMINATOR(&_L1CrossDomainMessenger.CallOpts) return _L1CrossDomainMessenger.Contract.MINGASDYNAMICOVERHEADDENOMINATOR(&_L1CrossDomainMessenger.CallOpts)
} }
// MINGASDYNAMICOVERHEADDENOMINATOR is a free data retrieval call binding the contract method 0x0c568498. // MINGASDYNAMICOVERHEADDENOMINATOR is a free data retrieval call binding the contract method 0x0c568498.
// //
// Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR() view returns(uint32) // Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR() view returns(uint64)
func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) MINGASDYNAMICOVERHEADDENOMINATOR() (uint32, error) { func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) MINGASDYNAMICOVERHEADDENOMINATOR() (uint64, error) {
return _L1CrossDomainMessenger.Contract.MINGASDYNAMICOVERHEADDENOMINATOR(&_L1CrossDomainMessenger.CallOpts) return _L1CrossDomainMessenger.Contract.MINGASDYNAMICOVERHEADDENOMINATOR(&_L1CrossDomainMessenger.CallOpts)
} }
// MINGASDYNAMICOVERHEADNUMERATOR is a free data retrieval call binding the contract method 0x2828d7e8. // MINGASDYNAMICOVERHEADNUMERATOR is a free data retrieval call binding the contract method 0x2828d7e8.
// //
// Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR() view returns(uint32) // Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR() view returns(uint64)
func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MINGASDYNAMICOVERHEADNUMERATOR(opts *bind.CallOpts) (uint32, error) { func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MINGASDYNAMICOVERHEADNUMERATOR(opts *bind.CallOpts) (uint64, error) {
var out []interface{} var out []interface{}
err := _L1CrossDomainMessenger.contract.Call(opts, &out, "MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR") err := _L1CrossDomainMessenger.contract.Call(opts, &out, "MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR")
if err != nil { if err != nil {
return *new(uint32), err return *new(uint64), err
} }
out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64)
return out0, err return out0, err
...@@ -344,30 +344,30 @@ func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MINGASDYNAMICOVERHE ...@@ -344,30 +344,30 @@ func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) MINGASDYNAMICOVERHE
// MINGASDYNAMICOVERHEADNUMERATOR is a free data retrieval call binding the contract method 0x2828d7e8. // MINGASDYNAMICOVERHEADNUMERATOR is a free data retrieval call binding the contract method 0x2828d7e8.
// //
// Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR() view returns(uint32) // Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR() view returns(uint64)
func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) MINGASDYNAMICOVERHEADNUMERATOR() (uint32, error) { func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) MINGASDYNAMICOVERHEADNUMERATOR() (uint64, error) {
return _L1CrossDomainMessenger.Contract.MINGASDYNAMICOVERHEADNUMERATOR(&_L1CrossDomainMessenger.CallOpts) return _L1CrossDomainMessenger.Contract.MINGASDYNAMICOVERHEADNUMERATOR(&_L1CrossDomainMessenger.CallOpts)
} }
// MINGASDYNAMICOVERHEADNUMERATOR is a free data retrieval call binding the contract method 0x2828d7e8. // MINGASDYNAMICOVERHEADNUMERATOR is a free data retrieval call binding the contract method 0x2828d7e8.
// //
// Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR() view returns(uint32) // Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR() view returns(uint64)
func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) MINGASDYNAMICOVERHEADNUMERATOR() (uint32, error) { func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) MINGASDYNAMICOVERHEADNUMERATOR() (uint64, error) {
return _L1CrossDomainMessenger.Contract.MINGASDYNAMICOVERHEADNUMERATOR(&_L1CrossDomainMessenger.CallOpts) return _L1CrossDomainMessenger.Contract.MINGASDYNAMICOVERHEADNUMERATOR(&_L1CrossDomainMessenger.CallOpts)
} }
// BaseGas is a free data retrieval call binding the contract method 0xb28ade25. // BaseGas is a free data retrieval call binding the contract method 0xb28ade25.
// //
// Solidity: function baseGas(bytes _message, uint32 _minGasLimit) pure returns(uint32) // Solidity: function baseGas(bytes _message, uint32 _minGasLimit) pure returns(uint64)
func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) BaseGas(opts *bind.CallOpts, _message []byte, _minGasLimit uint32) (uint32, error) { func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) BaseGas(opts *bind.CallOpts, _message []byte, _minGasLimit uint32) (uint64, error) {
var out []interface{} var out []interface{}
err := _L1CrossDomainMessenger.contract.Call(opts, &out, "baseGas", _message, _minGasLimit) err := _L1CrossDomainMessenger.contract.Call(opts, &out, "baseGas", _message, _minGasLimit)
if err != nil { if err != nil {
return *new(uint32), err return *new(uint64), err
} }
out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64)
return out0, err return out0, err
...@@ -375,15 +375,15 @@ func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) BaseGas(opts *bind. ...@@ -375,15 +375,15 @@ func (_L1CrossDomainMessenger *L1CrossDomainMessengerCaller) BaseGas(opts *bind.
// BaseGas is a free data retrieval call binding the contract method 0xb28ade25. // BaseGas is a free data retrieval call binding the contract method 0xb28ade25.
// //
// Solidity: function baseGas(bytes _message, uint32 _minGasLimit) pure returns(uint32) // Solidity: function baseGas(bytes _message, uint32 _minGasLimit) pure returns(uint64)
func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) BaseGas(_message []byte, _minGasLimit uint32) (uint32, error) { func (_L1CrossDomainMessenger *L1CrossDomainMessengerSession) BaseGas(_message []byte, _minGasLimit uint32) (uint64, error) {
return _L1CrossDomainMessenger.Contract.BaseGas(&_L1CrossDomainMessenger.CallOpts, _message, _minGasLimit) return _L1CrossDomainMessenger.Contract.BaseGas(&_L1CrossDomainMessenger.CallOpts, _message, _minGasLimit)
} }
// BaseGas is a free data retrieval call binding the contract method 0xb28ade25. // BaseGas is a free data retrieval call binding the contract method 0xb28ade25.
// //
// Solidity: function baseGas(bytes _message, uint32 _minGasLimit) pure returns(uint32) // Solidity: function baseGas(bytes _message, uint32 _minGasLimit) pure returns(uint64)
func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) BaseGas(_message []byte, _minGasLimit uint32) (uint32, error) { func (_L1CrossDomainMessenger *L1CrossDomainMessengerCallerSession) BaseGas(_message []byte, _minGasLimit uint32) (uint64, error) {
return _L1CrossDomainMessenger.Contract.BaseGas(&_L1CrossDomainMessenger.CallOpts, _message, _minGasLimit) return _L1CrossDomainMessenger.Contract.BaseGas(&_L1CrossDomainMessenger.CallOpts, _message, _minGasLimit)
} }
......
...@@ -9,11 +9,11 @@ import ( ...@@ -9,11 +9,11 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc" "github.com/ethereum-optimism/optimism/op-bindings/solc"
) )
const L1CrossDomainMessengerStorageLayoutJSON = "{\"storage\":[{\"astId\":24797,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"spacer_0_0_20\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":27183,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"_initialized\",\"offset\":20,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":27186,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"_initializing\",\"offset\":21,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":27797,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_uint256)50_storage\"},{\"astId\":27055,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":27175,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":27348,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"_paused\",\"offset\":0,\"slot\":\"101\",\"type\":\"t_bool\"},{\"astId\":27453,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"102\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":27468,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"_status\",\"offset\":0,\"slot\":\"151\",\"type\":\"t_uint256\"},{\"astId\":27512,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"152\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":24849,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"spacer_201_0_32\",\"offset\":0,\"slot\":\"201\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":24854,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"spacer_202_0_32\",\"offset\":0,\"slot\":\"202\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":24859,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"successfulMessages\",\"offset\":0,\"slot\":\"203\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":24862,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"xDomainMsgSender\",\"offset\":0,\"slot\":\"204\",\"type\":\"t_address\"},{\"astId\":24865,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"msgNonce\",\"offset\":0,\"slot\":\"205\",\"type\":\"t_uint240\"},{\"astId\":24870,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"receivedMessages\",\"offset\":0,\"slot\":\"206\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":24875,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"207\",\"type\":\"t_array(t_uint256)42_storage\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)42_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[42]\",\"numberOfBytes\":\"1344\"},\"t_array(t_uint256)49_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[49]\",\"numberOfBytes\":\"1568\"},\"t_array(t_uint256)50_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[50]\",\"numberOfBytes\":\"1600\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_mapping(t_bytes32,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_bool\"},\"t_uint240\":{\"encoding\":\"inplace\",\"label\":\"uint240\",\"numberOfBytes\":\"30\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}" const L1CrossDomainMessengerStorageLayoutJSON = "{\"storage\":[{\"astId\":24817,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"spacer_0_0_20\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":27206,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"_initialized\",\"offset\":20,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":27209,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"_initializing\",\"offset\":21,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":27820,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_uint256)50_storage\"},{\"astId\":27078,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":27198,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":27371,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"_paused\",\"offset\":0,\"slot\":\"101\",\"type\":\"t_bool\"},{\"astId\":27476,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"102\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":27491,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"_status\",\"offset\":0,\"slot\":\"151\",\"type\":\"t_uint256\"},{\"astId\":27535,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"152\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":24869,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"spacer_201_0_32\",\"offset\":0,\"slot\":\"201\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":24874,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"spacer_202_0_32\",\"offset\":0,\"slot\":\"202\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":24879,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"successfulMessages\",\"offset\":0,\"slot\":\"203\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":24882,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"xDomainMsgSender\",\"offset\":0,\"slot\":\"204\",\"type\":\"t_address\"},{\"astId\":24885,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"msgNonce\",\"offset\":0,\"slot\":\"205\",\"type\":\"t_uint240\"},{\"astId\":24890,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"receivedMessages\",\"offset\":0,\"slot\":\"206\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":24895,\"contract\":\"contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"207\",\"type\":\"t_array(t_uint256)42_storage\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)42_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[42]\",\"numberOfBytes\":\"1344\"},\"t_array(t_uint256)49_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[49]\",\"numberOfBytes\":\"1568\"},\"t_array(t_uint256)50_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[50]\",\"numberOfBytes\":\"1600\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_mapping(t_bytes32,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_bool\"},\"t_uint240\":{\"encoding\":\"inplace\",\"label\":\"uint240\",\"numberOfBytes\":\"30\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}"
var L1CrossDomainMessengerStorageLayout = new(solc.StorageLayout) var L1CrossDomainMessengerStorageLayout = new(solc.StorageLayout)
var L1CrossDomainMessengerDeployedBin = "0x6080604052600436106101755760003560e01c80637dea7cc3116100cb578063b28ade251161007f578063ecc7042811610059578063ecc70428146103f3578063f2fde38b14610458578063f69f81511461047857600080fd5b8063b28ade251461038c578063d764ad0b146103ac578063db505d80146103bf57600080fd5b80638456cb59116100b05780638456cb591461031c5780638da5cb5b14610331578063b1b1b2091461035c57600080fd5b80637dea7cc3146102f05780638129fc1c1461030757600080fd5b80633f827a5a1161012d5780636425666b116101075780636425666b1461026d5780636e296e45146102c6578063715018a6146102db57600080fd5b80633f827a5a146101ff57806354fd4d50146102275780635c975abb1461024957600080fd5b80632828d7e81161015e5780632828d7e8146101bf5780633dbb202b146101d55780633f4ba83a146101ea57600080fd5b8063028f85f71461017a5780630c568498146101a9575b600080fd5b34801561018657600080fd5b5061018f601081565b60405163ffffffff90911681526020015b60405180910390f35b3480156101b557600080fd5b5061018f6103e881565b3480156101cb57600080fd5b5061018f6103f881565b6101e86101e3366004611de4565b6104a8565b005b3480156101f657600080fd5b506101e8610712565b34801561020b57600080fd5b50610214600181565b60405161ffff90911681526020016101a0565b34801561023357600080fd5b5061023c610724565b6040516101a09190611ec5565b34801561025557600080fd5b5060655460ff165b60405190151581526020016101a0565b34801561027957600080fd5b506102a17f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a0565b3480156102d257600080fd5b506102a16107c7565b3480156102e757600080fd5b506101e86108b3565b3480156102fc57600080fd5b5061018f62030d4081565b34801561031357600080fd5b506101e86108c5565b34801561032857600080fd5b506101e8610ac2565b34801561033d57600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff166102a1565b34801561036857600080fd5b5061025d610377366004611edf565b60cb6020526000908152604090205460ff1681565b34801561039857600080fd5b5061018f6103a7366004611ef8565b610ad2565b6101e86103ba366004611f4c565b610b18565b3480156103cb57600080fd5b506102a17f000000000000000000000000000000000000000000000000000000000000000081565b3480156103ff57600080fd5b5061044a60cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b6040519081526020016101a0565b34801561046457600080fd5b506101e8610473366004611fd2565b6111a9565b34801561048457600080fd5b5061025d610493366004611edf565b60ce6020526000908152604090205460ff1681565b6105e77f00000000000000000000000000000000000000000000000000000000000000006104d7858585610ad2565b63ffffffff16347fd764ad0b0000000000000000000000000000000000000000000000000000000061054960cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b338a34898c8c6040516024016105659796959493929190612038565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611279565b8373ffffffffffffffffffffffffffffffffffffffff167fcb0f7ffd78f9aee47a248fae8db181db6eee833039123e026dcbff529522e52a33858561066c60cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b8660405161067e959493929190612097565b60405180910390a260405134815233907f8ebb2ec2465bdb2a06a66fc37a0963af8a2a6a1479d81d56fdb8cbb98096d5469060200160405180910390a2505060cd80547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808216600101167fffff0000000000000000000000000000000000000000000000000000000000009091161790555050565b61071a61132e565b6107226113af565b565b606061074f7f000000000000000000000000000000000000000000000000000000000000000061142c565b6107787f000000000000000000000000000000000000000000000000000000000000000061142c565b6107a17f000000000000000000000000000000000000000000000000000000000000000061142c565b6040516020016107b3939291906120e5565b604051602081830303815290604052905090565b60cc5460009073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff215301610896576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f43726f7373446f6d61696e4d657373656e6765723a2078446f6d61696e4d657360448201527f7361676553656e646572206973206e6f7420736574000000000000000000000060648201526084015b60405180910390fd5b5060cc5473ffffffffffffffffffffffffffffffffffffffff1690565b6108bb61132e565b6107226000611561565b6000547501000000000000000000000000000000000000000000900460ff1615808015610910575060005460017401000000000000000000000000000000000000000090910460ff16105b806109425750303b158015610942575060005474010000000000000000000000000000000000000000900460ff166001145b6109ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161088d565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790558015610a5457600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790555b610a5c6115d8565b8015610abf57600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b610aca61132e565b6107226116cf565b600062030d40610ae360108561218a565b6103e8610af26103f88661218a565b610afc91906121e5565b610b069190612208565b610b109190612208565b949350505050565b600260975403610b84576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161088d565b6002609755610b9161172a565b60f087901c60018114610c4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605560248201527f43726f7373446f6d61696e4d657373656e6765723a206f6e6c7920766572736960448201527f6f6e2031206d657373616765732061726520737570706f72746564206166746560648201527f722074686520426564726f636b20757067726164650000000000000000000000608482015260a40161088d565b6000610c92898989898989898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061179792505050565b9050610c9c6117ba565b15610cb557853414610cb057610cb0612230565b610e07565b3415610d69576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605060248201527f43726f7373446f6d61696e4d657373656e6765723a2076616c7565206d75737460448201527f206265207a65726f20756e6c657373206d6573736167652069732066726f6d2060648201527f612073797374656d206164647265737300000000000000000000000000000000608482015260a40161088d565b600081815260ce602052604090205460ff16610e07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520636160448201527f6e6e6f74206265207265706c6179656400000000000000000000000000000000606482015260840161088d565b610e10876118de565b15610ec3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f43726f7373446f6d61696e4d657373656e6765723a2063616e6e6f742073656e60448201527f64206d65737361676520746f20626c6f636b65642073797374656d206164647260648201527f6573730000000000000000000000000000000000000000000000000000000000608482015260a40161088d565b600081815260cb602052604090205460ff1615610f62576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520686160448201527f7320616c7265616479206265656e2072656c6179656400000000000000000000606482015260840161088d565b610f6e61afc88661225f565b5a1015610ffd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f43726f7373446f6d61696e4d657373656e6765723a20696e737566666963696560448201527f6e742067617320746f2072656c6179206d657373616765000000000000000000606482015260840161088d565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8a1617905560006110998861105161138861afc8612277565b5a61105c9190612277565b8988888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061195592505050565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055905080151560010361113457600082815260cb602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c91a2611193565b600082815260ce602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f91a25b505060016097555050505050505050565b905090565b6111b161132e565b73ffffffffffffffffffffffffffffffffffffffff8116611254576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161088d565b610abf81611561565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6040517fe9e05c4200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e9e05c429084906112f690889083908990600090899060040161228e565b6000604051808303818588803b15801561130f57600080fd5b505af1158015611323573d6000803e3d6000fd5b505050505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610722576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161088d565b6113b761196f565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60608160000361146f57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156114995780611483816122e6565b91506114929050600a8361231e565b9150611473565b60008167ffffffffffffffff8111156114b4576114b4612332565b6040519080825280601f01601f1916602001820160405280156114de576020820181803683370190505b5090505b8415610b10576114f3600183612277565b9150611500600a86612361565b61150b90603061225f565b60f81b81838151811061152057611520612375565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061155a600a8661231e565b94506114e2565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000547501000000000000000000000000000000000000000000900460ff16611683576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088d565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead1790556116b76119db565b6116bf611a86565b6116c7611b3a565b610722611c0f565b6116d761172a565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586114023390565b60655460ff1615610722576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161088d565b60006117a7878787878787611cc1565b8051906020012090509695505050505050565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161480156111a457507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16639bf62d826040518163ffffffff1660e01b8152600401602060405180830381865afa15801561189e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118c291906123a4565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b600073ffffffffffffffffffffffffffffffffffffffff821630148061194f57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b92915050565b600080600080845160208601878a8af19695505050505050565b60655460ff16610722576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015260640161088d565b6000547501000000000000000000000000000000000000000000900460ff16610722576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088d565b6000547501000000000000000000000000000000000000000000900460ff16611b31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088d565b61072233611561565b6000547501000000000000000000000000000000000000000000900460ff16611be5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088d565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b6000547501000000000000000000000000000000000000000000900460ff16611cba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088d565b6001609755565b6060868686868686604051602401611cde969594939291906123c1565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd764ad0b0000000000000000000000000000000000000000000000000000000017905290509695505050505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610abf57600080fd5b60008083601f840112611d9457600080fd5b50813567ffffffffffffffff811115611dac57600080fd5b602083019150836020828501011115611dc457600080fd5b9250929050565b803563ffffffff81168114611ddf57600080fd5b919050565b60008060008060608587031215611dfa57600080fd5b8435611e0581611d60565b9350602085013567ffffffffffffffff811115611e2157600080fd5b611e2d87828801611d82565b9094509250611e40905060408601611dcb565b905092959194509250565b60005b83811015611e66578181015183820152602001611e4e565b83811115611e75576000848401525b50505050565b60008151808452611e93816020860160208601611e4b565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611ed86020830184611e7b565b9392505050565b600060208284031215611ef157600080fd5b5035919050565b600080600060408486031215611f0d57600080fd5b833567ffffffffffffffff811115611f2457600080fd5b611f3086828701611d82565b9094509250611f43905060208501611dcb565b90509250925092565b600080600080600080600060c0888a031215611f6757600080fd5b873596506020880135611f7981611d60565b95506040880135611f8981611d60565b9450606088013593506080880135925060a088013567ffffffffffffffff811115611fb357600080fd5b611fbf8a828b01611d82565b989b979a50959850939692959293505050565b600060208284031215611fe457600080fd5b8135611ed881611d60565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b878152600073ffffffffffffffffffffffffffffffffffffffff808916602084015280881660408401525085606083015263ffffffff8516608083015260c060a083015261208a60c083018486611fef565b9998505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff861681526080602082015260006120c7608083018688611fef565b905083604083015263ffffffff831660608301529695505050505050565b600084516120f7818460208901611e4b565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551612133816001850160208a01611e4b565b6001920191820152835161214e816002840160208801611e4b565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff808316818516818304811182151516156121ad576121ad61215b565b02949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600063ffffffff808416806121fc576121fc6121b6565b92169190910492915050565b600063ffffffff8083168185168083038211156122275761222761215b565b01949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b600082198211156122725761227261215b565b500190565b6000828210156122895761228961215b565b500390565b73ffffffffffffffffffffffffffffffffffffffff8616815284602082015267ffffffffffffffff84166040820152821515606082015260a0608082015260006122db60a0830184611e7b565b979650505050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036123175761231761215b565b5060010190565b60008261232d5761232d6121b6565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082612370576123706121b6565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156123b657600080fd5b8151611ed881611d60565b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a083015261240c60c0830184611e7b565b9897505050505050505056fea164736f6c634300080f000a" var L1CrossDomainMessengerDeployedBin = "0x6080604052600436106101755760003560e01c80637dea7cc3116100cb578063b28ade251161007f578063ecc7042811610059578063ecc70428146103f7578063f2fde38b1461045c578063f69f81511461047c57600080fd5b8063b28ade2514610390578063d764ad0b146103b0578063db505d80146103c357600080fd5b80638456cb59116100b05780638456cb59146103205780638da5cb5b14610335578063b1b1b2091461036057600080fd5b80637dea7cc3146102f45780638129fc1c1461030b57600080fd5b80633f827a5a1161012d5780636425666b116101075780636425666b146102715780636e296e45146102ca578063715018a6146102df57600080fd5b80633f827a5a1461020357806354fd4d501461022b5780635c975abb1461024d57600080fd5b80632828d7e81161015e5780632828d7e8146101c35780633dbb202b146101d95780633f4ba83a146101ee57600080fd5b8063028f85f71461017a5780630c568498146101ad575b600080fd5b34801561018657600080fd5b5061018f601081565b60405167ffffffffffffffff90911681526020015b60405180910390f35b3480156101b957600080fd5b5061018f6103e881565b3480156101cf57600080fd5b5061018f6103f881565b6101ec6101e7366004611de8565b6104ac565b005b3480156101fa57600080fd5b506101ec610710565b34801561020f57600080fd5b50610218600181565b60405161ffff90911681526020016101a4565b34801561023757600080fd5b50610240610722565b6040516101a49190611ec9565b34801561025957600080fd5b5060655460ff165b60405190151581526020016101a4565b34801561027d57600080fd5b506102a57f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a4565b3480156102d657600080fd5b506102a56107c5565b3480156102eb57600080fd5b506101ec6108b1565b34801561030057600080fd5b5061018f62030d4081565b34801561031757600080fd5b506101ec6108c3565b34801561032c57600080fd5b506101ec610ac0565b34801561034157600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff166102a5565b34801561036c57600080fd5b5061026161037b366004611ee3565b60cb6020526000908152604090205460ff1681565b34801561039c57600080fd5b5061018f6103ab366004611efc565b610ad0565b6101ec6103be366004611f50565b610b1c565b3480156103cf57600080fd5b506102a57f000000000000000000000000000000000000000000000000000000000000000081565b34801561040357600080fd5b5061044e60cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b6040519081526020016101a4565b34801561046857600080fd5b506101ec610477366004611fd6565b6111ad565b34801561048857600080fd5b50610261610497366004611ee3565b60ce6020526000908152604090205460ff1681565b6105e57f00000000000000000000000000000000000000000000000000000000000000006104db858585610ad0565b347fd764ad0b0000000000000000000000000000000000000000000000000000000061054760cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b338a34898c8c604051602401610563979695949392919061203c565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261127d565b8373ffffffffffffffffffffffffffffffffffffffff167fcb0f7ffd78f9aee47a248fae8db181db6eee833039123e026dcbff529522e52a33858561066a60cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b8660405161067c95949392919061209b565b60405180910390a260405134815233907f8ebb2ec2465bdb2a06a66fc37a0963af8a2a6a1479d81d56fdb8cbb98096d5469060200160405180910390a2505060cd80547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808216600101167fffff0000000000000000000000000000000000000000000000000000000000009091161790555050565b610718611332565b6107206113b3565b565b606061074d7f0000000000000000000000000000000000000000000000000000000000000000611430565b6107767f0000000000000000000000000000000000000000000000000000000000000000611430565b61079f7f0000000000000000000000000000000000000000000000000000000000000000611430565b6040516020016107b1939291906120e9565b604051602081830303815290604052905090565b60cc5460009073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff215301610894576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f43726f7373446f6d61696e4d657373656e6765723a2078446f6d61696e4d657360448201527f7361676553656e646572206973206e6f7420736574000000000000000000000060648201526084015b60405180910390fd5b5060cc5473ffffffffffffffffffffffffffffffffffffffff1690565b6108b9611332565b6107206000611565565b6000547501000000000000000000000000000000000000000000900460ff161580801561090e575060005460017401000000000000000000000000000000000000000090910460ff16105b806109405750303b158015610940575060005474010000000000000000000000000000000000000000900460ff166001145b6109cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161088b565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790558015610a5257600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790555b610a5a6115dc565b8015610abd57600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b610ac8611332565b6107206116d3565b600062030d40610ae160108561218e565b6103e8610af66103f863ffffffff871661218e565b610b0091906121ed565b610b0a9190612214565b610b149190612214565b949350505050565b600260975403610b88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161088b565b6002609755610b9561172e565b60f087901c60018114610c50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605560248201527f43726f7373446f6d61696e4d657373656e6765723a206f6e6c7920766572736960448201527f6f6e2031206d657373616765732061726520737570706f72746564206166746560648201527f722074686520426564726f636b20757067726164650000000000000000000000608482015260a40161088b565b6000610c96898989898989898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061179b92505050565b9050610ca06117be565b15610cb957853414610cb457610cb4612240565b610e0b565b3415610d6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605060248201527f43726f7373446f6d61696e4d657373656e6765723a2076616c7565206d75737460448201527f206265207a65726f20756e6c657373206d6573736167652069732066726f6d2060648201527f612073797374656d206164647265737300000000000000000000000000000000608482015260a40161088b565b600081815260ce602052604090205460ff16610e0b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520636160448201527f6e6e6f74206265207265706c6179656400000000000000000000000000000000606482015260840161088b565b610e14876118e2565b15610ec7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f43726f7373446f6d61696e4d657373656e6765723a2063616e6e6f742073656e60448201527f64206d65737361676520746f20626c6f636b65642073797374656d206164647260648201527f6573730000000000000000000000000000000000000000000000000000000000608482015260a40161088b565b600081815260cb602052604090205460ff1615610f66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520686160448201527f7320616c7265616479206265656e2072656c6179656400000000000000000000606482015260840161088b565b610f7261afc88661226f565b5a1015611001576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f43726f7373446f6d61696e4d657373656e6765723a20696e737566666963696560448201527f6e742067617320746f2072656c6179206d657373616765000000000000000000606482015260840161088b565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8a16179055600061109d8861105561138861afc8612287565b5a6110609190612287565b8988888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061195992505050565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055905080151560010361113857600082815260cb602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c91a2611197565b600082815260ce602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f91a25b505060016097555050505050505050565b905090565b6111b5611332565b73ffffffffffffffffffffffffffffffffffffffff8116611258576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161088b565b610abd81611565565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6040517fe9e05c4200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e9e05c429084906112fa90889083908990600090899060040161229e565b6000604051808303818588803b15801561131357600080fd5b505af1158015611327573d6000803e3d6000fd5b505050505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610720576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161088b565b6113bb611973565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60608160000361147357505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b811561149d5780611487816122f6565b91506114969050600a8361232e565b9150611477565b60008167ffffffffffffffff8111156114b8576114b8612342565b6040519080825280601f01601f1916602001820160405280156114e2576020820181803683370190505b5090505b8415610b14576114f7600183612287565b9150611504600a86612371565b61150f90603061226f565b60f81b81838151811061152457611524612385565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061155e600a8661232e565b94506114e6565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000547501000000000000000000000000000000000000000000900460ff16611687576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088b565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead1790556116bb6119df565b6116c3611a8a565b6116cb611b3e565b610720611c13565b6116db61172e565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586114063390565b60655460ff1615610720576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161088b565b60006117ab878787878787611cc5565b8051906020012090509695505050505050565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161480156111a857507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16639bf62d826040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118c691906123b4565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b600073ffffffffffffffffffffffffffffffffffffffff821630148061195357507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b92915050565b600080600080845160208601878a8af19695505050505050565b60655460ff16610720576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015260640161088b565b6000547501000000000000000000000000000000000000000000900460ff16610720576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088b565b6000547501000000000000000000000000000000000000000000900460ff16611b35576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088b565b61072033611565565b6000547501000000000000000000000000000000000000000000900460ff16611be9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088b565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b6000547501000000000000000000000000000000000000000000900460ff16611cbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088b565b6001609755565b6060868686868686604051602401611ce2969594939291906123d1565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd764ad0b0000000000000000000000000000000000000000000000000000000017905290509695505050505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610abd57600080fd5b60008083601f840112611d9857600080fd5b50813567ffffffffffffffff811115611db057600080fd5b602083019150836020828501011115611dc857600080fd5b9250929050565b803563ffffffff81168114611de357600080fd5b919050565b60008060008060608587031215611dfe57600080fd5b8435611e0981611d64565b9350602085013567ffffffffffffffff811115611e2557600080fd5b611e3187828801611d86565b9094509250611e44905060408601611dcf565b905092959194509250565b60005b83811015611e6a578181015183820152602001611e52565b83811115611e79576000848401525b50505050565b60008151808452611e97816020860160208601611e4f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611edc6020830184611e7f565b9392505050565b600060208284031215611ef557600080fd5b5035919050565b600080600060408486031215611f1157600080fd5b833567ffffffffffffffff811115611f2857600080fd5b611f3486828701611d86565b9094509250611f47905060208501611dcf565b90509250925092565b600080600080600080600060c0888a031215611f6b57600080fd5b873596506020880135611f7d81611d64565b95506040880135611f8d81611d64565b9450606088013593506080880135925060a088013567ffffffffffffffff811115611fb757600080fd5b611fc38a828b01611d86565b989b979a50959850939692959293505050565b600060208284031215611fe857600080fd5b8135611edc81611d64565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b878152600073ffffffffffffffffffffffffffffffffffffffff808916602084015280881660408401525085606083015263ffffffff8516608083015260c060a083015261208e60c083018486611ff3565b9998505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff861681526080602082015260006120cb608083018688611ff3565b905083604083015263ffffffff831660608301529695505050505050565b600084516120fb818460208901611e4f565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551612137816001850160208a01611e4f565b60019201918201528351612152816002840160208801611e4f565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600067ffffffffffffffff808316818516818304811182151516156121b5576121b561215f565b02949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600067ffffffffffffffff80841680612208576122086121be565b92169190910492915050565b600067ffffffffffffffff8083168185168083038211156122375761223761215f565b01949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b600082198211156122825761228261215f565b500190565b6000828210156122995761229961215f565b500390565b73ffffffffffffffffffffffffffffffffffffffff8616815284602082015267ffffffffffffffff84166040820152821515606082015260a0608082015260006122eb60a0830184611e7f565b979650505050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036123275761232761215f565b5060010190565b60008261233d5761233d6121be565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082612380576123806121be565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156123c657600080fd5b8151611edc81611d64565b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a083015261241c60c0830184611e7f565b9897505050505050505056fea164736f6c634300080f000a"
func init() { func init() {
if err := json.Unmarshal([]byte(L1CrossDomainMessengerStorageLayoutJSON), L1CrossDomainMessengerStorageLayout); err != nil { if err := json.Unmarshal([]byte(L1CrossDomainMessengerStorageLayoutJSON), L1CrossDomainMessengerStorageLayout); err != nil {
......
...@@ -30,8 +30,8 @@ var ( ...@@ -30,8 +30,8 @@ var (
// L2CrossDomainMessengerMetaData contains all meta data concerning the L2CrossDomainMessenger contract. // L2CrossDomainMessengerMetaData contains all meta data concerning the L2CrossDomainMessenger contract.
var L2CrossDomainMessengerMetaData = &bind.MetaData{ var L2CrossDomainMessengerMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1CrossDomainMessenger\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"FailedRelayedMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"RelayedMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"messageNonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"SentMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SentMessageExtension1\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MESSAGE_VERSION\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_GAS_CALLDATA_OVERHEAD\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_GAS_CONSTANT_OVERHEAD\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"}],\"name\":\"baseGas\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l1CrossDomainMessenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"otherMessenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"receivedMessages\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"relayMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"successfulMessages\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"xDomainMessageSender\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1CrossDomainMessenger\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"FailedRelayedMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"RelayedMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"messageNonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"SentMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SentMessageExtension1\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MESSAGE_VERSION\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_GAS_CALLDATA_OVERHEAD\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_GAS_CONSTANT_OVERHEAD\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"}],\"name\":\"baseGas\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l1CrossDomainMessenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"otherMessenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"receivedMessages\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"relayMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"successfulMessages\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"xDomainMessageSender\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
Bin: "0x6101006040523480156200001257600080fd5b50604051620027b8380380620027b8833981016040819052620000359162000442565b6001600160a01b038116608052600060a081905260c052600160e0526200005b62000062565b5062000474565b600054600160a81b900460ff16158080156200008b57506000546001600160a01b90910460ff16105b80620000c25750620000a830620001af60201b620012ad1760201c565b158015620000c25750600054600160a01b900460ff166001145b6200012b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff60a01b1916600160a01b179055801562000159576000805460ff60a81b1916600160a81b1790555b62000163620001be565b8015620001ac576000805460ff60a81b19169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6001600160a01b03163b151590565b600054600160a81b900460ff166200021c5760405162461bcd60e51b815260206004820152602b60248201526000805160206200279883398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000122565b60cc80546001600160a01b03191661dead1790556200023a6200025a565b62000244620002b8565b6200024e62000321565b620002586200038b565b565b600054600160a81b900460ff16620002585760405162461bcd60e51b815260206004820152602b60248201526000805160206200279883398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000122565b600054600160a81b900460ff16620003165760405162461bcd60e51b815260206004820152602b60248201526000805160206200279883398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000122565b6200025833620003f0565b600054600160a81b900460ff166200037f5760405162461bcd60e51b815260206004820152602b60248201526000805160206200279883398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000122565b6065805460ff19169055565b600054600160a81b900460ff16620003e95760405162461bcd60e51b815260206004820152602b60248201526000805160206200279883398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000122565b6001609755565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000602082840312156200045557600080fd5b81516001600160a01b03811681146200046d57600080fd5b9392505050565b60805160a05160c05160e0516122d5620004c3600039600061077c015260006107530152600061072a015260008181610337015281816103d0015281816104ac0152610ccf01526122d56000f3fe6080604052600436106101755760003560e01c80638129fc1c116100cb578063b28ade251161007f578063ecc7042811610059578063ecc70428146103f2578063f2fde38b14610457578063f69f81511461047757600080fd5b8063b28ade251461038b578063d764ad0b146103ab578063db505d80146103be57600080fd5b80638da5cb5b116100b05780638da5cb5b146102fd578063a711986914610328578063b1b1b2091461035b57600080fd5b80638129fc1c146102d35780638456cb59146102e857600080fd5b80633f827a5a1161012d5780636e296e45116101075780636e296e451461026d578063715018a6146102a75780637dea7cc3146102bc57600080fd5b80633f827a5a146101ff57806354fd4d50146102275780635c975abb1461024957600080fd5b80632828d7e81161015e5780632828d7e8146101bf5780633dbb202b146101d55780633f4ba83a146101ea57600080fd5b8063028f85f71461017a5780630c568498146101a9575b600080fd5b34801561018657600080fd5b5061018f601081565b60405163ffffffff90911681526020015b60405180910390f35b3480156101b557600080fd5b5061018f6103e881565b3480156101cb57600080fd5b5061018f6103f881565b6101e86101e3366004611cc9565b6104a7565b005b3480156101f657600080fd5b506101e8610711565b34801561020b57600080fd5b50610214600181565b60405161ffff90911681526020016101a0565b34801561023357600080fd5b5061023c610723565b6040516101a09190611da8565b34801561025557600080fd5b5060655460ff165b60405190151581526020016101a0565b34801561027957600080fd5b506102826107c6565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a0565b3480156102b357600080fd5b506101e86108b2565b3480156102c857600080fd5b5061018f62030d4081565b3480156102df57600080fd5b506101e86108c4565b3480156102f457600080fd5b506101e8610ac1565b34801561030957600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff16610282565b34801561033457600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610282565b34801561036757600080fd5b5061025d610376366004611dc2565b60cb6020526000908152604090205460ff1681565b34801561039757600080fd5b5061018f6103a6366004611ddb565b610ad1565b6101e86103b9366004611e2f565b610b17565b3480156103ca57600080fd5b506102827f000000000000000000000000000000000000000000000000000000000000000081565b3480156103fe57600080fd5b5061044960cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b6040519081526020016101a0565b34801561046357600080fd5b506101e8610472366004611eb1565b6111f9565b34801561048357600080fd5b5061025d610492366004611dc2565b60ce6020526000908152604090205460ff1681565b6105e67f00000000000000000000000000000000000000000000000000000000000000006104d6858585610ad1565b63ffffffff16347fd764ad0b0000000000000000000000000000000000000000000000000000000061054860cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b338a34898c8c6040516024016105649796959493929190611f15565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526112c9565b8373ffffffffffffffffffffffffffffffffffffffff167fcb0f7ffd78f9aee47a248fae8db181db6eee833039123e026dcbff529522e52a33858561066b60cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b8660405161067d959493929190611f74565b60405180910390a260405134815233907f8ebb2ec2465bdb2a06a66fc37a0963af8a2a6a1479d81d56fdb8cbb98096d5469060200160405180910390a2505060cd80547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808216600101167fffff0000000000000000000000000000000000000000000000000000000000009091161790555050565b610719611357565b6107216113d8565b565b606061074e7f0000000000000000000000000000000000000000000000000000000000000000611455565b6107777f0000000000000000000000000000000000000000000000000000000000000000611455565b6107a07f0000000000000000000000000000000000000000000000000000000000000000611455565b6040516020016107b293929190611fc2565b604051602081830303815290604052905090565b60cc5460009073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff215301610895576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f43726f7373446f6d61696e4d657373656e6765723a2078446f6d61696e4d657360448201527f7361676553656e646572206973206e6f7420736574000000000000000000000060648201526084015b60405180910390fd5b5060cc5473ffffffffffffffffffffffffffffffffffffffff1690565b6108ba611357565b610721600061158a565b6000547501000000000000000000000000000000000000000000900460ff161580801561090f575060005460017401000000000000000000000000000000000000000090910460ff16105b806109415750303b158015610941575060005474010000000000000000000000000000000000000000900460ff166001145b6109cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161088c565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790558015610a5357600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790555b610a5b611601565b8015610abe57600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b610ac9611357565b6107216116f8565b600062030d40610ae2601085612067565b6103e8610af16103f886612067565b610afb91906120c2565b610b0591906120e5565b610b0f91906120e5565b949350505050565b600260975403610b83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161088c565b6002609755610b90611753565b60f087901c60018114610c4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605560248201527f43726f7373446f6d61696e4d657373656e6765723a206f6e6c7920766572736960448201527f6f6e2031206d657373616765732061726520737570706f72746564206166746560648201527f722074686520426564726f636b20757067726164650000000000000000000000608482015260a40161088c565b6000610c91898989898989898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506117c092505050565b905073ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffeeeeffffffffffffffffffffffffffffffffeeef330181167f000000000000000000000000000000000000000000000000000000000000000090911603610d0a57853414610d0557610d0561210d565b610e5c565b3415610dbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605060248201527f43726f7373446f6d61696e4d657373656e6765723a2076616c7565206d75737460448201527f206265207a65726f20756e6c657373206d6573736167652069732066726f6d2060648201527f612073797374656d206164647265737300000000000000000000000000000000608482015260a40161088c565b600081815260ce602052604090205460ff16610e5c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520636160448201527f6e6e6f74206265207265706c6179656400000000000000000000000000000000606482015260840161088c565b610e65876117e3565b15610f18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f43726f7373446f6d61696e4d657373656e6765723a2063616e6e6f742073656e60448201527f64206d65737361676520746f20626c6f636b65642073797374656d206164647260648201527f6573730000000000000000000000000000000000000000000000000000000000608482015260a40161088c565b600081815260cb602052604090205460ff1615610fb7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520686160448201527f7320616c7265616479206265656e2072656c6179656400000000000000000000606482015260840161088c565b610fc361afc88661213c565b5a1015611052576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f43726f7373446f6d61696e4d657373656e6765723a20696e737566666963696560448201527f6e742067617320746f2072656c6179206d657373616765000000000000000000606482015260840161088c565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8a1617905560006110ee886110a661138861afc8612154565b5a6110b19190612154565b8988888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061183892505050565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055905080151560010361118957600082815260cb602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c91a26111e8565b600082815260ce602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f91a25b505060016097555050505050505050565b611201611357565b73ffffffffffffffffffffffffffffffffffffffff81166112a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161088c565b610abe8161158a565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6040517fc2b3e5ac0000000000000000000000000000000000000000000000000000000081527342000000000000000000000000000000000000169063c2b3e5ac90849061131f9088908890879060040161216b565b6000604051808303818588803b15801561133857600080fd5b505af115801561134c573d6000803e3d6000fd5b505050505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610721576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161088c565b6113e0611852565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60608160000361149857505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156114c257806114ac816121b3565b91506114bb9050600a836121eb565b915061149c565b60008167ffffffffffffffff8111156114dd576114dd6121ff565b6040519080825280601f01601f191660200182016040528015611507576020820181803683370190505b5090505b8415610b0f5761151c600183612154565b9150611529600a8661222e565b61153490603061213c565b60f81b81838151811061154957611549612242565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611583600a866121eb565b945061150b565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000547501000000000000000000000000000000000000000000900460ff166116ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088c565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead1790556116e06118be565b6116e8611969565b6116f0611a1d565b610721611af2565b611700611753565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861142b3390565b60655460ff1615610721576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161088c565b60006117d0878787878787611ba4565b8051906020012090509695505050505050565b600073ffffffffffffffffffffffffffffffffffffffff8216301480611832575073ffffffffffffffffffffffffffffffffffffffff8216734200000000000000000000000000000000000016145b92915050565b600080600080845160208601878a8af19695505050505050565b60655460ff16610721576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015260640161088c565b6000547501000000000000000000000000000000000000000000900460ff16610721576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088c565b6000547501000000000000000000000000000000000000000000900460ff16611a14576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088c565b6107213361158a565b6000547501000000000000000000000000000000000000000000900460ff16611ac8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088c565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b6000547501000000000000000000000000000000000000000000900460ff16611b9d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088c565b6001609755565b6060868686868686604051602401611bc196959493929190612271565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd764ad0b0000000000000000000000000000000000000000000000000000000017905290509695505050505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611c6757600080fd5b919050565b60008083601f840112611c7e57600080fd5b50813567ffffffffffffffff811115611c9657600080fd5b602083019150836020828501011115611cae57600080fd5b9250929050565b803563ffffffff81168114611c6757600080fd5b60008060008060608587031215611cdf57600080fd5b611ce885611c43565b9350602085013567ffffffffffffffff811115611d0457600080fd5b611d1087828801611c6c565b9094509250611d23905060408601611cb5565b905092959194509250565b60005b83811015611d49578181015183820152602001611d31565b83811115611d58576000848401525b50505050565b60008151808452611d76816020860160208601611d2e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611dbb6020830184611d5e565b9392505050565b600060208284031215611dd457600080fd5b5035919050565b600080600060408486031215611df057600080fd5b833567ffffffffffffffff811115611e0757600080fd5b611e1386828701611c6c565b9094509250611e26905060208501611cb5565b90509250925092565b600080600080600080600060c0888a031215611e4a57600080fd5b87359650611e5a60208901611c43565b9550611e6860408901611c43565b9450606088013593506080880135925060a088013567ffffffffffffffff811115611e9257600080fd5b611e9e8a828b01611c6c565b989b979a50959850939692959293505050565b600060208284031215611ec357600080fd5b611dbb82611c43565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b878152600073ffffffffffffffffffffffffffffffffffffffff808916602084015280881660408401525085606083015263ffffffff8516608083015260c060a0830152611f6760c083018486611ecc565b9998505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff86168152608060208201526000611fa4608083018688611ecc565b905083604083015263ffffffff831660608301529695505050505050565b60008451611fd4818460208901611d2e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551612010816001850160208a01611d2e565b6001920191820152835161202b816002840160208801611d2e565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff8083168185168183048111821515161561208a5761208a612038565b02949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600063ffffffff808416806120d9576120d9612093565b92169190910492915050565b600063ffffffff80831681851680830382111561210457612104612038565b01949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b6000821982111561214f5761214f612038565b500190565b60008282101561216657612166612038565b500390565b73ffffffffffffffffffffffffffffffffffffffff8416815267ffffffffffffffff831660208201526060604082015260006121aa6060830184611d5e565b95945050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036121e4576121e4612038565b5060010190565b6000826121fa576121fa612093565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008261223d5761223d612093565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a08301526122bc60c0830184611d5e565b9897505050505050505056fea164736f6c634300080f000a496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", Bin: "0x6101006040523480156200001257600080fd5b50604051620027c8380380620027c8833981016040819052620000359162000442565b6001600160a01b038116608052600060a081905260c052600160e0526200005b62000062565b5062000474565b600054600160a81b900460ff16158080156200008b57506000546001600160a01b90910460ff16105b80620000c25750620000a830620001af60201b620012b11760201c565b158015620000c25750600054600160a01b900460ff166001145b6200012b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff60a01b1916600160a01b179055801562000159576000805460ff60a81b1916600160a81b1790555b62000163620001be565b8015620001ac576000805460ff60a81b19169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6001600160a01b03163b151590565b600054600160a81b900460ff166200021c5760405162461bcd60e51b815260206004820152602b6024820152600080516020620027a883398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000122565b60cc80546001600160a01b03191661dead1790556200023a6200025a565b62000244620002b8565b6200024e62000321565b620002586200038b565b565b600054600160a81b900460ff16620002585760405162461bcd60e51b815260206004820152602b6024820152600080516020620027a883398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000122565b600054600160a81b900460ff16620003165760405162461bcd60e51b815260206004820152602b6024820152600080516020620027a883398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000122565b6200025833620003f0565b600054600160a81b900460ff166200037f5760405162461bcd60e51b815260206004820152602b6024820152600080516020620027a883398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000122565b6065805460ff19169055565b600054600160a81b900460ff16620003e95760405162461bcd60e51b815260206004820152602b6024820152600080516020620027a883398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000122565b6001609755565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000602082840312156200045557600080fd5b81516001600160a01b03811681146200046d57600080fd5b9392505050565b60805160a05160c05160e0516122e5620004c3600039600061077a015260006107510152600061072801526000818161033b015281816103d4015281816104b00152610cd301526122e56000f3fe6080604052600436106101755760003560e01c80638129fc1c116100cb578063b28ade251161007f578063ecc7042811610059578063ecc70428146103f6578063f2fde38b1461045b578063f69f81511461047b57600080fd5b8063b28ade251461038f578063d764ad0b146103af578063db505d80146103c257600080fd5b80638da5cb5b116100b05780638da5cb5b14610301578063a71198691461032c578063b1b1b2091461035f57600080fd5b80638129fc1c146102d75780638456cb59146102ec57600080fd5b80633f827a5a1161012d5780636e296e45116101075780636e296e4514610271578063715018a6146102ab5780637dea7cc3146102c057600080fd5b80633f827a5a1461020357806354fd4d501461022b5780635c975abb1461024d57600080fd5b80632828d7e81161015e5780632828d7e8146101c35780633dbb202b146101d95780633f4ba83a146101ee57600080fd5b8063028f85f71461017a5780630c568498146101ad575b600080fd5b34801561018657600080fd5b5061018f601081565b60405167ffffffffffffffff90911681526020015b60405180910390f35b3480156101b957600080fd5b5061018f6103e881565b3480156101cf57600080fd5b5061018f6103f881565b6101ec6101e7366004611ccd565b6104ab565b005b3480156101fa57600080fd5b506101ec61070f565b34801561020f57600080fd5b50610218600181565b60405161ffff90911681526020016101a4565b34801561023757600080fd5b50610240610721565b6040516101a49190611dac565b34801561025957600080fd5b5060655460ff165b60405190151581526020016101a4565b34801561027d57600080fd5b506102866107c4565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a4565b3480156102b757600080fd5b506101ec6108b0565b3480156102cc57600080fd5b5061018f62030d4081565b3480156102e357600080fd5b506101ec6108c2565b3480156102f857600080fd5b506101ec610abf565b34801561030d57600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff16610286565b34801561033857600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610286565b34801561036b57600080fd5b5061026161037a366004611dc6565b60cb6020526000908152604090205460ff1681565b34801561039b57600080fd5b5061018f6103aa366004611ddf565b610acf565b6101ec6103bd366004611e33565b610b1b565b3480156103ce57600080fd5b506102867f000000000000000000000000000000000000000000000000000000000000000081565b34801561040257600080fd5b5061044d60cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b6040519081526020016101a4565b34801561046757600080fd5b506101ec610476366004611eb5565b6111fd565b34801561048757600080fd5b50610261610496366004611dc6565b60ce6020526000908152604090205460ff1681565b6105e47f00000000000000000000000000000000000000000000000000000000000000006104da858585610acf565b347fd764ad0b0000000000000000000000000000000000000000000000000000000061054660cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b338a34898c8c6040516024016105629796959493929190611f19565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526112cd565b8373ffffffffffffffffffffffffffffffffffffffff167fcb0f7ffd78f9aee47a248fae8db181db6eee833039123e026dcbff529522e52a33858561066960cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b8660405161067b959493929190611f78565b60405180910390a260405134815233907f8ebb2ec2465bdb2a06a66fc37a0963af8a2a6a1479d81d56fdb8cbb98096d5469060200160405180910390a2505060cd80547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808216600101167fffff0000000000000000000000000000000000000000000000000000000000009091161790555050565b61071761135b565b61071f6113dc565b565b606061074c7f0000000000000000000000000000000000000000000000000000000000000000611459565b6107757f0000000000000000000000000000000000000000000000000000000000000000611459565b61079e7f0000000000000000000000000000000000000000000000000000000000000000611459565b6040516020016107b093929190611fc6565b604051602081830303815290604052905090565b60cc5460009073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff215301610893576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f43726f7373446f6d61696e4d657373656e6765723a2078446f6d61696e4d657360448201527f7361676553656e646572206973206e6f7420736574000000000000000000000060648201526084015b60405180910390fd5b5060cc5473ffffffffffffffffffffffffffffffffffffffff1690565b6108b861135b565b61071f600061158e565b6000547501000000000000000000000000000000000000000000900460ff161580801561090d575060005460017401000000000000000000000000000000000000000090910460ff16105b8061093f5750303b15801561093f575060005474010000000000000000000000000000000000000000900460ff166001145b6109cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161088a565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790558015610a5157600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790555b610a59611605565b8015610abc57600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b610ac761135b565b61071f6116fc565b600062030d40610ae060108561206b565b6103e8610af56103f863ffffffff871661206b565b610aff91906120ca565b610b0991906120f1565b610b1391906120f1565b949350505050565b600260975403610b87576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161088a565b6002609755610b94611757565b60f087901c60018114610c4f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605560248201527f43726f7373446f6d61696e4d657373656e6765723a206f6e6c7920766572736960448201527f6f6e2031206d657373616765732061726520737570706f72746564206166746560648201527f722074686520426564726f636b20757067726164650000000000000000000000608482015260a40161088a565b6000610c95898989898989898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506117c492505050565b905073ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffeeeeffffffffffffffffffffffffffffffffeeef330181167f000000000000000000000000000000000000000000000000000000000000000090911603610d0e57853414610d0957610d0961211d565b610e60565b3415610dc2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605060248201527f43726f7373446f6d61696e4d657373656e6765723a2076616c7565206d75737460448201527f206265207a65726f20756e6c657373206d6573736167652069732066726f6d2060648201527f612073797374656d206164647265737300000000000000000000000000000000608482015260a40161088a565b600081815260ce602052604090205460ff16610e60576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520636160448201527f6e6e6f74206265207265706c6179656400000000000000000000000000000000606482015260840161088a565b610e69876117e7565b15610f1c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f43726f7373446f6d61696e4d657373656e6765723a2063616e6e6f742073656e60448201527f64206d65737361676520746f20626c6f636b65642073797374656d206164647260648201527f6573730000000000000000000000000000000000000000000000000000000000608482015260a40161088a565b600081815260cb602052604090205460ff1615610fbb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520686160448201527f7320616c7265616479206265656e2072656c6179656400000000000000000000606482015260840161088a565b610fc761afc88661214c565b5a1015611056576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f43726f7373446f6d61696e4d657373656e6765723a20696e737566666963696560448201527f6e742067617320746f2072656c6179206d657373616765000000000000000000606482015260840161088a565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8a1617905560006110f2886110aa61138861afc8612164565b5a6110b59190612164565b8988888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061183c92505050565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055905080151560010361118d57600082815260cb602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c91a26111ec565b600082815260ce602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f91a25b505060016097555050505050505050565b61120561135b565b73ffffffffffffffffffffffffffffffffffffffff81166112a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161088a565b610abc8161158e565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6040517fc2b3e5ac0000000000000000000000000000000000000000000000000000000081527342000000000000000000000000000000000000169063c2b3e5ac9084906113239088908890879060040161217b565b6000604051808303818588803b15801561133c57600080fd5b505af1158015611350573d6000803e3d6000fd5b505050505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff16331461071f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161088a565b6113e4611856565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60608160000361149c57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156114c657806114b0816121c3565b91506114bf9050600a836121fb565b91506114a0565b60008167ffffffffffffffff8111156114e1576114e161220f565b6040519080825280601f01601f19166020018201604052801561150b576020820181803683370190505b5090505b8415610b1357611520600183612164565b915061152d600a8661223e565b61153890603061214c565b60f81b81838151811061154d5761154d612252565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611587600a866121fb565b945061150f565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000547501000000000000000000000000000000000000000000900460ff166116b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088a565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead1790556116e46118c2565b6116ec61196d565b6116f4611a21565b61071f611af6565b611704611757565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861142f3390565b60655460ff161561071f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161088a565b60006117d4878787878787611ba8565b8051906020012090509695505050505050565b600073ffffffffffffffffffffffffffffffffffffffff8216301480611836575073ffffffffffffffffffffffffffffffffffffffff8216734200000000000000000000000000000000000016145b92915050565b600080600080845160208601878a8af19695505050505050565b60655460ff1661071f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015260640161088a565b6000547501000000000000000000000000000000000000000000900460ff1661071f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088a565b6000547501000000000000000000000000000000000000000000900460ff16611a18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088a565b61071f3361158e565b6000547501000000000000000000000000000000000000000000900460ff16611acc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088a565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b6000547501000000000000000000000000000000000000000000900460ff16611ba1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088a565b6001609755565b6060868686868686604051602401611bc596959493929190612281565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd764ad0b0000000000000000000000000000000000000000000000000000000017905290509695505050505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611c6b57600080fd5b919050565b60008083601f840112611c8257600080fd5b50813567ffffffffffffffff811115611c9a57600080fd5b602083019150836020828501011115611cb257600080fd5b9250929050565b803563ffffffff81168114611c6b57600080fd5b60008060008060608587031215611ce357600080fd5b611cec85611c47565b9350602085013567ffffffffffffffff811115611d0857600080fd5b611d1487828801611c70565b9094509250611d27905060408601611cb9565b905092959194509250565b60005b83811015611d4d578181015183820152602001611d35565b83811115611d5c576000848401525b50505050565b60008151808452611d7a816020860160208601611d32565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611dbf6020830184611d62565b9392505050565b600060208284031215611dd857600080fd5b5035919050565b600080600060408486031215611df457600080fd5b833567ffffffffffffffff811115611e0b57600080fd5b611e1786828701611c70565b9094509250611e2a905060208501611cb9565b90509250925092565b600080600080600080600060c0888a031215611e4e57600080fd5b87359650611e5e60208901611c47565b9550611e6c60408901611c47565b9450606088013593506080880135925060a088013567ffffffffffffffff811115611e9657600080fd5b611ea28a828b01611c70565b989b979a50959850939692959293505050565b600060208284031215611ec757600080fd5b611dbf82611c47565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b878152600073ffffffffffffffffffffffffffffffffffffffff808916602084015280881660408401525085606083015263ffffffff8516608083015260c060a0830152611f6b60c083018486611ed0565b9998505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff86168152608060208201526000611fa8608083018688611ed0565b905083604083015263ffffffff831660608301529695505050505050565b60008451611fd8818460208901611d32565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551612014816001850160208a01611d32565b6001920191820152835161202f816002840160208801611d32565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600067ffffffffffffffff808316818516818304811182151516156120925761209261203c565b02949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600067ffffffffffffffff808416806120e5576120e561209b565b92169190910492915050565b600067ffffffffffffffff8083168185168083038211156121145761211461203c565b01949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b6000821982111561215f5761215f61203c565b500190565b6000828210156121765761217661203c565b500390565b73ffffffffffffffffffffffffffffffffffffffff8416815267ffffffffffffffff831660208201526060604082015260006121ba6060830184611d62565b95945050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036121f4576121f461203c565b5060010190565b60008261220a5761220a61209b565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008261224d5761224d61209b565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a08301526122cc60c0830184611d62565b9897505050505050505056fea164736f6c634300080f000a496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069",
} }
// L2CrossDomainMessengerABI is the input ABI used to generate the binding from. // L2CrossDomainMessengerABI is the input ABI used to generate the binding from.
...@@ -234,16 +234,16 @@ func (_L2CrossDomainMessenger *L2CrossDomainMessengerCallerSession) MESSAGEVERSI ...@@ -234,16 +234,16 @@ func (_L2CrossDomainMessenger *L2CrossDomainMessengerCallerSession) MESSAGEVERSI
// MINGASCALLDATAOVERHEAD is a free data retrieval call binding the contract method 0x028f85f7. // MINGASCALLDATAOVERHEAD is a free data retrieval call binding the contract method 0x028f85f7.
// //
// Solidity: function MIN_GAS_CALLDATA_OVERHEAD() view returns(uint32) // Solidity: function MIN_GAS_CALLDATA_OVERHEAD() view returns(uint64)
func (_L2CrossDomainMessenger *L2CrossDomainMessengerCaller) MINGASCALLDATAOVERHEAD(opts *bind.CallOpts) (uint32, error) { func (_L2CrossDomainMessenger *L2CrossDomainMessengerCaller) MINGASCALLDATAOVERHEAD(opts *bind.CallOpts) (uint64, error) {
var out []interface{} var out []interface{}
err := _L2CrossDomainMessenger.contract.Call(opts, &out, "MIN_GAS_CALLDATA_OVERHEAD") err := _L2CrossDomainMessenger.contract.Call(opts, &out, "MIN_GAS_CALLDATA_OVERHEAD")
if err != nil { if err != nil {
return *new(uint32), err return *new(uint64), err
} }
out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64)
return out0, err return out0, err
...@@ -251,30 +251,30 @@ func (_L2CrossDomainMessenger *L2CrossDomainMessengerCaller) MINGASCALLDATAOVERH ...@@ -251,30 +251,30 @@ func (_L2CrossDomainMessenger *L2CrossDomainMessengerCaller) MINGASCALLDATAOVERH
// MINGASCALLDATAOVERHEAD is a free data retrieval call binding the contract method 0x028f85f7. // MINGASCALLDATAOVERHEAD is a free data retrieval call binding the contract method 0x028f85f7.
// //
// Solidity: function MIN_GAS_CALLDATA_OVERHEAD() view returns(uint32) // Solidity: function MIN_GAS_CALLDATA_OVERHEAD() view returns(uint64)
func (_L2CrossDomainMessenger *L2CrossDomainMessengerSession) MINGASCALLDATAOVERHEAD() (uint32, error) { func (_L2CrossDomainMessenger *L2CrossDomainMessengerSession) MINGASCALLDATAOVERHEAD() (uint64, error) {
return _L2CrossDomainMessenger.Contract.MINGASCALLDATAOVERHEAD(&_L2CrossDomainMessenger.CallOpts) return _L2CrossDomainMessenger.Contract.MINGASCALLDATAOVERHEAD(&_L2CrossDomainMessenger.CallOpts)
} }
// MINGASCALLDATAOVERHEAD is a free data retrieval call binding the contract method 0x028f85f7. // MINGASCALLDATAOVERHEAD is a free data retrieval call binding the contract method 0x028f85f7.
// //
// Solidity: function MIN_GAS_CALLDATA_OVERHEAD() view returns(uint32) // Solidity: function MIN_GAS_CALLDATA_OVERHEAD() view returns(uint64)
func (_L2CrossDomainMessenger *L2CrossDomainMessengerCallerSession) MINGASCALLDATAOVERHEAD() (uint32, error) { func (_L2CrossDomainMessenger *L2CrossDomainMessengerCallerSession) MINGASCALLDATAOVERHEAD() (uint64, error) {
return _L2CrossDomainMessenger.Contract.MINGASCALLDATAOVERHEAD(&_L2CrossDomainMessenger.CallOpts) return _L2CrossDomainMessenger.Contract.MINGASCALLDATAOVERHEAD(&_L2CrossDomainMessenger.CallOpts)
} }
// MINGASCONSTANTOVERHEAD is a free data retrieval call binding the contract method 0x7dea7cc3. // MINGASCONSTANTOVERHEAD is a free data retrieval call binding the contract method 0x7dea7cc3.
// //
// Solidity: function MIN_GAS_CONSTANT_OVERHEAD() view returns(uint32) // Solidity: function MIN_GAS_CONSTANT_OVERHEAD() view returns(uint64)
func (_L2CrossDomainMessenger *L2CrossDomainMessengerCaller) MINGASCONSTANTOVERHEAD(opts *bind.CallOpts) (uint32, error) { func (_L2CrossDomainMessenger *L2CrossDomainMessengerCaller) MINGASCONSTANTOVERHEAD(opts *bind.CallOpts) (uint64, error) {
var out []interface{} var out []interface{}
err := _L2CrossDomainMessenger.contract.Call(opts, &out, "MIN_GAS_CONSTANT_OVERHEAD") err := _L2CrossDomainMessenger.contract.Call(opts, &out, "MIN_GAS_CONSTANT_OVERHEAD")
if err != nil { if err != nil {
return *new(uint32), err return *new(uint64), err
} }
out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64)
return out0, err return out0, err
...@@ -282,30 +282,30 @@ func (_L2CrossDomainMessenger *L2CrossDomainMessengerCaller) MINGASCONSTANTOVERH ...@@ -282,30 +282,30 @@ func (_L2CrossDomainMessenger *L2CrossDomainMessengerCaller) MINGASCONSTANTOVERH
// MINGASCONSTANTOVERHEAD is a free data retrieval call binding the contract method 0x7dea7cc3. // MINGASCONSTANTOVERHEAD is a free data retrieval call binding the contract method 0x7dea7cc3.
// //
// Solidity: function MIN_GAS_CONSTANT_OVERHEAD() view returns(uint32) // Solidity: function MIN_GAS_CONSTANT_OVERHEAD() view returns(uint64)
func (_L2CrossDomainMessenger *L2CrossDomainMessengerSession) MINGASCONSTANTOVERHEAD() (uint32, error) { func (_L2CrossDomainMessenger *L2CrossDomainMessengerSession) MINGASCONSTANTOVERHEAD() (uint64, error) {
return _L2CrossDomainMessenger.Contract.MINGASCONSTANTOVERHEAD(&_L2CrossDomainMessenger.CallOpts) return _L2CrossDomainMessenger.Contract.MINGASCONSTANTOVERHEAD(&_L2CrossDomainMessenger.CallOpts)
} }
// MINGASCONSTANTOVERHEAD is a free data retrieval call binding the contract method 0x7dea7cc3. // MINGASCONSTANTOVERHEAD is a free data retrieval call binding the contract method 0x7dea7cc3.
// //
// Solidity: function MIN_GAS_CONSTANT_OVERHEAD() view returns(uint32) // Solidity: function MIN_GAS_CONSTANT_OVERHEAD() view returns(uint64)
func (_L2CrossDomainMessenger *L2CrossDomainMessengerCallerSession) MINGASCONSTANTOVERHEAD() (uint32, error) { func (_L2CrossDomainMessenger *L2CrossDomainMessengerCallerSession) MINGASCONSTANTOVERHEAD() (uint64, error) {
return _L2CrossDomainMessenger.Contract.MINGASCONSTANTOVERHEAD(&_L2CrossDomainMessenger.CallOpts) return _L2CrossDomainMessenger.Contract.MINGASCONSTANTOVERHEAD(&_L2CrossDomainMessenger.CallOpts)
} }
// MINGASDYNAMICOVERHEADDENOMINATOR is a free data retrieval call binding the contract method 0x0c568498. // MINGASDYNAMICOVERHEADDENOMINATOR is a free data retrieval call binding the contract method 0x0c568498.
// //
// Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR() view returns(uint32) // Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR() view returns(uint64)
func (_L2CrossDomainMessenger *L2CrossDomainMessengerCaller) MINGASDYNAMICOVERHEADDENOMINATOR(opts *bind.CallOpts) (uint32, error) { func (_L2CrossDomainMessenger *L2CrossDomainMessengerCaller) MINGASDYNAMICOVERHEADDENOMINATOR(opts *bind.CallOpts) (uint64, error) {
var out []interface{} var out []interface{}
err := _L2CrossDomainMessenger.contract.Call(opts, &out, "MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR") err := _L2CrossDomainMessenger.contract.Call(opts, &out, "MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR")
if err != nil { if err != nil {
return *new(uint32), err return *new(uint64), err
} }
out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64)
return out0, err return out0, err
...@@ -313,30 +313,30 @@ func (_L2CrossDomainMessenger *L2CrossDomainMessengerCaller) MINGASDYNAMICOVERHE ...@@ -313,30 +313,30 @@ func (_L2CrossDomainMessenger *L2CrossDomainMessengerCaller) MINGASDYNAMICOVERHE
// MINGASDYNAMICOVERHEADDENOMINATOR is a free data retrieval call binding the contract method 0x0c568498. // MINGASDYNAMICOVERHEADDENOMINATOR is a free data retrieval call binding the contract method 0x0c568498.
// //
// Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR() view returns(uint32) // Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR() view returns(uint64)
func (_L2CrossDomainMessenger *L2CrossDomainMessengerSession) MINGASDYNAMICOVERHEADDENOMINATOR() (uint32, error) { func (_L2CrossDomainMessenger *L2CrossDomainMessengerSession) MINGASDYNAMICOVERHEADDENOMINATOR() (uint64, error) {
return _L2CrossDomainMessenger.Contract.MINGASDYNAMICOVERHEADDENOMINATOR(&_L2CrossDomainMessenger.CallOpts) return _L2CrossDomainMessenger.Contract.MINGASDYNAMICOVERHEADDENOMINATOR(&_L2CrossDomainMessenger.CallOpts)
} }
// MINGASDYNAMICOVERHEADDENOMINATOR is a free data retrieval call binding the contract method 0x0c568498. // MINGASDYNAMICOVERHEADDENOMINATOR is a free data retrieval call binding the contract method 0x0c568498.
// //
// Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR() view returns(uint32) // Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR() view returns(uint64)
func (_L2CrossDomainMessenger *L2CrossDomainMessengerCallerSession) MINGASDYNAMICOVERHEADDENOMINATOR() (uint32, error) { func (_L2CrossDomainMessenger *L2CrossDomainMessengerCallerSession) MINGASDYNAMICOVERHEADDENOMINATOR() (uint64, error) {
return _L2CrossDomainMessenger.Contract.MINGASDYNAMICOVERHEADDENOMINATOR(&_L2CrossDomainMessenger.CallOpts) return _L2CrossDomainMessenger.Contract.MINGASDYNAMICOVERHEADDENOMINATOR(&_L2CrossDomainMessenger.CallOpts)
} }
// MINGASDYNAMICOVERHEADNUMERATOR is a free data retrieval call binding the contract method 0x2828d7e8. // MINGASDYNAMICOVERHEADNUMERATOR is a free data retrieval call binding the contract method 0x2828d7e8.
// //
// Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR() view returns(uint32) // Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR() view returns(uint64)
func (_L2CrossDomainMessenger *L2CrossDomainMessengerCaller) MINGASDYNAMICOVERHEADNUMERATOR(opts *bind.CallOpts) (uint32, error) { func (_L2CrossDomainMessenger *L2CrossDomainMessengerCaller) MINGASDYNAMICOVERHEADNUMERATOR(opts *bind.CallOpts) (uint64, error) {
var out []interface{} var out []interface{}
err := _L2CrossDomainMessenger.contract.Call(opts, &out, "MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR") err := _L2CrossDomainMessenger.contract.Call(opts, &out, "MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR")
if err != nil { if err != nil {
return *new(uint32), err return *new(uint64), err
} }
out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64)
return out0, err return out0, err
...@@ -344,30 +344,30 @@ func (_L2CrossDomainMessenger *L2CrossDomainMessengerCaller) MINGASDYNAMICOVERHE ...@@ -344,30 +344,30 @@ func (_L2CrossDomainMessenger *L2CrossDomainMessengerCaller) MINGASDYNAMICOVERHE
// MINGASDYNAMICOVERHEADNUMERATOR is a free data retrieval call binding the contract method 0x2828d7e8. // MINGASDYNAMICOVERHEADNUMERATOR is a free data retrieval call binding the contract method 0x2828d7e8.
// //
// Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR() view returns(uint32) // Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR() view returns(uint64)
func (_L2CrossDomainMessenger *L2CrossDomainMessengerSession) MINGASDYNAMICOVERHEADNUMERATOR() (uint32, error) { func (_L2CrossDomainMessenger *L2CrossDomainMessengerSession) MINGASDYNAMICOVERHEADNUMERATOR() (uint64, error) {
return _L2CrossDomainMessenger.Contract.MINGASDYNAMICOVERHEADNUMERATOR(&_L2CrossDomainMessenger.CallOpts) return _L2CrossDomainMessenger.Contract.MINGASDYNAMICOVERHEADNUMERATOR(&_L2CrossDomainMessenger.CallOpts)
} }
// MINGASDYNAMICOVERHEADNUMERATOR is a free data retrieval call binding the contract method 0x2828d7e8. // MINGASDYNAMICOVERHEADNUMERATOR is a free data retrieval call binding the contract method 0x2828d7e8.
// //
// Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR() view returns(uint32) // Solidity: function MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR() view returns(uint64)
func (_L2CrossDomainMessenger *L2CrossDomainMessengerCallerSession) MINGASDYNAMICOVERHEADNUMERATOR() (uint32, error) { func (_L2CrossDomainMessenger *L2CrossDomainMessengerCallerSession) MINGASDYNAMICOVERHEADNUMERATOR() (uint64, error) {
return _L2CrossDomainMessenger.Contract.MINGASDYNAMICOVERHEADNUMERATOR(&_L2CrossDomainMessenger.CallOpts) return _L2CrossDomainMessenger.Contract.MINGASDYNAMICOVERHEADNUMERATOR(&_L2CrossDomainMessenger.CallOpts)
} }
// BaseGas is a free data retrieval call binding the contract method 0xb28ade25. // BaseGas is a free data retrieval call binding the contract method 0xb28ade25.
// //
// Solidity: function baseGas(bytes _message, uint32 _minGasLimit) pure returns(uint32) // Solidity: function baseGas(bytes _message, uint32 _minGasLimit) pure returns(uint64)
func (_L2CrossDomainMessenger *L2CrossDomainMessengerCaller) BaseGas(opts *bind.CallOpts, _message []byte, _minGasLimit uint32) (uint32, error) { func (_L2CrossDomainMessenger *L2CrossDomainMessengerCaller) BaseGas(opts *bind.CallOpts, _message []byte, _minGasLimit uint32) (uint64, error) {
var out []interface{} var out []interface{}
err := _L2CrossDomainMessenger.contract.Call(opts, &out, "baseGas", _message, _minGasLimit) err := _L2CrossDomainMessenger.contract.Call(opts, &out, "baseGas", _message, _minGasLimit)
if err != nil { if err != nil {
return *new(uint32), err return *new(uint64), err
} }
out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64)
return out0, err return out0, err
...@@ -375,15 +375,15 @@ func (_L2CrossDomainMessenger *L2CrossDomainMessengerCaller) BaseGas(opts *bind. ...@@ -375,15 +375,15 @@ func (_L2CrossDomainMessenger *L2CrossDomainMessengerCaller) BaseGas(opts *bind.
// BaseGas is a free data retrieval call binding the contract method 0xb28ade25. // BaseGas is a free data retrieval call binding the contract method 0xb28ade25.
// //
// Solidity: function baseGas(bytes _message, uint32 _minGasLimit) pure returns(uint32) // Solidity: function baseGas(bytes _message, uint32 _minGasLimit) pure returns(uint64)
func (_L2CrossDomainMessenger *L2CrossDomainMessengerSession) BaseGas(_message []byte, _minGasLimit uint32) (uint32, error) { func (_L2CrossDomainMessenger *L2CrossDomainMessengerSession) BaseGas(_message []byte, _minGasLimit uint32) (uint64, error) {
return _L2CrossDomainMessenger.Contract.BaseGas(&_L2CrossDomainMessenger.CallOpts, _message, _minGasLimit) return _L2CrossDomainMessenger.Contract.BaseGas(&_L2CrossDomainMessenger.CallOpts, _message, _minGasLimit)
} }
// BaseGas is a free data retrieval call binding the contract method 0xb28ade25. // BaseGas is a free data retrieval call binding the contract method 0xb28ade25.
// //
// Solidity: function baseGas(bytes _message, uint32 _minGasLimit) pure returns(uint32) // Solidity: function baseGas(bytes _message, uint32 _minGasLimit) pure returns(uint64)
func (_L2CrossDomainMessenger *L2CrossDomainMessengerCallerSession) BaseGas(_message []byte, _minGasLimit uint32) (uint32, error) { func (_L2CrossDomainMessenger *L2CrossDomainMessengerCallerSession) BaseGas(_message []byte, _minGasLimit uint32) (uint64, error) {
return _L2CrossDomainMessenger.Contract.BaseGas(&_L2CrossDomainMessenger.CallOpts, _message, _minGasLimit) return _L2CrossDomainMessenger.Contract.BaseGas(&_L2CrossDomainMessenger.CallOpts, _message, _minGasLimit)
} }
......
...@@ -9,11 +9,11 @@ import ( ...@@ -9,11 +9,11 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc" "github.com/ethereum-optimism/optimism/op-bindings/solc"
) )
const L2CrossDomainMessengerStorageLayoutJSON = "{\"storage\":[{\"astId\":24797,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"spacer_0_0_20\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":27183,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_initialized\",\"offset\":20,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":27186,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_initializing\",\"offset\":21,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":27797,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_uint256)50_storage\"},{\"astId\":27055,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":27175,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":27348,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_paused\",\"offset\":0,\"slot\":\"101\",\"type\":\"t_bool\"},{\"astId\":27453,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"102\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":27468,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_status\",\"offset\":0,\"slot\":\"151\",\"type\":\"t_uint256\"},{\"astId\":27512,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"152\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":24849,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"spacer_201_0_32\",\"offset\":0,\"slot\":\"201\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":24854,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"spacer_202_0_32\",\"offset\":0,\"slot\":\"202\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":24859,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"successfulMessages\",\"offset\":0,\"slot\":\"203\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":24862,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"xDomainMsgSender\",\"offset\":0,\"slot\":\"204\",\"type\":\"t_address\"},{\"astId\":24865,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"msgNonce\",\"offset\":0,\"slot\":\"205\",\"type\":\"t_uint240\"},{\"astId\":24870,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"receivedMessages\",\"offset\":0,\"slot\":\"206\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":24875,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"207\",\"type\":\"t_array(t_uint256)42_storage\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)42_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[42]\",\"numberOfBytes\":\"1344\"},\"t_array(t_uint256)49_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[49]\",\"numberOfBytes\":\"1568\"},\"t_array(t_uint256)50_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[50]\",\"numberOfBytes\":\"1600\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_mapping(t_bytes32,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_bool\"},\"t_uint240\":{\"encoding\":\"inplace\",\"label\":\"uint240\",\"numberOfBytes\":\"30\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}" const L2CrossDomainMessengerStorageLayoutJSON = "{\"storage\":[{\"astId\":24817,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"spacer_0_0_20\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":27206,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_initialized\",\"offset\":20,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":27209,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_initializing\",\"offset\":21,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":27820,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_uint256)50_storage\"},{\"astId\":27078,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":27198,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":27371,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_paused\",\"offset\":0,\"slot\":\"101\",\"type\":\"t_bool\"},{\"astId\":27476,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"102\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":27491,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_status\",\"offset\":0,\"slot\":\"151\",\"type\":\"t_uint256\"},{\"astId\":27535,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"152\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":24869,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"spacer_201_0_32\",\"offset\":0,\"slot\":\"201\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":24874,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"spacer_202_0_32\",\"offset\":0,\"slot\":\"202\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":24879,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"successfulMessages\",\"offset\":0,\"slot\":\"203\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":24882,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"xDomainMsgSender\",\"offset\":0,\"slot\":\"204\",\"type\":\"t_address\"},{\"astId\":24885,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"msgNonce\",\"offset\":0,\"slot\":\"205\",\"type\":\"t_uint240\"},{\"astId\":24890,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"receivedMessages\",\"offset\":0,\"slot\":\"206\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":24895,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"207\",\"type\":\"t_array(t_uint256)42_storage\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)42_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[42]\",\"numberOfBytes\":\"1344\"},\"t_array(t_uint256)49_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[49]\",\"numberOfBytes\":\"1568\"},\"t_array(t_uint256)50_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[50]\",\"numberOfBytes\":\"1600\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_mapping(t_bytes32,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_bool\"},\"t_uint240\":{\"encoding\":\"inplace\",\"label\":\"uint240\",\"numberOfBytes\":\"30\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}"
var L2CrossDomainMessengerStorageLayout = new(solc.StorageLayout) var L2CrossDomainMessengerStorageLayout = new(solc.StorageLayout)
var L2CrossDomainMessengerDeployedBin = "0x6080604052600436106101755760003560e01c80638129fc1c116100cb578063b28ade251161007f578063ecc7042811610059578063ecc70428146103f2578063f2fde38b14610457578063f69f81511461047757600080fd5b8063b28ade251461038b578063d764ad0b146103ab578063db505d80146103be57600080fd5b80638da5cb5b116100b05780638da5cb5b146102fd578063a711986914610328578063b1b1b2091461035b57600080fd5b80638129fc1c146102d35780638456cb59146102e857600080fd5b80633f827a5a1161012d5780636e296e45116101075780636e296e451461026d578063715018a6146102a75780637dea7cc3146102bc57600080fd5b80633f827a5a146101ff57806354fd4d50146102275780635c975abb1461024957600080fd5b80632828d7e81161015e5780632828d7e8146101bf5780633dbb202b146101d55780633f4ba83a146101ea57600080fd5b8063028f85f71461017a5780630c568498146101a9575b600080fd5b34801561018657600080fd5b5061018f601081565b60405163ffffffff90911681526020015b60405180910390f35b3480156101b557600080fd5b5061018f6103e881565b3480156101cb57600080fd5b5061018f6103f881565b6101e86101e3366004611cc9565b6104a7565b005b3480156101f657600080fd5b506101e8610711565b34801561020b57600080fd5b50610214600181565b60405161ffff90911681526020016101a0565b34801561023357600080fd5b5061023c610723565b6040516101a09190611da8565b34801561025557600080fd5b5060655460ff165b60405190151581526020016101a0565b34801561027957600080fd5b506102826107c6565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a0565b3480156102b357600080fd5b506101e86108b2565b3480156102c857600080fd5b5061018f62030d4081565b3480156102df57600080fd5b506101e86108c4565b3480156102f457600080fd5b506101e8610ac1565b34801561030957600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff16610282565b34801561033457600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610282565b34801561036757600080fd5b5061025d610376366004611dc2565b60cb6020526000908152604090205460ff1681565b34801561039757600080fd5b5061018f6103a6366004611ddb565b610ad1565b6101e86103b9366004611e2f565b610b17565b3480156103ca57600080fd5b506102827f000000000000000000000000000000000000000000000000000000000000000081565b3480156103fe57600080fd5b5061044960cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b6040519081526020016101a0565b34801561046357600080fd5b506101e8610472366004611eb1565b6111f9565b34801561048357600080fd5b5061025d610492366004611dc2565b60ce6020526000908152604090205460ff1681565b6105e67f00000000000000000000000000000000000000000000000000000000000000006104d6858585610ad1565b63ffffffff16347fd764ad0b0000000000000000000000000000000000000000000000000000000061054860cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b338a34898c8c6040516024016105649796959493929190611f15565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526112c9565b8373ffffffffffffffffffffffffffffffffffffffff167fcb0f7ffd78f9aee47a248fae8db181db6eee833039123e026dcbff529522e52a33858561066b60cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b8660405161067d959493929190611f74565b60405180910390a260405134815233907f8ebb2ec2465bdb2a06a66fc37a0963af8a2a6a1479d81d56fdb8cbb98096d5469060200160405180910390a2505060cd80547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808216600101167fffff0000000000000000000000000000000000000000000000000000000000009091161790555050565b610719611357565b6107216113d8565b565b606061074e7f0000000000000000000000000000000000000000000000000000000000000000611455565b6107777f0000000000000000000000000000000000000000000000000000000000000000611455565b6107a07f0000000000000000000000000000000000000000000000000000000000000000611455565b6040516020016107b293929190611fc2565b604051602081830303815290604052905090565b60cc5460009073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff215301610895576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f43726f7373446f6d61696e4d657373656e6765723a2078446f6d61696e4d657360448201527f7361676553656e646572206973206e6f7420736574000000000000000000000060648201526084015b60405180910390fd5b5060cc5473ffffffffffffffffffffffffffffffffffffffff1690565b6108ba611357565b610721600061158a565b6000547501000000000000000000000000000000000000000000900460ff161580801561090f575060005460017401000000000000000000000000000000000000000090910460ff16105b806109415750303b158015610941575060005474010000000000000000000000000000000000000000900460ff166001145b6109cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161088c565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790558015610a5357600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790555b610a5b611601565b8015610abe57600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b610ac9611357565b6107216116f8565b600062030d40610ae2601085612067565b6103e8610af16103f886612067565b610afb91906120c2565b610b0591906120e5565b610b0f91906120e5565b949350505050565b600260975403610b83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161088c565b6002609755610b90611753565b60f087901c60018114610c4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605560248201527f43726f7373446f6d61696e4d657373656e6765723a206f6e6c7920766572736960448201527f6f6e2031206d657373616765732061726520737570706f72746564206166746560648201527f722074686520426564726f636b20757067726164650000000000000000000000608482015260a40161088c565b6000610c91898989898989898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506117c092505050565b905073ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffeeeeffffffffffffffffffffffffffffffffeeef330181167f000000000000000000000000000000000000000000000000000000000000000090911603610d0a57853414610d0557610d0561210d565b610e5c565b3415610dbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605060248201527f43726f7373446f6d61696e4d657373656e6765723a2076616c7565206d75737460448201527f206265207a65726f20756e6c657373206d6573736167652069732066726f6d2060648201527f612073797374656d206164647265737300000000000000000000000000000000608482015260a40161088c565b600081815260ce602052604090205460ff16610e5c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520636160448201527f6e6e6f74206265207265706c6179656400000000000000000000000000000000606482015260840161088c565b610e65876117e3565b15610f18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f43726f7373446f6d61696e4d657373656e6765723a2063616e6e6f742073656e60448201527f64206d65737361676520746f20626c6f636b65642073797374656d206164647260648201527f6573730000000000000000000000000000000000000000000000000000000000608482015260a40161088c565b600081815260cb602052604090205460ff1615610fb7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520686160448201527f7320616c7265616479206265656e2072656c6179656400000000000000000000606482015260840161088c565b610fc361afc88661213c565b5a1015611052576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f43726f7373446f6d61696e4d657373656e6765723a20696e737566666963696560448201527f6e742067617320746f2072656c6179206d657373616765000000000000000000606482015260840161088c565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8a1617905560006110ee886110a661138861afc8612154565b5a6110b19190612154565b8988888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061183892505050565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055905080151560010361118957600082815260cb602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c91a26111e8565b600082815260ce602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f91a25b505060016097555050505050505050565b611201611357565b73ffffffffffffffffffffffffffffffffffffffff81166112a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161088c565b610abe8161158a565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6040517fc2b3e5ac0000000000000000000000000000000000000000000000000000000081527342000000000000000000000000000000000000169063c2b3e5ac90849061131f9088908890879060040161216b565b6000604051808303818588803b15801561133857600080fd5b505af115801561134c573d6000803e3d6000fd5b505050505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610721576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161088c565b6113e0611852565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60608160000361149857505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156114c257806114ac816121b3565b91506114bb9050600a836121eb565b915061149c565b60008167ffffffffffffffff8111156114dd576114dd6121ff565b6040519080825280601f01601f191660200182016040528015611507576020820181803683370190505b5090505b8415610b0f5761151c600183612154565b9150611529600a8661222e565b61153490603061213c565b60f81b81838151811061154957611549612242565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611583600a866121eb565b945061150b565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000547501000000000000000000000000000000000000000000900460ff166116ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088c565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead1790556116e06118be565b6116e8611969565b6116f0611a1d565b610721611af2565b611700611753565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861142b3390565b60655460ff1615610721576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161088c565b60006117d0878787878787611ba4565b8051906020012090509695505050505050565b600073ffffffffffffffffffffffffffffffffffffffff8216301480611832575073ffffffffffffffffffffffffffffffffffffffff8216734200000000000000000000000000000000000016145b92915050565b600080600080845160208601878a8af19695505050505050565b60655460ff16610721576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015260640161088c565b6000547501000000000000000000000000000000000000000000900460ff16610721576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088c565b6000547501000000000000000000000000000000000000000000900460ff16611a14576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088c565b6107213361158a565b6000547501000000000000000000000000000000000000000000900460ff16611ac8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088c565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b6000547501000000000000000000000000000000000000000000900460ff16611b9d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088c565b6001609755565b6060868686868686604051602401611bc196959493929190612271565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd764ad0b0000000000000000000000000000000000000000000000000000000017905290509695505050505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611c6757600080fd5b919050565b60008083601f840112611c7e57600080fd5b50813567ffffffffffffffff811115611c9657600080fd5b602083019150836020828501011115611cae57600080fd5b9250929050565b803563ffffffff81168114611c6757600080fd5b60008060008060608587031215611cdf57600080fd5b611ce885611c43565b9350602085013567ffffffffffffffff811115611d0457600080fd5b611d1087828801611c6c565b9094509250611d23905060408601611cb5565b905092959194509250565b60005b83811015611d49578181015183820152602001611d31565b83811115611d58576000848401525b50505050565b60008151808452611d76816020860160208601611d2e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611dbb6020830184611d5e565b9392505050565b600060208284031215611dd457600080fd5b5035919050565b600080600060408486031215611df057600080fd5b833567ffffffffffffffff811115611e0757600080fd5b611e1386828701611c6c565b9094509250611e26905060208501611cb5565b90509250925092565b600080600080600080600060c0888a031215611e4a57600080fd5b87359650611e5a60208901611c43565b9550611e6860408901611c43565b9450606088013593506080880135925060a088013567ffffffffffffffff811115611e9257600080fd5b611e9e8a828b01611c6c565b989b979a50959850939692959293505050565b600060208284031215611ec357600080fd5b611dbb82611c43565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b878152600073ffffffffffffffffffffffffffffffffffffffff808916602084015280881660408401525085606083015263ffffffff8516608083015260c060a0830152611f6760c083018486611ecc565b9998505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff86168152608060208201526000611fa4608083018688611ecc565b905083604083015263ffffffff831660608301529695505050505050565b60008451611fd4818460208901611d2e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551612010816001850160208a01611d2e565b6001920191820152835161202b816002840160208801611d2e565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff8083168185168183048111821515161561208a5761208a612038565b02949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600063ffffffff808416806120d9576120d9612093565b92169190910492915050565b600063ffffffff80831681851680830382111561210457612104612038565b01949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b6000821982111561214f5761214f612038565b500190565b60008282101561216657612166612038565b500390565b73ffffffffffffffffffffffffffffffffffffffff8416815267ffffffffffffffff831660208201526060604082015260006121aa6060830184611d5e565b95945050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036121e4576121e4612038565b5060010190565b6000826121fa576121fa612093565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008261223d5761223d612093565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a08301526122bc60c0830184611d5e565b9897505050505050505056fea164736f6c634300080f000a" var L2CrossDomainMessengerDeployedBin = "0x6080604052600436106101755760003560e01c80638129fc1c116100cb578063b28ade251161007f578063ecc7042811610059578063ecc70428146103f6578063f2fde38b1461045b578063f69f81511461047b57600080fd5b8063b28ade251461038f578063d764ad0b146103af578063db505d80146103c257600080fd5b80638da5cb5b116100b05780638da5cb5b14610301578063a71198691461032c578063b1b1b2091461035f57600080fd5b80638129fc1c146102d75780638456cb59146102ec57600080fd5b80633f827a5a1161012d5780636e296e45116101075780636e296e4514610271578063715018a6146102ab5780637dea7cc3146102c057600080fd5b80633f827a5a1461020357806354fd4d501461022b5780635c975abb1461024d57600080fd5b80632828d7e81161015e5780632828d7e8146101c35780633dbb202b146101d95780633f4ba83a146101ee57600080fd5b8063028f85f71461017a5780630c568498146101ad575b600080fd5b34801561018657600080fd5b5061018f601081565b60405167ffffffffffffffff90911681526020015b60405180910390f35b3480156101b957600080fd5b5061018f6103e881565b3480156101cf57600080fd5b5061018f6103f881565b6101ec6101e7366004611ccd565b6104ab565b005b3480156101fa57600080fd5b506101ec61070f565b34801561020f57600080fd5b50610218600181565b60405161ffff90911681526020016101a4565b34801561023757600080fd5b50610240610721565b6040516101a49190611dac565b34801561025957600080fd5b5060655460ff165b60405190151581526020016101a4565b34801561027d57600080fd5b506102866107c4565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a4565b3480156102b757600080fd5b506101ec6108b0565b3480156102cc57600080fd5b5061018f62030d4081565b3480156102e357600080fd5b506101ec6108c2565b3480156102f857600080fd5b506101ec610abf565b34801561030d57600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff16610286565b34801561033857600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610286565b34801561036b57600080fd5b5061026161037a366004611dc6565b60cb6020526000908152604090205460ff1681565b34801561039b57600080fd5b5061018f6103aa366004611ddf565b610acf565b6101ec6103bd366004611e33565b610b1b565b3480156103ce57600080fd5b506102867f000000000000000000000000000000000000000000000000000000000000000081565b34801561040257600080fd5b5061044d60cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b6040519081526020016101a4565b34801561046757600080fd5b506101ec610476366004611eb5565b6111fd565b34801561048757600080fd5b50610261610496366004611dc6565b60ce6020526000908152604090205460ff1681565b6105e47f00000000000000000000000000000000000000000000000000000000000000006104da858585610acf565b347fd764ad0b0000000000000000000000000000000000000000000000000000000061054660cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b338a34898c8c6040516024016105629796959493929190611f19565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526112cd565b8373ffffffffffffffffffffffffffffffffffffffff167fcb0f7ffd78f9aee47a248fae8db181db6eee833039123e026dcbff529522e52a33858561066960cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b8660405161067b959493929190611f78565b60405180910390a260405134815233907f8ebb2ec2465bdb2a06a66fc37a0963af8a2a6a1479d81d56fdb8cbb98096d5469060200160405180910390a2505060cd80547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808216600101167fffff0000000000000000000000000000000000000000000000000000000000009091161790555050565b61071761135b565b61071f6113dc565b565b606061074c7f0000000000000000000000000000000000000000000000000000000000000000611459565b6107757f0000000000000000000000000000000000000000000000000000000000000000611459565b61079e7f0000000000000000000000000000000000000000000000000000000000000000611459565b6040516020016107b093929190611fc6565b604051602081830303815290604052905090565b60cc5460009073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff215301610893576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f43726f7373446f6d61696e4d657373656e6765723a2078446f6d61696e4d657360448201527f7361676553656e646572206973206e6f7420736574000000000000000000000060648201526084015b60405180910390fd5b5060cc5473ffffffffffffffffffffffffffffffffffffffff1690565b6108b861135b565b61071f600061158e565b6000547501000000000000000000000000000000000000000000900460ff161580801561090d575060005460017401000000000000000000000000000000000000000090910460ff16105b8061093f5750303b15801561093f575060005474010000000000000000000000000000000000000000900460ff166001145b6109cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161088a565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790558015610a5157600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790555b610a59611605565b8015610abc57600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b610ac761135b565b61071f6116fc565b600062030d40610ae060108561206b565b6103e8610af56103f863ffffffff871661206b565b610aff91906120ca565b610b0991906120f1565b610b1391906120f1565b949350505050565b600260975403610b87576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161088a565b6002609755610b94611757565b60f087901c60018114610c4f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605560248201527f43726f7373446f6d61696e4d657373656e6765723a206f6e6c7920766572736960448201527f6f6e2031206d657373616765732061726520737570706f72746564206166746560648201527f722074686520426564726f636b20757067726164650000000000000000000000608482015260a40161088a565b6000610c95898989898989898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506117c492505050565b905073ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffeeeeffffffffffffffffffffffffffffffffeeef330181167f000000000000000000000000000000000000000000000000000000000000000090911603610d0e57853414610d0957610d0961211d565b610e60565b3415610dc2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605060248201527f43726f7373446f6d61696e4d657373656e6765723a2076616c7565206d75737460448201527f206265207a65726f20756e6c657373206d6573736167652069732066726f6d2060648201527f612073797374656d206164647265737300000000000000000000000000000000608482015260a40161088a565b600081815260ce602052604090205460ff16610e60576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520636160448201527f6e6e6f74206265207265706c6179656400000000000000000000000000000000606482015260840161088a565b610e69876117e7565b15610f1c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f43726f7373446f6d61696e4d657373656e6765723a2063616e6e6f742073656e60448201527f64206d65737361676520746f20626c6f636b65642073797374656d206164647260648201527f6573730000000000000000000000000000000000000000000000000000000000608482015260a40161088a565b600081815260cb602052604090205460ff1615610fbb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520686160448201527f7320616c7265616479206265656e2072656c6179656400000000000000000000606482015260840161088a565b610fc761afc88661214c565b5a1015611056576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f43726f7373446f6d61696e4d657373656e6765723a20696e737566666963696560448201527f6e742067617320746f2072656c6179206d657373616765000000000000000000606482015260840161088a565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8a1617905560006110f2886110aa61138861afc8612164565b5a6110b59190612164565b8988888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061183c92505050565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055905080151560010361118d57600082815260cb602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c91a26111ec565b600082815260ce602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f91a25b505060016097555050505050505050565b61120561135b565b73ffffffffffffffffffffffffffffffffffffffff81166112a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161088a565b610abc8161158e565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6040517fc2b3e5ac0000000000000000000000000000000000000000000000000000000081527342000000000000000000000000000000000000169063c2b3e5ac9084906113239088908890879060040161217b565b6000604051808303818588803b15801561133c57600080fd5b505af1158015611350573d6000803e3d6000fd5b505050505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff16331461071f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161088a565b6113e4611856565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60608160000361149c57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156114c657806114b0816121c3565b91506114bf9050600a836121fb565b91506114a0565b60008167ffffffffffffffff8111156114e1576114e161220f565b6040519080825280601f01601f19166020018201604052801561150b576020820181803683370190505b5090505b8415610b1357611520600183612164565b915061152d600a8661223e565b61153890603061214c565b60f81b81838151811061154d5761154d612252565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611587600a866121fb565b945061150f565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000547501000000000000000000000000000000000000000000900460ff166116b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088a565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead1790556116e46118c2565b6116ec61196d565b6116f4611a21565b61071f611af6565b611704611757565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861142f3390565b60655460ff161561071f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161088a565b60006117d4878787878787611ba8565b8051906020012090509695505050505050565b600073ffffffffffffffffffffffffffffffffffffffff8216301480611836575073ffffffffffffffffffffffffffffffffffffffff8216734200000000000000000000000000000000000016145b92915050565b600080600080845160208601878a8af19695505050505050565b60655460ff1661071f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015260640161088a565b6000547501000000000000000000000000000000000000000000900460ff1661071f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088a565b6000547501000000000000000000000000000000000000000000900460ff16611a18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088a565b61071f3361158e565b6000547501000000000000000000000000000000000000000000900460ff16611acc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088a565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b6000547501000000000000000000000000000000000000000000900460ff16611ba1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161088a565b6001609755565b6060868686868686604051602401611bc596959493929190612281565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd764ad0b0000000000000000000000000000000000000000000000000000000017905290509695505050505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611c6b57600080fd5b919050565b60008083601f840112611c8257600080fd5b50813567ffffffffffffffff811115611c9a57600080fd5b602083019150836020828501011115611cb257600080fd5b9250929050565b803563ffffffff81168114611c6b57600080fd5b60008060008060608587031215611ce357600080fd5b611cec85611c47565b9350602085013567ffffffffffffffff811115611d0857600080fd5b611d1487828801611c70565b9094509250611d27905060408601611cb9565b905092959194509250565b60005b83811015611d4d578181015183820152602001611d35565b83811115611d5c576000848401525b50505050565b60008151808452611d7a816020860160208601611d32565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611dbf6020830184611d62565b9392505050565b600060208284031215611dd857600080fd5b5035919050565b600080600060408486031215611df457600080fd5b833567ffffffffffffffff811115611e0b57600080fd5b611e1786828701611c70565b9094509250611e2a905060208501611cb9565b90509250925092565b600080600080600080600060c0888a031215611e4e57600080fd5b87359650611e5e60208901611c47565b9550611e6c60408901611c47565b9450606088013593506080880135925060a088013567ffffffffffffffff811115611e9657600080fd5b611ea28a828b01611c70565b989b979a50959850939692959293505050565b600060208284031215611ec757600080fd5b611dbf82611c47565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b878152600073ffffffffffffffffffffffffffffffffffffffff808916602084015280881660408401525085606083015263ffffffff8516608083015260c060a0830152611f6b60c083018486611ed0565b9998505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff86168152608060208201526000611fa8608083018688611ed0565b905083604083015263ffffffff831660608301529695505050505050565b60008451611fd8818460208901611d32565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551612014816001850160208a01611d32565b6001920191820152835161202f816002840160208801611d32565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600067ffffffffffffffff808316818516818304811182151516156120925761209261203c565b02949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600067ffffffffffffffff808416806120e5576120e561209b565b92169190910492915050565b600067ffffffffffffffff8083168185168083038211156121145761211461203c565b01949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b6000821982111561215f5761215f61203c565b500190565b6000828210156121765761217661203c565b500390565b73ffffffffffffffffffffffffffffffffffffffff8416815267ffffffffffffffff831660208201526060604082015260006121ba6060830184611d62565b95945050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036121f4576121f461203c565b5060010190565b60008261220a5761220a61209b565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008261224d5761224d61209b565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a08301526122cc60c0830184611d62565b9897505050505050505056fea164736f6c634300080f000a"
func init() { func init() {
if err := json.Unmarshal([]byte(L2CrossDomainMessengerStorageLayoutJSON), L2CrossDomainMessengerStorageLayout); err != nil { if err := json.Unmarshal([]byte(L2CrossDomainMessengerStorageLayoutJSON), L2CrossDomainMessengerStorageLayout); err != nil {
......
...@@ -9,7 +9,7 @@ import ( ...@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc" "github.com/ethereum-optimism/optimism/op-bindings/solc"
) )
const L2StandardBridgeStorageLayoutJSON = "{\"storage\":[{\"astId\":26356,\"contract\":\"contracts/L2/L2StandardBridge.sol:L2StandardBridge\",\"label\":\"spacer_0_0_20\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":26359,\"contract\":\"contracts/L2/L2StandardBridge.sol:L2StandardBridge\",\"label\":\"spacer_1_0_20\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_address\"},{\"astId\":26366,\"contract\":\"contracts/L2/L2StandardBridge.sol:L2StandardBridge\",\"label\":\"deposits\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"},{\"astId\":26371,\"contract\":\"contracts/L2/L2StandardBridge.sol:L2StandardBridge\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_array(t_uint256)47_storage\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)47_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[47]\",\"numberOfBytes\":\"1504\"},\"t_mapping(t_address,t_mapping(t_address,t_uint256))\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e mapping(address =\u003e uint256))\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_mapping(t_address,t_uint256)\"},\"t_mapping(t_address,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_uint256\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"}}}" const L2StandardBridgeStorageLayoutJSON = "{\"storage\":[{\"astId\":26379,\"contract\":\"contracts/L2/L2StandardBridge.sol:L2StandardBridge\",\"label\":\"spacer_0_0_20\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":26382,\"contract\":\"contracts/L2/L2StandardBridge.sol:L2StandardBridge\",\"label\":\"spacer_1_0_20\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_address\"},{\"astId\":26389,\"contract\":\"contracts/L2/L2StandardBridge.sol:L2StandardBridge\",\"label\":\"deposits\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"},{\"astId\":26394,\"contract\":\"contracts/L2/L2StandardBridge.sol:L2StandardBridge\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_array(t_uint256)47_storage\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)47_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[47]\",\"numberOfBytes\":\"1504\"},\"t_mapping(t_address,t_mapping(t_address,t_uint256))\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e mapping(address =\u003e uint256))\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_mapping(t_address,t_uint256)\"},\"t_mapping(t_address,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_uint256\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"}}}"
var L2StandardBridgeStorageLayout = new(solc.StorageLayout) var L2StandardBridgeStorageLayout = new(solc.StorageLayout)
......
...@@ -30,8 +30,8 @@ var ( ...@@ -30,8 +30,8 @@ var (
// L2ToL1MessagePasserMetaData contains all meta data concerning the L2ToL1MessagePasser contract. // L2ToL1MessagePasserMetaData contains all meta data concerning the L2ToL1MessagePasser contract.
var L2ToL1MessagePasserMetaData = &bind.MetaData{ var L2ToL1MessagePasserMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"WithdrawalInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"WithdrawalInitiatedExtension1\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"WithdrawerBalanceBurnt\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"initiateWithdrawal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"sentMessages\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"MessagePassed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"MessagePassedExtension1\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"WithdrawerBalanceBurnt\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"initiateWithdrawal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"sentMessages\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]",
Bin: "0x60e060405234801561001057600080fd5b506000608081905260a052600160c05260805160a05160c05161091361004f60003960006102fe015260006102d5015260006102ac01526109136000f3fe60806040526004361061005e5760003560e01c806382e3702d1161004357806382e3702d146100c7578063affed0e014610107578063c2b3e5ac1461012b57600080fd5b806344df8e701461008757806354fd4d501461009c57600080fd5b366100825761008033620186a060405180602001604052806000815250610139565b005b600080fd5b34801561009357600080fd5b5061008061026d565b3480156100a857600080fd5b506100b16102a5565b6040516100be9190610587565b60405180910390f35b3480156100d357600080fd5b506100f76100e23660046105a1565b60006020819052908152604090205460ff1681565b60405190151581526020016100be565b34801561011357600080fd5b5061011d60015481565b6040519081526020016100be565b6100806101393660046105e9565b600061019e6040518060c0016040528060015481526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff16815260200134815260200185815260200184815250610348565b6000818152602081905260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915554905191925073ffffffffffffffffffffffffffffffffffffffff8616913391907f87bf7b546c8de873abb0db5b579ec131f8d0cf5b14f39933551cf9ced23a61369061022c903490899089906106ed565b60405180910390a460405181907f2ef6ceb1668fdd882b1f89ddd53a666b0c1113d14cf90c0fbf97c7b1ad880fbb90600090a2505060018054810190555050565b4761027781610395565b60405181907f7967de617a5ac1cc7eba2d6f37570a0135afa950d8bb77cdd35f0d0b4e85a16f90600090a250565b60606102d07f00000000000000000000000000000000000000000000000000000000000000006103c4565b6102f97f00000000000000000000000000000000000000000000000000000000000000006103c4565b6103227f00000000000000000000000000000000000000000000000000000000000000006103c4565b60405160200161033493929190610715565b604051602081830303815290604052905090565b80516020808301516040808501516060860151608087015160a0880151935160009761037897909695910161078b565b604051602081830303815290604052805190602001209050919050565b806040516103a290610501565b6040518091039082f09050801580156103bf573d6000803e3d6000fd5b505050565b60608160000361040757505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115610431578061041b81610811565b915061042a9050600a83610878565b915061040b565b60008167ffffffffffffffff81111561044c5761044c6105ba565b6040519080825280601f01601f191660200182016040528015610476576020820181803683370190505b5090505b84156104f95761048b60018361088c565b9150610498600a866108a3565b6104a39060306108b7565b60f81b8183815181106104b8576104b86108cf565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506104f2600a86610878565b945061047a565b949350505050565b6008806108ff83390190565b60005b83811015610528578181015183820152602001610510565b83811115610537576000848401525b50505050565b6000815180845261055581602086016020860161050d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061059a602083018461053d565b9392505050565b6000602082840312156105b357600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806000606084860312156105fe57600080fd5b833573ffffffffffffffffffffffffffffffffffffffff8116811461062257600080fd5b925060208401359150604084013567ffffffffffffffff8082111561064657600080fd5b818601915086601f83011261065a57600080fd5b81358181111561066c5761066c6105ba565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156106b2576106b26105ba565b816040528281528960208487010111156106cb57600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b83815282602082015260606040820152600061070c606083018461053d565b95945050505050565b6000845161072781846020890161050d565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610763816001850160208a0161050d565b6001920191820152835161077e81600284016020880161050d565b0160020195945050505050565b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a08301526107d660c083018461053d565b98975050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610842576108426107e2565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261088757610887610849565b500490565b60008282101561089e5761089e6107e2565b500390565b6000826108b2576108b2610849565b500690565b600082198211156108ca576108ca6107e2565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfe608060405230fffea164736f6c634300080f000a", Bin: "0x60e060405234801561001057600080fd5b506000608081905260a052600160c05260805160a05160c05161091361004f60003960006102fe015260006102d5015260006102ac01526109136000f3fe60806040526004361061005e5760003560e01c806382e3702d1161004357806382e3702d146100c7578063affed0e014610107578063c2b3e5ac1461012b57600080fd5b806344df8e701461008757806354fd4d501461009c57600080fd5b366100825761008033620186a060405180602001604052806000815250610139565b005b600080fd5b34801561009357600080fd5b5061008061026d565b3480156100a857600080fd5b506100b16102a5565b6040516100be9190610587565b60405180910390f35b3480156100d357600080fd5b506100f76100e23660046105a1565b60006020819052908152604090205460ff1681565b60405190151581526020016100be565b34801561011357600080fd5b5061011d60015481565b6040519081526020016100be565b6100806101393660046105e9565b600061019e6040518060c0016040528060015481526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff16815260200134815260200185815260200184815250610348565b6000818152602081905260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915554905191925073ffffffffffffffffffffffffffffffffffffffff8616913391907f7744840cae4793a72467311120512aa98e4398bcd2b9d379b2b9c3b60fa03d729061022c903490899089906106ed565b60405180910390a460405181907fedd348f9c36ef1a5b0747bb5039752707059f0b934c8e508b3271e08fbd0122c90600090a2505060018054810190555050565b4761027781610395565b60405181907f7967de617a5ac1cc7eba2d6f37570a0135afa950d8bb77cdd35f0d0b4e85a16f90600090a250565b60606102d07f00000000000000000000000000000000000000000000000000000000000000006103c4565b6102f97f00000000000000000000000000000000000000000000000000000000000000006103c4565b6103227f00000000000000000000000000000000000000000000000000000000000000006103c4565b60405160200161033493929190610715565b604051602081830303815290604052905090565b80516020808301516040808501516060860151608087015160a0880151935160009761037897909695910161078b565b604051602081830303815290604052805190602001209050919050565b806040516103a290610501565b6040518091039082f09050801580156103bf573d6000803e3d6000fd5b505050565b60608160000361040757505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115610431578061041b81610811565b915061042a9050600a83610878565b915061040b565b60008167ffffffffffffffff81111561044c5761044c6105ba565b6040519080825280601f01601f191660200182016040528015610476576020820181803683370190505b5090505b84156104f95761048b60018361088c565b9150610498600a866108a3565b6104a39060306108b7565b60f81b8183815181106104b8576104b86108cf565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506104f2600a86610878565b945061047a565b949350505050565b6008806108ff83390190565b60005b83811015610528578181015183820152602001610510565b83811115610537576000848401525b50505050565b6000815180845261055581602086016020860161050d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061059a602083018461053d565b9392505050565b6000602082840312156105b357600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806000606084860312156105fe57600080fd5b833573ffffffffffffffffffffffffffffffffffffffff8116811461062257600080fd5b925060208401359150604084013567ffffffffffffffff8082111561064657600080fd5b818601915086601f83011261065a57600080fd5b81358181111561066c5761066c6105ba565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156106b2576106b26105ba565b816040528281528960208487010111156106cb57600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b83815282602082015260606040820152600061070c606083018461053d565b95945050505050565b6000845161072781846020890161050d565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610763816001850160208a0161050d565b6001920191820152835161077e81600284016020880161050d565b0160020195945050505050565b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a08301526107d660c083018461053d565b98975050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610842576108426107e2565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261088757610887610849565b500490565b60008282101561089e5761089e6107e2565b500390565b6000826108b2576108b2610849565b500690565b600082198211156108ca576108ca6107e2565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfe608060405230fffea164736f6c634300080f000a",
} }
// L2ToL1MessagePasserABI is the input ABI used to generate the binding from. // L2ToL1MessagePasserABI is the input ABI used to generate the binding from.
...@@ -357,9 +357,9 @@ func (_L2ToL1MessagePasser *L2ToL1MessagePasserTransactorSession) Receive() (*ty ...@@ -357,9 +357,9 @@ func (_L2ToL1MessagePasser *L2ToL1MessagePasserTransactorSession) Receive() (*ty
return _L2ToL1MessagePasser.Contract.Receive(&_L2ToL1MessagePasser.TransactOpts) return _L2ToL1MessagePasser.Contract.Receive(&_L2ToL1MessagePasser.TransactOpts)
} }
// L2ToL1MessagePasserWithdrawalInitiatedIterator is returned from FilterWithdrawalInitiated and is used to iterate over the raw logs and unpacked data for WithdrawalInitiated events raised by the L2ToL1MessagePasser contract. // L2ToL1MessagePasserMessagePassedIterator is returned from FilterMessagePassed and is used to iterate over the raw logs and unpacked data for MessagePassed events raised by the L2ToL1MessagePasser contract.
type L2ToL1MessagePasserWithdrawalInitiatedIterator struct { type L2ToL1MessagePasserMessagePassedIterator struct {
Event *L2ToL1MessagePasserWithdrawalInitiated // Event containing the contract specifics and raw log Event *L2ToL1MessagePasserMessagePassed // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data event string // Event name to use for unpacking event data
...@@ -373,7 +373,7 @@ type L2ToL1MessagePasserWithdrawalInitiatedIterator struct { ...@@ -373,7 +373,7 @@ type L2ToL1MessagePasserWithdrawalInitiatedIterator struct {
// Next advances the iterator to the subsequent event, returning whether there // 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 // 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. // returned and Error() can be queried for the exact failure.
func (it *L2ToL1MessagePasserWithdrawalInitiatedIterator) Next() bool { func (it *L2ToL1MessagePasserMessagePassedIterator) Next() bool {
// If the iterator failed, stop iterating // If the iterator failed, stop iterating
if it.fail != nil { if it.fail != nil {
return false return false
...@@ -382,7 +382,7 @@ func (it *L2ToL1MessagePasserWithdrawalInitiatedIterator) Next() bool { ...@@ -382,7 +382,7 @@ func (it *L2ToL1MessagePasserWithdrawalInitiatedIterator) Next() bool {
if it.done { if it.done {
select { select {
case log := <-it.logs: case log := <-it.logs:
it.Event = new(L2ToL1MessagePasserWithdrawalInitiated) it.Event = new(L2ToL1MessagePasserMessagePassed)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err it.fail = err
return false return false
...@@ -397,7 +397,7 @@ func (it *L2ToL1MessagePasserWithdrawalInitiatedIterator) Next() bool { ...@@ -397,7 +397,7 @@ func (it *L2ToL1MessagePasserWithdrawalInitiatedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event // Iterator still in progress, wait for either a data or an error event
select { select {
case log := <-it.logs: case log := <-it.logs:
it.Event = new(L2ToL1MessagePasserWithdrawalInitiated) it.Event = new(L2ToL1MessagePasserMessagePassed)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err it.fail = err
return false return false
...@@ -413,19 +413,19 @@ func (it *L2ToL1MessagePasserWithdrawalInitiatedIterator) Next() bool { ...@@ -413,19 +413,19 @@ func (it *L2ToL1MessagePasserWithdrawalInitiatedIterator) Next() bool {
} }
// Error returns any retrieval or parsing error occurred during filtering. // Error returns any retrieval or parsing error occurred during filtering.
func (it *L2ToL1MessagePasserWithdrawalInitiatedIterator) Error() error { func (it *L2ToL1MessagePasserMessagePassedIterator) Error() error {
return it.fail return it.fail
} }
// Close terminates the iteration process, releasing any pending underlying // Close terminates the iteration process, releasing any pending underlying
// resources. // resources.
func (it *L2ToL1MessagePasserWithdrawalInitiatedIterator) Close() error { func (it *L2ToL1MessagePasserMessagePassedIterator) Close() error {
it.sub.Unsubscribe() it.sub.Unsubscribe()
return nil return nil
} }
// L2ToL1MessagePasserWithdrawalInitiated represents a WithdrawalInitiated event raised by the L2ToL1MessagePasser contract. // L2ToL1MessagePasserMessagePassed represents a MessagePassed event raised by the L2ToL1MessagePasser contract.
type L2ToL1MessagePasserWithdrawalInitiated struct { type L2ToL1MessagePasserMessagePassed struct {
Nonce *big.Int Nonce *big.Int
Sender common.Address Sender common.Address
Target common.Address Target common.Address
...@@ -435,10 +435,10 @@ type L2ToL1MessagePasserWithdrawalInitiated struct { ...@@ -435,10 +435,10 @@ type L2ToL1MessagePasserWithdrawalInitiated struct {
Raw types.Log // Blockchain specific contextual infos Raw types.Log // Blockchain specific contextual infos
} }
// FilterWithdrawalInitiated is a free log retrieval operation binding the contract event 0x87bf7b546c8de873abb0db5b579ec131f8d0cf5b14f39933551cf9ced23a6136. // FilterMessagePassed is a free log retrieval operation binding the contract event 0x7744840cae4793a72467311120512aa98e4398bcd2b9d379b2b9c3b60fa03d72.
// //
// Solidity: event WithdrawalInitiated(uint256 indexed nonce, address indexed sender, address indexed target, uint256 value, uint256 gasLimit, bytes data) // Solidity: event MessagePassed(uint256 indexed nonce, address indexed sender, address indexed target, uint256 value, uint256 gasLimit, bytes data)
func (_L2ToL1MessagePasser *L2ToL1MessagePasserFilterer) FilterWithdrawalInitiated(opts *bind.FilterOpts, nonce []*big.Int, sender []common.Address, target []common.Address) (*L2ToL1MessagePasserWithdrawalInitiatedIterator, error) { func (_L2ToL1MessagePasser *L2ToL1MessagePasserFilterer) FilterMessagePassed(opts *bind.FilterOpts, nonce []*big.Int, sender []common.Address, target []common.Address) (*L2ToL1MessagePasserMessagePassedIterator, error) {
var nonceRule []interface{} var nonceRule []interface{}
for _, nonceItem := range nonce { for _, nonceItem := range nonce {
...@@ -453,17 +453,17 @@ func (_L2ToL1MessagePasser *L2ToL1MessagePasserFilterer) FilterWithdrawalInitiat ...@@ -453,17 +453,17 @@ func (_L2ToL1MessagePasser *L2ToL1MessagePasserFilterer) FilterWithdrawalInitiat
targetRule = append(targetRule, targetItem) targetRule = append(targetRule, targetItem)
} }
logs, sub, err := _L2ToL1MessagePasser.contract.FilterLogs(opts, "WithdrawalInitiated", nonceRule, senderRule, targetRule) logs, sub, err := _L2ToL1MessagePasser.contract.FilterLogs(opts, "MessagePassed", nonceRule, senderRule, targetRule)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return &L2ToL1MessagePasserWithdrawalInitiatedIterator{contract: _L2ToL1MessagePasser.contract, event: "WithdrawalInitiated", logs: logs, sub: sub}, nil return &L2ToL1MessagePasserMessagePassedIterator{contract: _L2ToL1MessagePasser.contract, event: "MessagePassed", logs: logs, sub: sub}, nil
} }
// WatchWithdrawalInitiated is a free log subscription operation binding the contract event 0x87bf7b546c8de873abb0db5b579ec131f8d0cf5b14f39933551cf9ced23a6136. // WatchMessagePassed is a free log subscription operation binding the contract event 0x7744840cae4793a72467311120512aa98e4398bcd2b9d379b2b9c3b60fa03d72.
// //
// Solidity: event WithdrawalInitiated(uint256 indexed nonce, address indexed sender, address indexed target, uint256 value, uint256 gasLimit, bytes data) // Solidity: event MessagePassed(uint256 indexed nonce, address indexed sender, address indexed target, uint256 value, uint256 gasLimit, bytes data)
func (_L2ToL1MessagePasser *L2ToL1MessagePasserFilterer) WatchWithdrawalInitiated(opts *bind.WatchOpts, sink chan<- *L2ToL1MessagePasserWithdrawalInitiated, nonce []*big.Int, sender []common.Address, target []common.Address) (event.Subscription, error) { func (_L2ToL1MessagePasser *L2ToL1MessagePasserFilterer) WatchMessagePassed(opts *bind.WatchOpts, sink chan<- *L2ToL1MessagePasserMessagePassed, nonce []*big.Int, sender []common.Address, target []common.Address) (event.Subscription, error) {
var nonceRule []interface{} var nonceRule []interface{}
for _, nonceItem := range nonce { for _, nonceItem := range nonce {
...@@ -478,7 +478,7 @@ func (_L2ToL1MessagePasser *L2ToL1MessagePasserFilterer) WatchWithdrawalInitiate ...@@ -478,7 +478,7 @@ func (_L2ToL1MessagePasser *L2ToL1MessagePasserFilterer) WatchWithdrawalInitiate
targetRule = append(targetRule, targetItem) targetRule = append(targetRule, targetItem)
} }
logs, sub, err := _L2ToL1MessagePasser.contract.WatchLogs(opts, "WithdrawalInitiated", nonceRule, senderRule, targetRule) logs, sub, err := _L2ToL1MessagePasser.contract.WatchLogs(opts, "MessagePassed", nonceRule, senderRule, targetRule)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -488,8 +488,8 @@ func (_L2ToL1MessagePasser *L2ToL1MessagePasserFilterer) WatchWithdrawalInitiate ...@@ -488,8 +488,8 @@ func (_L2ToL1MessagePasser *L2ToL1MessagePasserFilterer) WatchWithdrawalInitiate
select { select {
case log := <-logs: case log := <-logs:
// New log arrived, parse the event and forward to the user // New log arrived, parse the event and forward to the user
event := new(L2ToL1MessagePasserWithdrawalInitiated) event := new(L2ToL1MessagePasserMessagePassed)
if err := _L2ToL1MessagePasser.contract.UnpackLog(event, "WithdrawalInitiated", log); err != nil { if err := _L2ToL1MessagePasser.contract.UnpackLog(event, "MessagePassed", log); err != nil {
return err return err
} }
event.Raw = log event.Raw = log
...@@ -510,21 +510,21 @@ func (_L2ToL1MessagePasser *L2ToL1MessagePasserFilterer) WatchWithdrawalInitiate ...@@ -510,21 +510,21 @@ func (_L2ToL1MessagePasser *L2ToL1MessagePasserFilterer) WatchWithdrawalInitiate
}), nil }), nil
} }
// ParseWithdrawalInitiated is a log parse operation binding the contract event 0x87bf7b546c8de873abb0db5b579ec131f8d0cf5b14f39933551cf9ced23a6136. // ParseMessagePassed is a log parse operation binding the contract event 0x7744840cae4793a72467311120512aa98e4398bcd2b9d379b2b9c3b60fa03d72.
// //
// Solidity: event WithdrawalInitiated(uint256 indexed nonce, address indexed sender, address indexed target, uint256 value, uint256 gasLimit, bytes data) // Solidity: event MessagePassed(uint256 indexed nonce, address indexed sender, address indexed target, uint256 value, uint256 gasLimit, bytes data)
func (_L2ToL1MessagePasser *L2ToL1MessagePasserFilterer) ParseWithdrawalInitiated(log types.Log) (*L2ToL1MessagePasserWithdrawalInitiated, error) { func (_L2ToL1MessagePasser *L2ToL1MessagePasserFilterer) ParseMessagePassed(log types.Log) (*L2ToL1MessagePasserMessagePassed, error) {
event := new(L2ToL1MessagePasserWithdrawalInitiated) event := new(L2ToL1MessagePasserMessagePassed)
if err := _L2ToL1MessagePasser.contract.UnpackLog(event, "WithdrawalInitiated", log); err != nil { if err := _L2ToL1MessagePasser.contract.UnpackLog(event, "MessagePassed", log); err != nil {
return nil, err return nil, err
} }
event.Raw = log event.Raw = log
return event, nil return event, nil
} }
// L2ToL1MessagePasserWithdrawalInitiatedExtension1Iterator is returned from FilterWithdrawalInitiatedExtension1 and is used to iterate over the raw logs and unpacked data for WithdrawalInitiatedExtension1 events raised by the L2ToL1MessagePasser contract. // L2ToL1MessagePasserMessagePassedExtension1Iterator is returned from FilterMessagePassedExtension1 and is used to iterate over the raw logs and unpacked data for MessagePassedExtension1 events raised by the L2ToL1MessagePasser contract.
type L2ToL1MessagePasserWithdrawalInitiatedExtension1Iterator struct { type L2ToL1MessagePasserMessagePassedExtension1Iterator struct {
Event *L2ToL1MessagePasserWithdrawalInitiatedExtension1 // Event containing the contract specifics and raw log Event *L2ToL1MessagePasserMessagePassedExtension1 // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data event string // Event name to use for unpacking event data
...@@ -538,7 +538,7 @@ type L2ToL1MessagePasserWithdrawalInitiatedExtension1Iterator struct { ...@@ -538,7 +538,7 @@ type L2ToL1MessagePasserWithdrawalInitiatedExtension1Iterator struct {
// Next advances the iterator to the subsequent event, returning whether there // 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 // 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. // returned and Error() can be queried for the exact failure.
func (it *L2ToL1MessagePasserWithdrawalInitiatedExtension1Iterator) Next() bool { func (it *L2ToL1MessagePasserMessagePassedExtension1Iterator) Next() bool {
// If the iterator failed, stop iterating // If the iterator failed, stop iterating
if it.fail != nil { if it.fail != nil {
return false return false
...@@ -547,7 +547,7 @@ func (it *L2ToL1MessagePasserWithdrawalInitiatedExtension1Iterator) Next() bool ...@@ -547,7 +547,7 @@ func (it *L2ToL1MessagePasserWithdrawalInitiatedExtension1Iterator) Next() bool
if it.done { if it.done {
select { select {
case log := <-it.logs: case log := <-it.logs:
it.Event = new(L2ToL1MessagePasserWithdrawalInitiatedExtension1) it.Event = new(L2ToL1MessagePasserMessagePassedExtension1)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err it.fail = err
return false return false
...@@ -562,7 +562,7 @@ func (it *L2ToL1MessagePasserWithdrawalInitiatedExtension1Iterator) Next() bool ...@@ -562,7 +562,7 @@ func (it *L2ToL1MessagePasserWithdrawalInitiatedExtension1Iterator) Next() bool
// Iterator still in progress, wait for either a data or an error event // Iterator still in progress, wait for either a data or an error event
select { select {
case log := <-it.logs: case log := <-it.logs:
it.Event = new(L2ToL1MessagePasserWithdrawalInitiatedExtension1) it.Event = new(L2ToL1MessagePasserMessagePassedExtension1)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err it.fail = err
return false return false
...@@ -578,51 +578,51 @@ func (it *L2ToL1MessagePasserWithdrawalInitiatedExtension1Iterator) Next() bool ...@@ -578,51 +578,51 @@ func (it *L2ToL1MessagePasserWithdrawalInitiatedExtension1Iterator) Next() bool
} }
// Error returns any retrieval or parsing error occurred during filtering. // Error returns any retrieval or parsing error occurred during filtering.
func (it *L2ToL1MessagePasserWithdrawalInitiatedExtension1Iterator) Error() error { func (it *L2ToL1MessagePasserMessagePassedExtension1Iterator) Error() error {
return it.fail return it.fail
} }
// Close terminates the iteration process, releasing any pending underlying // Close terminates the iteration process, releasing any pending underlying
// resources. // resources.
func (it *L2ToL1MessagePasserWithdrawalInitiatedExtension1Iterator) Close() error { func (it *L2ToL1MessagePasserMessagePassedExtension1Iterator) Close() error {
it.sub.Unsubscribe() it.sub.Unsubscribe()
return nil return nil
} }
// L2ToL1MessagePasserWithdrawalInitiatedExtension1 represents a WithdrawalInitiatedExtension1 event raised by the L2ToL1MessagePasser contract. // L2ToL1MessagePasserMessagePassedExtension1 represents a MessagePassedExtension1 event raised by the L2ToL1MessagePasser contract.
type L2ToL1MessagePasserWithdrawalInitiatedExtension1 struct { type L2ToL1MessagePasserMessagePassedExtension1 struct {
Hash [32]byte Hash [32]byte
Raw types.Log // Blockchain specific contextual infos Raw types.Log // Blockchain specific contextual infos
} }
// FilterWithdrawalInitiatedExtension1 is a free log retrieval operation binding the contract event 0x2ef6ceb1668fdd882b1f89ddd53a666b0c1113d14cf90c0fbf97c7b1ad880fbb. // FilterMessagePassedExtension1 is a free log retrieval operation binding the contract event 0xedd348f9c36ef1a5b0747bb5039752707059f0b934c8e508b3271e08fbd0122c.
// //
// Solidity: event WithdrawalInitiatedExtension1(bytes32 indexed hash) // Solidity: event MessagePassedExtension1(bytes32 indexed hash)
func (_L2ToL1MessagePasser *L2ToL1MessagePasserFilterer) FilterWithdrawalInitiatedExtension1(opts *bind.FilterOpts, hash [][32]byte) (*L2ToL1MessagePasserWithdrawalInitiatedExtension1Iterator, error) { func (_L2ToL1MessagePasser *L2ToL1MessagePasserFilterer) FilterMessagePassedExtension1(opts *bind.FilterOpts, hash [][32]byte) (*L2ToL1MessagePasserMessagePassedExtension1Iterator, error) {
var hashRule []interface{} var hashRule []interface{}
for _, hashItem := range hash { for _, hashItem := range hash {
hashRule = append(hashRule, hashItem) hashRule = append(hashRule, hashItem)
} }
logs, sub, err := _L2ToL1MessagePasser.contract.FilterLogs(opts, "WithdrawalInitiatedExtension1", hashRule) logs, sub, err := _L2ToL1MessagePasser.contract.FilterLogs(opts, "MessagePassedExtension1", hashRule)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return &L2ToL1MessagePasserWithdrawalInitiatedExtension1Iterator{contract: _L2ToL1MessagePasser.contract, event: "WithdrawalInitiatedExtension1", logs: logs, sub: sub}, nil return &L2ToL1MessagePasserMessagePassedExtension1Iterator{contract: _L2ToL1MessagePasser.contract, event: "MessagePassedExtension1", logs: logs, sub: sub}, nil
} }
// WatchWithdrawalInitiatedExtension1 is a free log subscription operation binding the contract event 0x2ef6ceb1668fdd882b1f89ddd53a666b0c1113d14cf90c0fbf97c7b1ad880fbb. // WatchMessagePassedExtension1 is a free log subscription operation binding the contract event 0xedd348f9c36ef1a5b0747bb5039752707059f0b934c8e508b3271e08fbd0122c.
// //
// Solidity: event WithdrawalInitiatedExtension1(bytes32 indexed hash) // Solidity: event MessagePassedExtension1(bytes32 indexed hash)
func (_L2ToL1MessagePasser *L2ToL1MessagePasserFilterer) WatchWithdrawalInitiatedExtension1(opts *bind.WatchOpts, sink chan<- *L2ToL1MessagePasserWithdrawalInitiatedExtension1, hash [][32]byte) (event.Subscription, error) { func (_L2ToL1MessagePasser *L2ToL1MessagePasserFilterer) WatchMessagePassedExtension1(opts *bind.WatchOpts, sink chan<- *L2ToL1MessagePasserMessagePassedExtension1, hash [][32]byte) (event.Subscription, error) {
var hashRule []interface{} var hashRule []interface{}
for _, hashItem := range hash { for _, hashItem := range hash {
hashRule = append(hashRule, hashItem) hashRule = append(hashRule, hashItem)
} }
logs, sub, err := _L2ToL1MessagePasser.contract.WatchLogs(opts, "WithdrawalInitiatedExtension1", hashRule) logs, sub, err := _L2ToL1MessagePasser.contract.WatchLogs(opts, "MessagePassedExtension1", hashRule)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -632,8 +632,8 @@ func (_L2ToL1MessagePasser *L2ToL1MessagePasserFilterer) WatchWithdrawalInitiate ...@@ -632,8 +632,8 @@ func (_L2ToL1MessagePasser *L2ToL1MessagePasserFilterer) WatchWithdrawalInitiate
select { select {
case log := <-logs: case log := <-logs:
// New log arrived, parse the event and forward to the user // New log arrived, parse the event and forward to the user
event := new(L2ToL1MessagePasserWithdrawalInitiatedExtension1) event := new(L2ToL1MessagePasserMessagePassedExtension1)
if err := _L2ToL1MessagePasser.contract.UnpackLog(event, "WithdrawalInitiatedExtension1", log); err != nil { if err := _L2ToL1MessagePasser.contract.UnpackLog(event, "MessagePassedExtension1", log); err != nil {
return err return err
} }
event.Raw = log event.Raw = log
...@@ -654,12 +654,12 @@ func (_L2ToL1MessagePasser *L2ToL1MessagePasserFilterer) WatchWithdrawalInitiate ...@@ -654,12 +654,12 @@ func (_L2ToL1MessagePasser *L2ToL1MessagePasserFilterer) WatchWithdrawalInitiate
}), nil }), nil
} }
// ParseWithdrawalInitiatedExtension1 is a log parse operation binding the contract event 0x2ef6ceb1668fdd882b1f89ddd53a666b0c1113d14cf90c0fbf97c7b1ad880fbb. // ParseMessagePassedExtension1 is a log parse operation binding the contract event 0xedd348f9c36ef1a5b0747bb5039752707059f0b934c8e508b3271e08fbd0122c.
// //
// Solidity: event WithdrawalInitiatedExtension1(bytes32 indexed hash) // Solidity: event MessagePassedExtension1(bytes32 indexed hash)
func (_L2ToL1MessagePasser *L2ToL1MessagePasserFilterer) ParseWithdrawalInitiatedExtension1(log types.Log) (*L2ToL1MessagePasserWithdrawalInitiatedExtension1, error) { func (_L2ToL1MessagePasser *L2ToL1MessagePasserFilterer) ParseMessagePassedExtension1(log types.Log) (*L2ToL1MessagePasserMessagePassedExtension1, error) {
event := new(L2ToL1MessagePasserWithdrawalInitiatedExtension1) event := new(L2ToL1MessagePasserMessagePassedExtension1)
if err := _L2ToL1MessagePasser.contract.UnpackLog(event, "WithdrawalInitiatedExtension1", log); err != nil { if err := _L2ToL1MessagePasser.contract.UnpackLog(event, "MessagePassedExtension1", log); err != nil {
return nil, err return nil, err
} }
event.Raw = log event.Raw = log
......
...@@ -13,7 +13,7 @@ const L2ToL1MessagePasserStorageLayoutJSON = "{\"storage\":[{\"astId\":2546,\"co ...@@ -13,7 +13,7 @@ const L2ToL1MessagePasserStorageLayoutJSON = "{\"storage\":[{\"astId\":2546,\"co
var L2ToL1MessagePasserStorageLayout = new(solc.StorageLayout) var L2ToL1MessagePasserStorageLayout = new(solc.StorageLayout)
var L2ToL1MessagePasserDeployedBin = "0x60806040526004361061005e5760003560e01c806382e3702d1161004357806382e3702d146100c7578063affed0e014610107578063c2b3e5ac1461012b57600080fd5b806344df8e701461008757806354fd4d501461009c57600080fd5b366100825761008033620186a060405180602001604052806000815250610139565b005b600080fd5b34801561009357600080fd5b5061008061026d565b3480156100a857600080fd5b506100b16102a5565b6040516100be9190610587565b60405180910390f35b3480156100d357600080fd5b506100f76100e23660046105a1565b60006020819052908152604090205460ff1681565b60405190151581526020016100be565b34801561011357600080fd5b5061011d60015481565b6040519081526020016100be565b6100806101393660046105e9565b600061019e6040518060c0016040528060015481526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff16815260200134815260200185815260200184815250610348565b6000818152602081905260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915554905191925073ffffffffffffffffffffffffffffffffffffffff8616913391907f87bf7b546c8de873abb0db5b579ec131f8d0cf5b14f39933551cf9ced23a61369061022c903490899089906106ed565b60405180910390a460405181907f2ef6ceb1668fdd882b1f89ddd53a666b0c1113d14cf90c0fbf97c7b1ad880fbb90600090a2505060018054810190555050565b4761027781610395565b60405181907f7967de617a5ac1cc7eba2d6f37570a0135afa950d8bb77cdd35f0d0b4e85a16f90600090a250565b60606102d07f00000000000000000000000000000000000000000000000000000000000000006103c4565b6102f97f00000000000000000000000000000000000000000000000000000000000000006103c4565b6103227f00000000000000000000000000000000000000000000000000000000000000006103c4565b60405160200161033493929190610715565b604051602081830303815290604052905090565b80516020808301516040808501516060860151608087015160a0880151935160009761037897909695910161078b565b604051602081830303815290604052805190602001209050919050565b806040516103a290610501565b6040518091039082f09050801580156103bf573d6000803e3d6000fd5b505050565b60608160000361040757505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115610431578061041b81610811565b915061042a9050600a83610878565b915061040b565b60008167ffffffffffffffff81111561044c5761044c6105ba565b6040519080825280601f01601f191660200182016040528015610476576020820181803683370190505b5090505b84156104f95761048b60018361088c565b9150610498600a866108a3565b6104a39060306108b7565b60f81b8183815181106104b8576104b86108cf565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506104f2600a86610878565b945061047a565b949350505050565b6008806108ff83390190565b60005b83811015610528578181015183820152602001610510565b83811115610537576000848401525b50505050565b6000815180845261055581602086016020860161050d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061059a602083018461053d565b9392505050565b6000602082840312156105b357600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806000606084860312156105fe57600080fd5b833573ffffffffffffffffffffffffffffffffffffffff8116811461062257600080fd5b925060208401359150604084013567ffffffffffffffff8082111561064657600080fd5b818601915086601f83011261065a57600080fd5b81358181111561066c5761066c6105ba565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156106b2576106b26105ba565b816040528281528960208487010111156106cb57600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b83815282602082015260606040820152600061070c606083018461053d565b95945050505050565b6000845161072781846020890161050d565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610763816001850160208a0161050d565b6001920191820152835161077e81600284016020880161050d565b0160020195945050505050565b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a08301526107d660c083018461053d565b98975050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610842576108426107e2565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261088757610887610849565b500490565b60008282101561089e5761089e6107e2565b500390565b6000826108b2576108b2610849565b500690565b600082198211156108ca576108ca6107e2565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfe608060405230fffea164736f6c634300080f000a" var L2ToL1MessagePasserDeployedBin = "0x60806040526004361061005e5760003560e01c806382e3702d1161004357806382e3702d146100c7578063affed0e014610107578063c2b3e5ac1461012b57600080fd5b806344df8e701461008757806354fd4d501461009c57600080fd5b366100825761008033620186a060405180602001604052806000815250610139565b005b600080fd5b34801561009357600080fd5b5061008061026d565b3480156100a857600080fd5b506100b16102a5565b6040516100be9190610587565b60405180910390f35b3480156100d357600080fd5b506100f76100e23660046105a1565b60006020819052908152604090205460ff1681565b60405190151581526020016100be565b34801561011357600080fd5b5061011d60015481565b6040519081526020016100be565b6100806101393660046105e9565b600061019e6040518060c0016040528060015481526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff16815260200134815260200185815260200184815250610348565b6000818152602081905260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915554905191925073ffffffffffffffffffffffffffffffffffffffff8616913391907f7744840cae4793a72467311120512aa98e4398bcd2b9d379b2b9c3b60fa03d729061022c903490899089906106ed565b60405180910390a460405181907fedd348f9c36ef1a5b0747bb5039752707059f0b934c8e508b3271e08fbd0122c90600090a2505060018054810190555050565b4761027781610395565b60405181907f7967de617a5ac1cc7eba2d6f37570a0135afa950d8bb77cdd35f0d0b4e85a16f90600090a250565b60606102d07f00000000000000000000000000000000000000000000000000000000000000006103c4565b6102f97f00000000000000000000000000000000000000000000000000000000000000006103c4565b6103227f00000000000000000000000000000000000000000000000000000000000000006103c4565b60405160200161033493929190610715565b604051602081830303815290604052905090565b80516020808301516040808501516060860151608087015160a0880151935160009761037897909695910161078b565b604051602081830303815290604052805190602001209050919050565b806040516103a290610501565b6040518091039082f09050801580156103bf573d6000803e3d6000fd5b505050565b60608160000361040757505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115610431578061041b81610811565b915061042a9050600a83610878565b915061040b565b60008167ffffffffffffffff81111561044c5761044c6105ba565b6040519080825280601f01601f191660200182016040528015610476576020820181803683370190505b5090505b84156104f95761048b60018361088c565b9150610498600a866108a3565b6104a39060306108b7565b60f81b8183815181106104b8576104b86108cf565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506104f2600a86610878565b945061047a565b949350505050565b6008806108ff83390190565b60005b83811015610528578181015183820152602001610510565b83811115610537576000848401525b50505050565b6000815180845261055581602086016020860161050d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061059a602083018461053d565b9392505050565b6000602082840312156105b357600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806000606084860312156105fe57600080fd5b833573ffffffffffffffffffffffffffffffffffffffff8116811461062257600080fd5b925060208401359150604084013567ffffffffffffffff8082111561064657600080fd5b818601915086601f83011261065a57600080fd5b81358181111561066c5761066c6105ba565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156106b2576106b26105ba565b816040528281528960208487010111156106cb57600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b83815282602082015260606040820152600061070c606083018461053d565b95945050505050565b6000845161072781846020890161050d565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610763816001850160208a0161050d565b6001920191820152835161077e81600284016020880161050d565b0160020195945050505050565b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a08301526107d660c083018461053d565b98975050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610842576108426107e2565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261088757610887610849565b500490565b60008282101561089e5761089e6107e2565b500390565b6000826108b2576108b2610849565b500690565b600082198211156108ca576108ca6107e2565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfe608060405230fffea164736f6c634300080f000a"
func init() { func init() {
if err := json.Unmarshal([]byte(L2ToL1MessagePasserStorageLayoutJSON), L2ToL1MessagePasserStorageLayout); err != nil { if err := json.Unmarshal([]byte(L2ToL1MessagePasserStorageLayoutJSON), L2ToL1MessagePasserStorageLayout); err != nil {
......
...@@ -9,7 +9,7 @@ import ( ...@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc" "github.com/ethereum-optimism/optimism/op-bindings/solc"
) )
const LegacyERC20ETHStorageLayoutJSON = "{\"storage\":[{\"astId\":28005,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_balances\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":28011,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_allowances\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"},{\"astId\":28013,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_totalSupply\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":28015,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_name\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_string_storage\"},{\"astId\":28017,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_symbol\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_string_storage\"},{\"astId\":25269,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"remoteToken\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_address\"},{\"astId\":25272,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"bridge\",\"offset\":0,\"slot\":\"6\",\"type\":\"t_address\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_mapping(t_address,t_mapping(t_address,t_uint256))\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e mapping(address =\u003e uint256))\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_mapping(t_address,t_uint256)\"},\"t_mapping(t_address,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_uint256\"},\"t_string_storage\":{\"encoding\":\"bytes\",\"label\":\"string\",\"numberOfBytes\":\"32\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"}}}" const LegacyERC20ETHStorageLayoutJSON = "{\"storage\":[{\"astId\":28179,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_balances\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":28185,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_allowances\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"},{\"astId\":28187,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_totalSupply\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":28189,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_name\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_string_storage\"},{\"astId\":28191,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_symbol\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_string_storage\"},{\"astId\":25292,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"remoteToken\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_address\"},{\"astId\":25295,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"bridge\",\"offset\":0,\"slot\":\"6\",\"type\":\"t_address\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_mapping(t_address,t_mapping(t_address,t_uint256))\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e mapping(address =\u003e uint256))\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_mapping(t_address,t_uint256)\"},\"t_mapping(t_address,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_uint256\"},\"t_string_storage\":{\"encoding\":\"bytes\",\"label\":\"string\",\"numberOfBytes\":\"32\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"}}}"
var LegacyERC20ETHStorageLayout = new(solc.StorageLayout) var LegacyERC20ETHStorageLayout = new(solc.StorageLayout)
......
...@@ -49,7 +49,7 @@ type TypesWithdrawalTransaction struct { ...@@ -49,7 +49,7 @@ type TypesWithdrawalTransaction struct {
// OptimismPortalMetaData contains all meta data concerning the OptimismPortal contract. // OptimismPortalMetaData contains all meta data concerning the OptimismPortal contract.
var OptimismPortalMetaData = &bind.MetaData{ var OptimismPortalMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[{\"internalType\":\"contractL2OutputOracle\",\"name\":\"_l2Oracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_finalizationPeriodSeconds\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"opaqueData\",\"type\":\"bytes\"}],\"name\":\"TransactionDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"withdrawalHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"name\":\"WithdrawalFinalized\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BASE_FEE_MAX_CHANGE_DENOMINATOR\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ELASTICITY_MULTIPLIER\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"FINALIZATION_PERIOD_SECONDS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"INITIAL_BASE_FEE\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"L2_ORACLE\",\"outputs\":[{\"internalType\":\"contractL2OutputOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_RESOURCE_LIMIT\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINIMUM_BASE_FEE\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TARGET_RESOURCE_LIMIT\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"_gasLimit\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"_isCreation\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"depositTransaction\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structTypes.WithdrawalTransaction\",\"name\":\"_tx\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"_l2BlockNumber\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"version\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"messagePasserStorageRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"latestBlockhash\",\"type\":\"bytes32\"}],\"internalType\":\"structTypes.OutputRootProof\",\"name\":\"_outputRootProof\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"_withdrawalProof\",\"type\":\"bytes\"}],\"name\":\"finalizeWithdrawalTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"finalizedWithdrawals\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_l2BlockNumber\",\"type\":\"uint256\"}],\"name\":\"isBlockFinalized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2Sender\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"params\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"prevBaseFee\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"prevBoughtGas\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"prevBlockNum\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", ABI: "[{\"inputs\":[{\"internalType\":\"contractL2OutputOracle\",\"name\":\"_l2Oracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_finalizationPeriodSeconds\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"opaqueData\",\"type\":\"bytes\"}],\"name\":\"TransactionDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"withdrawalHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"name\":\"WithdrawalFinalized\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BASE_FEE_MAX_CHANGE_DENOMINATOR\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ELASTICITY_MULTIPLIER\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"FINALIZATION_PERIOD_SECONDS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"INITIAL_BASE_FEE\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"L2_ORACLE\",\"outputs\":[{\"internalType\":\"contractL2OutputOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_RESOURCE_LIMIT\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINIMUM_BASE_FEE\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TARGET_RESOURCE_LIMIT\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"_gasLimit\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"_isCreation\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"depositTransaction\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structTypes.WithdrawalTransaction\",\"name\":\"_tx\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"_l2BlockNumber\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"version\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"messagePasserStorageRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"latestBlockhash\",\"type\":\"bytes32\"}],\"internalType\":\"structTypes.OutputRootProof\",\"name\":\"_outputRootProof\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"_withdrawalProof\",\"type\":\"bytes\"}],\"name\":\"finalizeWithdrawalTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"finalizedWithdrawals\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_l2BlockNumber\",\"type\":\"uint256\"}],\"name\":\"isBlockFinalized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2Sender\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"params\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"prevBaseFee\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"prevBoughtGas\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"prevBlockNum\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]",
Bin: "0x6101206040523480156200001257600080fd5b5060405162003fab38038062003fab833981016040819052620000359162000261565b6000608081905260a052600160c0526001600160a01b0382166101005260e08190526200006162000069565b50506200029d565b600054610100900460ff16158080156200008a5750600054600160ff909116105b80620000ba5750620000a730620001af60201b620012881760201c565b158015620000ba575060005460ff166001145b620001235760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801562000147576000805461ff0019166101001790555b603380546001600160a01b03191661dead17905562000165620001be565b8015620001ac576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6001600160a01b03163b151590565b600054610100900460ff166200022b5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016200011a565b60408051606081018252633b9aca0080825260006020830152436001600160401b031691909201819052600160c01b0217600155565b600080604083850312156200027557600080fd5b82516001600160a01b03811681146200028d57600080fd5b6020939093015192949293505050565b60805160a05160c05160e05161010051613cb4620002f76000396000818161013401528181610b760152610d9d0152600081816103bd015261156101526000610925015260006108fc015260006108d30152613cb46000f3fe6080604052600436106100f65760003560e01c8063a14238e71161008a578063cff0ab9611610059578063cff0ab96146102f7578063e9e05c4214610398578063f4daa291146103ab578063fdc9fe1d146103df57600080fd5b8063a14238e71461026d578063c4fc4798146102ad578063ca3e99ba146102cd578063cd7c9789146102e257600080fd5b80636bb0291e116100c65780636bb0291e146102005780638129fc1c14610215578063867ead131461022a5780639bf62d821461024057600080fd5b80621c2ff61461012257806313620abd1461018057806354fd4d50146101b957806364b79208146101db57600080fd5b3661011d5761011b3334620186a06000604051806020016040528060008152506103ff565b005b600080fd5b34801561012e57600080fd5b506101567f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561018c57600080fd5b50610198633b9aca0081565b6040516fffffffffffffffffffffffffffffffff9091168152602001610177565b3480156101c557600080fd5b506101ce6108cc565b6040516101779190613307565b3480156101e757600080fd5b506101f2627a120081565b604051908152602001610177565b34801561020c57600080fd5b506101f2600481565b34801561022157600080fd5b5061011b61096f565b34801561023657600080fd5b506101f261271081565b34801561024c57600080fd5b506033546101569073ffffffffffffffffffffffffffffffffffffffff1681565b34801561027957600080fd5b5061029d61028836600461331a565b60346020526000908152604090205460ff1681565b6040519015158152602001610177565b3480156102b957600080fd5b5061029d6102c836600461331a565b610b2d565b3480156102d957600080fd5b506101f2610bf2565b3480156102ee57600080fd5b506101f2600881565b34801561030357600080fd5b5060015461035f906fffffffffffffffffffffffffffffffff81169067ffffffffffffffff7001000000000000000000000000000000008204811691780100000000000000000000000000000000000000000000000090041683565b604080516fffffffffffffffffffffffffffffffff909416845267ffffffffffffffff9283166020850152911690820152606001610177565b61011b6103a636600461345f565b6103ff565b3480156103b757600080fd5b506101f27f000000000000000000000000000000000000000000000000000000000000000081565b3480156103eb57600080fd5b5061011b6103fa36600461354d565b610c03565b8260005a905083156104b65773ffffffffffffffffffffffffffffffffffffffff8716156104b657604080517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482015260248101919091527f4f7074696d69736d506f7274616c3a206d7573742073656e6420746f2061646460448201527f72657373283029207768656e206372656174696e67206120636f6e747261637460648201526084015b60405180910390fd5b333281146104d7575033731111000000000000000000000000000000001111015b600034888888886040516020016104f2959493929190613641565b604051602081830303815290604052905060008973ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fb3813568d9991fc951961fcb4c784893574240a28925604d09fc577c55bb7c32846040516105629190613307565b60405180910390a450506001546000906105a2907801000000000000000000000000000000000000000000000000900467ffffffffffffffff16436136d5565b9050801561072b5760006105ba6004627a120061371b565b6001546105e59190700100000000000000000000000000000000900467ffffffffffffffff16613783565b9050600060086105f96004627a120061371b565b6001546106199085906fffffffffffffffffffffffffffffffff166137f7565b610623919061371b565b61062d919061371b565b600154909150600090610679906106639061065b9085906fffffffffffffffffffffffffffffffff166138b3565b6127106112a4565b6fffffffffffffffffffffffffffffffff6112bf565b905060018411156106ec576106e9610663670de0b6b3a76400006106d56106a160088361371b565b6106b390670de0b6b3a7640000613783565b6106be60018a6136d5565b6106d090670de0b6b3a7640000613927565b6112ce565b6106df90856137f7565b61065b919061371b565b90505b6fffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff4316021760015550505b6001805484919060109061075e908490700100000000000000000000000000000000900467ffffffffffffffff16613964565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550627a1200600160000160109054906101000a900467ffffffffffffffff1667ffffffffffffffff16131561083a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f5265736f757263654d65746572696e673a2063616e6e6f7420627579206d6f7260448201527f6520676173207468616e20617661696c61626c6520676173206c696d6974000060648201526084016104ad565b600154600090610866906fffffffffffffffffffffffffffffffff1667ffffffffffffffff8616613990565b6fffffffffffffffffffffffffffffffff169050600061088a48633b9aca006112ff565b61089490836139c8565b905060005a6108a390866136d5565b9050808211156108bf576108bf6108ba82846136d5565b61130f565b5050505050505050505050565b60606108f77f000000000000000000000000000000000000000000000000000000000000000061133d565b6109207f000000000000000000000000000000000000000000000000000000000000000061133d565b6109497f000000000000000000000000000000000000000000000000000000000000000061133d565b60405160200161095b939291906139dc565b604051602081830303815290604052905090565b600054610100900460ff161580801561098f5750600054600160ff909116105b806109a95750303b1580156109a9575060005460ff166001145b610a35576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016104ad565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610a9357600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b603380547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055610ac761147a565b8015610b2a57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6040517fa25ae55700000000000000000000000000000000000000000000000000000000815260048101829052600090819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063a25ae557906024016040805180830381865afa158015610bbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be09190613a52565b9050610beb8161155d565b9392505050565b610c006004627a120061371b565b81565b60335473ffffffffffffffffffffffffffffffffffffffff1661dead14610cac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d506f7274616c3a2063616e206f6e6c79207472696767657260448201527f206f6e65207769746864726177616c20706572207472616e73616374696f6e0060648201526084016104ad565b3073ffffffffffffffffffffffffffffffffffffffff16856040015173ffffffffffffffffffffffffffffffffffffffff1603610d6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d506f7274616c3a20796f752063616e6e6f742073656e642060448201527f6d6573736167657320746f2074686520706f7274616c20636f6e74726163740060648201526084016104ad565b6040517fa25ae557000000000000000000000000000000000000000000000000000000008152600481018590526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a25ae557906024016040805180830381865afa158015610df8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1c9190613a52565b9050610e278161155d565b610eb3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4f7074696d69736d506f7274616c3a2070726f706f73616c206973206e6f742060448201527f7965742066696e616c697a65640000000000000000000000000000000000000060648201526084016104ad565b610eca610ec536869003860186613aa1565b611597565b815114610f59576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f7074696d69736d506f7274616c3a20696e76616c6964206f7574707574207260448201527f6f6f742070726f6f66000000000000000000000000000000000000000000000060648201526084016104ad565b6000610f64876115f3565b9050610fab81866040013586868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061162392505050565b611037576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4f7074696d69736d506f7274616c3a20696e76616c696420776974686472617760448201527f616c20696e636c7573696f6e2070726f6f66000000000000000000000000000060648201526084016104ad565b60008181526034602052604090205460ff16156110d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f4f7074696d69736d506f7274616c3a207769746864726177616c20686173206160448201527f6c7265616479206265656e2066696e616c697a6564000000000000000000000060648201526084016104ad565b600081815260346020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055608087015161111f90614e2090613b07565b5a10156111ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4f7074696d69736d506f7274616c3a20696e73756666696369656e742067617360448201527f20746f2066696e616c697a65207769746864726177616c00000000000000000060648201526084016104ad565b8660200151603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000611211886040015189608001518a606001518b60a001516116ea565b603380547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead17905560405190915082907fdb5c7652857aa163daadd670e116628fb42e869d8ac4251ef8971d9e5727df1b9061127690841515815260200190565b60405180910390a25050505050505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6000818312156112b457816112b6565b825b90505b92915050565b60008183126112b457816112b6565b60006112b6670de0b6b3a7640000836112e686611704565b6112f091906137f7565b6112fa919061371b565b611948565b6000818310156112b457816112b6565b6000805a90505b825a61132290836136d5565b10156113385761133182613b1f565b9150611316565b505050565b60608160000361138057505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156113aa578061139481613b1f565b91506113a39050600a836139c8565b9150611384565b60008167ffffffffffffffff8111156113c5576113c561335c565b6040519080825280601f01601f1916602001820160405280156113ef576020820181803683370190505b5090505b8415611472576114046001836136d5565b9150611411600a86613b57565b61141c906030613b07565b60f81b81838151811061143157611431613b6b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061146b600a866139c8565b94506113f3565b949350505050565b600054610100900460ff16611511576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016104ad565b60408051606081018252633b9aca00808252600060208301524367ffffffffffffffff169190920181905278010000000000000000000000000000000000000000000000000217600155565b60007f0000000000000000000000000000000000000000000000000000000000000000826020015161158f9190613b07565b421192915050565b600081600001518260200151836040015184606001516040516020016115d6949392919093845260208401929092526040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b80516020808301516040808501516060860151608087015160a088015193516000976115d6979096959101613b9a565b604080516020810185905260009181018290528190606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828252805160209182012090830181905292506116e19101604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828201909152600182527f01000000000000000000000000000000000000000000000000000000000000006020830152908587611b87565b95945050505050565b600080600080845160208601878a8af19695505050505050565b600080821361176f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f554e444546494e4544000000000000000000000000000000000000000000000060448201526064016104ad565b6000606061177c84611bab565b03609f8181039490941b90931c6c465772b2bbbb5f824b15207a3081018102606090811d6d0388eaa27412d5aca026815d636e018202811d6d0df99ac502031bf953eff472fdcc018202811d6d13cdffb29d51d99322bdff5f2211018202811d6d0a0f742023def783a307a986912e018202811d6d01920d8043ca89b5239253284e42018202811d6c0b7a86d7375468fac667a0a527016c29508e458543d8aa4df2abee7883018302821d6d0139601a2efabe717e604cbb4894018302821d6d02247f7a7b6594320649aa03aba1018302821d7fffffffffffffffffffffffffffffffffffffff73c0c716a594e00d54e3c4cbc9018302821d7ffffffffffffffffffffffffffffffffffffffdc7b88c420e53a9890533129f6f01830290911d7fffffffffffffffffffffffffffffffffffffff465fda27eb4d63ded474e5f832019091027ffffffffffffffff5f6af8f7b3396644f18e157960000000000000000000000000105711340daa0d5f769dba1915cef59f0815a5506027d0267a36c0c95b3975ab3ee5b203a7614a3f75373f047d803ae7b6687f2b393909302929092017d57115e47018c7177eebf7cd370a3356a1b7863008a5ae8028c72b88642840160ae1d92915050565b60007ffffffffffffffffffffffffffffffffffffffffffffffffdb731c958f34d94c1821361197957506000919050565b680755bf798b4a1bf1e582126119eb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4558505f4f564552464c4f57000000000000000000000000000000000000000060448201526064016104ad565b6503782dace9d9604e83901b059150600060606bb17217f7d1cf79abc9e3b39884821b056b80000000000000000000000001901d6bb17217f7d1cf79abc9e3b39881029093037fffffffffffffffffffffffffffffffffffffffdbf3ccf1604d263450f02a550481018102606090811d6d0277594991cfc85f6e2461837cd9018202811d7fffffffffffffffffffffffffffffffffffffe5adedaa1cb095af9e4da10e363c018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d7ffffffffffffffffffffffffffffffffffffd38dc772608b0ae56cce01296c0eb018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084017ffffffffffffffffffffffffffffffffffffffe2c69812cf03b0763fd454a8f7e010290911d6e0587f503bb6ea29d25fcb7401964500190910279d835ebba824c98fb31b83b2ca45c000000000000000000000000010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b600080611b9386611c81565b9050611ba181868686611cb3565b9695505050505050565b6000808211611c16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f554e444546494e4544000000000000000000000000000000000000000000000060448201526064016104ad565b5060016fffffffffffffffffffffffffffffffff821160071b82811c67ffffffffffffffff1060061b1782811c63ffffffff1060051b1782811c61ffff1060041b1782811c60ff10600390811b90911783811c600f1060021b1783811c909110821b1791821c111790565b60608180519060200120604051602001611c9d91815260200190565b6040516020818303038152906040529050919050565b6000806000611cc3878686611cf0565b91509150818015611ce557508051602080830191909120875191880191909120145b979650505050505050565b600060606000611cff85611e0b565b90506000806000611d11848a89611f06565b81519295509093509150158080611d255750815b611db1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4d65726b6c65547269653a2070726f76696465642070726f6f6620697320696e60448201527f76616c696400000000000000000000000000000000000000000000000000000060648201526084016104ad565b600081611dcd5760405180602001604052806000815250611df9565b611df986611ddc6001886136d5565b81518110611dec57611dec613b6b565b602002602001015161248f565b919b919a509098505050505050505050565b60606000611e18836124b9565b90506000815167ffffffffffffffff811115611e3657611e3661335c565b604051908082528060200260200182016040528015611e7b57816020015b6040805180820190915260608082526020820152815260200190600190039081611e545790505b50905060005b8251811015611efe576000611eae848381518110611ea157611ea1613b6b565b60200260200101516124ec565b90506040518060400160405280828152602001611eca836124b9565b815250838381518110611edf57611edf613b6b565b6020026020010181905250508080611ef690613b1f565b915050611e81565b509392505050565b60006060818080611f16876125b3565b90506000869050600080611f3d604051806040016040528060608152602001606081525090565b60005b8c5181101561244b578c8181518110611f5b57611f5b613b6b565b602002602001015191508284611f719190613b07565b9350611f7e600188613b07565b965083600003611fff57815180516020909101208514611ffa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4d65726b6c65547269653a20696e76616c696420726f6f74206861736800000060448201526064016104ad565b61213b565b8151516020116120a157815180516020909101208514611ffa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4d65726b6c65547269653a20696e76616c6964206c6172676520696e7465726e60448201527f616c20686173680000000000000000000000000000000000000000000000000060648201526084016104ad565b815185906120ae90613bf1565b1461213b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4d65726b6c65547269653a20696e76616c696420696e7465726e616c206e6f6460448201527f652068617368000000000000000000000000000000000000000000000000000060648201526084016104ad565b61214760106001613b07565b826020015151036121b9578551841461244b57600086858151811061216e5761216e613b6b565b602001015160f81c60f81b60f81c9050600083602001518260ff168151811061219957612199613b6b565b602002602001015190506121ac81612736565b9650600194505050612439565b6002826020015151036123b15760006121d18361276c565b90506000816000815181106121e8576121e8613b6b565b016020015160f81c905060006121ff600283613c33565b61220a906002613c55565b9050600061221b848360ff16612790565b905060006122298b8a612790565b9050600061223783836127c6565b905060ff85166002148061224e575060ff85166003145b156122a4578083511480156122635750808251145b1561227557612272818b613b07565b99505b507f8000000000000000000000000000000000000000000000000000000000000000995061244b945050505050565b60ff851615806122b7575060ff85166001145b1561232957825181146122f357507f8000000000000000000000000000000000000000000000000000000000000000995061244b945050505050565b61231a886020015160018151811061230d5761230d613b6b565b6020026020010151612736565b9a509750612439945050505050565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4d65726b6c65547269653a2072656365697665642061206e6f6465207769746860448201527f20616e20756e6b6e6f776e20707265666978000000000000000000000000000060648201526084016104ad565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f4d65726b6c65547269653a20726563656976656420616e20756e70617273656160448201527f626c65206e6f646500000000000000000000000000000000000000000000000060648201526084016104ad565b8061244381613b1f565b915050611f40565b507f800000000000000000000000000000000000000000000000000000000000000084148661247a8786612790565b909e909d50909b509950505050505050505050565b602081015180516060916112b9916124a9906001906136d5565b81518110611ea157611ea1613b6b565b6040805180820182526000808252602091820152815180830190925282518252808301908201526060906112b990612872565b606060008060006124fc85612acb565b91945092509050600081600181111561251757612517613c78565b146125a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f524c505265616465723a20696e76616c696420524c502062797465732076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016104ad565b6116e185602001518484612fb6565b60606000825160026125c59190613927565b67ffffffffffffffff8111156125dd576125dd61335c565b6040519080825280601f01601f191660200182016040528015612607576020820181803683370190505b50905060005b835181101561272f57600484828151811061262a5761262a613b6b565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016901c8261265f836002613927565b8151811061266f5761266f613b6b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060108482815181106126b2576126b2613b6b565b01602001516126c4919060f81c613c33565b60f81b826126d3836002613927565b6126de906001613b07565b815181106126ee576126ee613b6b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508061272781613b1f565b91505061260d565b5092915050565b600060606020836000015110156127575761275083613094565b9050612763565b612760836124ec565b90505b610beb81613bf1565b60606112b961278b8360200151600081518110611ea157611ea1613b6b565b6125b3565b6060825182106127af57506040805160208101909152600081526112b9565b6112b683838486516127c191906136d5565b61309f565b6000805b8084511180156127da5750808351115b801561285b57508281815181106127f3576127f3613b6b565b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191684828151811061283257612832613b6b565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016145b156112b6578061286a81613b1f565b9150506127ca565b606060008061288084612acb565b9193509091506001905081600181111561289c5761289c613c78565b14612929576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f524c505265616465723a20696e76616c696420524c50206c6973742076616c7560448201527f650000000000000000000000000000000000000000000000000000000000000060648201526084016104ad565b6040805160208082526104208201909252600091816020015b60408051808201909152600080825260208201528152602001906001900390816129425790505090506000835b8651811015612ac05760208210612a08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f524c505265616465723a2070726f766964656420524c50206c6973742065786360448201527f65656473206d6178206c697374206c656e67746800000000000000000000000060648201526084016104ad565b600080612a456040518060400160405280858c60000151612a2991906136d5565b8152602001858c60200151612a3e9190613b07565b9052612acb565b509150915060405180604001604052808383612a619190613b07565b8152602001848b60200151612a769190613b07565b815250858581518110612a8b57612a8b613b6b565b6020908102919091010152612aa1600185613b07565b9350612aad8183613b07565b612ab79084613b07565b9250505061296f565b508152949350505050565b600080600080846000015111612b63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f524c505265616465723a20524c50206974656d2063616e6e6f74206265206e7560448201527f6c6c00000000000000000000000000000000000000000000000000000000000060648201526084016104ad565b6020840151805160001a607f8111612b88576000600160009450945094505050612faf565b60b78111612c44576000612b9d6080836136d5565b905080876000015111612c32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f524c505265616465723a20696e76616c696420524c502073686f72742073747260448201527f696e67000000000000000000000000000000000000000000000000000000000060648201526084016104ad565b60019550935060009250612faf915050565b60bf8111612db3576000612c5960b7836136d5565b905080876000015111612cee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67207374726960448201527f6e67206c656e677468000000000000000000000000000000000000000000000060648201526084016104ad565b600183015160208290036101000a9004612d088183613b07565b885111612d97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67207374726960448201527f6e6700000000000000000000000000000000000000000000000000000000000060648201526084016104ad565b612da2826001613b07565b9650945060009350612faf92505050565b60f78111612e6e576000612dc860c0836136d5565b905080876000015111612e5d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f524c505265616465723a20696e76616c696420524c502073686f7274206c697360448201527f740000000000000000000000000000000000000000000000000000000000000060648201526084016104ad565b600195509350849250612faf915050565b6000612e7b60f7836136d5565b905080876000015111612f10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67206c69737460448201527f206c656e6774680000000000000000000000000000000000000000000000000060648201526084016104ad565b600183015160208290036101000a9004612f2a8183613b07565b885111612f93576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67206c69737460448201526064016104ad565b612f9e826001613b07565b9650945060019350612faf92505050565b9193909250565b606060008267ffffffffffffffff811115612fd357612fd361335c565b6040519080825280601f01601f191660200182016040528015612ffd576020820181803683370190505b5090508051600003613010579050610beb565b600061301c8587613b07565b90506020820160005b6130306020876139c8565b8110156130675782518252613046602084613b07565b9250613053602083613b07565b91508061305f81613b1f565b915050613025565b5060006001602087066020036101000a039050808251168119845116178252839450505050509392505050565b60606112b982613277565b60608182601f01101561310e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f7700000000000000000000000000000000000060448201526064016104ad565b82828401101561317a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f7700000000000000000000000000000000000060448201526064016104ad565b818301845110156131e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f736c6963655f6f75744f66426f756e647300000000000000000000000000000060448201526064016104ad565b606082158015613206576040519150600082526020820160405261326e565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561323f578051835260209283019201613227565b5050858452601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016604052505b50949350505050565b60606112b9826020015160008460000151612fb6565b60005b838110156132a8578181015183820152602001613290565b838111156132b7576000848401525b50505050565b600081518084526132d581602086016020860161328d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006112b660208301846132bd565b60006020828403121561332c57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461335757600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160c0810167ffffffffffffffff811182821017156133ae576133ae61335c565b60405290565b600082601f8301126133c557600080fd5b813567ffffffffffffffff808211156133e0576133e061335c565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156134265761342661335c565b8160405283815286602085880101111561343f57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a0868803121561347757600080fd5b61348086613333565b945060208601359350604086013567ffffffffffffffff80821682146134a557600080fd5b90935060608701359081151582146134bc57600080fd5b909250608087013590808211156134d257600080fd5b506134df888289016133b4565b9150509295509295909350565b6000608082840312156134fe57600080fd5b50919050565b60008083601f84011261351657600080fd5b50813567ffffffffffffffff81111561352e57600080fd5b60208301915083602082850101111561354657600080fd5b9250929050565b600080600080600060e0868803121561356557600080fd5b853567ffffffffffffffff8082111561357d57600080fd5b9087019060c0828a03121561359157600080fd5b61359961338b565b823581526135a960208401613333565b60208201526135ba60408401613333565b6040820152606083013560608201526080830135608082015260a0830135828111156135e557600080fd5b6135f18b8286016133b4565b60a08301525096506020880135955061360d8960408a016134ec565b945060c088013591508082111561362357600080fd5b5061363088828901613504565b969995985093965092949392505050565b8581528460208201527fffffffffffffffff0000000000000000000000000000000000000000000000008460c01b16604082015282151560f81b60488201526000825161369581604985016020870161328d565b919091016049019695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000828210156136e7576136e76136a6565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261372a5761372a6136ec565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f80000000000000000000000000000000000000000000000000000000000000008314161561377e5761377e6136a6565b500590565b6000808312837f8000000000000000000000000000000000000000000000000000000000000000018312811516156137bd576137bd6136a6565b837f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0183138116156137f1576137f16136a6565b50500390565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600084136000841385830485118282161615613838576138386136a6565b7f80000000000000000000000000000000000000000000000000000000000000006000871286820588128184161615613873576138736136a6565b6000871292508782058712848416161561388f5761388f6136a6565b878505871281841616156138a5576138a56136a6565b505050929093029392505050565b6000808212827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038413811516156138ed576138ed6136a6565b827f8000000000000000000000000000000000000000000000000000000000000000038412811615613921576139216136a6565b50500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561395f5761395f6136a6565b500290565b600067ffffffffffffffff808316818516808303821115613987576139876136a6565b01949350505050565b60006fffffffffffffffffffffffffffffffff808316818516818304811182151516156139bf576139bf6136a6565b02949350505050565b6000826139d7576139d76136ec565b500490565b600084516139ee81846020890161328d565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551613a2a816001850160208a0161328d565b60019201918201528351613a4581600284016020880161328d565b0160020195945050505050565b600060408284031215613a6457600080fd5b6040516040810181811067ffffffffffffffff82111715613a8757613a8761335c565b604052825181526020928301519281019290925250919050565b600060808284031215613ab357600080fd5b6040516080810181811067ffffffffffffffff82111715613ad657613ad661335c565b8060405250823581526020830135602082015260408301356040820152606083013560608201528091505092915050565b60008219821115613b1a57613b1a6136a6565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b5057613b506136a6565b5060010190565b600082613b6657613b666136ec565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a0830152613be560c08301846132bd565b98975050505050505050565b805160208083015191908110156134fe577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60209190910360031b1b16919050565b600060ff831680613c4657613c466136ec565b8060ff84160691505092915050565b600060ff821660ff841680821015613c6f57613c6f6136a6565b90039392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea164736f6c634300080f000a", Bin: "0x6101206040523480156200001257600080fd5b5060405162003fab38038062003fab833981016040819052620000359162000261565b6000608081905260a052600160c0526001600160a01b0382166101005260e08190526200006162000069565b50506200029d565b600054610100900460ff16158080156200008a5750600054600160ff909116105b80620000ba5750620000a730620001af60201b620012881760201c565b158015620000ba575060005460ff166001145b620001235760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801562000147576000805461ff0019166101001790555b603280546001600160a01b03191661dead17905562000165620001be565b8015620001ac576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6001600160a01b03163b151590565b600054610100900460ff166200022b5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016200011a565b60408051606081018252633b9aca0080825260006020830152436001600160401b031691909201819052600160c01b0217600155565b600080604083850312156200027557600080fd5b82516001600160a01b03811681146200028d57600080fd5b6020939093015192949293505050565b60805160a05160c05160e05161010051613cb4620002f76000396000818161013401528181610b760152610d9d0152600081816103bd015261156101526000610925015260006108fc015260006108d30152613cb46000f3fe6080604052600436106100f65760003560e01c8063a14238e71161008a578063cff0ab9611610059578063cff0ab96146102f7578063e9e05c4214610398578063f4daa291146103ab578063fdc9fe1d146103df57600080fd5b8063a14238e71461026d578063c4fc4798146102ad578063ca3e99ba146102cd578063cd7c9789146102e257600080fd5b80636bb0291e116100c65780636bb0291e146102005780638129fc1c14610215578063867ead131461022a5780639bf62d821461024057600080fd5b80621c2ff61461012257806313620abd1461018057806354fd4d50146101b957806364b79208146101db57600080fd5b3661011d5761011b3334620186a06000604051806020016040528060008152506103ff565b005b600080fd5b34801561012e57600080fd5b506101567f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561018c57600080fd5b50610198633b9aca0081565b6040516fffffffffffffffffffffffffffffffff9091168152602001610177565b3480156101c557600080fd5b506101ce6108cc565b6040516101779190613307565b3480156101e757600080fd5b506101f2627a120081565b604051908152602001610177565b34801561020c57600080fd5b506101f2600481565b34801561022157600080fd5b5061011b61096f565b34801561023657600080fd5b506101f261271081565b34801561024c57600080fd5b506032546101569073ffffffffffffffffffffffffffffffffffffffff1681565b34801561027957600080fd5b5061029d61028836600461331a565b60336020526000908152604090205460ff1681565b6040519015158152602001610177565b3480156102b957600080fd5b5061029d6102c836600461331a565b610b2d565b3480156102d957600080fd5b506101f2610bf2565b3480156102ee57600080fd5b506101f2600881565b34801561030357600080fd5b5060015461035f906fffffffffffffffffffffffffffffffff81169067ffffffffffffffff7001000000000000000000000000000000008204811691780100000000000000000000000000000000000000000000000090041683565b604080516fffffffffffffffffffffffffffffffff909416845267ffffffffffffffff9283166020850152911690820152606001610177565b61011b6103a636600461345f565b6103ff565b3480156103b757600080fd5b506101f27f000000000000000000000000000000000000000000000000000000000000000081565b3480156103eb57600080fd5b5061011b6103fa36600461354d565b610c03565b8260005a905083156104b65773ffffffffffffffffffffffffffffffffffffffff8716156104b657604080517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482015260248101919091527f4f7074696d69736d506f7274616c3a206d7573742073656e6420746f2061646460448201527f72657373283029207768656e206372656174696e67206120636f6e747261637460648201526084015b60405180910390fd5b333281146104d7575033731111000000000000000000000000000000001111015b600034888888886040516020016104f2959493929190613641565b604051602081830303815290604052905060008973ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fb3813568d9991fc951961fcb4c784893574240a28925604d09fc577c55bb7c32846040516105629190613307565b60405180910390a450506001546000906105a2907801000000000000000000000000000000000000000000000000900467ffffffffffffffff16436136d5565b9050801561072b5760006105ba6004627a120061371b565b6001546105e59190700100000000000000000000000000000000900467ffffffffffffffff16613783565b9050600060086105f96004627a120061371b565b6001546106199085906fffffffffffffffffffffffffffffffff166137f7565b610623919061371b565b61062d919061371b565b600154909150600090610679906106639061065b9085906fffffffffffffffffffffffffffffffff166138b3565b6127106112a4565b6fffffffffffffffffffffffffffffffff6112bf565b905060018411156106ec576106e9610663670de0b6b3a76400006106d56106a160088361371b565b6106b390670de0b6b3a7640000613783565b6106be60018a6136d5565b6106d090670de0b6b3a7640000613927565b6112ce565b6106df90856137f7565b61065b919061371b565b90505b6fffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff4316021760015550505b6001805484919060109061075e908490700100000000000000000000000000000000900467ffffffffffffffff16613964565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550627a1200600160000160109054906101000a900467ffffffffffffffff1667ffffffffffffffff16131561083a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f5265736f757263654d65746572696e673a2063616e6e6f7420627579206d6f7260448201527f6520676173207468616e20617661696c61626c6520676173206c696d6974000060648201526084016104ad565b600154600090610866906fffffffffffffffffffffffffffffffff1667ffffffffffffffff8616613990565b6fffffffffffffffffffffffffffffffff169050600061088a48633b9aca006112ff565b61089490836139c8565b905060005a6108a390866136d5565b9050808211156108bf576108bf6108ba82846136d5565b61130f565b5050505050505050505050565b60606108f77f000000000000000000000000000000000000000000000000000000000000000061133d565b6109207f000000000000000000000000000000000000000000000000000000000000000061133d565b6109497f000000000000000000000000000000000000000000000000000000000000000061133d565b60405160200161095b939291906139dc565b604051602081830303815290604052905090565b600054610100900460ff161580801561098f5750600054600160ff909116105b806109a95750303b1580156109a9575060005460ff166001145b610a35576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016104ad565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610a9357600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b603280547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055610ac761147a565b8015610b2a57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6040517fa25ae55700000000000000000000000000000000000000000000000000000000815260048101829052600090819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063a25ae557906024016040805180830381865afa158015610bbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be09190613a52565b9050610beb8161155d565b9392505050565b610c006004627a120061371b565b81565b60325473ffffffffffffffffffffffffffffffffffffffff1661dead14610cac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d506f7274616c3a2063616e206f6e6c79207472696767657260448201527f206f6e65207769746864726177616c20706572207472616e73616374696f6e0060648201526084016104ad565b3073ffffffffffffffffffffffffffffffffffffffff16856040015173ffffffffffffffffffffffffffffffffffffffff1603610d6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d506f7274616c3a20796f752063616e6e6f742073656e642060448201527f6d6573736167657320746f2074686520706f7274616c20636f6e74726163740060648201526084016104ad565b6040517fa25ae557000000000000000000000000000000000000000000000000000000008152600481018590526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a25ae557906024016040805180830381865afa158015610df8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1c9190613a52565b9050610e278161155d565b610eb3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4f7074696d69736d506f7274616c3a2070726f706f73616c206973206e6f742060448201527f7965742066696e616c697a65640000000000000000000000000000000000000060648201526084016104ad565b610eca610ec536869003860186613aa1565b611597565b815114610f59576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f7074696d69736d506f7274616c3a20696e76616c6964206f7574707574207260448201527f6f6f742070726f6f66000000000000000000000000000000000000000000000060648201526084016104ad565b6000610f64876115f3565b9050610fab81866040013586868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061162392505050565b611037576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4f7074696d69736d506f7274616c3a20696e76616c696420776974686472617760448201527f616c20696e636c7573696f6e2070726f6f66000000000000000000000000000060648201526084016104ad565b60008181526033602052604090205460ff16156110d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f4f7074696d69736d506f7274616c3a207769746864726177616c20686173206160448201527f6c7265616479206265656e2066696e616c697a6564000000000000000000000060648201526084016104ad565b600081815260336020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055608087015161111f90614e2090613b07565b5a10156111ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4f7074696d69736d506f7274616c3a20696e73756666696369656e742067617360448201527f20746f2066696e616c697a65207769746864726177616c00000000000000000060648201526084016104ad565b8660200151603260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000611211886040015189608001518a606001518b60a001516116ea565b603280547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead17905560405190915082907fdb5c7652857aa163daadd670e116628fb42e869d8ac4251ef8971d9e5727df1b9061127690841515815260200190565b60405180910390a25050505050505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6000818312156112b457816112b6565b825b90505b92915050565b60008183126112b457816112b6565b60006112b6670de0b6b3a7640000836112e686611704565b6112f091906137f7565b6112fa919061371b565b611948565b6000818310156112b457816112b6565b6000805a90505b825a61132290836136d5565b10156113385761133182613b1f565b9150611316565b505050565b60608160000361138057505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156113aa578061139481613b1f565b91506113a39050600a836139c8565b9150611384565b60008167ffffffffffffffff8111156113c5576113c561335c565b6040519080825280601f01601f1916602001820160405280156113ef576020820181803683370190505b5090505b8415611472576114046001836136d5565b9150611411600a86613b57565b61141c906030613b07565b60f81b81838151811061143157611431613b6b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061146b600a866139c8565b94506113f3565b949350505050565b600054610100900460ff16611511576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016104ad565b60408051606081018252633b9aca00808252600060208301524367ffffffffffffffff169190920181905278010000000000000000000000000000000000000000000000000217600155565b60007f0000000000000000000000000000000000000000000000000000000000000000826020015161158f9190613b07565b421192915050565b600081600001518260200151836040015184606001516040516020016115d6949392919093845260208401929092526040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b80516020808301516040808501516060860151608087015160a088015193516000976115d6979096959101613b9a565b604080516020810185905260009181018290528190606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828252805160209182012090830181905292506116e19101604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828201909152600182527f01000000000000000000000000000000000000000000000000000000000000006020830152908587611b87565b95945050505050565b600080600080845160208601878a8af19695505050505050565b600080821361176f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f554e444546494e4544000000000000000000000000000000000000000000000060448201526064016104ad565b6000606061177c84611bab565b03609f8181039490941b90931c6c465772b2bbbb5f824b15207a3081018102606090811d6d0388eaa27412d5aca026815d636e018202811d6d0df99ac502031bf953eff472fdcc018202811d6d13cdffb29d51d99322bdff5f2211018202811d6d0a0f742023def783a307a986912e018202811d6d01920d8043ca89b5239253284e42018202811d6c0b7a86d7375468fac667a0a527016c29508e458543d8aa4df2abee7883018302821d6d0139601a2efabe717e604cbb4894018302821d6d02247f7a7b6594320649aa03aba1018302821d7fffffffffffffffffffffffffffffffffffffff73c0c716a594e00d54e3c4cbc9018302821d7ffffffffffffffffffffffffffffffffffffffdc7b88c420e53a9890533129f6f01830290911d7fffffffffffffffffffffffffffffffffffffff465fda27eb4d63ded474e5f832019091027ffffffffffffffff5f6af8f7b3396644f18e157960000000000000000000000000105711340daa0d5f769dba1915cef59f0815a5506027d0267a36c0c95b3975ab3ee5b203a7614a3f75373f047d803ae7b6687f2b393909302929092017d57115e47018c7177eebf7cd370a3356a1b7863008a5ae8028c72b88642840160ae1d92915050565b60007ffffffffffffffffffffffffffffffffffffffffffffffffdb731c958f34d94c1821361197957506000919050565b680755bf798b4a1bf1e582126119eb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4558505f4f564552464c4f57000000000000000000000000000000000000000060448201526064016104ad565b6503782dace9d9604e83901b059150600060606bb17217f7d1cf79abc9e3b39884821b056b80000000000000000000000001901d6bb17217f7d1cf79abc9e3b39881029093037fffffffffffffffffffffffffffffffffffffffdbf3ccf1604d263450f02a550481018102606090811d6d0277594991cfc85f6e2461837cd9018202811d7fffffffffffffffffffffffffffffffffffffe5adedaa1cb095af9e4da10e363c018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d7ffffffffffffffffffffffffffffffffffffd38dc772608b0ae56cce01296c0eb018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084017ffffffffffffffffffffffffffffffffffffffe2c69812cf03b0763fd454a8f7e010290911d6e0587f503bb6ea29d25fcb7401964500190910279d835ebba824c98fb31b83b2ca45c000000000000000000000000010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b600080611b9386611c81565b9050611ba181868686611cb3565b9695505050505050565b6000808211611c16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f554e444546494e4544000000000000000000000000000000000000000000000060448201526064016104ad565b5060016fffffffffffffffffffffffffffffffff821160071b82811c67ffffffffffffffff1060061b1782811c63ffffffff1060051b1782811c61ffff1060041b1782811c60ff10600390811b90911783811c600f1060021b1783811c909110821b1791821c111790565b60608180519060200120604051602001611c9d91815260200190565b6040516020818303038152906040529050919050565b6000806000611cc3878686611cf0565b91509150818015611ce557508051602080830191909120875191880191909120145b979650505050505050565b600060606000611cff85611e0b565b90506000806000611d11848a89611f06565b81519295509093509150158080611d255750815b611db1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4d65726b6c65547269653a2070726f76696465642070726f6f6620697320696e60448201527f76616c696400000000000000000000000000000000000000000000000000000060648201526084016104ad565b600081611dcd5760405180602001604052806000815250611df9565b611df986611ddc6001886136d5565b81518110611dec57611dec613b6b565b602002602001015161248f565b919b919a509098505050505050505050565b60606000611e18836124b9565b90506000815167ffffffffffffffff811115611e3657611e3661335c565b604051908082528060200260200182016040528015611e7b57816020015b6040805180820190915260608082526020820152815260200190600190039081611e545790505b50905060005b8251811015611efe576000611eae848381518110611ea157611ea1613b6b565b60200260200101516124ec565b90506040518060400160405280828152602001611eca836124b9565b815250838381518110611edf57611edf613b6b565b6020026020010181905250508080611ef690613b1f565b915050611e81565b509392505050565b60006060818080611f16876125b3565b90506000869050600080611f3d604051806040016040528060608152602001606081525090565b60005b8c5181101561244b578c8181518110611f5b57611f5b613b6b565b602002602001015191508284611f719190613b07565b9350611f7e600188613b07565b965083600003611fff57815180516020909101208514611ffa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4d65726b6c65547269653a20696e76616c696420726f6f74206861736800000060448201526064016104ad565b61213b565b8151516020116120a157815180516020909101208514611ffa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4d65726b6c65547269653a20696e76616c6964206c6172676520696e7465726e60448201527f616c20686173680000000000000000000000000000000000000000000000000060648201526084016104ad565b815185906120ae90613bf1565b1461213b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4d65726b6c65547269653a20696e76616c696420696e7465726e616c206e6f6460448201527f652068617368000000000000000000000000000000000000000000000000000060648201526084016104ad565b61214760106001613b07565b826020015151036121b9578551841461244b57600086858151811061216e5761216e613b6b565b602001015160f81c60f81b60f81c9050600083602001518260ff168151811061219957612199613b6b565b602002602001015190506121ac81612736565b9650600194505050612439565b6002826020015151036123b15760006121d18361276c565b90506000816000815181106121e8576121e8613b6b565b016020015160f81c905060006121ff600283613c33565b61220a906002613c55565b9050600061221b848360ff16612790565b905060006122298b8a612790565b9050600061223783836127c6565b905060ff85166002148061224e575060ff85166003145b156122a4578083511480156122635750808251145b1561227557612272818b613b07565b99505b507f8000000000000000000000000000000000000000000000000000000000000000995061244b945050505050565b60ff851615806122b7575060ff85166001145b1561232957825181146122f357507f8000000000000000000000000000000000000000000000000000000000000000995061244b945050505050565b61231a886020015160018151811061230d5761230d613b6b565b6020026020010151612736565b9a509750612439945050505050565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4d65726b6c65547269653a2072656365697665642061206e6f6465207769746860448201527f20616e20756e6b6e6f776e20707265666978000000000000000000000000000060648201526084016104ad565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f4d65726b6c65547269653a20726563656976656420616e20756e70617273656160448201527f626c65206e6f646500000000000000000000000000000000000000000000000060648201526084016104ad565b8061244381613b1f565b915050611f40565b507f800000000000000000000000000000000000000000000000000000000000000084148661247a8786612790565b909e909d50909b509950505050505050505050565b602081015180516060916112b9916124a9906001906136d5565b81518110611ea157611ea1613b6b565b6040805180820182526000808252602091820152815180830190925282518252808301908201526060906112b990612872565b606060008060006124fc85612acb565b91945092509050600081600181111561251757612517613c78565b146125a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f524c505265616465723a20696e76616c696420524c502062797465732076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016104ad565b6116e185602001518484612fb6565b60606000825160026125c59190613927565b67ffffffffffffffff8111156125dd576125dd61335c565b6040519080825280601f01601f191660200182016040528015612607576020820181803683370190505b50905060005b835181101561272f57600484828151811061262a5761262a613b6b565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016901c8261265f836002613927565b8151811061266f5761266f613b6b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060108482815181106126b2576126b2613b6b565b01602001516126c4919060f81c613c33565b60f81b826126d3836002613927565b6126de906001613b07565b815181106126ee576126ee613b6b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508061272781613b1f565b91505061260d565b5092915050565b600060606020836000015110156127575761275083613094565b9050612763565b612760836124ec565b90505b610beb81613bf1565b60606112b961278b8360200151600081518110611ea157611ea1613b6b565b6125b3565b6060825182106127af57506040805160208101909152600081526112b9565b6112b683838486516127c191906136d5565b61309f565b6000805b8084511180156127da5750808351115b801561285b57508281815181106127f3576127f3613b6b565b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191684828151811061283257612832613b6b565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016145b156112b6578061286a81613b1f565b9150506127ca565b606060008061288084612acb565b9193509091506001905081600181111561289c5761289c613c78565b14612929576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f524c505265616465723a20696e76616c696420524c50206c6973742076616c7560448201527f650000000000000000000000000000000000000000000000000000000000000060648201526084016104ad565b6040805160208082526104208201909252600091816020015b60408051808201909152600080825260208201528152602001906001900390816129425790505090506000835b8651811015612ac05760208210612a08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f524c505265616465723a2070726f766964656420524c50206c6973742065786360448201527f65656473206d6178206c697374206c656e67746800000000000000000000000060648201526084016104ad565b600080612a456040518060400160405280858c60000151612a2991906136d5565b8152602001858c60200151612a3e9190613b07565b9052612acb565b509150915060405180604001604052808383612a619190613b07565b8152602001848b60200151612a769190613b07565b815250858581518110612a8b57612a8b613b6b565b6020908102919091010152612aa1600185613b07565b9350612aad8183613b07565b612ab79084613b07565b9250505061296f565b508152949350505050565b600080600080846000015111612b63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f524c505265616465723a20524c50206974656d2063616e6e6f74206265206e7560448201527f6c6c00000000000000000000000000000000000000000000000000000000000060648201526084016104ad565b6020840151805160001a607f8111612b88576000600160009450945094505050612faf565b60b78111612c44576000612b9d6080836136d5565b905080876000015111612c32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f524c505265616465723a20696e76616c696420524c502073686f72742073747260448201527f696e67000000000000000000000000000000000000000000000000000000000060648201526084016104ad565b60019550935060009250612faf915050565b60bf8111612db3576000612c5960b7836136d5565b905080876000015111612cee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67207374726960448201527f6e67206c656e677468000000000000000000000000000000000000000000000060648201526084016104ad565b600183015160208290036101000a9004612d088183613b07565b885111612d97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67207374726960448201527f6e6700000000000000000000000000000000000000000000000000000000000060648201526084016104ad565b612da2826001613b07565b9650945060009350612faf92505050565b60f78111612e6e576000612dc860c0836136d5565b905080876000015111612e5d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f524c505265616465723a20696e76616c696420524c502073686f7274206c697360448201527f740000000000000000000000000000000000000000000000000000000000000060648201526084016104ad565b600195509350849250612faf915050565b6000612e7b60f7836136d5565b905080876000015111612f10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67206c69737460448201527f206c656e6774680000000000000000000000000000000000000000000000000060648201526084016104ad565b600183015160208290036101000a9004612f2a8183613b07565b885111612f93576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67206c69737460448201526064016104ad565b612f9e826001613b07565b9650945060019350612faf92505050565b9193909250565b606060008267ffffffffffffffff811115612fd357612fd361335c565b6040519080825280601f01601f191660200182016040528015612ffd576020820181803683370190505b5090508051600003613010579050610beb565b600061301c8587613b07565b90506020820160005b6130306020876139c8565b8110156130675782518252613046602084613b07565b9250613053602083613b07565b91508061305f81613b1f565b915050613025565b5060006001602087066020036101000a039050808251168119845116178252839450505050509392505050565b60606112b982613277565b60608182601f01101561310e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f7700000000000000000000000000000000000060448201526064016104ad565b82828401101561317a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f7700000000000000000000000000000000000060448201526064016104ad565b818301845110156131e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f736c6963655f6f75744f66426f756e647300000000000000000000000000000060448201526064016104ad565b606082158015613206576040519150600082526020820160405261326e565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561323f578051835260209283019201613227565b5050858452601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016604052505b50949350505050565b60606112b9826020015160008460000151612fb6565b60005b838110156132a8578181015183820152602001613290565b838111156132b7576000848401525b50505050565b600081518084526132d581602086016020860161328d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006112b660208301846132bd565b60006020828403121561332c57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461335757600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160c0810167ffffffffffffffff811182821017156133ae576133ae61335c565b60405290565b600082601f8301126133c557600080fd5b813567ffffffffffffffff808211156133e0576133e061335c565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156134265761342661335c565b8160405283815286602085880101111561343f57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a0868803121561347757600080fd5b61348086613333565b945060208601359350604086013567ffffffffffffffff80821682146134a557600080fd5b90935060608701359081151582146134bc57600080fd5b909250608087013590808211156134d257600080fd5b506134df888289016133b4565b9150509295509295909350565b6000608082840312156134fe57600080fd5b50919050565b60008083601f84011261351657600080fd5b50813567ffffffffffffffff81111561352e57600080fd5b60208301915083602082850101111561354657600080fd5b9250929050565b600080600080600060e0868803121561356557600080fd5b853567ffffffffffffffff8082111561357d57600080fd5b9087019060c0828a03121561359157600080fd5b61359961338b565b823581526135a960208401613333565b60208201526135ba60408401613333565b6040820152606083013560608201526080830135608082015260a0830135828111156135e557600080fd5b6135f18b8286016133b4565b60a08301525096506020880135955061360d8960408a016134ec565b945060c088013591508082111561362357600080fd5b5061363088828901613504565b969995985093965092949392505050565b8581528460208201527fffffffffffffffff0000000000000000000000000000000000000000000000008460c01b16604082015282151560f81b60488201526000825161369581604985016020870161328d565b919091016049019695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000828210156136e7576136e76136a6565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261372a5761372a6136ec565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f80000000000000000000000000000000000000000000000000000000000000008314161561377e5761377e6136a6565b500590565b6000808312837f8000000000000000000000000000000000000000000000000000000000000000018312811516156137bd576137bd6136a6565b837f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0183138116156137f1576137f16136a6565b50500390565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600084136000841385830485118282161615613838576138386136a6565b7f80000000000000000000000000000000000000000000000000000000000000006000871286820588128184161615613873576138736136a6565b6000871292508782058712848416161561388f5761388f6136a6565b878505871281841616156138a5576138a56136a6565b505050929093029392505050565b6000808212827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038413811516156138ed576138ed6136a6565b827f8000000000000000000000000000000000000000000000000000000000000000038412811615613921576139216136a6565b50500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561395f5761395f6136a6565b500290565b600067ffffffffffffffff808316818516808303821115613987576139876136a6565b01949350505050565b60006fffffffffffffffffffffffffffffffff808316818516818304811182151516156139bf576139bf6136a6565b02949350505050565b6000826139d7576139d76136ec565b500490565b600084516139ee81846020890161328d565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551613a2a816001850160208a0161328d565b60019201918201528351613a4581600284016020880161328d565b0160020195945050505050565b600060408284031215613a6457600080fd5b6040516040810181811067ffffffffffffffff82111715613a8757613a8761335c565b604052825181526020928301519281019290925250919050565b600060808284031215613ab357600080fd5b6040516080810181811067ffffffffffffffff82111715613ad657613ad661335c565b8060405250823581526020830135602082015260408301356040820152606083013560608201528091505092915050565b60008219821115613b1a57613b1a6136a6565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b5057613b506136a6565b5060010190565b600082613b6657613b666136ec565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a0830152613be560c08301846132bd565b98975050505050505050565b805160208083015191908110156134fe577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60209190910360031b1b16919050565b600060ff831680613c4657613c466136ec565b8060ff84160691505092915050565b600060ff821660ff841680821015613c6f57613c6f6136a6565b90039392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea164736f6c634300080f000a",
} }
// OptimismPortalABI is the input ABI used to generate the binding from. // OptimismPortalABI is the input ABI used to generate the binding from.
......
...@@ -9,11 +9,11 @@ import ( ...@@ -9,11 +9,11 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc" "github.com/ethereum-optimism/optimism/op-bindings/solc"
) )
const OptimismPortalStorageLayoutJSON = "{\"storage\":[{\"astId\":27183,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":27186,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1404,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"params\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_struct(ResourceParams)1374_storage\"},{\"astId\":1409,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":982,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"l2Sender\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":995,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"finalizedWithdrawals\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_mapping(t_bytes32,t_bool)\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)49_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[49]\",\"numberOfBytes\":\"1568\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_mapping(t_bytes32,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_bool\"},\"t_struct(ResourceParams)1374_storage\":{\"encoding\":\"inplace\",\"label\":\"struct ResourceMetering.ResourceParams\",\"numberOfBytes\":\"32\"},\"t_uint128\":{\"encoding\":\"inplace\",\"label\":\"uint128\",\"numberOfBytes\":\"16\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint64\":{\"encoding\":\"inplace\",\"label\":\"uint64\",\"numberOfBytes\":\"8\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}" const OptimismPortalStorageLayoutJSON = "{\"storage\":[{\"astId\":28019,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":28022,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1404,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"params\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_struct(ResourceParams)1374_storage\"},{\"astId\":1409,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_array(t_uint256)48_storage\"},{\"astId\":982,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"l2Sender\",\"offset\":0,\"slot\":\"50\",\"type\":\"t_address\"},{\"astId\":995,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"finalizedWithdrawals\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_mapping(t_bytes32,t_bool)\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)48_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[48]\",\"numberOfBytes\":\"1536\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_mapping(t_bytes32,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_bool\"},\"t_struct(ResourceParams)1374_storage\":{\"encoding\":\"inplace\",\"label\":\"struct ResourceMetering.ResourceParams\",\"numberOfBytes\":\"32\"},\"t_uint128\":{\"encoding\":\"inplace\",\"label\":\"uint128\",\"numberOfBytes\":\"16\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint64\":{\"encoding\":\"inplace\",\"label\":\"uint64\",\"numberOfBytes\":\"8\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}"
var OptimismPortalStorageLayout = new(solc.StorageLayout) var OptimismPortalStorageLayout = new(solc.StorageLayout)
var OptimismPortalDeployedBin = "0x6080604052600436106100f65760003560e01c8063a14238e71161008a578063cff0ab9611610059578063cff0ab96146102f7578063e9e05c4214610398578063f4daa291146103ab578063fdc9fe1d146103df57600080fd5b8063a14238e71461026d578063c4fc4798146102ad578063ca3e99ba146102cd578063cd7c9789146102e257600080fd5b80636bb0291e116100c65780636bb0291e146102005780638129fc1c14610215578063867ead131461022a5780639bf62d821461024057600080fd5b80621c2ff61461012257806313620abd1461018057806354fd4d50146101b957806364b79208146101db57600080fd5b3661011d5761011b3334620186a06000604051806020016040528060008152506103ff565b005b600080fd5b34801561012e57600080fd5b506101567f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561018c57600080fd5b50610198633b9aca0081565b6040516fffffffffffffffffffffffffffffffff9091168152602001610177565b3480156101c557600080fd5b506101ce6108cc565b6040516101779190613307565b3480156101e757600080fd5b506101f2627a120081565b604051908152602001610177565b34801561020c57600080fd5b506101f2600481565b34801561022157600080fd5b5061011b61096f565b34801561023657600080fd5b506101f261271081565b34801561024c57600080fd5b506033546101569073ffffffffffffffffffffffffffffffffffffffff1681565b34801561027957600080fd5b5061029d61028836600461331a565b60346020526000908152604090205460ff1681565b6040519015158152602001610177565b3480156102b957600080fd5b5061029d6102c836600461331a565b610b2d565b3480156102d957600080fd5b506101f2610bf2565b3480156102ee57600080fd5b506101f2600881565b34801561030357600080fd5b5060015461035f906fffffffffffffffffffffffffffffffff81169067ffffffffffffffff7001000000000000000000000000000000008204811691780100000000000000000000000000000000000000000000000090041683565b604080516fffffffffffffffffffffffffffffffff909416845267ffffffffffffffff9283166020850152911690820152606001610177565b61011b6103a636600461345f565b6103ff565b3480156103b757600080fd5b506101f27f000000000000000000000000000000000000000000000000000000000000000081565b3480156103eb57600080fd5b5061011b6103fa36600461354d565b610c03565b8260005a905083156104b65773ffffffffffffffffffffffffffffffffffffffff8716156104b657604080517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482015260248101919091527f4f7074696d69736d506f7274616c3a206d7573742073656e6420746f2061646460448201527f72657373283029207768656e206372656174696e67206120636f6e747261637460648201526084015b60405180910390fd5b333281146104d7575033731111000000000000000000000000000000001111015b600034888888886040516020016104f2959493929190613641565b604051602081830303815290604052905060008973ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fb3813568d9991fc951961fcb4c784893574240a28925604d09fc577c55bb7c32846040516105629190613307565b60405180910390a450506001546000906105a2907801000000000000000000000000000000000000000000000000900467ffffffffffffffff16436136d5565b9050801561072b5760006105ba6004627a120061371b565b6001546105e59190700100000000000000000000000000000000900467ffffffffffffffff16613783565b9050600060086105f96004627a120061371b565b6001546106199085906fffffffffffffffffffffffffffffffff166137f7565b610623919061371b565b61062d919061371b565b600154909150600090610679906106639061065b9085906fffffffffffffffffffffffffffffffff166138b3565b6127106112a4565b6fffffffffffffffffffffffffffffffff6112bf565b905060018411156106ec576106e9610663670de0b6b3a76400006106d56106a160088361371b565b6106b390670de0b6b3a7640000613783565b6106be60018a6136d5565b6106d090670de0b6b3a7640000613927565b6112ce565b6106df90856137f7565b61065b919061371b565b90505b6fffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff4316021760015550505b6001805484919060109061075e908490700100000000000000000000000000000000900467ffffffffffffffff16613964565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550627a1200600160000160109054906101000a900467ffffffffffffffff1667ffffffffffffffff16131561083a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f5265736f757263654d65746572696e673a2063616e6e6f7420627579206d6f7260448201527f6520676173207468616e20617661696c61626c6520676173206c696d6974000060648201526084016104ad565b600154600090610866906fffffffffffffffffffffffffffffffff1667ffffffffffffffff8616613990565b6fffffffffffffffffffffffffffffffff169050600061088a48633b9aca006112ff565b61089490836139c8565b905060005a6108a390866136d5565b9050808211156108bf576108bf6108ba82846136d5565b61130f565b5050505050505050505050565b60606108f77f000000000000000000000000000000000000000000000000000000000000000061133d565b6109207f000000000000000000000000000000000000000000000000000000000000000061133d565b6109497f000000000000000000000000000000000000000000000000000000000000000061133d565b60405160200161095b939291906139dc565b604051602081830303815290604052905090565b600054610100900460ff161580801561098f5750600054600160ff909116105b806109a95750303b1580156109a9575060005460ff166001145b610a35576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016104ad565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610a9357600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b603380547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055610ac761147a565b8015610b2a57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6040517fa25ae55700000000000000000000000000000000000000000000000000000000815260048101829052600090819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063a25ae557906024016040805180830381865afa158015610bbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be09190613a52565b9050610beb8161155d565b9392505050565b610c006004627a120061371b565b81565b60335473ffffffffffffffffffffffffffffffffffffffff1661dead14610cac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d506f7274616c3a2063616e206f6e6c79207472696767657260448201527f206f6e65207769746864726177616c20706572207472616e73616374696f6e0060648201526084016104ad565b3073ffffffffffffffffffffffffffffffffffffffff16856040015173ffffffffffffffffffffffffffffffffffffffff1603610d6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d506f7274616c3a20796f752063616e6e6f742073656e642060448201527f6d6573736167657320746f2074686520706f7274616c20636f6e74726163740060648201526084016104ad565b6040517fa25ae557000000000000000000000000000000000000000000000000000000008152600481018590526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a25ae557906024016040805180830381865afa158015610df8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1c9190613a52565b9050610e278161155d565b610eb3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4f7074696d69736d506f7274616c3a2070726f706f73616c206973206e6f742060448201527f7965742066696e616c697a65640000000000000000000000000000000000000060648201526084016104ad565b610eca610ec536869003860186613aa1565b611597565b815114610f59576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f7074696d69736d506f7274616c3a20696e76616c6964206f7574707574207260448201527f6f6f742070726f6f66000000000000000000000000000000000000000000000060648201526084016104ad565b6000610f64876115f3565b9050610fab81866040013586868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061162392505050565b611037576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4f7074696d69736d506f7274616c3a20696e76616c696420776974686472617760448201527f616c20696e636c7573696f6e2070726f6f66000000000000000000000000000060648201526084016104ad565b60008181526034602052604090205460ff16156110d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f4f7074696d69736d506f7274616c3a207769746864726177616c20686173206160448201527f6c7265616479206265656e2066696e616c697a6564000000000000000000000060648201526084016104ad565b600081815260346020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055608087015161111f90614e2090613b07565b5a10156111ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4f7074696d69736d506f7274616c3a20696e73756666696369656e742067617360448201527f20746f2066696e616c697a65207769746864726177616c00000000000000000060648201526084016104ad565b8660200151603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000611211886040015189608001518a606001518b60a001516116ea565b603380547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead17905560405190915082907fdb5c7652857aa163daadd670e116628fb42e869d8ac4251ef8971d9e5727df1b9061127690841515815260200190565b60405180910390a25050505050505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6000818312156112b457816112b6565b825b90505b92915050565b60008183126112b457816112b6565b60006112b6670de0b6b3a7640000836112e686611704565b6112f091906137f7565b6112fa919061371b565b611948565b6000818310156112b457816112b6565b6000805a90505b825a61132290836136d5565b10156113385761133182613b1f565b9150611316565b505050565b60608160000361138057505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156113aa578061139481613b1f565b91506113a39050600a836139c8565b9150611384565b60008167ffffffffffffffff8111156113c5576113c561335c565b6040519080825280601f01601f1916602001820160405280156113ef576020820181803683370190505b5090505b8415611472576114046001836136d5565b9150611411600a86613b57565b61141c906030613b07565b60f81b81838151811061143157611431613b6b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061146b600a866139c8565b94506113f3565b949350505050565b600054610100900460ff16611511576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016104ad565b60408051606081018252633b9aca00808252600060208301524367ffffffffffffffff169190920181905278010000000000000000000000000000000000000000000000000217600155565b60007f0000000000000000000000000000000000000000000000000000000000000000826020015161158f9190613b07565b421192915050565b600081600001518260200151836040015184606001516040516020016115d6949392919093845260208401929092526040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b80516020808301516040808501516060860151608087015160a088015193516000976115d6979096959101613b9a565b604080516020810185905260009181018290528190606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828252805160209182012090830181905292506116e19101604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828201909152600182527f01000000000000000000000000000000000000000000000000000000000000006020830152908587611b87565b95945050505050565b600080600080845160208601878a8af19695505050505050565b600080821361176f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f554e444546494e4544000000000000000000000000000000000000000000000060448201526064016104ad565b6000606061177c84611bab565b03609f8181039490941b90931c6c465772b2bbbb5f824b15207a3081018102606090811d6d0388eaa27412d5aca026815d636e018202811d6d0df99ac502031bf953eff472fdcc018202811d6d13cdffb29d51d99322bdff5f2211018202811d6d0a0f742023def783a307a986912e018202811d6d01920d8043ca89b5239253284e42018202811d6c0b7a86d7375468fac667a0a527016c29508e458543d8aa4df2abee7883018302821d6d0139601a2efabe717e604cbb4894018302821d6d02247f7a7b6594320649aa03aba1018302821d7fffffffffffffffffffffffffffffffffffffff73c0c716a594e00d54e3c4cbc9018302821d7ffffffffffffffffffffffffffffffffffffffdc7b88c420e53a9890533129f6f01830290911d7fffffffffffffffffffffffffffffffffffffff465fda27eb4d63ded474e5f832019091027ffffffffffffffff5f6af8f7b3396644f18e157960000000000000000000000000105711340daa0d5f769dba1915cef59f0815a5506027d0267a36c0c95b3975ab3ee5b203a7614a3f75373f047d803ae7b6687f2b393909302929092017d57115e47018c7177eebf7cd370a3356a1b7863008a5ae8028c72b88642840160ae1d92915050565b60007ffffffffffffffffffffffffffffffffffffffffffffffffdb731c958f34d94c1821361197957506000919050565b680755bf798b4a1bf1e582126119eb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4558505f4f564552464c4f57000000000000000000000000000000000000000060448201526064016104ad565b6503782dace9d9604e83901b059150600060606bb17217f7d1cf79abc9e3b39884821b056b80000000000000000000000001901d6bb17217f7d1cf79abc9e3b39881029093037fffffffffffffffffffffffffffffffffffffffdbf3ccf1604d263450f02a550481018102606090811d6d0277594991cfc85f6e2461837cd9018202811d7fffffffffffffffffffffffffffffffffffffe5adedaa1cb095af9e4da10e363c018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d7ffffffffffffffffffffffffffffffffffffd38dc772608b0ae56cce01296c0eb018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084017ffffffffffffffffffffffffffffffffffffffe2c69812cf03b0763fd454a8f7e010290911d6e0587f503bb6ea29d25fcb7401964500190910279d835ebba824c98fb31b83b2ca45c000000000000000000000000010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b600080611b9386611c81565b9050611ba181868686611cb3565b9695505050505050565b6000808211611c16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f554e444546494e4544000000000000000000000000000000000000000000000060448201526064016104ad565b5060016fffffffffffffffffffffffffffffffff821160071b82811c67ffffffffffffffff1060061b1782811c63ffffffff1060051b1782811c61ffff1060041b1782811c60ff10600390811b90911783811c600f1060021b1783811c909110821b1791821c111790565b60608180519060200120604051602001611c9d91815260200190565b6040516020818303038152906040529050919050565b6000806000611cc3878686611cf0565b91509150818015611ce557508051602080830191909120875191880191909120145b979650505050505050565b600060606000611cff85611e0b565b90506000806000611d11848a89611f06565b81519295509093509150158080611d255750815b611db1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4d65726b6c65547269653a2070726f76696465642070726f6f6620697320696e60448201527f76616c696400000000000000000000000000000000000000000000000000000060648201526084016104ad565b600081611dcd5760405180602001604052806000815250611df9565b611df986611ddc6001886136d5565b81518110611dec57611dec613b6b565b602002602001015161248f565b919b919a509098505050505050505050565b60606000611e18836124b9565b90506000815167ffffffffffffffff811115611e3657611e3661335c565b604051908082528060200260200182016040528015611e7b57816020015b6040805180820190915260608082526020820152815260200190600190039081611e545790505b50905060005b8251811015611efe576000611eae848381518110611ea157611ea1613b6b565b60200260200101516124ec565b90506040518060400160405280828152602001611eca836124b9565b815250838381518110611edf57611edf613b6b565b6020026020010181905250508080611ef690613b1f565b915050611e81565b509392505050565b60006060818080611f16876125b3565b90506000869050600080611f3d604051806040016040528060608152602001606081525090565b60005b8c5181101561244b578c8181518110611f5b57611f5b613b6b565b602002602001015191508284611f719190613b07565b9350611f7e600188613b07565b965083600003611fff57815180516020909101208514611ffa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4d65726b6c65547269653a20696e76616c696420726f6f74206861736800000060448201526064016104ad565b61213b565b8151516020116120a157815180516020909101208514611ffa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4d65726b6c65547269653a20696e76616c6964206c6172676520696e7465726e60448201527f616c20686173680000000000000000000000000000000000000000000000000060648201526084016104ad565b815185906120ae90613bf1565b1461213b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4d65726b6c65547269653a20696e76616c696420696e7465726e616c206e6f6460448201527f652068617368000000000000000000000000000000000000000000000000000060648201526084016104ad565b61214760106001613b07565b826020015151036121b9578551841461244b57600086858151811061216e5761216e613b6b565b602001015160f81c60f81b60f81c9050600083602001518260ff168151811061219957612199613b6b565b602002602001015190506121ac81612736565b9650600194505050612439565b6002826020015151036123b15760006121d18361276c565b90506000816000815181106121e8576121e8613b6b565b016020015160f81c905060006121ff600283613c33565b61220a906002613c55565b9050600061221b848360ff16612790565b905060006122298b8a612790565b9050600061223783836127c6565b905060ff85166002148061224e575060ff85166003145b156122a4578083511480156122635750808251145b1561227557612272818b613b07565b99505b507f8000000000000000000000000000000000000000000000000000000000000000995061244b945050505050565b60ff851615806122b7575060ff85166001145b1561232957825181146122f357507f8000000000000000000000000000000000000000000000000000000000000000995061244b945050505050565b61231a886020015160018151811061230d5761230d613b6b565b6020026020010151612736565b9a509750612439945050505050565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4d65726b6c65547269653a2072656365697665642061206e6f6465207769746860448201527f20616e20756e6b6e6f776e20707265666978000000000000000000000000000060648201526084016104ad565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f4d65726b6c65547269653a20726563656976656420616e20756e70617273656160448201527f626c65206e6f646500000000000000000000000000000000000000000000000060648201526084016104ad565b8061244381613b1f565b915050611f40565b507f800000000000000000000000000000000000000000000000000000000000000084148661247a8786612790565b909e909d50909b509950505050505050505050565b602081015180516060916112b9916124a9906001906136d5565b81518110611ea157611ea1613b6b565b6040805180820182526000808252602091820152815180830190925282518252808301908201526060906112b990612872565b606060008060006124fc85612acb565b91945092509050600081600181111561251757612517613c78565b146125a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f524c505265616465723a20696e76616c696420524c502062797465732076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016104ad565b6116e185602001518484612fb6565b60606000825160026125c59190613927565b67ffffffffffffffff8111156125dd576125dd61335c565b6040519080825280601f01601f191660200182016040528015612607576020820181803683370190505b50905060005b835181101561272f57600484828151811061262a5761262a613b6b565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016901c8261265f836002613927565b8151811061266f5761266f613b6b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060108482815181106126b2576126b2613b6b565b01602001516126c4919060f81c613c33565b60f81b826126d3836002613927565b6126de906001613b07565b815181106126ee576126ee613b6b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508061272781613b1f565b91505061260d565b5092915050565b600060606020836000015110156127575761275083613094565b9050612763565b612760836124ec565b90505b610beb81613bf1565b60606112b961278b8360200151600081518110611ea157611ea1613b6b565b6125b3565b6060825182106127af57506040805160208101909152600081526112b9565b6112b683838486516127c191906136d5565b61309f565b6000805b8084511180156127da5750808351115b801561285b57508281815181106127f3576127f3613b6b565b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191684828151811061283257612832613b6b565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016145b156112b6578061286a81613b1f565b9150506127ca565b606060008061288084612acb565b9193509091506001905081600181111561289c5761289c613c78565b14612929576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f524c505265616465723a20696e76616c696420524c50206c6973742076616c7560448201527f650000000000000000000000000000000000000000000000000000000000000060648201526084016104ad565b6040805160208082526104208201909252600091816020015b60408051808201909152600080825260208201528152602001906001900390816129425790505090506000835b8651811015612ac05760208210612a08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f524c505265616465723a2070726f766964656420524c50206c6973742065786360448201527f65656473206d6178206c697374206c656e67746800000000000000000000000060648201526084016104ad565b600080612a456040518060400160405280858c60000151612a2991906136d5565b8152602001858c60200151612a3e9190613b07565b9052612acb565b509150915060405180604001604052808383612a619190613b07565b8152602001848b60200151612a769190613b07565b815250858581518110612a8b57612a8b613b6b565b6020908102919091010152612aa1600185613b07565b9350612aad8183613b07565b612ab79084613b07565b9250505061296f565b508152949350505050565b600080600080846000015111612b63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f524c505265616465723a20524c50206974656d2063616e6e6f74206265206e7560448201527f6c6c00000000000000000000000000000000000000000000000000000000000060648201526084016104ad565b6020840151805160001a607f8111612b88576000600160009450945094505050612faf565b60b78111612c44576000612b9d6080836136d5565b905080876000015111612c32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f524c505265616465723a20696e76616c696420524c502073686f72742073747260448201527f696e67000000000000000000000000000000000000000000000000000000000060648201526084016104ad565b60019550935060009250612faf915050565b60bf8111612db3576000612c5960b7836136d5565b905080876000015111612cee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67207374726960448201527f6e67206c656e677468000000000000000000000000000000000000000000000060648201526084016104ad565b600183015160208290036101000a9004612d088183613b07565b885111612d97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67207374726960448201527f6e6700000000000000000000000000000000000000000000000000000000000060648201526084016104ad565b612da2826001613b07565b9650945060009350612faf92505050565b60f78111612e6e576000612dc860c0836136d5565b905080876000015111612e5d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f524c505265616465723a20696e76616c696420524c502073686f7274206c697360448201527f740000000000000000000000000000000000000000000000000000000000000060648201526084016104ad565b600195509350849250612faf915050565b6000612e7b60f7836136d5565b905080876000015111612f10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67206c69737460448201527f206c656e6774680000000000000000000000000000000000000000000000000060648201526084016104ad565b600183015160208290036101000a9004612f2a8183613b07565b885111612f93576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67206c69737460448201526064016104ad565b612f9e826001613b07565b9650945060019350612faf92505050565b9193909250565b606060008267ffffffffffffffff811115612fd357612fd361335c565b6040519080825280601f01601f191660200182016040528015612ffd576020820181803683370190505b5090508051600003613010579050610beb565b600061301c8587613b07565b90506020820160005b6130306020876139c8565b8110156130675782518252613046602084613b07565b9250613053602083613b07565b91508061305f81613b1f565b915050613025565b5060006001602087066020036101000a039050808251168119845116178252839450505050509392505050565b60606112b982613277565b60608182601f01101561310e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f7700000000000000000000000000000000000060448201526064016104ad565b82828401101561317a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f7700000000000000000000000000000000000060448201526064016104ad565b818301845110156131e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f736c6963655f6f75744f66426f756e647300000000000000000000000000000060448201526064016104ad565b606082158015613206576040519150600082526020820160405261326e565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561323f578051835260209283019201613227565b5050858452601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016604052505b50949350505050565b60606112b9826020015160008460000151612fb6565b60005b838110156132a8578181015183820152602001613290565b838111156132b7576000848401525b50505050565b600081518084526132d581602086016020860161328d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006112b660208301846132bd565b60006020828403121561332c57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461335757600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160c0810167ffffffffffffffff811182821017156133ae576133ae61335c565b60405290565b600082601f8301126133c557600080fd5b813567ffffffffffffffff808211156133e0576133e061335c565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156134265761342661335c565b8160405283815286602085880101111561343f57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a0868803121561347757600080fd5b61348086613333565b945060208601359350604086013567ffffffffffffffff80821682146134a557600080fd5b90935060608701359081151582146134bc57600080fd5b909250608087013590808211156134d257600080fd5b506134df888289016133b4565b9150509295509295909350565b6000608082840312156134fe57600080fd5b50919050565b60008083601f84011261351657600080fd5b50813567ffffffffffffffff81111561352e57600080fd5b60208301915083602082850101111561354657600080fd5b9250929050565b600080600080600060e0868803121561356557600080fd5b853567ffffffffffffffff8082111561357d57600080fd5b9087019060c0828a03121561359157600080fd5b61359961338b565b823581526135a960208401613333565b60208201526135ba60408401613333565b6040820152606083013560608201526080830135608082015260a0830135828111156135e557600080fd5b6135f18b8286016133b4565b60a08301525096506020880135955061360d8960408a016134ec565b945060c088013591508082111561362357600080fd5b5061363088828901613504565b969995985093965092949392505050565b8581528460208201527fffffffffffffffff0000000000000000000000000000000000000000000000008460c01b16604082015282151560f81b60488201526000825161369581604985016020870161328d565b919091016049019695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000828210156136e7576136e76136a6565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261372a5761372a6136ec565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f80000000000000000000000000000000000000000000000000000000000000008314161561377e5761377e6136a6565b500590565b6000808312837f8000000000000000000000000000000000000000000000000000000000000000018312811516156137bd576137bd6136a6565b837f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0183138116156137f1576137f16136a6565b50500390565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600084136000841385830485118282161615613838576138386136a6565b7f80000000000000000000000000000000000000000000000000000000000000006000871286820588128184161615613873576138736136a6565b6000871292508782058712848416161561388f5761388f6136a6565b878505871281841616156138a5576138a56136a6565b505050929093029392505050565b6000808212827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038413811516156138ed576138ed6136a6565b827f8000000000000000000000000000000000000000000000000000000000000000038412811615613921576139216136a6565b50500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561395f5761395f6136a6565b500290565b600067ffffffffffffffff808316818516808303821115613987576139876136a6565b01949350505050565b60006fffffffffffffffffffffffffffffffff808316818516818304811182151516156139bf576139bf6136a6565b02949350505050565b6000826139d7576139d76136ec565b500490565b600084516139ee81846020890161328d565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551613a2a816001850160208a0161328d565b60019201918201528351613a4581600284016020880161328d565b0160020195945050505050565b600060408284031215613a6457600080fd5b6040516040810181811067ffffffffffffffff82111715613a8757613a8761335c565b604052825181526020928301519281019290925250919050565b600060808284031215613ab357600080fd5b6040516080810181811067ffffffffffffffff82111715613ad657613ad661335c565b8060405250823581526020830135602082015260408301356040820152606083013560608201528091505092915050565b60008219821115613b1a57613b1a6136a6565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b5057613b506136a6565b5060010190565b600082613b6657613b666136ec565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a0830152613be560c08301846132bd565b98975050505050505050565b805160208083015191908110156134fe577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60209190910360031b1b16919050565b600060ff831680613c4657613c466136ec565b8060ff84160691505092915050565b600060ff821660ff841680821015613c6f57613c6f6136a6565b90039392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea164736f6c634300080f000a" var OptimismPortalDeployedBin = "0x6080604052600436106100f65760003560e01c8063a14238e71161008a578063cff0ab9611610059578063cff0ab96146102f7578063e9e05c4214610398578063f4daa291146103ab578063fdc9fe1d146103df57600080fd5b8063a14238e71461026d578063c4fc4798146102ad578063ca3e99ba146102cd578063cd7c9789146102e257600080fd5b80636bb0291e116100c65780636bb0291e146102005780638129fc1c14610215578063867ead131461022a5780639bf62d821461024057600080fd5b80621c2ff61461012257806313620abd1461018057806354fd4d50146101b957806364b79208146101db57600080fd5b3661011d5761011b3334620186a06000604051806020016040528060008152506103ff565b005b600080fd5b34801561012e57600080fd5b506101567f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561018c57600080fd5b50610198633b9aca0081565b6040516fffffffffffffffffffffffffffffffff9091168152602001610177565b3480156101c557600080fd5b506101ce6108cc565b6040516101779190613307565b3480156101e757600080fd5b506101f2627a120081565b604051908152602001610177565b34801561020c57600080fd5b506101f2600481565b34801561022157600080fd5b5061011b61096f565b34801561023657600080fd5b506101f261271081565b34801561024c57600080fd5b506032546101569073ffffffffffffffffffffffffffffffffffffffff1681565b34801561027957600080fd5b5061029d61028836600461331a565b60336020526000908152604090205460ff1681565b6040519015158152602001610177565b3480156102b957600080fd5b5061029d6102c836600461331a565b610b2d565b3480156102d957600080fd5b506101f2610bf2565b3480156102ee57600080fd5b506101f2600881565b34801561030357600080fd5b5060015461035f906fffffffffffffffffffffffffffffffff81169067ffffffffffffffff7001000000000000000000000000000000008204811691780100000000000000000000000000000000000000000000000090041683565b604080516fffffffffffffffffffffffffffffffff909416845267ffffffffffffffff9283166020850152911690820152606001610177565b61011b6103a636600461345f565b6103ff565b3480156103b757600080fd5b506101f27f000000000000000000000000000000000000000000000000000000000000000081565b3480156103eb57600080fd5b5061011b6103fa36600461354d565b610c03565b8260005a905083156104b65773ffffffffffffffffffffffffffffffffffffffff8716156104b657604080517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482015260248101919091527f4f7074696d69736d506f7274616c3a206d7573742073656e6420746f2061646460448201527f72657373283029207768656e206372656174696e67206120636f6e747261637460648201526084015b60405180910390fd5b333281146104d7575033731111000000000000000000000000000000001111015b600034888888886040516020016104f2959493929190613641565b604051602081830303815290604052905060008973ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fb3813568d9991fc951961fcb4c784893574240a28925604d09fc577c55bb7c32846040516105629190613307565b60405180910390a450506001546000906105a2907801000000000000000000000000000000000000000000000000900467ffffffffffffffff16436136d5565b9050801561072b5760006105ba6004627a120061371b565b6001546105e59190700100000000000000000000000000000000900467ffffffffffffffff16613783565b9050600060086105f96004627a120061371b565b6001546106199085906fffffffffffffffffffffffffffffffff166137f7565b610623919061371b565b61062d919061371b565b600154909150600090610679906106639061065b9085906fffffffffffffffffffffffffffffffff166138b3565b6127106112a4565b6fffffffffffffffffffffffffffffffff6112bf565b905060018411156106ec576106e9610663670de0b6b3a76400006106d56106a160088361371b565b6106b390670de0b6b3a7640000613783565b6106be60018a6136d5565b6106d090670de0b6b3a7640000613927565b6112ce565b6106df90856137f7565b61065b919061371b565b90505b6fffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff4316021760015550505b6001805484919060109061075e908490700100000000000000000000000000000000900467ffffffffffffffff16613964565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550627a1200600160000160109054906101000a900467ffffffffffffffff1667ffffffffffffffff16131561083a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f5265736f757263654d65746572696e673a2063616e6e6f7420627579206d6f7260448201527f6520676173207468616e20617661696c61626c6520676173206c696d6974000060648201526084016104ad565b600154600090610866906fffffffffffffffffffffffffffffffff1667ffffffffffffffff8616613990565b6fffffffffffffffffffffffffffffffff169050600061088a48633b9aca006112ff565b61089490836139c8565b905060005a6108a390866136d5565b9050808211156108bf576108bf6108ba82846136d5565b61130f565b5050505050505050505050565b60606108f77f000000000000000000000000000000000000000000000000000000000000000061133d565b6109207f000000000000000000000000000000000000000000000000000000000000000061133d565b6109497f000000000000000000000000000000000000000000000000000000000000000061133d565b60405160200161095b939291906139dc565b604051602081830303815290604052905090565b600054610100900460ff161580801561098f5750600054600160ff909116105b806109a95750303b1580156109a9575060005460ff166001145b610a35576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016104ad565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610a9357600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b603280547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055610ac761147a565b8015610b2a57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6040517fa25ae55700000000000000000000000000000000000000000000000000000000815260048101829052600090819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063a25ae557906024016040805180830381865afa158015610bbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be09190613a52565b9050610beb8161155d565b9392505050565b610c006004627a120061371b565b81565b60325473ffffffffffffffffffffffffffffffffffffffff1661dead14610cac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d506f7274616c3a2063616e206f6e6c79207472696767657260448201527f206f6e65207769746864726177616c20706572207472616e73616374696f6e0060648201526084016104ad565b3073ffffffffffffffffffffffffffffffffffffffff16856040015173ffffffffffffffffffffffffffffffffffffffff1603610d6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d506f7274616c3a20796f752063616e6e6f742073656e642060448201527f6d6573736167657320746f2074686520706f7274616c20636f6e74726163740060648201526084016104ad565b6040517fa25ae557000000000000000000000000000000000000000000000000000000008152600481018590526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a25ae557906024016040805180830381865afa158015610df8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1c9190613a52565b9050610e278161155d565b610eb3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4f7074696d69736d506f7274616c3a2070726f706f73616c206973206e6f742060448201527f7965742066696e616c697a65640000000000000000000000000000000000000060648201526084016104ad565b610eca610ec536869003860186613aa1565b611597565b815114610f59576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f7074696d69736d506f7274616c3a20696e76616c6964206f7574707574207260448201527f6f6f742070726f6f66000000000000000000000000000000000000000000000060648201526084016104ad565b6000610f64876115f3565b9050610fab81866040013586868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061162392505050565b611037576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4f7074696d69736d506f7274616c3a20696e76616c696420776974686472617760448201527f616c20696e636c7573696f6e2070726f6f66000000000000000000000000000060648201526084016104ad565b60008181526033602052604090205460ff16156110d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f4f7074696d69736d506f7274616c3a207769746864726177616c20686173206160448201527f6c7265616479206265656e2066696e616c697a6564000000000000000000000060648201526084016104ad565b600081815260336020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055608087015161111f90614e2090613b07565b5a10156111ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4f7074696d69736d506f7274616c3a20696e73756666696369656e742067617360448201527f20746f2066696e616c697a65207769746864726177616c00000000000000000060648201526084016104ad565b8660200151603260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000611211886040015189608001518a606001518b60a001516116ea565b603280547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead17905560405190915082907fdb5c7652857aa163daadd670e116628fb42e869d8ac4251ef8971d9e5727df1b9061127690841515815260200190565b60405180910390a25050505050505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6000818312156112b457816112b6565b825b90505b92915050565b60008183126112b457816112b6565b60006112b6670de0b6b3a7640000836112e686611704565b6112f091906137f7565b6112fa919061371b565b611948565b6000818310156112b457816112b6565b6000805a90505b825a61132290836136d5565b10156113385761133182613b1f565b9150611316565b505050565b60608160000361138057505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156113aa578061139481613b1f565b91506113a39050600a836139c8565b9150611384565b60008167ffffffffffffffff8111156113c5576113c561335c565b6040519080825280601f01601f1916602001820160405280156113ef576020820181803683370190505b5090505b8415611472576114046001836136d5565b9150611411600a86613b57565b61141c906030613b07565b60f81b81838151811061143157611431613b6b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061146b600a866139c8565b94506113f3565b949350505050565b600054610100900460ff16611511576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016104ad565b60408051606081018252633b9aca00808252600060208301524367ffffffffffffffff169190920181905278010000000000000000000000000000000000000000000000000217600155565b60007f0000000000000000000000000000000000000000000000000000000000000000826020015161158f9190613b07565b421192915050565b600081600001518260200151836040015184606001516040516020016115d6949392919093845260208401929092526040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b80516020808301516040808501516060860151608087015160a088015193516000976115d6979096959101613b9a565b604080516020810185905260009181018290528190606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828252805160209182012090830181905292506116e19101604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828201909152600182527f01000000000000000000000000000000000000000000000000000000000000006020830152908587611b87565b95945050505050565b600080600080845160208601878a8af19695505050505050565b600080821361176f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f554e444546494e4544000000000000000000000000000000000000000000000060448201526064016104ad565b6000606061177c84611bab565b03609f8181039490941b90931c6c465772b2bbbb5f824b15207a3081018102606090811d6d0388eaa27412d5aca026815d636e018202811d6d0df99ac502031bf953eff472fdcc018202811d6d13cdffb29d51d99322bdff5f2211018202811d6d0a0f742023def783a307a986912e018202811d6d01920d8043ca89b5239253284e42018202811d6c0b7a86d7375468fac667a0a527016c29508e458543d8aa4df2abee7883018302821d6d0139601a2efabe717e604cbb4894018302821d6d02247f7a7b6594320649aa03aba1018302821d7fffffffffffffffffffffffffffffffffffffff73c0c716a594e00d54e3c4cbc9018302821d7ffffffffffffffffffffffffffffffffffffffdc7b88c420e53a9890533129f6f01830290911d7fffffffffffffffffffffffffffffffffffffff465fda27eb4d63ded474e5f832019091027ffffffffffffffff5f6af8f7b3396644f18e157960000000000000000000000000105711340daa0d5f769dba1915cef59f0815a5506027d0267a36c0c95b3975ab3ee5b203a7614a3f75373f047d803ae7b6687f2b393909302929092017d57115e47018c7177eebf7cd370a3356a1b7863008a5ae8028c72b88642840160ae1d92915050565b60007ffffffffffffffffffffffffffffffffffffffffffffffffdb731c958f34d94c1821361197957506000919050565b680755bf798b4a1bf1e582126119eb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4558505f4f564552464c4f57000000000000000000000000000000000000000060448201526064016104ad565b6503782dace9d9604e83901b059150600060606bb17217f7d1cf79abc9e3b39884821b056b80000000000000000000000001901d6bb17217f7d1cf79abc9e3b39881029093037fffffffffffffffffffffffffffffffffffffffdbf3ccf1604d263450f02a550481018102606090811d6d0277594991cfc85f6e2461837cd9018202811d7fffffffffffffffffffffffffffffffffffffe5adedaa1cb095af9e4da10e363c018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d7ffffffffffffffffffffffffffffffffffffd38dc772608b0ae56cce01296c0eb018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084017ffffffffffffffffffffffffffffffffffffffe2c69812cf03b0763fd454a8f7e010290911d6e0587f503bb6ea29d25fcb7401964500190910279d835ebba824c98fb31b83b2ca45c000000000000000000000000010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b600080611b9386611c81565b9050611ba181868686611cb3565b9695505050505050565b6000808211611c16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f554e444546494e4544000000000000000000000000000000000000000000000060448201526064016104ad565b5060016fffffffffffffffffffffffffffffffff821160071b82811c67ffffffffffffffff1060061b1782811c63ffffffff1060051b1782811c61ffff1060041b1782811c60ff10600390811b90911783811c600f1060021b1783811c909110821b1791821c111790565b60608180519060200120604051602001611c9d91815260200190565b6040516020818303038152906040529050919050565b6000806000611cc3878686611cf0565b91509150818015611ce557508051602080830191909120875191880191909120145b979650505050505050565b600060606000611cff85611e0b565b90506000806000611d11848a89611f06565b81519295509093509150158080611d255750815b611db1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4d65726b6c65547269653a2070726f76696465642070726f6f6620697320696e60448201527f76616c696400000000000000000000000000000000000000000000000000000060648201526084016104ad565b600081611dcd5760405180602001604052806000815250611df9565b611df986611ddc6001886136d5565b81518110611dec57611dec613b6b565b602002602001015161248f565b919b919a509098505050505050505050565b60606000611e18836124b9565b90506000815167ffffffffffffffff811115611e3657611e3661335c565b604051908082528060200260200182016040528015611e7b57816020015b6040805180820190915260608082526020820152815260200190600190039081611e545790505b50905060005b8251811015611efe576000611eae848381518110611ea157611ea1613b6b565b60200260200101516124ec565b90506040518060400160405280828152602001611eca836124b9565b815250838381518110611edf57611edf613b6b565b6020026020010181905250508080611ef690613b1f565b915050611e81565b509392505050565b60006060818080611f16876125b3565b90506000869050600080611f3d604051806040016040528060608152602001606081525090565b60005b8c5181101561244b578c8181518110611f5b57611f5b613b6b565b602002602001015191508284611f719190613b07565b9350611f7e600188613b07565b965083600003611fff57815180516020909101208514611ffa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4d65726b6c65547269653a20696e76616c696420726f6f74206861736800000060448201526064016104ad565b61213b565b8151516020116120a157815180516020909101208514611ffa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4d65726b6c65547269653a20696e76616c6964206c6172676520696e7465726e60448201527f616c20686173680000000000000000000000000000000000000000000000000060648201526084016104ad565b815185906120ae90613bf1565b1461213b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4d65726b6c65547269653a20696e76616c696420696e7465726e616c206e6f6460448201527f652068617368000000000000000000000000000000000000000000000000000060648201526084016104ad565b61214760106001613b07565b826020015151036121b9578551841461244b57600086858151811061216e5761216e613b6b565b602001015160f81c60f81b60f81c9050600083602001518260ff168151811061219957612199613b6b565b602002602001015190506121ac81612736565b9650600194505050612439565b6002826020015151036123b15760006121d18361276c565b90506000816000815181106121e8576121e8613b6b565b016020015160f81c905060006121ff600283613c33565b61220a906002613c55565b9050600061221b848360ff16612790565b905060006122298b8a612790565b9050600061223783836127c6565b905060ff85166002148061224e575060ff85166003145b156122a4578083511480156122635750808251145b1561227557612272818b613b07565b99505b507f8000000000000000000000000000000000000000000000000000000000000000995061244b945050505050565b60ff851615806122b7575060ff85166001145b1561232957825181146122f357507f8000000000000000000000000000000000000000000000000000000000000000995061244b945050505050565b61231a886020015160018151811061230d5761230d613b6b565b6020026020010151612736565b9a509750612439945050505050565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4d65726b6c65547269653a2072656365697665642061206e6f6465207769746860448201527f20616e20756e6b6e6f776e20707265666978000000000000000000000000000060648201526084016104ad565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f4d65726b6c65547269653a20726563656976656420616e20756e70617273656160448201527f626c65206e6f646500000000000000000000000000000000000000000000000060648201526084016104ad565b8061244381613b1f565b915050611f40565b507f800000000000000000000000000000000000000000000000000000000000000084148661247a8786612790565b909e909d50909b509950505050505050505050565b602081015180516060916112b9916124a9906001906136d5565b81518110611ea157611ea1613b6b565b6040805180820182526000808252602091820152815180830190925282518252808301908201526060906112b990612872565b606060008060006124fc85612acb565b91945092509050600081600181111561251757612517613c78565b146125a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f524c505265616465723a20696e76616c696420524c502062797465732076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016104ad565b6116e185602001518484612fb6565b60606000825160026125c59190613927565b67ffffffffffffffff8111156125dd576125dd61335c565b6040519080825280601f01601f191660200182016040528015612607576020820181803683370190505b50905060005b835181101561272f57600484828151811061262a5761262a613b6b565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016901c8261265f836002613927565b8151811061266f5761266f613b6b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060108482815181106126b2576126b2613b6b565b01602001516126c4919060f81c613c33565b60f81b826126d3836002613927565b6126de906001613b07565b815181106126ee576126ee613b6b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508061272781613b1f565b91505061260d565b5092915050565b600060606020836000015110156127575761275083613094565b9050612763565b612760836124ec565b90505b610beb81613bf1565b60606112b961278b8360200151600081518110611ea157611ea1613b6b565b6125b3565b6060825182106127af57506040805160208101909152600081526112b9565b6112b683838486516127c191906136d5565b61309f565b6000805b8084511180156127da5750808351115b801561285b57508281815181106127f3576127f3613b6b565b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191684828151811061283257612832613b6b565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016145b156112b6578061286a81613b1f565b9150506127ca565b606060008061288084612acb565b9193509091506001905081600181111561289c5761289c613c78565b14612929576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f524c505265616465723a20696e76616c696420524c50206c6973742076616c7560448201527f650000000000000000000000000000000000000000000000000000000000000060648201526084016104ad565b6040805160208082526104208201909252600091816020015b60408051808201909152600080825260208201528152602001906001900390816129425790505090506000835b8651811015612ac05760208210612a08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f524c505265616465723a2070726f766964656420524c50206c6973742065786360448201527f65656473206d6178206c697374206c656e67746800000000000000000000000060648201526084016104ad565b600080612a456040518060400160405280858c60000151612a2991906136d5565b8152602001858c60200151612a3e9190613b07565b9052612acb565b509150915060405180604001604052808383612a619190613b07565b8152602001848b60200151612a769190613b07565b815250858581518110612a8b57612a8b613b6b565b6020908102919091010152612aa1600185613b07565b9350612aad8183613b07565b612ab79084613b07565b9250505061296f565b508152949350505050565b600080600080846000015111612b63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f524c505265616465723a20524c50206974656d2063616e6e6f74206265206e7560448201527f6c6c00000000000000000000000000000000000000000000000000000000000060648201526084016104ad565b6020840151805160001a607f8111612b88576000600160009450945094505050612faf565b60b78111612c44576000612b9d6080836136d5565b905080876000015111612c32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f524c505265616465723a20696e76616c696420524c502073686f72742073747260448201527f696e67000000000000000000000000000000000000000000000000000000000060648201526084016104ad565b60019550935060009250612faf915050565b60bf8111612db3576000612c5960b7836136d5565b905080876000015111612cee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67207374726960448201527f6e67206c656e677468000000000000000000000000000000000000000000000060648201526084016104ad565b600183015160208290036101000a9004612d088183613b07565b885111612d97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67207374726960448201527f6e6700000000000000000000000000000000000000000000000000000000000060648201526084016104ad565b612da2826001613b07565b9650945060009350612faf92505050565b60f78111612e6e576000612dc860c0836136d5565b905080876000015111612e5d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f524c505265616465723a20696e76616c696420524c502073686f7274206c697360448201527f740000000000000000000000000000000000000000000000000000000000000060648201526084016104ad565b600195509350849250612faf915050565b6000612e7b60f7836136d5565b905080876000015111612f10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67206c69737460448201527f206c656e6774680000000000000000000000000000000000000000000000000060648201526084016104ad565b600183015160208290036101000a9004612f2a8183613b07565b885111612f93576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67206c69737460448201526064016104ad565b612f9e826001613b07565b9650945060019350612faf92505050565b9193909250565b606060008267ffffffffffffffff811115612fd357612fd361335c565b6040519080825280601f01601f191660200182016040528015612ffd576020820181803683370190505b5090508051600003613010579050610beb565b600061301c8587613b07565b90506020820160005b6130306020876139c8565b8110156130675782518252613046602084613b07565b9250613053602083613b07565b91508061305f81613b1f565b915050613025565b5060006001602087066020036101000a039050808251168119845116178252839450505050509392505050565b60606112b982613277565b60608182601f01101561310e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f7700000000000000000000000000000000000060448201526064016104ad565b82828401101561317a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f7700000000000000000000000000000000000060448201526064016104ad565b818301845110156131e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f736c6963655f6f75744f66426f756e647300000000000000000000000000000060448201526064016104ad565b606082158015613206576040519150600082526020820160405261326e565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561323f578051835260209283019201613227565b5050858452601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016604052505b50949350505050565b60606112b9826020015160008460000151612fb6565b60005b838110156132a8578181015183820152602001613290565b838111156132b7576000848401525b50505050565b600081518084526132d581602086016020860161328d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006112b660208301846132bd565b60006020828403121561332c57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461335757600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160c0810167ffffffffffffffff811182821017156133ae576133ae61335c565b60405290565b600082601f8301126133c557600080fd5b813567ffffffffffffffff808211156133e0576133e061335c565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156134265761342661335c565b8160405283815286602085880101111561343f57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a0868803121561347757600080fd5b61348086613333565b945060208601359350604086013567ffffffffffffffff80821682146134a557600080fd5b90935060608701359081151582146134bc57600080fd5b909250608087013590808211156134d257600080fd5b506134df888289016133b4565b9150509295509295909350565b6000608082840312156134fe57600080fd5b50919050565b60008083601f84011261351657600080fd5b50813567ffffffffffffffff81111561352e57600080fd5b60208301915083602082850101111561354657600080fd5b9250929050565b600080600080600060e0868803121561356557600080fd5b853567ffffffffffffffff8082111561357d57600080fd5b9087019060c0828a03121561359157600080fd5b61359961338b565b823581526135a960208401613333565b60208201526135ba60408401613333565b6040820152606083013560608201526080830135608082015260a0830135828111156135e557600080fd5b6135f18b8286016133b4565b60a08301525096506020880135955061360d8960408a016134ec565b945060c088013591508082111561362357600080fd5b5061363088828901613504565b969995985093965092949392505050565b8581528460208201527fffffffffffffffff0000000000000000000000000000000000000000000000008460c01b16604082015282151560f81b60488201526000825161369581604985016020870161328d565b919091016049019695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000828210156136e7576136e76136a6565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261372a5761372a6136ec565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f80000000000000000000000000000000000000000000000000000000000000008314161561377e5761377e6136a6565b500590565b6000808312837f8000000000000000000000000000000000000000000000000000000000000000018312811516156137bd576137bd6136a6565b837f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0183138116156137f1576137f16136a6565b50500390565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600084136000841385830485118282161615613838576138386136a6565b7f80000000000000000000000000000000000000000000000000000000000000006000871286820588128184161615613873576138736136a6565b6000871292508782058712848416161561388f5761388f6136a6565b878505871281841616156138a5576138a56136a6565b505050929093029392505050565b6000808212827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038413811516156138ed576138ed6136a6565b827f8000000000000000000000000000000000000000000000000000000000000000038412811615613921576139216136a6565b50500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561395f5761395f6136a6565b500290565b600067ffffffffffffffff808316818516808303821115613987576139876136a6565b01949350505050565b60006fffffffffffffffffffffffffffffffff808316818516818304811182151516156139bf576139bf6136a6565b02949350505050565b6000826139d7576139d76136ec565b500490565b600084516139ee81846020890161328d565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551613a2a816001850160208a0161328d565b60019201918201528351613a4581600284016020880161328d565b0160020195945050505050565b600060408284031215613a6457600080fd5b6040516040810181811067ffffffffffffffff82111715613a8757613a8761335c565b604052825181526020928301519281019290925250919050565b600060808284031215613ab357600080fd5b6040516080810181811067ffffffffffffffff82111715613ad657613ad661335c565b8060405250823581526020830135602082015260408301356040820152606083013560608201528091505092915050565b60008219821115613b1a57613b1a6136a6565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b5057613b506136a6565b5060010190565b600082613b6657613b666136ec565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a0830152613be560c08301846132bd565b98975050505050505050565b805160208083015191908110156134fe577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60209190910360031b1b16919050565b600060ff831680613c4657613c466136ec565b8060ff84160691505092915050565b600060ff821660ff841680821015613c6f57613c6f6136a6565b90039392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea164736f6c634300080f000a"
func init() { func init() {
if err := json.Unmarshal([]byte(OptimismPortalStorageLayoutJSON), OptimismPortalStorageLayout); err != nil { if err := json.Unmarshal([]byte(OptimismPortalStorageLayoutJSON), OptimismPortalStorageLayout); err != nil {
......
...@@ -113,7 +113,7 @@ func Deploy(backend *backends.SimulatedBackend, constructors []Constructor, cb D ...@@ -113,7 +113,7 @@ func Deploy(backend *backends.SimulatedBackend, constructors []Constructor, cb D
backend.Commit() backend.Commit()
addr, err := bind.WaitDeployed(ctx, backend, tx) addr, err := bind.WaitDeployed(ctx, backend, tx)
if err != nil { if err != nil {
return nil, err return nil, fmt.Errorf("%s: %w", deployment.Name, err)
} }
if addr == (common.Address{}) { if addr == (common.Address{}) {
......
...@@ -2,6 +2,7 @@ package genesis ...@@ -2,6 +2,7 @@ package genesis
import ( import (
"encoding/json" "encoding/json"
"errors"
"os" "os"
"path/filepath" "path/filepath"
...@@ -120,6 +121,13 @@ func NewL2ImmutableConfig(config *DeployConfig, block *types.Block, proxyL1Stand ...@@ -120,6 +121,13 @@ func NewL2ImmutableConfig(config *DeployConfig, block *types.Block, proxyL1Stand
func NewL2StorageConfig(config *DeployConfig, block *types.Block, proxyL1StandardBridge common.Address, proxyL1CrossDomainMessenger common.Address) (state.StorageConfig, error) { func NewL2StorageConfig(config *DeployConfig, block *types.Block, proxyL1StandardBridge common.Address, proxyL1CrossDomainMessenger common.Address) (state.StorageConfig, error) {
storage := make(state.StorageConfig) storage := make(state.StorageConfig)
if block.Number() == nil {
return storage, errors.New("block number not set")
}
if block.BaseFee() == nil {
return storage, errors.New("block base fee not set")
}
storage["L2ToL1MessagePasser"] = state.StorageValues{ storage["L2ToL1MessagePasser"] = state.StorageValues{
"nonce": 0, "nonce": 0,
} }
......
...@@ -57,6 +57,8 @@ var DevAccounts = []common.Address{ ...@@ -57,6 +57,8 @@ var DevAccounts = []common.Address{
common.HexToAddress("0xdF3e18d64BC6A983f673Ab319CCaE4f1a57C7097"), common.HexToAddress("0xdF3e18d64BC6A983f673Ab319CCaE4f1a57C7097"),
common.HexToAddress("0xde3829a23df1479438622a08a116e8eb3f620bb5"), common.HexToAddress("0xde3829a23df1479438622a08a116e8eb3f620bb5"),
common.HexToAddress("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"), common.HexToAddress("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"),
// Test account used by geth tests
common.HexToAddress("0x71562b71999873DB5b286dF957af199Ec94617F7"),
} }
// The devBalance is the amount of wei that a dev account is funded with. // The devBalance is the amount of wei that a dev account is funded with.
......
package genesis package genesis
import ( import (
"github.com/ethereum-optimism/optimism/op-bindings/predeploys"
"github.com/ethereum-optimism/optimism/op-chain-ops/state" "github.com/ethereum-optimism/optimism/op-chain-ops/state"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
...@@ -29,6 +30,14 @@ func BuildL2DeveloperGenesis(config *DeployConfig, l1StartBlock *types.Block, l2 ...@@ -29,6 +30,14 @@ func BuildL2DeveloperGenesis(config *DeployConfig, l1StartBlock *types.Block, l2
} }
SetPrecompileBalances(db) SetPrecompileBalances(db)
if l2Addrs == nil {
l2Addrs = &L2Addresses{
ProxyAdmin: predeploys.DevProxyAdminAddr,
L1StandardBridgeProxy: predeploys.DevL1StandardBridgeAddr,
L1CrossDomainMessengerProxy: predeploys.DevL1CrossDomainMessengerAddr,
}
}
return BuildL2Genesis(db, config, l1StartBlock, l2Addrs) return BuildL2Genesis(db, config, l1StartBlock, l2Addrs)
} }
......
...@@ -77,7 +77,7 @@ func TestBuildL2DeveloperGenesis(t *testing.T) { ...@@ -77,7 +77,7 @@ func TestBuildL2DeveloperGenesis(t *testing.T) {
require.Equal(t, adminSlot, proxyAdmin.Address.Hash()) require.Equal(t, adminSlot, proxyAdmin.Address.Hash())
require.Equal(t, account.Code, depB) require.Equal(t, account.Code, depB)
} }
require.Equal(t, 2338, len(gen.Alloc)) require.Equal(t, 2339, len(gen.Alloc))
if writeFile { if writeFile {
file, _ := json.MarshalIndent(gen, "", " ") file, _ := json.MarshalIndent(gen, "", " ")
......
...@@ -4,7 +4,7 @@ go 1.18 ...@@ -4,7 +4,7 @@ go 1.18
require ( require (
github.com/ethereum-optimism/optimism/l2geth v0.0.0-20220820030939-de38b6f6f77e github.com/ethereum-optimism/optimism/l2geth v0.0.0-20220820030939-de38b6f6f77e
github.com/ethereum-optimism/optimism/op-bindings v0.8.9 github.com/ethereum-optimism/optimism/op-bindings v0.8.10
github.com/ethereum/go-ethereum v1.10.23 github.com/ethereum/go-ethereum v1.10.23
github.com/holiman/uint256 v1.2.0 github.com/holiman/uint256 v1.2.0
github.com/mattn/go-isatty v0.0.14 github.com/mattn/go-isatty v0.0.14
......
...@@ -176,8 +176,8 @@ github.com/ethereum-optimism/op-geth v0.0.0-20220926184707-53d23c240afd h1:NchOn ...@@ -176,8 +176,8 @@ github.com/ethereum-optimism/op-geth v0.0.0-20220926184707-53d23c240afd h1:NchOn
github.com/ethereum-optimism/op-geth v0.0.0-20220926184707-53d23c240afd/go.mod h1:/6CsT5Ceen2WPLI/oCA3xMcZ5sWMF/D46SjM/ayY0Oo= github.com/ethereum-optimism/op-geth v0.0.0-20220926184707-53d23c240afd/go.mod h1:/6CsT5Ceen2WPLI/oCA3xMcZ5sWMF/D46SjM/ayY0Oo=
github.com/ethereum-optimism/optimism/l2geth v0.0.0-20220820030939-de38b6f6f77e h1:LUfy9ofKcen9Cm1T9JyGNnrPLR2AmyelFbohS6bs4X8= github.com/ethereum-optimism/optimism/l2geth v0.0.0-20220820030939-de38b6f6f77e h1:LUfy9ofKcen9Cm1T9JyGNnrPLR2AmyelFbohS6bs4X8=
github.com/ethereum-optimism/optimism/l2geth v0.0.0-20220820030939-de38b6f6f77e/go.mod h1:Oj5A6Qs/Ao1SP17i3uKroyhz49q/ehagSXRAlvwaI5Y= github.com/ethereum-optimism/optimism/l2geth v0.0.0-20220820030939-de38b6f6f77e/go.mod h1:Oj5A6Qs/Ao1SP17i3uKroyhz49q/ehagSXRAlvwaI5Y=
github.com/ethereum-optimism/optimism/op-bindings v0.8.9 h1:QeYLhgZP0QkDLxyXhkWLj/iHDFkMNI18abgrHL4I9TE= github.com/ethereum-optimism/optimism/op-bindings v0.8.10 h1:aSAWCQwBQnbmv03Gvtuvn3qfTWrZu/sTlRAWrpQhiHc=
github.com/ethereum-optimism/optimism/op-bindings v0.8.9/go.mod h1:pyTCbh2o/SY+5/AL2Qo5GgAao3Gtt9Ff6tfK9Pa9emM= github.com/ethereum-optimism/optimism/op-bindings v0.8.10/go.mod h1:pyTCbh2o/SY+5/AL2Qo5GgAao3Gtt9Ff6tfK9Pa9emM=
github.com/ethereum/go-ethereum v1.10.4/go.mod h1:nEE0TP5MtxGzOMd7egIrbPJMQBnhVU3ELNxhBglIzhg= github.com/ethereum/go-ethereum v1.10.4/go.mod h1:nEE0TP5MtxGzOMd7egIrbPJMQBnhVU3ELNxhBglIzhg=
github.com/ethereum/go-ethereum v1.10.16/go.mod h1:Anj6cxczl+AHy63o4X9O8yWNHuN5wMpfb8MAnHkWn7Y= github.com/ethereum/go-ethereum v1.10.16/go.mod h1:Anj6cxczl+AHy63o4X9O8yWNHuN5wMpfb8MAnHkWn7Y=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
......
...@@ -47,7 +47,7 @@ func NewL2Verifier(log log.Logger, l1 derive.L1Fetcher, eng derive.Engine, cfg * ...@@ -47,7 +47,7 @@ func NewL2Verifier(log log.Logger, l1 derive.L1Fetcher, eng derive.Engine, cfg *
func (s *L2Verifier) SyncStatus() *eth.SyncStatus { func (s *L2Verifier) SyncStatus() *eth.SyncStatus {
return &eth.SyncStatus{ return &eth.SyncStatus{
CurrentL1: s.derivation.Progress().Origin, CurrentL1: s.derivation.Origin(),
HeadL1: s.l1Head, HeadL1: s.l1Head,
SafeL1: s.l1Safe, SafeL1: s.l1Safe,
FinalizedL1: s.l1Finalized, FinalizedL1: s.l1Finalized,
......
...@@ -15,9 +15,9 @@ import ( ...@@ -15,9 +15,9 @@ import (
// We prefer a mnemonic rather than direct private keys to make it easier // We prefer a mnemonic rather than direct private keys to make it easier
// to export all testing keys in external tooling for use during debugging. // to export all testing keys in external tooling for use during debugging.
var DefaultMnemonicConfig = &MnemonicConfig{ var DefaultMnemonicConfig = &MnemonicConfig{
Mnemonic: "test test test test test test test test test test test junk", Mnemonic: "test test test test test test test test test test test junk",
Deployer: "m/44'/60'/0'/0/1", Deployer: "m/44'/60'/0'/0/1",
// clique signer: removed, use engine API instead CliqueSigner: "m/44'/60'/0'/0/2",
Proposer: "m/44'/60'/0'/0/3", Proposer: "m/44'/60'/0'/0/3",
Batcher: "m/44'/60'/0'/0/4", Batcher: "m/44'/60'/0'/0/4",
SequencerP2P: "m/44'/60'/0'/0/5", SequencerP2P: "m/44'/60'/0'/0/5",
...@@ -26,11 +26,13 @@ var DefaultMnemonicConfig = &MnemonicConfig{ ...@@ -26,11 +26,13 @@ var DefaultMnemonicConfig = &MnemonicConfig{
Mallory: "m/44'/60'/0'/0/8", Mallory: "m/44'/60'/0'/0/8",
} }
// MnemonicConfig configures the private keys for testing purposes. // MnemonicConfig configures the private keys for the hive testnet.
// It's json-serializable, so we can ship it to e.g. the hardhat script client.
type MnemonicConfig struct { type MnemonicConfig struct {
Mnemonic string Mnemonic string
Deployer string Deployer string
CliqueSigner string
// rollup actors // rollup actors
Proposer string Proposer string
...@@ -58,6 +60,10 @@ func (m *MnemonicConfig) Secrets() (*Secrets, error) { ...@@ -58,6 +60,10 @@ func (m *MnemonicConfig) Secrets() (*Secrets, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
cliqueSigner, err := wallet.PrivateKey(account(m.CliqueSigner))
if err != nil {
return nil, err
}
proposer, err := wallet.PrivateKey(account(m.Proposer)) proposer, err := wallet.PrivateKey(account(m.Proposer))
if err != nil { if err != nil {
return nil, err return nil, err
...@@ -85,6 +91,7 @@ func (m *MnemonicConfig) Secrets() (*Secrets, error) { ...@@ -85,6 +91,7 @@ func (m *MnemonicConfig) Secrets() (*Secrets, error) {
return &Secrets{ return &Secrets{
Deployer: deployer, Deployer: deployer,
CliqueSigner: cliqueSigner,
Proposer: proposer, Proposer: proposer,
Batcher: batcher, Batcher: batcher,
SequencerP2P: sequencerP2P, SequencerP2P: sequencerP2P,
...@@ -96,7 +103,8 @@ func (m *MnemonicConfig) Secrets() (*Secrets, error) { ...@@ -96,7 +103,8 @@ func (m *MnemonicConfig) Secrets() (*Secrets, error) {
// Secrets bundles secp256k1 private keys for all common rollup actors for testing purposes. // Secrets bundles secp256k1 private keys for all common rollup actors for testing purposes.
type Secrets struct { type Secrets struct {
Deployer *ecdsa.PrivateKey Deployer *ecdsa.PrivateKey
CliqueSigner *ecdsa.PrivateKey
// rollup actors // rollup actors
Proposer *ecdsa.PrivateKey Proposer *ecdsa.PrivateKey
...@@ -122,6 +130,7 @@ func EncodePrivKey(priv *ecdsa.PrivateKey) hexutil.Bytes { ...@@ -122,6 +130,7 @@ func EncodePrivKey(priv *ecdsa.PrivateKey) hexutil.Bytes {
func (s *Secrets) Addresses() *Addresses { func (s *Secrets) Addresses() *Addresses {
return &Addresses{ return &Addresses{
Deployer: crypto.PubkeyToAddress(s.Deployer.PublicKey), Deployer: crypto.PubkeyToAddress(s.Deployer.PublicKey),
CliqueSigner: crypto.PubkeyToAddress(s.CliqueSigner.PublicKey),
Proposer: crypto.PubkeyToAddress(s.Proposer.PublicKey), Proposer: crypto.PubkeyToAddress(s.Proposer.PublicKey),
Batcher: crypto.PubkeyToAddress(s.Batcher.PublicKey), Batcher: crypto.PubkeyToAddress(s.Batcher.PublicKey),
SequencerP2P: crypto.PubkeyToAddress(s.SequencerP2P.PublicKey), SequencerP2P: crypto.PubkeyToAddress(s.SequencerP2P.PublicKey),
...@@ -133,7 +142,8 @@ func (s *Secrets) Addresses() *Addresses { ...@@ -133,7 +142,8 @@ func (s *Secrets) Addresses() *Addresses {
// Addresses bundles the addresses for all common rollup addresses for testing purposes. // Addresses bundles the addresses for all common rollup addresses for testing purposes.
type Addresses struct { type Addresses struct {
Deployer common.Address Deployer common.Address
CliqueSigner common.Address
// rollup actors // rollup actors
Proposer common.Address Proposer common.Address
...@@ -148,8 +158,8 @@ type Addresses struct { ...@@ -148,8 +158,8 @@ type Addresses struct {
func (a *Addresses) All() []common.Address { func (a *Addresses) All() []common.Address {
return []common.Address{ return []common.Address{
a.Batcher,
a.Deployer, a.Deployer,
a.CliqueSigner,
a.Proposer, a.Proposer,
a.Batcher, a.Batcher,
a.SequencerP2P, a.SequencerP2P,
......
package e2eutils package e2eutils
import (
"context"
"testing"
"time"
)
// TestingBase is an interface used for standard Go testing. // TestingBase is an interface used for standard Go testing.
// This interface is used for unit tests, benchmarks, and fuzz tests and also emulated in Hive. // This interface is used for unit tests, benchmarks, and fuzz tests and also emulated in Hive.
// //
...@@ -24,3 +30,9 @@ type TestingBase interface { ...@@ -24,3 +30,9 @@ type TestingBase interface {
Skipped() bool Skipped() bool
TempDir() string TempDir() string
} }
func TimeoutCtx(t *testing.T, timeout time.Duration) context.Context {
ctx, cancel := context.WithCancel(context.Background())
t.Cleanup(cancel)
return ctx
}
package e2eutils
import (
"context"
"errors"
"fmt"
"time"
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethclient"
)
func WaitReceiptOK(ctx context.Context, client *ethclient.Client, hash common.Hash) (*types.Receipt, error) {
return WaitReceipt(ctx, client, hash, types.ReceiptStatusSuccessful)
}
func WaitReceiptFail(ctx context.Context, client *ethclient.Client, hash common.Hash) (*types.Receipt, error) {
return WaitReceipt(ctx, client, hash, types.ReceiptStatusFailed)
}
func WaitReceipt(ctx context.Context, client *ethclient.Client, hash common.Hash, status uint64) (*types.Receipt, error) {
ticker := time.NewTicker(100 * time.Millisecond)
defer ticker.Stop()
for {
receipt, err := client.TransactionReceipt(ctx, hash)
if errors.Is(err, ethereum.NotFound) {
select {
case <-ctx.Done():
return nil, ctx.Err()
case <-ticker.C:
continue
}
}
if err != nil {
return nil, err
}
if receipt.Status != status {
return receipt, fmt.Errorf("expected status %d, but got %d", status, receipt.Status)
}
return receipt, nil
}
}
func WaitBlock(ctx context.Context, client *ethclient.Client, n uint64) error {
for {
height, err := client.BlockNumber(ctx)
if err != nil {
return err
}
if height < n {
time.Sleep(500 * time.Millisecond)
continue
}
break
}
return nil
}
func WaitFor(ctx context.Context, rate time.Duration, cb func() (bool, error)) error {
tick := time.NewTicker(rate)
defer tick.Stop()
for {
select {
case <-ctx.Done():
return ctx.Err()
case <-tick.C:
done, err := cb()
if err != nil {
return err
}
if done {
return nil
}
}
}
}
...@@ -10,7 +10,6 @@ import ( ...@@ -10,7 +10,6 @@ import (
"github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/cmd/utils"
rollupEth "github.com/ethereum-optimism/optimism/op-node/eth"
"github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/accounts/keystore"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
...@@ -23,8 +22,6 @@ import ( ...@@ -23,8 +22,6 @@ import (
"github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/ethclient"
"github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/node"
hdwallet "github.com/miguelmota/go-ethereum-hdwallet"
) )
func waitForTransaction(hash common.Hash, client *ethclient.Client, timeout time.Duration) (*types.Receipt, error) { func waitForTransaction(hash common.Hash, client *ethclient.Client, timeout time.Duration) (*types.Receipt, error) {
...@@ -75,25 +72,9 @@ func waitForBlock(number *big.Int, client *ethclient.Client, timeout time.Durati ...@@ -75,25 +72,9 @@ func waitForBlock(number *big.Int, client *ethclient.Client, timeout time.Durati
} }
} }
func getGenesisInfo(client *ethclient.Client) (id rollupEth.BlockID, timestamp uint64) { func initL1Geth(cfg *SystemConfig, genesis *core.Genesis) (*node.Node, *eth.Ethereum, error) {
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
defer cancel()
block, err := client.BlockByNumber(ctx, common.Big0)
if err != nil {
panic(err)
}
return rollupEth.BlockID{Hash: block.Hash(), Number: block.NumberU64()}, block.Time()
}
func initL1Geth(cfg *SystemConfig, wallet *hdwallet.Wallet, genesis *core.Genesis) (*node.Node, *eth.Ethereum, error) {
signer := deriveAccount(wallet, cfg.CliqueSignerDerivationPath)
pk, err := wallet.PrivateKey(signer)
if err != nil {
return nil, nil, fmt.Errorf("failed to locate private key in wallet: %w", err)
}
ethConfig := &ethconfig.Config{ ethConfig := &ethconfig.Config{
NetworkId: cfg.L1ChainID.Uint64(), NetworkId: cfg.DeployConfig.L1ChainID,
Genesis: genesis, Genesis: genesis,
} }
nodeConfig := &node.Config{ nodeConfig := &node.Config{
...@@ -106,7 +87,7 @@ func initL1Geth(cfg *SystemConfig, wallet *hdwallet.Wallet, genesis *core.Genesi ...@@ -106,7 +87,7 @@ func initL1Geth(cfg *SystemConfig, wallet *hdwallet.Wallet, genesis *core.Genesi
HTTPModules: []string{"debug", "admin", "eth", "txpool", "net", "rpc", "web3", "personal", "engine"}, HTTPModules: []string{"debug", "admin", "eth", "txpool", "net", "rpc", "web3", "personal", "engine"},
} }
l1Node, l1Eth, err := createGethNode(false, nodeConfig, ethConfig, []*ecdsa.PrivateKey{pk}) l1Node, l1Eth, err := createGethNode(false, nodeConfig, ethConfig, []*ecdsa.PrivateKey{cfg.Secrets.CliqueSigner})
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err
} }
...@@ -174,6 +155,8 @@ func initL2Geth(name string, l2ChainID *big.Int, genesis *core.Genesis, jwtPath ...@@ -174,6 +155,8 @@ func initL2Geth(name string, l2ChainID *big.Int, genesis *core.Genesis, jwtPath
WSPort: 0, WSPort: 0,
AuthAddr: "127.0.0.1", AuthAddr: "127.0.0.1",
AuthPort: 0, AuthPort: 0,
HTTPHost: "127.0.0.1",
HTTPPort: 0,
WSModules: []string{"debug", "admin", "eth", "txpool", "net", "rpc", "web3", "personal", "engine"}, WSModules: []string{"debug", "admin", "eth", "txpool", "net", "rpc", "web3", "personal", "engine"},
HTTPModules: []string{"debug", "admin", "eth", "txpool", "net", "rpc", "web3", "personal", "engine"}, HTTPModules: []string{"debug", "admin", "eth", "txpool", "net", "rpc", "web3", "personal", "engine"},
JWTSecret: jwtPath, JWTSecret: jwtPath,
......
...@@ -3,12 +3,12 @@ module github.com/ethereum-optimism/optimism/op-e2e ...@@ -3,12 +3,12 @@ module github.com/ethereum-optimism/optimism/op-e2e
go 1.18 go 1.18
require ( require (
github.com/ethereum-optimism/optimism/op-batcher v0.8.9 github.com/ethereum-optimism/optimism/op-batcher v0.8.10
github.com/ethereum-optimism/optimism/op-bindings v0.8.9 github.com/ethereum-optimism/optimism/op-bindings v0.8.10
github.com/ethereum-optimism/optimism/op-chain-ops v0.8.9 github.com/ethereum-optimism/optimism/op-chain-ops v0.8.10
github.com/ethereum-optimism/optimism/op-node v0.8.9 github.com/ethereum-optimism/optimism/op-node v0.8.10
github.com/ethereum-optimism/optimism/op-proposer v0.8.9 github.com/ethereum-optimism/optimism/op-proposer v0.8.10
github.com/ethereum-optimism/optimism/op-service v0.8.9 github.com/ethereum-optimism/optimism/op-service v0.8.10
github.com/ethereum/go-ethereum v1.10.23 github.com/ethereum/go-ethereum v1.10.23
github.com/libp2p/go-libp2p v0.21.0 github.com/libp2p/go-libp2p v0.21.0
github.com/libp2p/go-libp2p-core v0.19.1 github.com/libp2p/go-libp2p-core v0.19.1
......
...@@ -241,18 +241,18 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m ...@@ -241,18 +241,18 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/ethereum-optimism/op-geth v0.0.0-20220926184707-53d23c240afd h1:NchOnosWOkH9wlix8QevGHE+6vuRa+OMGvDNsczv2kQ= github.com/ethereum-optimism/op-geth v0.0.0-20220926184707-53d23c240afd h1:NchOnosWOkH9wlix8QevGHE+6vuRa+OMGvDNsczv2kQ=
github.com/ethereum-optimism/op-geth v0.0.0-20220926184707-53d23c240afd/go.mod h1:/6CsT5Ceen2WPLI/oCA3xMcZ5sWMF/D46SjM/ayY0Oo= github.com/ethereum-optimism/op-geth v0.0.0-20220926184707-53d23c240afd/go.mod h1:/6CsT5Ceen2WPLI/oCA3xMcZ5sWMF/D46SjM/ayY0Oo=
github.com/ethereum-optimism/optimism/op-batcher v0.8.9 h1:toKo/4yjwLX7J/C/Fi9hH3jd2TYAWwxUc9VPpR/Dv+A= github.com/ethereum-optimism/optimism/op-batcher v0.8.10 h1:nnC6Xs6XH/GHb/hDN+SGzDRed+PxsImPRzk6IZKiX6o=
github.com/ethereum-optimism/optimism/op-batcher v0.8.9/go.mod h1:iRw9zIuH0mV+zg7gpUeMHGuGsAWcFdIqzQdRMkW1fvQ= github.com/ethereum-optimism/optimism/op-batcher v0.8.10/go.mod h1:W7QUdBkKsDm09KVUmBSVww/DiCCglBBNuvcayWnedbc=
github.com/ethereum-optimism/optimism/op-bindings v0.8.9 h1:QeYLhgZP0QkDLxyXhkWLj/iHDFkMNI18abgrHL4I9TE= github.com/ethereum-optimism/optimism/op-bindings v0.8.10 h1:aSAWCQwBQnbmv03Gvtuvn3qfTWrZu/sTlRAWrpQhiHc=
github.com/ethereum-optimism/optimism/op-bindings v0.8.9/go.mod h1:pyTCbh2o/SY+5/AL2Qo5GgAao3Gtt9Ff6tfK9Pa9emM= github.com/ethereum-optimism/optimism/op-bindings v0.8.10/go.mod h1:pyTCbh2o/SY+5/AL2Qo5GgAao3Gtt9Ff6tfK9Pa9emM=
github.com/ethereum-optimism/optimism/op-chain-ops v0.8.9 h1:Z8174lRVnvw1r8w0OS0vOrFXcAg6635WuqHObZSJzKs= github.com/ethereum-optimism/optimism/op-chain-ops v0.8.10 h1:ErDuEO7Dsd7+XXlTWToBN/388IgC8eXjAPgiHoXviw4=
github.com/ethereum-optimism/optimism/op-chain-ops v0.8.9/go.mod h1:Y+on77cEP5Kn6Jc2aX24d3zk2lvT76KaUlTQSn7zesU= github.com/ethereum-optimism/optimism/op-chain-ops v0.8.10/go.mod h1:a9/PrzVU8EHKlLr6yz4YXw2VhEHYrbVogX56r26VUrY=
github.com/ethereum-optimism/optimism/op-node v0.8.9 h1:wUxvjeHB1nQtnsxbNxqHthSS+Uune7Xb17NWXDBdSXI= github.com/ethereum-optimism/optimism/op-node v0.8.10 h1:1Gc4FtR5B+HgfQ+byNn3P+tiJarpMZSYjj5iLvA3YtU=
github.com/ethereum-optimism/optimism/op-node v0.8.9/go.mod h1:ETNw9UP6sy/pWf6aoNHEgQKrXN2ca0Fm0OqIbCEghYk= github.com/ethereum-optimism/optimism/op-node v0.8.10/go.mod h1:6NkgIThuQbPY6fA9lI2A52DaeLM2FvrcwGCBVEY2fS8=
github.com/ethereum-optimism/optimism/op-proposer v0.8.9 h1:affd05NB0zxYJA/aCXEwDtaH1kcZfu3b3mnJTn94v74= github.com/ethereum-optimism/optimism/op-proposer v0.8.10 h1:dLzbYmaoMBViqCPlIUFB+bagSuwsd173P8kDhUMbBTQ=
github.com/ethereum-optimism/optimism/op-proposer v0.8.9/go.mod h1:00UGw9VkWSv/0TyltXqU2NGsp4QaWVPzLZ4zvpUGbhU= github.com/ethereum-optimism/optimism/op-proposer v0.8.10/go.mod h1:tdUw40bNis2G1uDT3jNv7BWWM+FzTar+fS5zv6o2YPA=
github.com/ethereum-optimism/optimism/op-service v0.8.9 h1:YdMBcgXi+NHqX3pKR6UhjGHtBeF8AQK6kLmwpv7LzJM= github.com/ethereum-optimism/optimism/op-service v0.8.10 h1:K3IABHI1b0MDrDXALvTKTbzy6IogGD6NgmbqfKEcEwM=
github.com/ethereum-optimism/optimism/op-service v0.8.9/go.mod h1:K0uybOhICTc2yfhrRj0cD1m7aPkOf5C9e6bUmvf4rGA= github.com/ethereum-optimism/optimism/op-service v0.8.10/go.mod h1:K0uybOhICTc2yfhrRj0cD1m7aPkOf5C9e6bUmvf4rGA=
github.com/ethereum/go-ethereum v1.10.4/go.mod h1:nEE0TP5MtxGzOMd7egIrbPJMQBnhVU3ELNxhBglIzhg= github.com/ethereum/go-ethereum v1.10.4/go.mod h1:nEE0TP5MtxGzOMd7egIrbPJMQBnhVU3ELNxhBglIzhg=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0=
......
...@@ -2,52 +2,155 @@ package op_e2e ...@@ -2,52 +2,155 @@ package op_e2e
import ( import (
"context" "context"
"crypto/ecdsa"
"fmt" "fmt"
"math/big" "math/big"
"os" "os"
"path"
"strings" "strings"
"testing"
"time" "time"
bss "github.com/ethereum-optimism/optimism/op-batcher" bss "github.com/ethereum-optimism/optimism/op-batcher"
"github.com/ethereum-optimism/optimism/op-bindings/bindings"
"github.com/ethereum-optimism/optimism/op-bindings/predeploys" "github.com/ethereum-optimism/optimism/op-bindings/predeploys"
"github.com/ethereum-optimism/optimism/op-chain-ops/genesis"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils"
"github.com/ethereum-optimism/optimism/op-node/eth"
"github.com/ethereum-optimism/optimism/op-node/metrics" "github.com/ethereum-optimism/optimism/op-node/metrics"
rollupNode "github.com/ethereum-optimism/optimism/op-node/node" rollupNode "github.com/ethereum-optimism/optimism/op-node/node"
"github.com/ethereum-optimism/optimism/op-node/p2p" "github.com/ethereum-optimism/optimism/op-node/p2p"
"github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-node/rollup/driver"
"github.com/ethereum-optimism/optimism/op-node/testlog"
l2os "github.com/ethereum-optimism/optimism/op-proposer" l2os "github.com/ethereum-optimism/optimism/op-proposer"
oplog "github.com/ethereum-optimism/optimism/op-service/log" oplog "github.com/ethereum-optimism/optimism/op-service/log"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/types" geth_eth "github.com/ethereum/go-ethereum/eth"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/eth"
"github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/ethclient"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/rpc"
mocknet "github.com/libp2p/go-libp2p/p2p/net/mock" mocknet "github.com/libp2p/go-libp2p/p2p/net/mock"
hdwallet "github.com/miguelmota/go-ethereum-hdwallet" "github.com/stretchr/testify/require"
) )
// deriveAddress returns the address associated derivation path for the wallet. var (
// It will panic if the derivation path is not correctly formatted. testingJWTSecret = [32]byte{123}
func deriveAddress(w accounts.Wallet, path string) common.Address { )
return deriveAccount(w, path).Address
func DefaultSystemConfig(t *testing.T) SystemConfig {
secrets, err := e2eutils.DefaultMnemonicConfig.Secrets()
require.NoError(t, err)
addresses := secrets.Addresses()
return SystemConfig{
Secrets: secrets,
Premine: make(map[common.Address]*big.Int),
DeployConfig: &genesis.DeployConfig{
L1ChainID: 900,
L2ChainID: 901,
L2BlockTime: 2,
FinalizationPeriodSeconds: 60 * 60 * 24,
MaxSequencerDrift: 10,
SequencerWindowSize: 30,
ChannelTimeout: 10,
P2PSequencerAddress: addresses.SequencerP2P,
BatchInboxAddress: common.Address{0: 0x52, 19: 0xff}, // tbd
BatchSenderAddress: addresses.Batcher,
L2OutputOracleSubmissionInterval: 4,
L2OutputOracleStartingTimestamp: -1,
L2OutputOracleProposer: addresses.Proposer,
L2OutputOracleOwner: common.Address{}, // tbd
L1BlockTime: 2,
L1GenesisBlockNonce: 4660,
CliqueSignerAddress: addresses.CliqueSigner,
L1GenesisBlockTimestamp: hexutil.Uint64(time.Now().Unix()),
L1GenesisBlockGasLimit: 5_000_000,
L1GenesisBlockDifficulty: uint642big(1),
L1GenesisBlockMixHash: common.Hash{},
L1GenesisBlockCoinbase: common.Address{},
L1GenesisBlockNumber: 0,
L1GenesisBlockGasUsed: 0,
L1GenesisBlockParentHash: common.Hash{},
L1GenesisBlockBaseFeePerGas: uint642big(7),
L2GenesisBlockNonce: 0,
L2GenesisBlockExtraData: []byte{},
L2GenesisBlockGasLimit: 5_000_000,
L2GenesisBlockDifficulty: uint642big(1),
L2GenesisBlockMixHash: common.Hash{},
L2GenesisBlockCoinbase: common.Address{0: 0x12},
L2GenesisBlockNumber: 0,
L2GenesisBlockGasUsed: 0,
L2GenesisBlockParentHash: common.Hash{},
L2GenesisBlockBaseFeePerGas: uint642big(7),
OptimismBaseFeeRecipient: common.Address{0: 0x52, 19: 0xf0}, // tbd
OptimismL1FeeRecipient: common.Address{0: 0x52, 19: 0xf1},
OptimismL2FeeRecipient: common.Address{0: 0x52, 19: 0xf2}, // tbd
L2CrossDomainMessengerOwner: common.Address{0: 0x52, 19: 0xf3}, // tbd
GasPriceOracleOwner: addresses.Alice, // tbd
GasPriceOracleOverhead: 0,
GasPriceOracleScalar: 0,
GasPriceOracleDecimals: 0,
DeploymentWaitConfirmations: 1,
EIP1559Elasticity: 2,
EIP1559Denominator: 8,
FundDevAccounts: true,
},
L1InfoPredeployAddress: predeploys.L1BlockAddr,
JWTFilePath: writeDefaultJWT(t),
JWTSecret: testingJWTSecret,
Nodes: map[string]*rollupNode.Config{
"verifier": {
Driver: driver.Config{
VerifierConfDepth: 0,
SequencerConfDepth: 0,
SequencerEnabled: false,
},
L1EpochPollInterval: time.Second * 4,
},
"sequencer": {
Driver: driver.Config{
VerifierConfDepth: 0,
SequencerConfDepth: 0,
SequencerEnabled: true,
},
// Submitter PrivKey is set in system start for rollup nodes where sequencer = true
RPC: rollupNode.RPCConfig{
ListenAddr: "127.0.0.1",
ListenPort: 0,
EnableAdmin: true,
},
L1EpochPollInterval: time.Second * 4,
},
},
Loggers: map[string]log.Logger{
"verifier": testlog.Logger(t, log.LvlInfo).New("role", "verifier"),
"sequencer": testlog.Logger(t, log.LvlInfo).New("role", "sequencer"),
"batcher": testlog.Logger(t, log.LvlInfo).New("role", "batcher"),
"proposer": testlog.Logger(t, log.LvlCrit).New("role", "proposer"),
},
P2PTopology: nil, // no P2P connectivity by default
}
} }
// deriveAccount returns the account associated derivation path for the wallet. func writeDefaultJWT(t *testing.T) string {
// It will panic if the derivation path is not correctly formatted. // Sadly the geth node config cannot load JWT secret from memory, it has to be a file
func deriveAccount(w accounts.Wallet, path string) accounts.Account { jwtPath := path.Join(t.TempDir(), "jwt_secret")
derivPath := hdwallet.MustParseDerivationPath(path) if err := os.WriteFile(jwtPath, []byte(hexutil.Encode(testingJWTSecret[:])), 0600); err != nil {
account, err := w.Derive(derivPath, true) t.Fatalf("failed to prepare jwt file for geth: %v", err)
if err != nil {
panic(err)
} }
return account return jwtPath
} }
type L2OOContractConfig struct { type L2OOContractConfig struct {
...@@ -61,257 +164,154 @@ type DepositContractConfig struct { ...@@ -61,257 +164,154 @@ type DepositContractConfig struct {
} }
type SystemConfig struct { type SystemConfig struct {
Mnemonic string Secrets *e2eutils.Secrets
Premine map[string]int // Derivation path -> amount in ETH (not wei) L1InfoPredeployAddress common.Address
CliqueSignerDerivationPath string
L2OutputHDPath string
BatchSubmitterHDPath string
P2PSignerHDPath string
DeployerHDPath string
L1InfoPredeployAddress common.Address
L2OOCfg L2OOContractConfig DeployConfig *genesis.DeployConfig
DepositCFG DepositContractConfig
L1ChainID *big.Int
L2ChainID *big.Int
JWTFilePath string JWTFilePath string
JWTSecret [32]byte JWTSecret [32]byte
Premine map[common.Address]*big.Int
Nodes map[string]*rollupNode.Config // Per node config. Don't use populate rollup.Config Nodes map[string]*rollupNode.Config // Per node config. Don't use populate rollup.Config
Loggers map[string]log.Logger Loggers map[string]log.Logger
ProposerLogger log.Logger ProposerLogger log.Logger
BatcherLogger log.Logger BatcherLogger log.Logger
RollupConfig rollup.Config // Shared rollup configs
L1BlockTime uint64
// map of outbound connections to other nodes. Node names prefixed with "~" are unconnected but linked. // map of outbound connections to other nodes. Node names prefixed with "~" are unconnected but linked.
// A nil map disables P2P completely. // A nil map disables P2P completely.
// Any node name not in the topology will not have p2p enabled. // Any node name not in the topology will not have p2p enabled.
P2PTopology map[string][]string P2PTopology map[string][]string
BaseFeeRecipient common.Address
L1FeeRecipient common.Address
} }
type System struct { type System struct {
cfg SystemConfig cfg SystemConfig
// Retain wallet RollupConfig *rollup.Config
wallet *hdwallet.Wallet
// Connections to running nodes // Connections to running nodes
nodes map[string]*node.Node Nodes map[string]*node.Node
backends map[string]*eth.Ethereum Backends map[string]*geth_eth.Ethereum
Clients map[string]*ethclient.Client Clients map[string]*ethclient.Client
RolupGenesis rollup.Genesis RollupNodes map[string]*rollupNode.OpNode
rollupNodes map[string]*rollupNode.OpNode L2OutputSubmitter *l2os.L2OutputSubmitter
l2OutputSubmitter *l2os.L2OutputSubmitter BatchSubmitter *bss.BatchSubmitter
batchSubmitter *bss.BatchSubmitter Mocknet mocknet.Mocknet
L2OOContractAddr common.Address
DepositContractAddr common.Address
Mocknet mocknet.Mocknet
}
func precompileAlloc() core.GenesisAlloc {
alloc := make(map[common.Address]core.GenesisAccount)
var addr [common.AddressLength]byte
for i := 0; i < 256; i++ {
addr[common.AddressLength-1] = byte(i)
alloc[addr] = core.GenesisAccount{Balance: common.Big1}
}
return alloc
}
func cliqueExtraData(w accounts.Wallet, signers []string) []byte {
// 32 Empty bytes
ret := make([]byte, 32)
// Signer addresses
for _, signer := range signers {
address := deriveAddress(w, signer)
// Was not able to automatically do this
for i := 0; i < len(address); i++ {
ret = append(ret, address[i])
}
}
// 65 Empty bytes
t := make([]byte, 65)
return append(ret, t...)
} }
func (sys *System) Close() { func (sys *System) Close() {
if sys.l2OutputSubmitter != nil { if sys.L2OutputSubmitter != nil {
sys.l2OutputSubmitter.Stop() sys.L2OutputSubmitter.Stop()
} }
if sys.batchSubmitter != nil { if sys.BatchSubmitter != nil {
sys.batchSubmitter.Stop() sys.BatchSubmitter.Stop()
} }
for _, node := range sys.rollupNodes { for _, node := range sys.RollupNodes {
node.Close() node.Close()
} }
for _, node := range sys.nodes { for _, node := range sys.Nodes {
node.Close() node.Close()
} }
sys.Mocknet.Close() sys.Mocknet.Close()
} }
func (cfg SystemConfig) start() (*System, error) { func (cfg SystemConfig) Start() (*System, error) {
sys := &System{ sys := &System{
cfg: cfg, cfg: cfg,
nodes: make(map[string]*node.Node), Nodes: make(map[string]*node.Node),
backends: make(map[string]*eth.Ethereum), Backends: make(map[string]*geth_eth.Ethereum),
Clients: make(map[string]*ethclient.Client), Clients: make(map[string]*ethclient.Client),
rollupNodes: make(map[string]*rollupNode.OpNode), RollupNodes: make(map[string]*rollupNode.OpNode),
} }
didErrAfterStart := false didErrAfterStart := false
defer func() { defer func() {
if didErrAfterStart { if didErrAfterStart {
for _, node := range sys.rollupNodes { for _, node := range sys.RollupNodes {
node.Close() node.Close()
} }
for _, node := range sys.nodes { for _, node := range sys.Nodes {
node.Close() node.Close()
} }
} }
}() }()
// Wallet l1Genesis, err := genesis.BuildL1DeveloperGenesis(cfg.DeployConfig)
wallet, err := hdwallet.NewFromMnemonic(cfg.Mnemonic)
if err != nil {
return nil, fmt.Errorf("Failed to create wallet: %w", err)
}
sys.wallet = wallet
// Create the BSS and set it's config here because it needs to be derived from the accounts
bssPrivKey, err := wallet.PrivateKey(accounts.Account{
URL: accounts.URL{
Path: cfg.BatchSubmitterHDPath,
},
})
if err != nil { if err != nil {
return nil, err return nil, err
} }
batchSubmitterAddr := crypto.PubkeyToAddress(bssPrivKey.PublicKey)
p2pSignerPrivKey, err := wallet.PrivateKey(accounts.Account{ for addr, amount := range cfg.Premine {
URL: accounts.URL{ if existing, ok := l1Genesis.Alloc[addr]; ok {
Path: cfg.P2PSignerHDPath, l1Genesis.Alloc[addr] = core.GenesisAccount{
}, Code: existing.Code,
}) Storage: existing.Storage,
if err != nil { Balance: amount,
return nil, err Nonce: existing.Nonce,
}
} else {
l1Genesis.Alloc[addr] = core.GenesisAccount{
Balance: amount,
Nonce: 0,
}
}
} }
p2pSignerAddr := crypto.PubkeyToAddress(p2pSignerPrivKey.PublicKey)
// Create the L2 Outputsubmitter Address and set it here because it needs to be derived from the accounts l1Block := l1Genesis.ToBlock()
l2OOSubmitter, err := wallet.PrivateKey(accounts.Account{ l2Addrs := &genesis.L2Addresses{
URL: accounts.URL{ ProxyAdmin: predeploys.DevProxyAdminAddr,
Path: cfg.L2OutputHDPath, L1StandardBridgeProxy: predeploys.DevL1StandardBridgeAddr,
}, L1CrossDomainMessengerProxy: predeploys.DevL1CrossDomainMessengerAddr,
}) }
l2Genesis, err := genesis.BuildL2DeveloperGenesis(cfg.DeployConfig, l1Block, l2Addrs)
if err != nil { if err != nil {
return nil, err return nil, err
} }
l2OutputSubmitterAddr := crypto.PubkeyToAddress(l2OOSubmitter.PublicKey)
// Genesis
eth := new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil)
l1Alloc := precompileAlloc()
l2Alloc := precompileAlloc()
for path, amt := range cfg.Premine {
balance := big.NewInt(int64(amt))
balance.Mul(balance, eth)
addr := deriveAddress(wallet, path)
l1Alloc[addr] = core.GenesisAccount{Balance: balance}
l2Alloc[addr] = core.GenesisAccount{Balance: balance}
}
l2Alloc[cfg.L1InfoPredeployAddress] = core.GenesisAccount{Code: common.FromHex(bindings.L1BlockDeployedBin), Balance: common.Big0} makeRollupConfig := func() rollup.Config {
l2Alloc[predeploys.L2ToL1MessagePasserAddr] = core.GenesisAccount{Code: common.FromHex(bindings.L2ToL1MessagePasserDeployedBin), Balance: common.Big0} return rollup.Config{
l2Alloc[predeploys.GasPriceOracleAddr] = core.GenesisAccount{Code: common.FromHex(bindings.GasPriceOracleDeployedBin), Balance: common.Big0, Storage: map[common.Hash]common.Hash{ Genesis: rollup.Genesis{
// storage for GasPriceOracle to have transctorPath wallet as owner L1: eth.BlockID{
common.BigToHash(big.NewInt(0)): common.HexToHash("0x8A0A996b22B103B500Cd0F20d62dF2Ba3364D295"), Hash: l1Block.Hash(),
}} Number: 0,
},
genesisTimestamp := uint64(time.Now().Unix()) L2: eth.BlockID{
Hash: l2Genesis.ToBlock().Hash(),
l1Genesis := &core.Genesis{ Number: 0,
Config: &params.ChainConfig{ },
ChainID: cfg.L1ChainID, L2Time: uint64(cfg.DeployConfig.L1GenesisBlockTimestamp),
HomesteadBlock: common.Big0,
EIP150Block: common.Big0,
EIP155Block: common.Big0,
EIP158Block: common.Big0,
ByzantiumBlock: common.Big0,
ConstantinopleBlock: common.Big0,
PetersburgBlock: common.Big0,
IstanbulBlock: common.Big0,
BerlinBlock: common.Big0,
LondonBlock: common.Big0,
Clique: &params.CliqueConfig{
Period: cfg.L1BlockTime,
Epoch: 30000,
}, },
}, BlockTime: cfg.DeployConfig.L2BlockTime,
Alloc: l1Alloc, MaxSequencerDrift: cfg.DeployConfig.MaxSequencerDrift,
Difficulty: common.Big1, SeqWindowSize: cfg.DeployConfig.SequencerWindowSize,
ExtraData: cliqueExtraData(wallet, []string{cfg.CliqueSignerDerivationPath}), ChannelTimeout: cfg.DeployConfig.ChannelTimeout,
GasLimit: 5000000, L1ChainID: cfg.L1ChainIDBig(),
Nonce: 4660, L2ChainID: cfg.L2ChainIDBig(),
Timestamp: genesisTimestamp, P2PSequencerAddress: cfg.DeployConfig.P2PSequencerAddress,
BaseFee: big.NewInt(7), FeeRecipientAddress: l2Genesis.Coinbase,
} BatchInboxAddress: cfg.DeployConfig.BatchInboxAddress,
l2Genesis := &core.Genesis{ BatchSenderAddress: cfg.DeployConfig.BatchSenderAddress,
Config: &params.ChainConfig{ DepositContractAddress: predeploys.DevOptimismPortalAddr,
ChainID: cfg.L2ChainID, }
HomesteadBlock: common.Big0,
EIP150Block: common.Big0,
EIP155Block: common.Big0,
EIP158Block: common.Big0,
ByzantiumBlock: common.Big0,
ConstantinopleBlock: common.Big0,
PetersburgBlock: common.Big0,
IstanbulBlock: common.Big0,
BerlinBlock: common.Big0,
LondonBlock: common.Big0,
MergeNetsplitBlock: common.Big0,
TerminalTotalDifficulty: common.Big0,
Optimism: &params.OptimismConfig{
BaseFeeRecipient: cfg.BaseFeeRecipient,
L1FeeRecipient: cfg.L1FeeRecipient,
EIP1559Elasticity: 2,
EIP1559Denominator: 8,
},
},
Alloc: l2Alloc,
Difficulty: common.Big1,
GasLimit: 5000000,
Nonce: 0,
// must be equal (or higher, while within bounds) as the L1 anchor point of the rollup
Timestamp: genesisTimestamp,
BaseFee: big.NewInt(7),
} }
defaultConfig := makeRollupConfig()
sys.RollupConfig = &defaultConfig
// Initialize nodes // Initialize nodes
l1Node, l1Backend, err := initL1Geth(&cfg, wallet, l1Genesis) l1Node, l1Backend, err := initL1Geth(&cfg, l1Genesis)
if err != nil { if err != nil {
return nil, err return nil, err
} }
sys.nodes["l1"] = l1Node sys.Nodes["l1"] = l1Node
sys.backends["l1"] = l1Backend sys.Backends["l1"] = l1Backend
for name := range cfg.Nodes { for name := range cfg.Nodes {
node, backend, err := initL2Geth(name, cfg.L2ChainID, l2Genesis, cfg.JWTFilePath) node, backend, err := initL2Geth(name, big.NewInt(int64(cfg.DeployConfig.L2ChainID)), l2Genesis, cfg.JWTFilePath)
if err != nil { if err != nil {
return nil, err return nil, err
} }
sys.nodes[name] = node sys.Nodes[name] = node
sys.backends[name] = backend sys.Backends[name] = backend
} }
// Start // Start
...@@ -325,7 +325,7 @@ func (cfg SystemConfig) start() (*System, error) { ...@@ -325,7 +325,7 @@ func (cfg SystemConfig) start() (*System, error) {
didErrAfterStart = true didErrAfterStart = true
return nil, err return nil, err
} }
for name, node := range sys.nodes { for name, node := range sys.Nodes {
if name == "l1" { if name == "l1" {
continue continue
} }
...@@ -347,9 +347,9 @@ func (cfg SystemConfig) start() (*System, error) { ...@@ -347,9 +347,9 @@ func (cfg SystemConfig) start() (*System, error) {
} }
for name, rollupCfg := range cfg.Nodes { for name, rollupCfg := range cfg.Nodes {
l2EndpointConfig := sys.nodes[name].WSAuthEndpoint() l2EndpointConfig := sys.Nodes[name].WSAuthEndpoint()
if useHTTP { if useHTTP {
l2EndpointConfig = sys.nodes[name].HTTPAuthEndpoint() l2EndpointConfig = sys.Nodes[name].HTTPAuthEndpoint()
} }
rollupCfg.L1 = &rollupNode.L1EndpointConfig{ rollupCfg.L1 = &rollupNode.L1EndpointConfig{
L1NodeAddr: l1EndpointConfig, L1NodeAddr: l1EndpointConfig,
...@@ -371,7 +371,7 @@ func (cfg SystemConfig) start() (*System, error) { ...@@ -371,7 +371,7 @@ func (cfg SystemConfig) start() (*System, error) {
} }
l1Client := ethclient.NewClient(rpc.DialInProc(l1Srv)) l1Client := ethclient.NewClient(rpc.DialInProc(l1Srv))
sys.Clients["l1"] = l1Client sys.Clients["l1"] = l1Client
for name, node := range sys.nodes { for name, node := range sys.Nodes {
client, err := ethclient.DialContext(ctx, node.WSEndpoint()) client, err := ethclient.DialContext(ctx, node.WSEndpoint())
if err != nil { if err != nil {
didErrAfterStart = true didErrAfterStart = true
...@@ -380,79 +380,9 @@ func (cfg SystemConfig) start() (*System, error) { ...@@ -380,79 +380,9 @@ func (cfg SystemConfig) start() (*System, error) {
sys.Clients[name] = client sys.Clients[name] = client
} }
// Rollup Genesis _, err = waitForBlock(big.NewInt(2), l1Client, 6*time.Second*time.Duration(cfg.DeployConfig.L1BlockTime))
l1GenesisID, _ := getGenesisInfo(l1Client)
var l2Client *ethclient.Client
for name, client := range sys.Clients {
if name != "l1" {
l2Client = client
break
}
}
l2GenesisID, l2GenesisTime := getGenesisInfo(l2Client)
sys.RolupGenesis = rollup.Genesis{
L1: l1GenesisID,
L2: l2GenesisID,
L2Time: l2GenesisTime,
}
sys.cfg.RollupConfig.Genesis = sys.RolupGenesis
sys.cfg.RollupConfig.BatchSenderAddress = batchSubmitterAddr
sys.cfg.RollupConfig.P2PSequencerAddress = p2pSignerAddr
// Deploy Deposit Contract
deployerPrivKey, err := sys.wallet.PrivateKey(accounts.Account{
URL: accounts.URL{
Path: cfg.DeployerHDPath,
},
})
if err != nil { if err != nil {
return nil, err return nil, fmt.Errorf("waiting for blocks: %w", err)
}
opts, err := bind.NewKeyedTransactorWithChainID(deployerPrivKey, cfg.L1ChainID)
if err != nil {
return nil, err
}
// empty genesis L2 output.
// Technically this may need to be computed with l2.ComputeL2OutputRoot(...),
// but there are no fraud proofs active in the test.
genesisL2Output := [32]byte{}
// Deploy contracts
sys.L2OOContractAddr, _, _, err = bindings.DeployL2OutputOracle(
opts,
l1Client,
sys.cfg.L2OOCfg.SubmissionFrequency,
genesisL2Output,
sys.cfg.L2OOCfg.HistoricalTotalBlocks,
new(big.Int).SetUint64(l2GenesisID.Number),
new(big.Int).SetUint64(l2Genesis.Timestamp),
new(big.Int).SetUint64(sys.cfg.RollupConfig.BlockTime),
l2OutputSubmitterAddr,
crypto.PubkeyToAddress(deployerPrivKey.PublicKey),
)
sys.cfg.DepositCFG.L2Oracle = sys.L2OOContractAddr
if err != nil {
return nil, err
}
var tx *types.Transaction
sys.DepositContractAddr, tx, _, err = bindings.DeployOptimismPortal(
opts,
l1Client,
sys.cfg.DepositCFG.L2Oracle,
sys.cfg.DepositCFG.FinalizationPeriod,
)
if err != nil {
return nil, err
}
// Wait up to 6 blocks to deploy the Optimism portal
_, err = waitForTransaction(tx.Hash(), l1Client, 6*time.Second*time.Duration(cfg.L1BlockTime))
if err != nil {
return nil, fmt.Errorf("waiting for OptimismPortal: %w", err)
} }
sys.Mocknet = mocknet.New() sys.Mocknet = mocknet.New()
...@@ -509,14 +439,13 @@ func (cfg SystemConfig) start() (*System, error) { ...@@ -509,14 +439,13 @@ func (cfg SystemConfig) start() (*System, error) {
// Rollup nodes // Rollup nodes
for name, nodeConfig := range cfg.Nodes { for name, nodeConfig := range cfg.Nodes {
c := *nodeConfig // copy c := *nodeConfig // copy
c.Rollup = sys.cfg.RollupConfig c.Rollup = makeRollupConfig()
c.Rollup.DepositContractAddress = sys.DepositContractAddr
if p, ok := p2pNodes[name]; ok { if p, ok := p2pNodes[name]; ok {
c.P2P = p c.P2P = p
if c.Driver.SequencerEnabled { if c.Driver.SequencerEnabled {
c.P2PSigner = &p2p.PreparedSigner{Signer: p2p.NewLocalSigner(p2pSignerPrivKey)} c.P2PSigner = &p2p.PreparedSigner{Signer: p2p.NewLocalSigner(cfg.Secrets.SequencerP2P)}
} }
} }
...@@ -530,7 +459,7 @@ func (cfg SystemConfig) start() (*System, error) { ...@@ -530,7 +459,7 @@ func (cfg SystemConfig) start() (*System, error) {
didErrAfterStart = true didErrAfterStart = true
return nil, err return nil, err
} }
sys.rollupNodes[name] = node sys.RollupNodes[name] = node
} }
if cfg.P2PTopology != nil { if cfg.P2PTopology != nil {
...@@ -555,11 +484,11 @@ func (cfg SystemConfig) start() (*System, error) { ...@@ -555,11 +484,11 @@ func (cfg SystemConfig) start() (*System, error) {
} }
// L2Output Submitter // L2Output Submitter
sys.l2OutputSubmitter, err = l2os.NewL2OutputSubmitter(l2os.Config{ sys.L2OutputSubmitter, err = l2os.NewL2OutputSubmitter(l2os.Config{
L1EthRpc: sys.nodes["l1"].WSEndpoint(), L1EthRpc: sys.Nodes["l1"].WSEndpoint(),
L2EthRpc: sys.nodes["sequencer"].WSEndpoint(), L2EthRpc: sys.Nodes["sequencer"].WSEndpoint(),
RollupRpc: sys.rollupNodes["sequencer"].HTTPEndpoint(), RollupRpc: sys.RollupNodes["sequencer"].HTTPEndpoint(),
L2OOAddress: sys.L2OOContractAddr.String(), L2OOAddress: predeploys.DevL2OutputOracleAddr.String(),
PollInterval: 50 * time.Millisecond, PollInterval: 50 * time.Millisecond,
NumConfirmations: 1, NumConfirmations: 1,
ResubmissionTimeout: 3 * time.Second, ResubmissionTimeout: 3 * time.Second,
...@@ -568,25 +497,24 @@ func (cfg SystemConfig) start() (*System, error) { ...@@ -568,25 +497,24 @@ func (cfg SystemConfig) start() (*System, error) {
Level: "info", Level: "info",
Format: "text", Format: "text",
}, },
Mnemonic: sys.cfg.Mnemonic, PrivateKey: hexPriv(cfg.Secrets.Proposer),
L2OutputHDPath: sys.cfg.L2OutputHDPath,
}, "", sys.cfg.Loggers["proposer"]) }, "", sys.cfg.Loggers["proposer"])
if err != nil { if err != nil {
return nil, fmt.Errorf("unable to setup l2 output submitter: %w", err) return nil, fmt.Errorf("unable to setup l2 output submitter: %w", err)
} }
if err := sys.l2OutputSubmitter.Start(); err != nil { if err := sys.L2OutputSubmitter.Start(); err != nil {
return nil, fmt.Errorf("unable to start l2 output submitter: %w", err) return nil, fmt.Errorf("unable to start l2 output submitter: %w", err)
} }
// Batch Submitter // Batch Submitter
sys.batchSubmitter, err = bss.NewBatchSubmitter(bss.Config{ sys.BatchSubmitter, err = bss.NewBatchSubmitter(bss.Config{
L1EthRpc: sys.nodes["l1"].WSEndpoint(), L1EthRpc: sys.Nodes["l1"].WSEndpoint(),
L2EthRpc: sys.nodes["sequencer"].WSEndpoint(), L2EthRpc: sys.Nodes["sequencer"].WSEndpoint(),
RollupRpc: sys.rollupNodes["sequencer"].HTTPEndpoint(), RollupRpc: sys.RollupNodes["sequencer"].HTTPEndpoint(),
MinL1TxSize: 1, MinL1TxSize: 1,
MaxL1TxSize: 120000, MaxL1TxSize: 120000,
ChannelTimeout: sys.cfg.RollupConfig.ChannelTimeout, ChannelTimeout: cfg.DeployConfig.ChannelTimeout,
PollInterval: 50 * time.Millisecond, PollInterval: 50 * time.Millisecond,
NumConfirmations: 1, NumConfirmations: 1,
ResubmissionTimeout: 5 * time.Second, ResubmissionTimeout: 5 * time.Second,
...@@ -595,17 +523,35 @@ func (cfg SystemConfig) start() (*System, error) { ...@@ -595,17 +523,35 @@ func (cfg SystemConfig) start() (*System, error) {
Level: "info", Level: "info",
Format: "text", Format: "text",
}, },
Mnemonic: sys.cfg.Mnemonic, PrivateKey: hexPriv(cfg.Secrets.Batcher),
SequencerHDPath: sys.cfg.BatchSubmitterHDPath, SequencerBatchInboxAddress: cfg.DeployConfig.BatchInboxAddress.String(),
SequencerBatchInboxAddress: sys.cfg.RollupConfig.BatchInboxAddress.String(),
}, sys.cfg.Loggers["batcher"]) }, sys.cfg.Loggers["batcher"])
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to setup batch submitter: %w", err) return nil, fmt.Errorf("failed to setup batch submitter: %w", err)
} }
if err := sys.batchSubmitter.Start(); err != nil { if err := sys.BatchSubmitter.Start(); err != nil {
return nil, fmt.Errorf("unable to start batch submitter: %w", err) return nil, fmt.Errorf("unable to start batch submitter: %w", err)
} }
return sys, nil return sys, nil
} }
func (cfg SystemConfig) L1ChainIDBig() *big.Int {
return new(big.Int).SetUint64(cfg.DeployConfig.L1ChainID)
}
func (cfg SystemConfig) L2ChainIDBig() *big.Int {
return new(big.Int).SetUint64(cfg.DeployConfig.L2ChainID)
}
func uint642big(in uint64) *hexutil.Big {
b := new(big.Int).SetUint64(in)
hu := hexutil.Big(*b)
return &hu
}
func hexPriv(in *ecdsa.PrivateKey) string {
b := e2eutils.EncodePrivKey(in)
return hexutil.Encode(b)
}
...@@ -5,28 +5,20 @@ import ( ...@@ -5,28 +5,20 @@ import (
"flag" "flag"
"fmt" "fmt"
"math/big" "math/big"
"os"
"path"
"testing" "testing"
"time" "time"
"github.com/ethereum-optimism/optimism/op-bindings/bindings" "github.com/ethereum-optimism/optimism/op-bindings/bindings"
"github.com/ethereum-optimism/optimism/op-bindings/predeploys" "github.com/ethereum-optimism/optimism/op-bindings/predeploys"
"github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/eth"
"github.com/ethereum-optimism/optimism/op-node/node"
rollupNode "github.com/ethereum-optimism/optimism/op-node/node"
"github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-node/rollup/derive" "github.com/ethereum-optimism/optimism/op-node/rollup/derive"
"github.com/ethereum-optimism/optimism/op-node/rollup/driver"
"github.com/ethereum-optimism/optimism/op-node/sources" "github.com/ethereum-optimism/optimism/op-node/sources"
"github.com/ethereum-optimism/optimism/op-node/testlog" "github.com/ethereum-optimism/optimism/op-node/testlog"
"github.com/ethereum-optimism/optimism/op-node/withdrawals" "github.com/ethereum-optimism/optimism/op-node/withdrawals"
"github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/accounts/keystore"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/ethclient"
...@@ -49,130 +41,26 @@ func init() { ...@@ -49,130 +41,26 @@ func init() {
flag.Parse() flag.Parse()
} }
// Temporary until the contract is deployed properly instead of as a pre-deploy to a specific address
var MockDepositContractAddr = common.HexToAddress("0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001")
const (
cliqueSignerHDPath = "m/44'/60'/0'/0/0"
transactorHDPath = "m/44'/60'/0'/0/1"
l2OutputHDPath = "m/44'/60'/0'/0/3"
bssHDPath = "m/44'/60'/0'/0/4"
p2pSignerHDPath = "m/44'/60'/0'/0/5"
deployerHDPath = "m/44'/60'/0'/0/6"
)
var (
batchInboxAddress = common.Address{0xff, 0x02}
testingJWTSecret = [32]byte{123}
)
func writeDefaultJWT(t *testing.T) string {
// Sadly the geth node config cannot load JWT secret from memory, it has to be a file
jwtPath := path.Join(t.TempDir(), "jwt_secret")
if err := os.WriteFile(jwtPath, []byte(hexutil.Encode(testingJWTSecret[:])), 0600); err != nil {
t.Fatalf("failed to prepare jwt file for geth: %v", err)
}
return jwtPath
}
func defaultSystemConfig(t *testing.T) SystemConfig {
return SystemConfig{
Mnemonic: "squirrel green gallery layer logic title habit chase clog actress language enrich body plate fun pledge gap abuse mansion define either blast alien witness",
Premine: map[string]int{
cliqueSignerHDPath: 10000000,
transactorHDPath: 10000000,
l2OutputHDPath: 10000000,
bssHDPath: 10000000,
deployerHDPath: 10000000,
},
DepositCFG: DepositContractConfig{
FinalizationPeriod: big.NewInt(60 * 60 * 24),
},
L2OOCfg: L2OOContractConfig{
SubmissionFrequency: big.NewInt(4),
HistoricalTotalBlocks: big.NewInt(0),
},
L2OutputHDPath: l2OutputHDPath,
BatchSubmitterHDPath: bssHDPath,
P2PSignerHDPath: p2pSignerHDPath,
DeployerHDPath: deployerHDPath,
CliqueSignerDerivationPath: cliqueSignerHDPath,
L1InfoPredeployAddress: predeploys.L1BlockAddr,
L1BlockTime: 2,
L1ChainID: big.NewInt(900),
L2ChainID: big.NewInt(901),
JWTFilePath: writeDefaultJWT(t),
JWTSecret: testingJWTSecret,
Nodes: map[string]*rollupNode.Config{
"verifier": {
Driver: driver.Config{
VerifierConfDepth: 0,
SequencerConfDepth: 0,
SequencerEnabled: false,
},
L1EpochPollInterval: time.Second * 4,
},
"sequencer": {
Driver: driver.Config{
VerifierConfDepth: 0,
SequencerConfDepth: 0,
SequencerEnabled: true,
},
// Submitter PrivKey is set in system start for rollup nodes where sequencer = true
RPC: node.RPCConfig{
ListenAddr: "127.0.0.1",
ListenPort: 0,
EnableAdmin: true,
},
L1EpochPollInterval: time.Second * 4,
},
},
Loggers: map[string]log.Logger{
"verifier": testlog.Logger(t, log.LvlInfo).New("role", "verifier"),
"sequencer": testlog.Logger(t, log.LvlInfo).New("role", "sequencer"),
"batcher": testlog.Logger(t, log.LvlInfo).New("role", "batcher"),
"proposer": testlog.Logger(t, log.LvlCrit).New("role", "proposer"),
},
RollupConfig: rollup.Config{
BlockTime: 1,
MaxSequencerDrift: 10,
SeqWindowSize: 30,
ChannelTimeout: 10,
L1ChainID: big.NewInt(900),
L2ChainID: big.NewInt(901),
// TODO pick defaults
P2PSequencerAddress: common.Address{}, // TODO configure sequencer p2p key
FeeRecipientAddress: common.Address{0xff, 0x01},
BatchInboxAddress: batchInboxAddress,
// Batch Sender address is filled out in system start
DepositContractAddress: MockDepositContractAddr,
},
P2PTopology: nil, // no P2P connectivity by default
BaseFeeRecipient: common.HexToAddress("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"),
L1FeeRecipient: common.HexToAddress("0xDe3829A23DF1479438622a08a116E8Eb3f620BB5"),
}
}
func TestL2OutputSubmitter(t *testing.T) { func TestL2OutputSubmitter(t *testing.T) {
t.Parallel() t.Parallel()
if !verboseGethNodes { if !verboseGethNodes {
log.Root().SetHandler(log.DiscardHandler()) log.Root().SetHandler(log.DiscardHandler())
} }
cfg := defaultSystemConfig(t) cfg := DefaultSystemConfig(t)
sys, err := cfg.start() sys, err := cfg.Start()
require.Nil(t, err, "Error starting up system") require.Nil(t, err, "Error starting up system")
defer sys.Close() defer sys.Close()
l1Client := sys.Clients["l1"] l1Client := sys.Clients["l1"]
rollupRPCClient, err := rpc.DialContext(context.Background(), sys.rollupNodes["sequencer"].HTTPEndpoint()) rollupRPCClient, err := rpc.DialContext(context.Background(), sys.RollupNodes["sequencer"].HTTPEndpoint())
require.Nil(t, err) require.Nil(t, err)
rollupClient := sources.NewRollupClient(rollupRPCClient) rollupClient := sources.NewRollupClient(rollupRPCClient)
// OutputOracle is already deployed // OutputOracle is already deployed
l2OutputOracle, err := bindings.NewL2OutputOracleCaller(sys.L2OOContractAddr, l1Client) l2OutputOracle, err := bindings.NewL2OutputOracleCaller(predeploys.DevL2OutputOracleAddr, l1Client)
require.Nil(t, err) require.Nil(t, err)
initialOutputBlockNumber, err := l2OutputOracle.LatestBlockNumber(&bind.CallOpts{}) initialOutputBlockNumber, err := l2OutputOracle.LatestBlockNumber(&bind.CallOpts{})
...@@ -184,7 +72,7 @@ func TestL2OutputSubmitter(t *testing.T) { ...@@ -184,7 +72,7 @@ func TestL2OutputSubmitter(t *testing.T) {
// for that block and subsequently reorgs to match what the verifier derives when running the // for that block and subsequently reorgs to match what the verifier derives when running the
// reconcillation process. // reconcillation process.
l2Verif := sys.Clients["verifier"] l2Verif := sys.Clients["verifier"]
_, err = waitForBlock(big.NewInt(6), l2Verif, 10*time.Duration(cfg.RollupConfig.BlockTime)*time.Second) _, err = waitForBlock(big.NewInt(6), l2Verif, 10*time.Duration(cfg.DeployConfig.L2BlockTime)*time.Second)
require.Nil(t, err) require.Nil(t, err)
// Wait for batch submitter to update L2 output oracle. // Wait for batch submitter to update L2 output oracle.
...@@ -224,7 +112,6 @@ func TestL2OutputSubmitter(t *testing.T) { ...@@ -224,7 +112,6 @@ func TestL2OutputSubmitter(t *testing.T) {
case <-ticker.C: case <-ticker.C:
} }
} }
} }
// TestSystemE2E sets up a L1 Geth node, a rollup node, and a L2 geth node and then confirms that L1 deposits are reflected on L2. // TestSystemE2E sets up a L1 Geth node, a rollup node, and a L2 geth node and then confirms that L1 deposits are reflected on L2.
...@@ -235,38 +122,31 @@ func TestSystemE2E(t *testing.T) { ...@@ -235,38 +122,31 @@ func TestSystemE2E(t *testing.T) {
log.Root().SetHandler(log.DiscardHandler()) log.Root().SetHandler(log.DiscardHandler())
} }
cfg := defaultSystemConfig(t) cfg := DefaultSystemConfig(t)
sys, err := cfg.start() sys, err := cfg.Start()
require.Nil(t, err, "Error starting up system") require.Nil(t, err, "Error starting up system")
defer sys.Close() defer sys.Close()
log := testlog.Logger(t, log.LvlInfo) log := testlog.Logger(t, log.LvlInfo)
log.Info("genesis", "l2", sys.cfg.RollupConfig.Genesis.L2, "l1", sys.cfg.RollupConfig.Genesis.L1, "l2_time", sys.cfg.RollupConfig.Genesis.L2Time) log.Info("genesis", "l2", sys.RollupConfig.Genesis.L2, "l1", sys.RollupConfig.Genesis.L1, "l2_time", sys.RollupConfig.Genesis.L2Time)
l1Client := sys.Clients["l1"] l1Client := sys.Clients["l1"]
l2Seq := sys.Clients["sequencer"] l2Seq := sys.Clients["sequencer"]
l2Verif := sys.Clients["verifier"] l2Verif := sys.Clients["verifier"]
// Transactor Account // Transactor Account
ethPrivKey, err := sys.wallet.PrivateKey(accounts.Account{ ethPrivKey := sys.cfg.Secrets.Alice
URL: accounts.URL{
Path: "m/44'/60'/0'/0/0",
},
})
require.Nil(t, err)
// Send Transaction & wait for success // Send Transaction & wait for success
fromAddr := common.HexToAddress("0x30ec912c5b1d14aa6d1cb9aa7a6682415c4f7eb0") fromAddr := sys.cfg.Secrets.Addresses().Alice
// Find deposit contract // Find deposit contract
depositContract, err := bindings.NewOptimismPortal(sys.DepositContractAddr, l1Client) depositContract, err := bindings.NewOptimismPortal(predeploys.DevOptimismPortalAddr, l1Client)
require.Nil(t, err) require.Nil(t, err)
l1Node := sys.nodes["l1"]
// Create signer // Create signer
ks := l1Node.AccountManager().Backends(keystore.KeyStoreType)[0].(*keystore.KeyStore) opts, err := bind.NewKeyedTransactorWithChainID(ethPrivKey, cfg.L1ChainIDBig())
opts, err := bind.NewKeyStoreTransactorWithChainID(ks, ks.Accounts()[0], cfg.L1ChainID)
require.Nil(t, err) require.Nil(t, err)
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
...@@ -280,13 +160,13 @@ func TestSystemE2E(t *testing.T) { ...@@ -280,13 +160,13 @@ func TestSystemE2E(t *testing.T) {
tx, err := depositContract.DepositTransaction(opts, fromAddr, common.Big0, 1_000_000, false, nil) tx, err := depositContract.DepositTransaction(opts, fromAddr, common.Big0, 1_000_000, false, nil)
require.Nil(t, err, "with deposit tx") require.Nil(t, err, "with deposit tx")
receipt, err := waitForTransaction(tx.Hash(), l1Client, 3*time.Duration(cfg.L1BlockTime)*time.Second) receipt, err := waitForTransaction(tx.Hash(), l1Client, 3*time.Duration(cfg.DeployConfig.L1BlockTime)*time.Second)
require.Nil(t, err, "Waiting for deposit tx on L1") require.Nil(t, err, "Waiting for deposit tx on L1")
reconstructedDep, err := derive.UnmarshalDepositLogEvent(receipt.Logs[0]) reconstructedDep, err := derive.UnmarshalDepositLogEvent(receipt.Logs[0])
require.NoError(t, err, "Could not reconstruct L2 Deposit") require.NoError(t, err, "Could not reconstruct L2 Deposit")
tx = types.NewTx(reconstructedDep) tx = types.NewTx(reconstructedDep)
receipt, err = waitForTransaction(tx.Hash(), l2Verif, 6*time.Duration(cfg.L1BlockTime)*time.Second) receipt, err = waitForTransaction(tx.Hash(), l2Verif, 6*time.Duration(cfg.DeployConfig.L1BlockTime)*time.Second)
require.NoError(t, err) require.NoError(t, err)
require.Equal(t, receipt.Status, types.ReceiptStatusSuccessful) require.Equal(t, receipt.Status, types.ReceiptStatusSuccessful)
...@@ -298,12 +178,12 @@ func TestSystemE2E(t *testing.T) { ...@@ -298,12 +178,12 @@ func TestSystemE2E(t *testing.T) {
diff := new(big.Int) diff := new(big.Int)
diff = diff.Sub(endBalance, startBalance) diff = diff.Sub(endBalance, startBalance)
require.Equal(t, diff, mintAmount, "Did not get expected balance change") require.Equal(t, mintAmount, diff, "Did not get expected balance change")
// Submit TX to L2 sequencer node // Submit TX to L2 sequencer node
toAddr := common.Address{0xff, 0xff} toAddr := common.Address{0xff, 0xff}
tx = types.MustSignNewTx(ethPrivKey, types.LatestSignerForChainID(cfg.L2ChainID), &types.DynamicFeeTx{ tx = types.MustSignNewTx(ethPrivKey, types.LatestSignerForChainID(cfg.L2ChainIDBig()), &types.DynamicFeeTx{
ChainID: cfg.L2ChainID, ChainID: cfg.L2ChainIDBig(),
Nonce: 1, // Already have deposit Nonce: 1, // Already have deposit
To: &toAddr, To: &toAddr,
Value: big.NewInt(1_000_000_000), Value: big.NewInt(1_000_000_000),
...@@ -314,10 +194,10 @@ func TestSystemE2E(t *testing.T) { ...@@ -314,10 +194,10 @@ func TestSystemE2E(t *testing.T) {
err = l2Seq.SendTransaction(context.Background(), tx) err = l2Seq.SendTransaction(context.Background(), tx)
require.Nil(t, err, "Sending L2 tx to sequencer") require.Nil(t, err, "Sending L2 tx to sequencer")
_, err = waitForTransaction(tx.Hash(), l2Seq, 3*time.Duration(cfg.L1BlockTime)*time.Second) _, err = waitForTransaction(tx.Hash(), l2Seq, 3*time.Duration(cfg.DeployConfig.L1BlockTime)*time.Second)
require.Nil(t, err, "Waiting for L2 tx on sequencer") require.Nil(t, err, "Waiting for L2 tx on sequencer")
receipt, err = waitForTransaction(tx.Hash(), l2Verif, 10*time.Duration(cfg.L1BlockTime)*time.Second) receipt, err = waitForTransaction(tx.Hash(), l2Verif, 10*time.Duration(cfg.DeployConfig.L1BlockTime)*time.Second)
require.Nil(t, err, "Waiting for L2 tx on verifier") require.Nil(t, err, "Waiting for L2 tx on verifier")
require.Equal(t, types.ReceiptStatusSuccessful, receipt.Status, "TX should have succeeded") require.Equal(t, types.ReceiptStatusSuccessful, receipt.Status, "TX should have succeeded")
...@@ -330,7 +210,7 @@ func TestSystemE2E(t *testing.T) { ...@@ -330,7 +210,7 @@ func TestSystemE2E(t *testing.T) {
require.Equal(t, verifBlock.ParentHash(), seqBlock.ParentHash(), "Verifier and sequencer blocks parent hashes not the same after including a batch tx") require.Equal(t, verifBlock.ParentHash(), seqBlock.ParentHash(), "Verifier and sequencer blocks parent hashes not the same after including a batch tx")
require.Equal(t, verifBlock.Hash(), seqBlock.Hash(), "Verifier and sequencer blocks not the same after including a batch tx") require.Equal(t, verifBlock.Hash(), seqBlock.Hash(), "Verifier and sequencer blocks not the same after including a batch tx")
rollupRPCClient, err := rpc.DialContext(context.Background(), sys.rollupNodes["sequencer"].HTTPEndpoint()) rollupRPCClient, err := rpc.DialContext(context.Background(), sys.RollupNodes["sequencer"].HTTPEndpoint())
require.Nil(t, err) require.Nil(t, err)
rollupClient := sources.NewRollupClient(rollupRPCClient) rollupClient := sources.NewRollupClient(rollupRPCClient)
// basic check that sync status works // basic check that sync status works
...@@ -350,21 +230,21 @@ func TestConfirmationDepth(t *testing.T) { ...@@ -350,21 +230,21 @@ func TestConfirmationDepth(t *testing.T) {
log.Root().SetHandler(log.DiscardHandler()) log.Root().SetHandler(log.DiscardHandler())
} }
cfg := defaultSystemConfig(t) cfg := DefaultSystemConfig(t)
cfg.RollupConfig.SeqWindowSize = 4 cfg.DeployConfig.SequencerWindowSize = 4
cfg.RollupConfig.MaxSequencerDrift = 3 * cfg.L1BlockTime cfg.DeployConfig.MaxSequencerDrift = 3 * cfg.DeployConfig.L1BlockTime
seqConfDepth := uint64(2) seqConfDepth := uint64(2)
verConfDepth := uint64(5) verConfDepth := uint64(5)
cfg.Nodes["sequencer"].Driver.SequencerConfDepth = seqConfDepth cfg.Nodes["sequencer"].Driver.SequencerConfDepth = seqConfDepth
cfg.Nodes["sequencer"].Driver.VerifierConfDepth = 0 cfg.Nodes["sequencer"].Driver.VerifierConfDepth = 0
cfg.Nodes["verifier"].Driver.VerifierConfDepth = verConfDepth cfg.Nodes["verifier"].Driver.VerifierConfDepth = verConfDepth
sys, err := cfg.start() sys, err := cfg.Start()
require.Nil(t, err, "Error starting up system") require.Nil(t, err, "Error starting up system")
defer sys.Close() defer sys.Close()
log := testlog.Logger(t, log.LvlInfo) log := testlog.Logger(t, log.LvlInfo)
log.Info("genesis", "l2", sys.cfg.RollupConfig.Genesis.L2, "l1", sys.cfg.RollupConfig.Genesis.L1, "l2_time", sys.cfg.RollupConfig.Genesis.L2Time) log.Info("genesis", "l2", sys.RollupConfig.Genesis.L2, "l1", sys.RollupConfig.Genesis.L1, "l2_time", sys.RollupConfig.Genesis.L2Time)
l1Client := sys.Clients["l1"] l1Client := sys.Clients["l1"]
l2Seq := sys.Clients["sequencer"] l2Seq := sys.Clients["sequencer"]
...@@ -372,7 +252,7 @@ func TestConfirmationDepth(t *testing.T) { ...@@ -372,7 +252,7 @@ func TestConfirmationDepth(t *testing.T) {
// Wait enough time for the sequencer to submit a block with distance from L1 head, submit it, // Wait enough time for the sequencer to submit a block with distance from L1 head, submit it,
// and for the slower verifier to read a full sequence window and cover confirmation depth for reading and some margin // and for the slower verifier to read a full sequence window and cover confirmation depth for reading and some margin
<-time.After(time.Duration((cfg.RollupConfig.SeqWindowSize+verConfDepth+3)*cfg.L1BlockTime) * time.Second) <-time.After(time.Duration((cfg.DeployConfig.SequencerWindowSize+verConfDepth+3)*cfg.DeployConfig.L1BlockTime) * time.Second)
// within a second, get both L1 and L2 verifier and sequencer block heads // within a second, get both L1 and L2 verifier and sequencer block heads
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
...@@ -388,7 +268,7 @@ func TestConfirmationDepth(t *testing.T) { ...@@ -388,7 +268,7 @@ func TestConfirmationDepth(t *testing.T) {
require.NoError(t, err) require.NoError(t, err)
require.LessOrEqual(t, info.Number+seqConfDepth, l1Head.NumberU64(), "the L2 head block should have an origin older than the L1 head block by at least the sequencer conf depth") require.LessOrEqual(t, info.Number+seqConfDepth, l1Head.NumberU64(), "the L2 head block should have an origin older than the L1 head block by at least the sequencer conf depth")
require.LessOrEqual(t, l2VerHead.Time()+cfg.L1BlockTime*verConfDepth, l2SeqHead.Time(), "the L2 verifier head should lag behind the sequencer without delay by at least the verifier conf depth") require.LessOrEqual(t, l2VerHead.Time()+cfg.DeployConfig.L1BlockTime*verConfDepth, l2SeqHead.Time(), "the L2 verifier head should lag behind the sequencer without delay by at least the verifier conf depth")
} }
// TestFinalize tests if L2 finalizes after sufficient time after L1 finalizes // TestFinalize tests if L2 finalizes after sufficient time after L1 finalizes
...@@ -398,9 +278,9 @@ func TestFinalize(t *testing.T) { ...@@ -398,9 +278,9 @@ func TestFinalize(t *testing.T) {
log.Root().SetHandler(log.DiscardHandler()) log.Root().SetHandler(log.DiscardHandler())
} }
cfg := defaultSystemConfig(t) cfg := DefaultSystemConfig(t)
sys, err := cfg.start() sys, err := cfg.Start()
require.Nil(t, err, "Error starting up system") require.Nil(t, err, "Error starting up system")
defer sys.Close() defer sys.Close()
...@@ -409,7 +289,7 @@ func TestFinalize(t *testing.T) { ...@@ -409,7 +289,7 @@ func TestFinalize(t *testing.T) {
// as configured in the extra geth lifecycle in testing setup // as configured in the extra geth lifecycle in testing setup
finalizedDistance := uint64(8) finalizedDistance := uint64(8)
// Wait enough time for L1 to finalize and L2 to confirm its data in finalized L1 blocks // Wait enough time for L1 to finalize and L2 to confirm its data in finalized L1 blocks
<-time.After(time.Duration((finalizedDistance+4)*cfg.L1BlockTime) * time.Second) <-time.After(time.Duration((finalizedDistance+4)*cfg.DeployConfig.L1BlockTime) * time.Second)
// fetch the finalizes head of geth // fetch the finalizes head of geth
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
...@@ -425,9 +305,9 @@ func TestMintOnRevertedDeposit(t *testing.T) { ...@@ -425,9 +305,9 @@ func TestMintOnRevertedDeposit(t *testing.T) {
if !verboseGethNodes { if !verboseGethNodes {
log.Root().SetHandler(log.DiscardHandler()) log.Root().SetHandler(log.DiscardHandler())
} }
cfg := defaultSystemConfig(t) cfg := DefaultSystemConfig(t)
sys, err := cfg.start() sys, err := cfg.Start()
require.Nil(t, err, "Error starting up system") require.Nil(t, err, "Error starting up system")
defer sys.Close() defer sys.Close()
...@@ -435,13 +315,13 @@ func TestMintOnRevertedDeposit(t *testing.T) { ...@@ -435,13 +315,13 @@ func TestMintOnRevertedDeposit(t *testing.T) {
l2Verif := sys.Clients["verifier"] l2Verif := sys.Clients["verifier"]
// Find deposit contract // Find deposit contract
depositContract, err := bindings.NewOptimismPortal(sys.DepositContractAddr, l1Client) depositContract, err := bindings.NewOptimismPortal(predeploys.DevOptimismPortalAddr, l1Client)
require.Nil(t, err) require.Nil(t, err)
l1Node := sys.nodes["l1"] l1Node := sys.Nodes["l1"]
// create signer // create signer
ks := l1Node.AccountManager().Backends(keystore.KeyStoreType)[0].(*keystore.KeyStore) ks := l1Node.AccountManager().Backends(keystore.KeyStoreType)[0].(*keystore.KeyStore)
opts, err := bind.NewKeyStoreTransactorWithChainID(ks, ks.Accounts()[0], cfg.L1ChainID) opts, err := bind.NewKeyStoreTransactorWithChainID(ks, ks.Accounts()[0], cfg.L1ChainIDBig())
require.Nil(t, err) require.Nil(t, err)
fromAddr := opts.From fromAddr := opts.From
...@@ -462,13 +342,13 @@ func TestMintOnRevertedDeposit(t *testing.T) { ...@@ -462,13 +342,13 @@ func TestMintOnRevertedDeposit(t *testing.T) {
tx, err := depositContract.DepositTransaction(opts, toAddr, value, 1_000_000, false, nil) tx, err := depositContract.DepositTransaction(opts, toAddr, value, 1_000_000, false, nil)
require.Nil(t, err, "with deposit tx") require.Nil(t, err, "with deposit tx")
receipt, err := waitForTransaction(tx.Hash(), l1Client, 3*time.Duration(cfg.L1BlockTime)*time.Second) receipt, err := waitForTransaction(tx.Hash(), l1Client, 3*time.Duration(cfg.DeployConfig.L1BlockTime)*time.Second)
require.Nil(t, err, "Waiting for deposit tx on L1") require.Nil(t, err, "Waiting for deposit tx on L1")
reconstructedDep, err := derive.UnmarshalDepositLogEvent(receipt.Logs[0]) reconstructedDep, err := derive.UnmarshalDepositLogEvent(receipt.Logs[0])
require.NoError(t, err, "Could not reconstruct L2 Deposit") require.NoError(t, err, "Could not reconstruct L2 Deposit")
tx = types.NewTx(reconstructedDep) tx = types.NewTx(reconstructedDep)
receipt, err = waitForTransaction(tx.Hash(), l2Verif, 3*time.Duration(cfg.L1BlockTime)*time.Second) receipt, err = waitForTransaction(tx.Hash(), l2Verif, 3*time.Duration(cfg.DeployConfig.L1BlockTime)*time.Second)
require.NoError(t, err) require.NoError(t, err)
require.Equal(t, receipt.Status, types.ReceiptStatusFailed) require.Equal(t, receipt.Status, types.ReceiptStatusFailed)
...@@ -503,14 +383,14 @@ func TestMissingBatchE2E(t *testing.T) { ...@@ -503,14 +383,14 @@ func TestMissingBatchE2E(t *testing.T) {
// The test logs may look scary, but this is expected: // The test logs may look scary, but this is expected:
// 'batcher unable to publish transaction role=batcher err="insufficient funds for gas * price + value"' // 'batcher unable to publish transaction role=batcher err="insufficient funds for gas * price + value"'
cfg := defaultSystemConfig(t) cfg := DefaultSystemConfig(t)
// small sequence window size so the test does not take as long // small sequence window size so the test does not take as long
cfg.RollupConfig.SeqWindowSize = 4 cfg.DeployConfig.SequencerWindowSize = 4
// Specifically set batch submitter balance to stop batches from being included // Specifically set batch submitter balance to stop batches from being included
cfg.Premine[bssHDPath] = 0 cfg.Premine[cfg.Secrets.Addresses().Batcher] = big.NewInt(0)
sys, err := cfg.start() sys, err := cfg.Start()
require.Nil(t, err, "Error starting up system") require.Nil(t, err, "Error starting up system")
defer sys.Close() defer sys.Close()
...@@ -518,17 +398,12 @@ func TestMissingBatchE2E(t *testing.T) { ...@@ -518,17 +398,12 @@ func TestMissingBatchE2E(t *testing.T) {
l2Verif := sys.Clients["verifier"] l2Verif := sys.Clients["verifier"]
// Transactor Account // Transactor Account
ethPrivKey, err := sys.wallet.PrivateKey(accounts.Account{ ethPrivKey := cfg.Secrets.Alice
URL: accounts.URL{
Path: transactorHDPath,
},
})
require.Nil(t, err)
// Submit TX to L2 sequencer node // Submit TX to L2 sequencer node
toAddr := common.Address{0xff, 0xff} toAddr := common.Address{0xff, 0xff}
tx := types.MustSignNewTx(ethPrivKey, types.LatestSignerForChainID(cfg.L2ChainID), &types.DynamicFeeTx{ tx := types.MustSignNewTx(ethPrivKey, types.LatestSignerForChainID(cfg.L2ChainIDBig()), &types.DynamicFeeTx{
ChainID: cfg.L2ChainID, ChainID: cfg.L2ChainIDBig(),
Nonce: 0, Nonce: 0,
To: &toAddr, To: &toAddr,
Value: big.NewInt(1_000_000_000), Value: big.NewInt(1_000_000_000),
...@@ -540,11 +415,11 @@ func TestMissingBatchE2E(t *testing.T) { ...@@ -540,11 +415,11 @@ func TestMissingBatchE2E(t *testing.T) {
require.Nil(t, err, "Sending L2 tx to sequencer") require.Nil(t, err, "Sending L2 tx to sequencer")
// Let it show up on the unsafe chain // Let it show up on the unsafe chain
receipt, err := waitForTransaction(tx.Hash(), l2Seq, 3*time.Duration(cfg.L1BlockTime)*time.Second) receipt, err := waitForTransaction(tx.Hash(), l2Seq, 3*time.Duration(cfg.DeployConfig.L1BlockTime)*time.Second)
require.Nil(t, err, "Waiting for L2 tx on sequencer") require.Nil(t, err, "Waiting for L2 tx on sequencer")
// Wait until the block it was first included in shows up in the safe chain on the verifier // Wait until the block it was first included in shows up in the safe chain on the verifier
_, err = waitForBlock(receipt.BlockNumber, l2Verif, time.Duration(cfg.RollupConfig.SeqWindowSize*cfg.L1BlockTime)*time.Second) _, err = waitForBlock(receipt.BlockNumber, l2Verif, time.Duration(sys.RollupConfig.SeqWindowSize*cfg.DeployConfig.L1BlockTime)*time.Second)
require.Nil(t, err, "Waiting for block on verifier") require.Nil(t, err, "Waiting for block on verifier")
// Assert that the transaction is not found on the verifier // Assert that the transaction is not found on the verifier
...@@ -610,10 +485,10 @@ func TestSystemMockP2P(t *testing.T) { ...@@ -610,10 +485,10 @@ func TestSystemMockP2P(t *testing.T) {
log.Root().SetHandler(log.DiscardHandler()) log.Root().SetHandler(log.DiscardHandler())
} }
cfg := defaultSystemConfig(t) cfg := DefaultSystemConfig(t)
// slow down L1 blocks so we can see the L2 blocks arrive well before the L1 blocks do. // slow down L1 blocks so we can see the L2 blocks arrive well before the L1 blocks do.
// Keep the seq window small so the L2 chain is started quick // Keep the seq window small so the L2 chain is started quick
cfg.L1BlockTime = 10 cfg.DeployConfig.L1BlockTime = 10
// connect the nodes // connect the nodes
cfg.P2PTopology = map[string][]string{ cfg.P2PTopology = map[string][]string{
...@@ -631,7 +506,7 @@ func TestSystemMockP2P(t *testing.T) { ...@@ -631,7 +506,7 @@ func TestSystemMockP2P(t *testing.T) {
cfg.Nodes["sequencer"].Tracer = seqTracer cfg.Nodes["sequencer"].Tracer = seqTracer
cfg.Nodes["verifier"].Tracer = verifTracer cfg.Nodes["verifier"].Tracer = verifTracer
sys, err := cfg.start() sys, err := cfg.Start()
require.Nil(t, err, "Error starting up system") require.Nil(t, err, "Error starting up system")
defer sys.Close() defer sys.Close()
...@@ -639,17 +514,12 @@ func TestSystemMockP2P(t *testing.T) { ...@@ -639,17 +514,12 @@ func TestSystemMockP2P(t *testing.T) {
l2Verif := sys.Clients["verifier"] l2Verif := sys.Clients["verifier"]
// Transactor Account // Transactor Account
ethPrivKey, err := sys.wallet.PrivateKey(accounts.Account{ ethPrivKey := cfg.Secrets.Alice
URL: accounts.URL{
Path: transactorHDPath,
},
})
require.Nil(t, err)
// Submit TX to L2 sequencer node // Submit TX to L2 sequencer node
toAddr := common.Address{0xff, 0xff} toAddr := common.Address{0xff, 0xff}
tx := types.MustSignNewTx(ethPrivKey, types.LatestSignerForChainID(cfg.L2ChainID), &types.DynamicFeeTx{ tx := types.MustSignNewTx(ethPrivKey, types.LatestSignerForChainID(cfg.L2ChainIDBig()), &types.DynamicFeeTx{
ChainID: cfg.L2ChainID, ChainID: cfg.L2ChainIDBig(),
Nonce: 0, Nonce: 0,
To: &toAddr, To: &toAddr,
Value: big.NewInt(1_000_000_000), Value: big.NewInt(1_000_000_000),
...@@ -661,11 +531,11 @@ func TestSystemMockP2P(t *testing.T) { ...@@ -661,11 +531,11 @@ func TestSystemMockP2P(t *testing.T) {
require.Nil(t, err, "Sending L2 tx to sequencer") require.Nil(t, err, "Sending L2 tx to sequencer")
// Wait for tx to be mined on the L2 sequencer chain // Wait for tx to be mined on the L2 sequencer chain
receiptSeq, err := waitForTransaction(tx.Hash(), l2Seq, 3*time.Duration(cfg.RollupConfig.BlockTime)*time.Second) receiptSeq, err := waitForTransaction(tx.Hash(), l2Seq, 3*time.Duration(sys.RollupConfig.BlockTime)*time.Second)
require.Nil(t, err, "Waiting for L2 tx on sequencer") require.Nil(t, err, "Waiting for L2 tx on sequencer")
// Wait until the block it was first included in shows up in the safe chain on the verifier // Wait until the block it was first included in shows up in the safe chain on the verifier
receiptVerif, err := waitForTransaction(tx.Hash(), l2Verif, 6*time.Duration(cfg.RollupConfig.BlockTime)*time.Second) receiptVerif, err := waitForTransaction(tx.Hash(), l2Verif, 6*time.Duration(sys.RollupConfig.BlockTime)*time.Second)
require.Nil(t, err, "Waiting for L2 tx on verifier") require.Nil(t, err, "Waiting for L2 tx on verifier")
require.Equal(t, receiptSeq, receiptVerif) require.Equal(t, receiptSeq, receiptVerif)
...@@ -684,9 +554,9 @@ func TestL1InfoContract(t *testing.T) { ...@@ -684,9 +554,9 @@ func TestL1InfoContract(t *testing.T) {
log.Root().SetHandler(log.DiscardHandler()) log.Root().SetHandler(log.DiscardHandler())
} }
cfg := defaultSystemConfig(t) cfg := DefaultSystemConfig(t)
sys, err := cfg.start() sys, err := cfg.Start()
require.Nil(t, err, "Error starting up system") require.Nil(t, err, "Error starting up system")
defer sys.Close() defer sys.Close()
...@@ -808,10 +678,10 @@ func TestWithdrawals(t *testing.T) { ...@@ -808,10 +678,10 @@ func TestWithdrawals(t *testing.T) {
log.Root().SetHandler(log.DiscardHandler()) log.Root().SetHandler(log.DiscardHandler())
} }
cfg := defaultSystemConfig(t) cfg := DefaultSystemConfig(t)
cfg.DepositCFG.FinalizationPeriod = big.NewInt(2) // 2s finalization period cfg.DeployConfig.FinalizationPeriodSeconds = 2 // 2s finalization period
sys, err := cfg.start() sys, err := cfg.Start()
require.Nil(t, err, "Error starting up system") require.Nil(t, err, "Error starting up system")
defer sys.Close() defer sys.Close()
...@@ -820,20 +690,15 @@ func TestWithdrawals(t *testing.T) { ...@@ -820,20 +690,15 @@ func TestWithdrawals(t *testing.T) {
l2Verif := sys.Clients["verifier"] l2Verif := sys.Clients["verifier"]
// Transactor Account // Transactor Account
ethPrivKey, err := sys.wallet.PrivateKey(accounts.Account{ ethPrivKey := cfg.Secrets.Alice
URL: accounts.URL{
Path: transactorHDPath,
},
})
require.Nil(t, err)
fromAddr := crypto.PubkeyToAddress(ethPrivKey.PublicKey) fromAddr := crypto.PubkeyToAddress(ethPrivKey.PublicKey)
// Find deposit contract // Find deposit contract
depositContract, err := bindings.NewOptimismPortal(sys.DepositContractAddr, l1Client) depositContract, err := bindings.NewOptimismPortal(predeploys.DevOptimismPortalAddr, l1Client)
require.Nil(t, err) require.Nil(t, err)
// Create L1 signer // Create L1 signer
opts, err := bind.NewKeyedTransactorWithChainID(ethPrivKey, cfg.L1ChainID) opts, err := bind.NewKeyedTransactorWithChainID(ethPrivKey, cfg.L1ChainIDBig())
require.Nil(t, err) require.Nil(t, err)
// Start L2 balance // Start L2 balance
...@@ -848,7 +713,7 @@ func TestWithdrawals(t *testing.T) { ...@@ -848,7 +713,7 @@ func TestWithdrawals(t *testing.T) {
tx, err := depositContract.DepositTransaction(opts, fromAddr, common.Big0, 1_000_000, false, nil) tx, err := depositContract.DepositTransaction(opts, fromAddr, common.Big0, 1_000_000, false, nil)
require.Nil(t, err, "with deposit tx") require.Nil(t, err, "with deposit tx")
receipt, err := waitForTransaction(tx.Hash(), l1Client, 3*time.Duration(cfg.L1BlockTime)*time.Second) receipt, err := waitForTransaction(tx.Hash(), l1Client, 3*time.Duration(cfg.DeployConfig.L1BlockTime)*time.Second)
require.Nil(t, err, "Waiting for deposit tx on L1") require.Nil(t, err, "Waiting for deposit tx on L1")
// Bind L2 Withdrawer Contract // Bind L2 Withdrawer Contract
...@@ -859,7 +724,7 @@ func TestWithdrawals(t *testing.T) { ...@@ -859,7 +724,7 @@ func TestWithdrawals(t *testing.T) {
reconstructedDep, err := derive.UnmarshalDepositLogEvent(receipt.Logs[0]) reconstructedDep, err := derive.UnmarshalDepositLogEvent(receipt.Logs[0])
require.NoError(t, err, "Could not reconstruct L2 Deposit") require.NoError(t, err, "Could not reconstruct L2 Deposit")
tx = types.NewTx(reconstructedDep) tx = types.NewTx(reconstructedDep)
receipt, err = waitForTransaction(tx.Hash(), l2Verif, 3*time.Duration(cfg.L1BlockTime)*time.Second) receipt, err = waitForTransaction(tx.Hash(), l2Verif, 3*time.Duration(cfg.DeployConfig.L1BlockTime)*time.Second)
require.NoError(t, err) require.NoError(t, err)
require.Equal(t, receipt.Status, types.ReceiptStatusSuccessful) require.Equal(t, receipt.Status, types.ReceiptStatusSuccessful)
...@@ -881,13 +746,13 @@ func TestWithdrawals(t *testing.T) { ...@@ -881,13 +746,13 @@ func TestWithdrawals(t *testing.T) {
// Intiate Withdrawal // Intiate Withdrawal
withdrawAmount := big.NewInt(500_000_000_000) withdrawAmount := big.NewInt(500_000_000_000)
l2opts, err := bind.NewKeyedTransactorWithChainID(ethPrivKey, cfg.L2ChainID) l2opts, err := bind.NewKeyedTransactorWithChainID(ethPrivKey, cfg.L2ChainIDBig())
require.Nil(t, err) require.Nil(t, err)
l2opts.Value = withdrawAmount l2opts.Value = withdrawAmount
tx, err = l2withdrawer.InitiateWithdrawal(l2opts, fromAddr, big.NewInt(21000), nil) tx, err = l2withdrawer.InitiateWithdrawal(l2opts, fromAddr, big.NewInt(21000), nil)
require.Nil(t, err, "sending initiate withdraw tx") require.Nil(t, err, "sending initiate withdraw tx")
receipt, err = waitForTransaction(tx.Hash(), l2Verif, 10*time.Duration(cfg.L1BlockTime)*time.Second) receipt, err = waitForTransaction(tx.Hash(), l2Verif, 10*time.Duration(cfg.DeployConfig.L1BlockTime)*time.Second)
require.Nil(t, err, "withdrawal initiated on L2 sequencer") require.Nil(t, err, "withdrawal initiated on L2 sequencer")
require.Equal(t, receipt.Status, types.ReceiptStatusSuccessful, "transaction failed") require.Equal(t, receipt.Status, types.ReceiptStatusSuccessful, "transaction failed")
...@@ -915,9 +780,9 @@ func TestWithdrawals(t *testing.T) { ...@@ -915,9 +780,9 @@ func TestWithdrawals(t *testing.T) {
require.Nil(t, err) require.Nil(t, err)
// Wait for finalization and then create the Finalized Withdrawal Transaction // Wait for finalization and then create the Finalized Withdrawal Transaction
ctx, cancel = context.WithTimeout(context.Background(), 20*time.Duration(cfg.L1BlockTime)*time.Second) ctx, cancel = context.WithTimeout(context.Background(), 20*time.Duration(cfg.DeployConfig.L1BlockTime)*time.Second)
defer cancel() defer cancel()
blockNumber, err := withdrawals.WaitForFinalizationPeriod(ctx, l1Client, sys.DepositContractAddr, receipt.BlockNumber) blockNumber, err := withdrawals.WaitForFinalizationPeriod(ctx, l1Client, predeploys.DevOptimismPortalAddr, receipt.BlockNumber)
require.Nil(t, err) require.Nil(t, err)
ctx, cancel = context.WithTimeout(context.Background(), 1*time.Second) ctx, cancel = context.WithTimeout(context.Background(), 1*time.Second)
...@@ -925,7 +790,7 @@ func TestWithdrawals(t *testing.T) { ...@@ -925,7 +790,7 @@ func TestWithdrawals(t *testing.T) {
header, err = l2Verif.HeaderByNumber(ctx, new(big.Int).SetUint64(blockNumber)) header, err = l2Verif.HeaderByNumber(ctx, new(big.Int).SetUint64(blockNumber))
require.Nil(t, err) require.Nil(t, err)
rpc, err := rpc.Dial(sys.nodes["verifier"].WSEndpoint()) rpc, err := rpc.Dial(sys.Nodes["verifier"].WSEndpoint())
require.Nil(t, err) require.Nil(t, err)
l2client := withdrawals.NewClient(rpc) l2client := withdrawals.NewClient(rpc)
...@@ -933,7 +798,7 @@ func TestWithdrawals(t *testing.T) { ...@@ -933,7 +798,7 @@ func TestWithdrawals(t *testing.T) {
params, err := withdrawals.FinalizeWithdrawalParameters(context.Background(), l2client, tx.Hash(), header) params, err := withdrawals.FinalizeWithdrawalParameters(context.Background(), l2client, tx.Hash(), header)
require.Nil(t, err) require.Nil(t, err)
portal, err := bindings.NewOptimismPortal(sys.DepositContractAddr, l1Client) portal, err := bindings.NewOptimismPortal(predeploys.DevOptimismPortalAddr, l1Client)
require.Nil(t, err) require.Nil(t, err)
opts.Value = nil opts.Value = nil
...@@ -954,7 +819,7 @@ func TestWithdrawals(t *testing.T) { ...@@ -954,7 +819,7 @@ func TestWithdrawals(t *testing.T) {
require.Nil(t, err) require.Nil(t, err)
receipt, err = waitForTransaction(tx.Hash(), l1Client, 3*time.Duration(cfg.L1BlockTime)*time.Second) receipt, err = waitForTransaction(tx.Hash(), l1Client, 3*time.Duration(cfg.DeployConfig.L1BlockTime)*time.Second)
require.Nil(t, err, "finalize withdrawal") require.Nil(t, err, "finalize withdrawal")
require.Equal(t, types.ReceiptStatusSuccessful, receipt.Status) require.Equal(t, types.ReceiptStatusSuccessful, receipt.Status)
...@@ -984,9 +849,9 @@ func TestFees(t *testing.T) { ...@@ -984,9 +849,9 @@ func TestFees(t *testing.T) {
log.Root().SetHandler(log.DiscardHandler()) log.Root().SetHandler(log.DiscardHandler())
} }
cfg := defaultSystemConfig(t) cfg := DefaultSystemConfig(t)
sys, err := cfg.start() sys, err := cfg.Start()
require.Nil(t, err, "Error starting up system") require.Nil(t, err, "Error starting up system")
defer sys.Close() defer sys.Close()
...@@ -994,12 +859,7 @@ func TestFees(t *testing.T) { ...@@ -994,12 +859,7 @@ func TestFees(t *testing.T) {
l2Verif := sys.Clients["verifier"] l2Verif := sys.Clients["verifier"]
// Transactor Account // Transactor Account
ethPrivKey, err := sys.wallet.PrivateKey(accounts.Account{ ethPrivKey := cfg.Secrets.Alice
URL: accounts.URL{
Path: transactorHDPath,
},
})
require.Nil(t, err)
fromAddr := crypto.PubkeyToAddress(ethPrivKey.PublicKey) fromAddr := crypto.PubkeyToAddress(ethPrivKey.PublicKey)
// Find gaspriceoracle contract // Find gaspriceoracle contract
...@@ -1007,14 +867,14 @@ func TestFees(t *testing.T) { ...@@ -1007,14 +867,14 @@ func TestFees(t *testing.T) {
require.Nil(t, err) require.Nil(t, err)
// GPO signer // GPO signer
l2opts, err := bind.NewKeyedTransactorWithChainID(ethPrivKey, cfg.L2ChainID) l2opts, err := bind.NewKeyedTransactorWithChainID(ethPrivKey, cfg.L2ChainIDBig())
require.Nil(t, err) require.Nil(t, err)
// Update overhead // Update overhead
tx, err := gpoContract.SetOverhead(l2opts, big.NewInt(2100)) tx, err := gpoContract.SetOverhead(l2opts, big.NewInt(2100))
require.Nil(t, err, "sending overhead update tx") require.Nil(t, err, "sending overhead update tx")
receipt, err := waitForTransaction(tx.Hash(), l2Verif, 10*time.Duration(cfg.L1BlockTime)*time.Second) receipt, err := waitForTransaction(tx.Hash(), l2Verif, 10*time.Duration(cfg.DeployConfig.L1BlockTime)*time.Second)
require.Nil(t, err, "waiting for overhead update tx") require.Nil(t, err, "waiting for overhead update tx")
require.Equal(t, receipt.Status, types.ReceiptStatusSuccessful, "transaction failed") require.Equal(t, receipt.Status, types.ReceiptStatusSuccessful, "transaction failed")
...@@ -1022,7 +882,7 @@ func TestFees(t *testing.T) { ...@@ -1022,7 +882,7 @@ func TestFees(t *testing.T) {
tx, err = gpoContract.SetDecimals(l2opts, big.NewInt(6)) tx, err = gpoContract.SetDecimals(l2opts, big.NewInt(6))
require.Nil(t, err, "sending gpo update tx") require.Nil(t, err, "sending gpo update tx")
receipt, err = waitForTransaction(tx.Hash(), l2Verif, 10*time.Duration(cfg.L1BlockTime)*time.Second) receipt, err = waitForTransaction(tx.Hash(), l2Verif, 10*time.Duration(cfg.DeployConfig.L1BlockTime)*time.Second)
require.Nil(t, err, "waiting for gpo decimals update tx") require.Nil(t, err, "waiting for gpo decimals update tx")
require.Equal(t, receipt.Status, types.ReceiptStatusSuccessful, "transaction failed") require.Equal(t, receipt.Status, types.ReceiptStatusSuccessful, "transaction failed")
...@@ -1030,7 +890,7 @@ func TestFees(t *testing.T) { ...@@ -1030,7 +890,7 @@ func TestFees(t *testing.T) {
tx, err = gpoContract.SetScalar(l2opts, big.NewInt(1_000_000)) tx, err = gpoContract.SetScalar(l2opts, big.NewInt(1_000_000))
require.Nil(t, err, "sending gpo update tx") require.Nil(t, err, "sending gpo update tx")
receipt, err = waitForTransaction(tx.Hash(), l2Verif, 10*time.Duration(cfg.L1BlockTime)*time.Second) receipt, err = waitForTransaction(tx.Hash(), l2Verif, 10*time.Duration(cfg.DeployConfig.L1BlockTime)*time.Second)
require.Nil(t, err, "waiting for gpo scalar update tx") require.Nil(t, err, "waiting for gpo scalar update tx")
require.Equal(t, receipt.Status, types.ReceiptStatusSuccessful, "transaction failed") require.Equal(t, receipt.Status, types.ReceiptStatusSuccessful, "transaction failed")
...@@ -1048,13 +908,13 @@ func TestFees(t *testing.T) { ...@@ -1048,13 +908,13 @@ func TestFees(t *testing.T) {
// BaseFee Recipient // BaseFee Recipient
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
defer cancel() defer cancel()
baseFeeRecipientStartBalance, err := l2Seq.BalanceAt(ctx, cfg.BaseFeeRecipient, nil) baseFeeRecipientStartBalance, err := l2Seq.BalanceAt(ctx, cfg.DeployConfig.OptimismBaseFeeRecipient, nil)
require.Nil(t, err) require.Nil(t, err)
// L1Fee Recipient // L1Fee Recipient
ctx, cancel = context.WithTimeout(context.Background(), 1*time.Second) ctx, cancel = context.WithTimeout(context.Background(), 1*time.Second)
defer cancel() defer cancel()
l1FeeRecipientStartBalance, err := l2Seq.BalanceAt(ctx, cfg.L1FeeRecipient, nil) l1FeeRecipientStartBalance, err := l2Seq.BalanceAt(ctx, cfg.DeployConfig.OptimismL2FeeRecipient, nil)
require.Nil(t, err) require.Nil(t, err)
// Simple transfer from signer to random account // Simple transfer from signer to random account
...@@ -1066,8 +926,8 @@ func TestFees(t *testing.T) { ...@@ -1066,8 +926,8 @@ func TestFees(t *testing.T) {
toAddr := common.Address{0xff, 0xff} toAddr := common.Address{0xff, 0xff}
transferAmount := big.NewInt(1_000_000_000) transferAmount := big.NewInt(1_000_000_000)
gasTip := big.NewInt(10) gasTip := big.NewInt(10)
tx = types.MustSignNewTx(ethPrivKey, types.LatestSignerForChainID(cfg.L2ChainID), &types.DynamicFeeTx{ tx = types.MustSignNewTx(ethPrivKey, types.LatestSignerForChainID(cfg.L2ChainIDBig()), &types.DynamicFeeTx{
ChainID: cfg.L2ChainID, ChainID: cfg.L2ChainIDBig(),
Nonce: 3, // Already have deposit Nonce: 3, // Already have deposit
To: &toAddr, To: &toAddr,
Value: transferAmount, Value: transferAmount,
...@@ -1078,10 +938,10 @@ func TestFees(t *testing.T) { ...@@ -1078,10 +938,10 @@ func TestFees(t *testing.T) {
err = l2Seq.SendTransaction(context.Background(), tx) err = l2Seq.SendTransaction(context.Background(), tx)
require.Nil(t, err, "Sending L2 tx to sequencer") require.Nil(t, err, "Sending L2 tx to sequencer")
_, err = waitForTransaction(tx.Hash(), l2Seq, 3*time.Duration(cfg.L1BlockTime)*time.Second) _, err = waitForTransaction(tx.Hash(), l2Seq, 3*time.Duration(cfg.DeployConfig.L1BlockTime)*time.Second)
require.Nil(t, err, "Waiting for L2 tx on sequencer") require.Nil(t, err, "Waiting for L2 tx on sequencer")
receipt, err = waitForTransaction(tx.Hash(), l2Verif, 3*time.Duration(cfg.L1BlockTime)*time.Second) receipt, err = waitForTransaction(tx.Hash(), l2Verif, 3*time.Duration(cfg.DeployConfig.L1BlockTime)*time.Second)
require.Nil(t, err, "Waiting for L2 tx on verifier") require.Nil(t, err, "Waiting for L2 tx on verifier")
require.Equal(t, types.ReceiptStatusSuccessful, receipt.Status, "TX should have succeeded") require.Equal(t, types.ReceiptStatusSuccessful, receipt.Status, "TX should have succeeded")
...@@ -1107,7 +967,7 @@ func TestFees(t *testing.T) { ...@@ -1107,7 +967,7 @@ func TestFees(t *testing.T) {
ctx, cancel = context.WithTimeout(context.Background(), 1*time.Second) ctx, cancel = context.WithTimeout(context.Background(), 1*time.Second)
defer cancel() defer cancel()
baseFeeRecipientEndBalance, err := l2Seq.BalanceAt(ctx, cfg.BaseFeeRecipient, header.Number) baseFeeRecipientEndBalance, err := l2Seq.BalanceAt(ctx, cfg.DeployConfig.OptimismBaseFeeRecipient, header.Number)
require.Nil(t, err) require.Nil(t, err)
l1Header, err := sys.Clients["l1"].HeaderByNumber(ctx, nil) l1Header, err := sys.Clients["l1"].HeaderByNumber(ctx, nil)
...@@ -1115,7 +975,7 @@ func TestFees(t *testing.T) { ...@@ -1115,7 +975,7 @@ func TestFees(t *testing.T) {
ctx, cancel = context.WithTimeout(context.Background(), 1*time.Second) ctx, cancel = context.WithTimeout(context.Background(), 1*time.Second)
defer cancel() defer cancel()
l1FeeRecipientEndBalance, err := l2Seq.BalanceAt(ctx, cfg.L1FeeRecipient, nil) l1FeeRecipientEndBalance, err := l2Seq.BalanceAt(ctx, cfg.DeployConfig.OptimismL2FeeRecipient, nil)
require.Nil(t, err) require.Nil(t, err)
// Diff fee recipient + coinbase balances // Diff fee recipient + coinbase balances
......
...@@ -5,7 +5,7 @@ import ( ...@@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"regexp" "regexp"
"github.com/ethereum-optimism/optimism/op-node/backoff" "github.com/ethereum-optimism/optimism/op-service/backoff"
"github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
......
...@@ -5,8 +5,9 @@ go 1.18 ...@@ -5,8 +5,9 @@ go 1.18
require ( require (
github.com/btcsuite/btcd/btcec/v2 v2.2.0 github.com/btcsuite/btcd/btcec/v2 v2.2.0
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1
github.com/ethereum-optimism/optimism/op-bindings v0.8.9 github.com/ethereum-optimism/optimism/op-bindings v0.8.10
github.com/ethereum-optimism/optimism/op-chain-ops v0.8.9 github.com/ethereum-optimism/optimism/op-chain-ops v0.8.10
github.com/ethereum-optimism/optimism/op-service v0.8.10
github.com/ethereum/go-ethereum v1.10.23 github.com/ethereum/go-ethereum v1.10.23
github.com/golang/snappy v0.0.4 github.com/golang/snappy v0.0.4
github.com/google/go-cmp v0.5.8 github.com/google/go-cmp v0.5.8
......
...@@ -190,10 +190,12 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m ...@@ -190,10 +190,12 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/ethereum-optimism/op-geth v0.0.0-20220926184707-53d23c240afd h1:NchOnosWOkH9wlix8QevGHE+6vuRa+OMGvDNsczv2kQ= github.com/ethereum-optimism/op-geth v0.0.0-20220926184707-53d23c240afd h1:NchOnosWOkH9wlix8QevGHE+6vuRa+OMGvDNsczv2kQ=
github.com/ethereum-optimism/op-geth v0.0.0-20220926184707-53d23c240afd/go.mod h1:/6CsT5Ceen2WPLI/oCA3xMcZ5sWMF/D46SjM/ayY0Oo= github.com/ethereum-optimism/op-geth v0.0.0-20220926184707-53d23c240afd/go.mod h1:/6CsT5Ceen2WPLI/oCA3xMcZ5sWMF/D46SjM/ayY0Oo=
github.com/ethereum-optimism/optimism/op-bindings v0.8.9 h1:QeYLhgZP0QkDLxyXhkWLj/iHDFkMNI18abgrHL4I9TE= github.com/ethereum-optimism/optimism/op-bindings v0.8.10 h1:aSAWCQwBQnbmv03Gvtuvn3qfTWrZu/sTlRAWrpQhiHc=
github.com/ethereum-optimism/optimism/op-bindings v0.8.9/go.mod h1:pyTCbh2o/SY+5/AL2Qo5GgAao3Gtt9Ff6tfK9Pa9emM= github.com/ethereum-optimism/optimism/op-bindings v0.8.10/go.mod h1:pyTCbh2o/SY+5/AL2Qo5GgAao3Gtt9Ff6tfK9Pa9emM=
github.com/ethereum-optimism/optimism/op-chain-ops v0.8.9 h1:Z8174lRVnvw1r8w0OS0vOrFXcAg6635WuqHObZSJzKs= github.com/ethereum-optimism/optimism/op-chain-ops v0.8.10 h1:ErDuEO7Dsd7+XXlTWToBN/388IgC8eXjAPgiHoXviw4=
github.com/ethereum-optimism/optimism/op-chain-ops v0.8.9/go.mod h1:Y+on77cEP5Kn6Jc2aX24d3zk2lvT76KaUlTQSn7zesU= github.com/ethereum-optimism/optimism/op-chain-ops v0.8.10/go.mod h1:a9/PrzVU8EHKlLr6yz4YXw2VhEHYrbVogX56r26VUrY=
github.com/ethereum-optimism/optimism/op-service v0.8.10 h1:K3IABHI1b0MDrDXALvTKTbzy6IogGD6NgmbqfKEcEwM=
github.com/ethereum-optimism/optimism/op-service v0.8.10/go.mod h1:K0uybOhICTc2yfhrRj0cD1m7aPkOf5C9e6bUmvf4rGA=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fjl/memsize v0.0.1 h1:+zhkb+dhUgx0/e+M8sF0QqiouvMQUiKR+QYvdxIOKcQ= github.com/fjl/memsize v0.0.1 h1:+zhkb+dhUgx0/e+M8sF0QqiouvMQUiKR+QYvdxIOKcQ=
github.com/fjl/memsize v0.0.1/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fjl/memsize v0.0.1/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0=
......
...@@ -8,15 +8,16 @@ import ( ...@@ -8,15 +8,16 @@ import (
"github.com/hashicorp/go-multierror" "github.com/hashicorp/go-multierror"
"github.com/libp2p/go-libp2p-core/peer" "github.com/libp2p/go-libp2p-core/peer"
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum-optimism/optimism/op-node/client" "github.com/ethereum-optimism/optimism/op-node/client"
"github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/eth"
"github.com/ethereum-optimism/optimism/op-node/metrics" "github.com/ethereum-optimism/optimism/op-node/metrics"
"github.com/ethereum-optimism/optimism/op-node/p2p" "github.com/ethereum-optimism/optimism/op-node/p2p"
"github.com/ethereum-optimism/optimism/op-node/rollup/driver" "github.com/ethereum-optimism/optimism/op-node/rollup/driver"
"github.com/ethereum-optimism/optimism/op-node/sources" "github.com/ethereum-optimism/optimism/op-node/sources"
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/log"
) )
type OpNode struct { type OpNode struct {
...@@ -220,11 +221,8 @@ func (n *OpNode) initP2PSigner(ctx context.Context, cfg *Config) error { ...@@ -220,11 +221,8 @@ func (n *OpNode) initP2PSigner(ctx context.Context, cfg *Config) error {
func (n *OpNode) Start(ctx context.Context) error { func (n *OpNode) Start(ctx context.Context) error {
n.log.Info("Starting execution engine driver") n.log.Info("Starting execution engine driver")
// Request initial head update, default to genesis otherwise
reqCtx, reqCancel := context.WithTimeout(ctx, time.Second*10)
// start driving engine: sync blocks by deriving them from L1 and driving them into the engine // start driving engine: sync blocks by deriving them from L1 and driving them into the engine
err := n.l2Driver.Start(reqCtx) err := n.l2Driver.Start()
reqCancel()
if err != nil { if err != nil {
n.log.Error("Could not start a rollup node", "err", err) n.log.Error("Could not start a rollup node", "err", err)
return err return err
......
...@@ -3,7 +3,6 @@ package derive ...@@ -3,7 +3,6 @@ package derive
import ( import (
"context" "context"
"fmt" "fmt"
"io"
"github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/eth"
"github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-node/rollup"
...@@ -15,7 +14,7 @@ import ( ...@@ -15,7 +14,7 @@ import (
// L1ReceiptsFetcher fetches L1 header info and receipts for the payload attributes derivation (the info tx and deposits) // L1ReceiptsFetcher fetches L1 header info and receipts for the payload attributes derivation (the info tx and deposits)
type L1ReceiptsFetcher interface { type L1ReceiptsFetcher interface {
InfoByHash(ctx context.Context, hash common.Hash) (eth.BlockInfo, error) InfoByHash(ctx context.Context, hash common.Hash) (eth.BlockInfo, error)
Fetch(ctx context.Context, blockHash common.Hash) (eth.BlockInfo, types.Transactions, eth.ReceiptsFetcher, error) FetchReceipts(ctx context.Context, blockHash common.Hash) (eth.BlockInfo, types.Receipts, error)
} }
// PreparePayloadAttributes prepares a PayloadAttributes template that is ready to build a L2 block with deposits only, on top of the given l2Parent, with the given epoch as L1 origin. // PreparePayloadAttributes prepares a PayloadAttributes template that is ready to build a L2 block with deposits only, on top of the given l2Parent, with the given epoch as L1 origin.
...@@ -32,7 +31,7 @@ func PreparePayloadAttributes(ctx context.Context, cfg *rollup.Config, dl L1Rece ...@@ -32,7 +31,7 @@ func PreparePayloadAttributes(ctx context.Context, cfg *rollup.Config, dl L1Rece
// case we need to fetch all transaction receipts from the L1 origin block so we can scan for // case we need to fetch all transaction receipts from the L1 origin block so we can scan for
// user deposits. // user deposits.
if l2Parent.L1Origin.Number != epoch.Number { if l2Parent.L1Origin.Number != epoch.Number {
info, _, receiptsFetcher, err := dl.Fetch(ctx, epoch.Hash) info, receipts, err := dl.FetchReceipts(ctx, epoch.Hash)
if err != nil { if err != nil {
return nil, NewTemporaryError(fmt.Errorf("failed to fetch L1 block info and receipts: %w", err)) return nil, NewTemporaryError(fmt.Errorf("failed to fetch L1 block info and receipts: %w", err))
} }
...@@ -41,17 +40,7 @@ func PreparePayloadAttributes(ctx context.Context, cfg *rollup.Config, dl L1Rece ...@@ -41,17 +40,7 @@ func PreparePayloadAttributes(ctx context.Context, cfg *rollup.Config, dl L1Rece
fmt.Errorf("cannot create new block with L1 origin %s (parent %s) on top of L1 origin %s", fmt.Errorf("cannot create new block with L1 origin %s (parent %s) on top of L1 origin %s",
epoch, info.ParentHash(), l2Parent.L1Origin)) epoch, info.ParentHash(), l2Parent.L1Origin))
} }
for {
if err := receiptsFetcher.Fetch(ctx); err == io.EOF {
break
} else if err != nil {
return nil, NewTemporaryError(fmt.Errorf("failed to fetch more receipts: %w", err))
}
}
receipts, err := receiptsFetcher.Result()
if err != nil {
return nil, NewResetError(fmt.Errorf("fetched bad receipt data: %w", err))
}
deposits, err := DeriveDeposits(receipts, cfg.DepositContractAddress) deposits, err := DeriveDeposits(receipts, cfg.DepositContractAddress)
if err != nil { if err != nil {
// deposits may never be ignored. Failing to process them is a critical error. // deposits may never be ignored. Failing to process them is a critical error.
......
...@@ -36,7 +36,7 @@ func TestPreparePayloadAttributes(t *testing.T) { ...@@ -36,7 +36,7 @@ func TestPreparePayloadAttributes(t *testing.T) {
l1Info := testutils.RandomBlockInfo(rng) l1Info := testutils.RandomBlockInfo(rng)
l1Info.InfoNum = l2Parent.L1Origin.Number + 1 l1Info.InfoNum = l2Parent.L1Origin.Number + 1
epoch := l1Info.ID() epoch := l1Info.ID()
l1Fetcher.ExpectFetch(epoch.Hash, l1Info, nil, nil, nil) l1Fetcher.ExpectFetchReceipts(epoch.Hash, l1Info, nil, nil)
_, err := PreparePayloadAttributes(context.Background(), cfg, l1Fetcher, l2Parent, l2Time, epoch) _, err := PreparePayloadAttributes(context.Background(), cfg, l1Fetcher, l2Parent, l2Time, epoch)
require.NotNil(t, err, "inconsistent L1 origin error expected") require.NotNil(t, err, "inconsistent L1 origin error expected")
require.ErrorIs(t, err, ErrReset, "inconsistent L1 origin transition must be handled like a critical error with reorg") require.ErrorIs(t, err, ErrReset, "inconsistent L1 origin transition must be handled like a critical error with reorg")
...@@ -63,7 +63,7 @@ func TestPreparePayloadAttributes(t *testing.T) { ...@@ -63,7 +63,7 @@ func TestPreparePayloadAttributes(t *testing.T) {
epoch := l2Parent.L1Origin epoch := l2Parent.L1Origin
epoch.Number += 1 epoch.Number += 1
mockRPCErr := errors.New("mock rpc error") mockRPCErr := errors.New("mock rpc error")
l1Fetcher.ExpectFetch(epoch.Hash, nil, nil, nil, mockRPCErr) l1Fetcher.ExpectFetchReceipts(epoch.Hash, nil, nil, mockRPCErr)
_, err := PreparePayloadAttributes(context.Background(), cfg, l1Fetcher, l2Parent, l2Time, epoch) _, err := PreparePayloadAttributes(context.Background(), cfg, l1Fetcher, l2Parent, l2Time, epoch)
require.ErrorIs(t, err, mockRPCErr, "mock rpc error expected") require.ErrorIs(t, err, mockRPCErr, "mock rpc error expected")
require.ErrorIs(t, err, ErrTemporary, "rpc errors should not be critical, it is not necessary to reorg") require.ErrorIs(t, err, ErrTemporary, "rpc errors should not be critical, it is not necessary to reorg")
...@@ -93,7 +93,7 @@ func TestPreparePayloadAttributes(t *testing.T) { ...@@ -93,7 +93,7 @@ func TestPreparePayloadAttributes(t *testing.T) {
epoch := l1Info.ID() epoch := l1Info.ID()
l1InfoTx, err := L1InfoDepositBytes(0, l1Info) l1InfoTx, err := L1InfoDepositBytes(0, l1Info)
require.NoError(t, err) require.NoError(t, err)
l1Fetcher.ExpectFetch(epoch.Hash, l1Info, nil, nil, nil) l1Fetcher.ExpectFetchReceipts(epoch.Hash, l1Info, nil, nil)
attrs, err := PreparePayloadAttributes(context.Background(), cfg, l1Fetcher, l2Parent, l2Time, epoch) attrs, err := PreparePayloadAttributes(context.Background(), cfg, l1Fetcher, l2Parent, l2Time, epoch)
require.NoError(t, err) require.NoError(t, err)
require.NotNil(t, attrs) require.NotNil(t, attrs)
...@@ -129,9 +129,7 @@ func TestPreparePayloadAttributes(t *testing.T) { ...@@ -129,9 +129,7 @@ func TestPreparePayloadAttributes(t *testing.T) {
l2Txs := append(append(make([]eth.Data, 0), l1InfoTx), usedDepositTxs...) l2Txs := append(append(make([]eth.Data, 0), l1InfoTx), usedDepositTxs...)
// txs are ignored, API is a bit bloated to previous approach. Only l1Info and receipts matter. l1Fetcher.ExpectFetchReceipts(epoch.Hash, l1Info, receipts, nil)
l1Txs := make(types.Transactions, len(receipts))
l1Fetcher.ExpectFetch(epoch.Hash, l1Info, l1Txs, receipts, nil)
attrs, err := PreparePayloadAttributes(context.Background(), cfg, l1Fetcher, l2Parent, l2Time, epoch) attrs, err := PreparePayloadAttributes(context.Background(), cfg, l1Fetcher, l2Parent, l2Time, epoch)
require.NoError(t, err) require.NoError(t, err)
require.NotNil(t, attrs) require.NotNil(t, attrs)
......
...@@ -26,12 +26,6 @@ import ( ...@@ -26,12 +26,6 @@ import (
// It is internally responsible for making sure that batches with L1 inclusions block outside it's // It is internally responsible for making sure that batches with L1 inclusions block outside it's
// working range are not considered or pruned. // working range are not considered or pruned.
type BatchQueueOutput interface {
StageProgress
AddBatch(batch *BatchData)
SafeL2Head() eth.L2BlockRef
}
type NextBatchProvider interface { type NextBatchProvider interface {
Origin() eth.L1BlockRef Origin() eth.L1BlockRef
NextBatch(ctx context.Context) (*BatchData, error) NextBatch(ctx context.Context) (*BatchData, error)
......
...@@ -38,7 +38,7 @@ type ChannelBank struct { ...@@ -38,7 +38,7 @@ type ChannelBank struct {
fetcher L1Fetcher fetcher L1Fetcher
} }
var _ PullStage = (*ChannelBank)(nil) var _ ResetableStage = (*ChannelBank)(nil)
// NewChannelBank creates a ChannelBank, which should be Reset(origin) before use. // NewChannelBank creates a ChannelBank, which should be Reset(origin) before use.
func NewChannelBank(log log.Logger, cfg *rollup.Config, prev NextDataProvider, fetcher L1Fetcher) *ChannelBank { func NewChannelBank(log log.Logger, cfg *rollup.Config, prev NextDataProvider, fetcher L1Fetcher) *ChannelBank {
......
...@@ -22,7 +22,7 @@ type ChannelInReader struct { ...@@ -22,7 +22,7 @@ type ChannelInReader struct {
prev *ChannelBank prev *ChannelBank
} }
var _ PullStage = (*ChannelInReader)(nil) var _ ResetableStage = (*ChannelInReader)(nil)
// NewChannelInReader creates a ChannelInReader, which should be Reset(origin) before use. // NewChannelInReader creates a ChannelInReader, which should be Reset(origin) before use.
func NewChannelInReader(log log.Logger, prev *ChannelBank) *ChannelInReader { func NewChannelInReader(log log.Logger, prev *ChannelBank) *ChannelInReader {
......
...@@ -78,13 +78,14 @@ type EngineQueue struct { ...@@ -78,13 +78,14 @@ type EngineQueue struct {
engine Engine engine Engine
prev NextAttributesProvider prev NextAttributesProvider
progress Progress // only used for pipeline resets origin eth.L1BlockRef // only used for pipeline resets
metrics Metrics metrics Metrics
l1Fetcher L1Fetcher
} }
// NewEngineQueue creates a new EngineQueue, which should be Reset(origin) before use. // NewEngineQueue creates a new EngineQueue, which should be Reset(origin) before use.
func NewEngineQueue(log log.Logger, cfg *rollup.Config, engine Engine, metrics Metrics, prev NextAttributesProvider) *EngineQueue { func NewEngineQueue(log log.Logger, cfg *rollup.Config, engine Engine, metrics Metrics, prev NextAttributesProvider, l1Fetcher L1Fetcher) *EngineQueue {
return &EngineQueue{ return &EngineQueue{
log: log, log: log,
cfg: cfg, cfg: cfg,
...@@ -95,12 +96,13 @@ func NewEngineQueue(log log.Logger, cfg *rollup.Config, engine Engine, metrics M ...@@ -95,12 +96,13 @@ func NewEngineQueue(log log.Logger, cfg *rollup.Config, engine Engine, metrics M
MaxSize: maxUnsafePayloadsMemory, MaxSize: maxUnsafePayloadsMemory,
SizeFn: payloadMemSize, SizeFn: payloadMemSize,
}, },
prev: prev, prev: prev,
l1Fetcher: l1Fetcher,
} }
} }
func (eq *EngineQueue) Progress() Progress { func (eq *EngineQueue) Origin() eth.L1BlockRef {
return eq.progress return eq.origin
} }
func (eq *EngineQueue) SetUnsafeHead(head eth.L2BlockRef) { func (eq *EngineQueue) SetUnsafeHead(head eth.L2BlockRef) {
...@@ -151,7 +153,7 @@ func (eq *EngineQueue) LastL2Time() uint64 { ...@@ -151,7 +153,7 @@ func (eq *EngineQueue) LastL2Time() uint64 {
return uint64(eq.safeAttributes[len(eq.safeAttributes)-1].Timestamp) return uint64(eq.safeAttributes[len(eq.safeAttributes)-1].Timestamp)
} }
func (eq *EngineQueue) Step(ctx context.Context, _ Progress) error { func (eq *EngineQueue) Step(ctx context.Context) error {
if len(eq.safeAttributes) > 0 { if len(eq.safeAttributes) > 0 {
return eq.tryNextSafeAttributes(ctx) return eq.tryNextSafeAttributes(ctx)
} }
...@@ -402,13 +404,13 @@ func (eq *EngineQueue) forceNextSafeAttributes(ctx context.Context) error { ...@@ -402,13 +404,13 @@ func (eq *EngineQueue) forceNextSafeAttributes(ctx context.Context) error {
// ResetStep Walks the L2 chain backwards until it finds an L2 block whose L1 origin is canonical. // ResetStep Walks the L2 chain backwards until it finds an L2 block whose L1 origin is canonical.
// The unsafe head is set to the head of the L2 chain, unless the existing safe head is not canonical. // The unsafe head is set to the head of the L2 chain, unless the existing safe head is not canonical.
func (eq *EngineQueue) ResetStep(ctx context.Context, l1Fetcher L1Fetcher) error { func (eq *EngineQueue) Reset(ctx context.Context, _ eth.L1BlockRef) error {
result, err := sync.FindL2Heads(ctx, eq.cfg, l1Fetcher, eq.engine) result, err := sync.FindL2Heads(ctx, eq.cfg, eq.l1Fetcher, eq.engine)
if err != nil { if err != nil {
return NewTemporaryError(fmt.Errorf("failed to find the L2 Heads to start from: %w", err)) return NewTemporaryError(fmt.Errorf("failed to find the L2 Heads to start from: %w", err))
} }
finalized, safe, unsafe := result.Finalized, result.Safe, result.Unsafe finalized, safe, unsafe := result.Finalized, result.Safe, result.Unsafe
l1Origin, err := l1Fetcher.L1BlockRefByHash(ctx, safe.L1Origin.Hash) l1Origin, err := eq.l1Fetcher.L1BlockRefByHash(ctx, safe.L1Origin.Hash)
if err != nil { if err != nil {
return NewTemporaryError(fmt.Errorf("failed to fetch the new L1 progress: origin: %v; err: %w", safe.L1Origin, err)) return NewTemporaryError(fmt.Errorf("failed to fetch the new L1 progress: origin: %v; err: %w", safe.L1Origin, err))
} }
...@@ -421,7 +423,7 @@ func (eq *EngineQueue) ResetStep(ctx context.Context, l1Fetcher L1Fetcher) error ...@@ -421,7 +423,7 @@ func (eq *EngineQueue) ResetStep(ctx context.Context, l1Fetcher L1Fetcher) error
if l1Origin.Number < eq.cfg.ChannelTimeout { if l1Origin.Number < eq.cfg.ChannelTimeout {
pipelineNumber = 0 pipelineNumber = 0
} }
pipelineOrigin, err := l1Fetcher.L1BlockRefByNumber(ctx, pipelineNumber) pipelineOrigin, err := eq.l1Fetcher.L1BlockRefByNumber(ctx, pipelineNumber)
if err != nil { if err != nil {
return NewTemporaryError(fmt.Errorf("failed to fetch the new L1 progress: origin: %v; err: %w", pipelineNumber, err)) return NewTemporaryError(fmt.Errorf("failed to fetch the new L1 progress: origin: %v; err: %w", pipelineNumber, err))
} }
...@@ -431,9 +433,7 @@ func (eq *EngineQueue) ResetStep(ctx context.Context, l1Fetcher L1Fetcher) error ...@@ -431,9 +433,7 @@ func (eq *EngineQueue) ResetStep(ctx context.Context, l1Fetcher L1Fetcher) error
eq.finalized = finalized eq.finalized = finalized
eq.finalityData = eq.finalityData[:0] eq.finalityData = eq.finalityData[:0]
// note: we do not clear the unsafe payloadds queue; if the payloads are not applicable anymore the parent hash checks will clear out the old payloads. // note: we do not clear the unsafe payloadds queue; if the payloads are not applicable anymore the parent hash checks will clear out the old payloads.
eq.progress = Progress{ eq.origin = pipelineOrigin
Origin: pipelineOrigin,
}
eq.metrics.RecordL2Ref("l2_finalized", finalized) eq.metrics.RecordL2Ref("l2_finalized", finalized)
eq.metrics.RecordL2Ref("l2_safe", safe) eq.metrics.RecordL2Ref("l2_safe", safe)
eq.metrics.RecordL2Ref("l2_unsafe", unsafe) eq.metrics.RecordL2Ref("l2_unsafe", unsafe)
......
...@@ -230,21 +230,21 @@ func TestEngineQueue_Finalize(t *testing.T) { ...@@ -230,21 +230,21 @@ func TestEngineQueue_Finalize(t *testing.T) {
prev := &fakeAttributesQueue{} prev := &fakeAttributesQueue{}
eq := NewEngineQueue(logger, cfg, eng, metrics, prev) eq := NewEngineQueue(logger, cfg, eng, metrics, prev, l1F)
require.ErrorIs(t, eq.ResetStep(context.Background(), l1F), io.EOF) require.ErrorIs(t, eq.Reset(context.Background(), eth.L1BlockRef{}), io.EOF)
require.Equal(t, refB1, eq.SafeL2Head(), "L2 reset should go back to sequence window ago: blocks with origin E and D are not safe until we reconcile, C is extra, and B1 is the end we look for") require.Equal(t, refB1, eq.SafeL2Head(), "L2 reset should go back to sequence window ago: blocks with origin E and D are not safe until we reconcile, C is extra, and B1 is the end we look for")
require.Equal(t, refB, eq.Progress().Origin, "Expecting to be set back derivation L1 progress to B") require.Equal(t, refB, eq.Origin(), "Expecting to be set back derivation L1 progress to B")
require.Equal(t, refA1, eq.Finalized(), "A1 is recognized as finalized before we run any steps") require.Equal(t, refA1, eq.Finalized(), "A1 is recognized as finalized before we run any steps")
// now say C1 was included in D and became the new safe head // now say C1 was included in D and became the new safe head
eq.progress.Origin = refD eq.origin = refD
prev.origin = refD prev.origin = refD
eq.safeHead = refC1 eq.safeHead = refC1
eq.postProcessSafeL2() eq.postProcessSafeL2()
// now say D0 was included in E and became the new safe head // now say D0 was included in E and became the new safe head
eq.progress.Origin = refE eq.origin = refE
prev.origin = refE prev.origin = refE
eq.safeHead = refD0 eq.safeHead = refD0
eq.postProcessSafeL2() eq.postProcessSafeL2()
......
...@@ -25,7 +25,7 @@ type L1Retrieval struct { ...@@ -25,7 +25,7 @@ type L1Retrieval struct {
datas DataIter datas DataIter
} }
var _ PullStage = (*L1Retrieval)(nil) var _ ResetableStage = (*L1Retrieval)(nil)
func NewL1Retrieval(log log.Logger, dataSrc DataAvailabilitySource, prev NextBlockProvider) *L1Retrieval { func NewL1Retrieval(log log.Logger, dataSrc DataAvailabilitySource, prev NextBlockProvider) *L1Retrieval {
return &L1Retrieval{ return &L1Retrieval{
......
...@@ -24,7 +24,7 @@ type L1Traversal struct { ...@@ -24,7 +24,7 @@ type L1Traversal struct {
log log.Logger log log.Logger
} }
var _ PullStage = (*L1Traversal)(nil) var _ ResetableStage = (*L1Traversal)(nil)
func NewL1Traversal(log log.Logger, l1Blocks L1BlockRefByNumberFetcher) *L1Traversal { func NewL1Traversal(log log.Logger, l1Blocks L1BlockRefByNumberFetcher) *L1Traversal {
return &L1Traversal{ return &L1Traversal{
......
...@@ -24,46 +24,22 @@ type L1Fetcher interface { ...@@ -24,46 +24,22 @@ type L1Fetcher interface {
L1TransactionFetcher L1TransactionFetcher
} }
type StageProgress interface { type ResetableStage interface {
Progress() Progress
}
type PullStage interface {
// Reset resets a pull stage. `base` refers to the L1 Block Reference to reset to. // Reset resets a pull stage. `base` refers to the L1 Block Reference to reset to.
// TODO: Return L1 Block reference
Reset(ctx context.Context, base eth.L1BlockRef) error Reset(ctx context.Context, base eth.L1BlockRef) error
} }
type Stage interface {
StageProgress
// Step tries to progress the state.
// The outer stage progress informs the step what to do.
//
// If the stage:
// - returns EOF: the stage will be skipped
// - returns another error: the stage will make the pipeline error.
// - returns nil: the stage will be repeated next Step
Step(ctx context.Context, outer Progress) error
// ResetStep prepares the state for usage in regular steps.
// Similar to Step(ctx) it returns:
// - EOF if the next stage should be reset
// - error if the reset should start all over again
// - nil if the reset should continue resetting this stage.
ResetStep(ctx context.Context, l1Fetcher L1Fetcher) error
}
type EngineQueueStage interface { type EngineQueueStage interface {
Finalized() eth.L2BlockRef Finalized() eth.L2BlockRef
UnsafeL2Head() eth.L2BlockRef UnsafeL2Head() eth.L2BlockRef
SafeL2Head() eth.L2BlockRef SafeL2Head() eth.L2BlockRef
Progress() Progress Origin() eth.L1BlockRef
SetUnsafeHead(head eth.L2BlockRef) SetUnsafeHead(head eth.L2BlockRef)
Finalize(l1Origin eth.BlockID) Finalize(l1Origin eth.BlockID)
AddSafeAttributes(attributes *eth.PayloadAttributes) AddSafeAttributes(attributes *eth.PayloadAttributes)
AddUnsafePayload(payload *eth.ExecutionPayload) AddUnsafePayload(payload *eth.ExecutionPayload)
Step(context.Context) error
} }
// DerivationPipeline is updated with new L1 data, and the Step() function can be iterated on to keep the L2 Engine in sync. // DerivationPipeline is updated with new L1 data, and the Step() function can be iterated on to keep the L2 Engine in sync.
...@@ -74,19 +50,12 @@ type DerivationPipeline struct { ...@@ -74,19 +50,12 @@ type DerivationPipeline struct {
// Index of the stage that is currently being reset. // Index of the stage that is currently being reset.
// >= len(stages) if no additional resetting is required // >= len(stages) if no additional resetting is required
resetting int resetting int
pullResetIdx int stages []ResetableStage
// Index of the stage that is currently being processed.
active int
// stages in execution order. A stage Step that: // Special stages to keep track of
stages []Stage traversal *L1Traversal
eng EngineQueueStage
pullStages []PullStage
traversal *L1Traversal
eng EngineQueueStage
metrics Metrics metrics Metrics
} }
...@@ -103,33 +72,32 @@ func NewDerivationPipeline(log log.Logger, cfg *rollup.Config, l1Fetcher L1Fetch ...@@ -103,33 +72,32 @@ func NewDerivationPipeline(log log.Logger, cfg *rollup.Config, l1Fetcher L1Fetch
batchQueue := NewBatchQueue(log, cfg, chInReader) batchQueue := NewBatchQueue(log, cfg, chInReader)
attributesQueue := NewAttributesQueue(log, cfg, l1Fetcher, batchQueue) attributesQueue := NewAttributesQueue(log, cfg, l1Fetcher, batchQueue)
// Push stages (that act like pull stages b/c we push from the innermost stages prior to the outermost stages) // Step stages
eng := NewEngineQueue(log, cfg, engine, metrics, attributesQueue) eng := NewEngineQueue(log, cfg, engine, metrics, attributesQueue, l1Fetcher)
stages := []Stage{eng} // Reset from engine queue then up from L1 Traversal. The stages do not talk to each other during
pullStages := []PullStage{attributesQueue, batchQueue, chInReader, bank, l1Src, l1Traversal} // the reset, but after the engine queue, this is the order in which the stages could talk to each other.
// Note: The engine queue stage is the only reset that can fail.
stages := []ResetableStage{eng, l1Traversal, l1Src, bank, chInReader, batchQueue, attributesQueue}
return &DerivationPipeline{ return &DerivationPipeline{
log: log, log: log,
cfg: cfg, cfg: cfg,
l1Fetcher: l1Fetcher, l1Fetcher: l1Fetcher,
resetting: 0, resetting: 0,
active: 0, stages: stages,
stages: stages, eng: eng,
pullStages: pullStages, metrics: metrics,
eng: eng, traversal: l1Traversal,
metrics: metrics,
traversal: l1Traversal,
} }
} }
func (dp *DerivationPipeline) Reset() { func (dp *DerivationPipeline) Reset() {
dp.resetting = 0 dp.resetting = 0
dp.pullResetIdx = 0
} }
func (dp *DerivationPipeline) Progress() Progress { func (dp *DerivationPipeline) Origin() eth.L1BlockRef {
return dp.eng.Progress() return dp.eng.Origin()
} }
func (dp *DerivationPipeline) Finalize(l1Origin eth.BlockID) { func (dp *DerivationPipeline) Finalize(l1Origin eth.BlockID) {
...@@ -165,12 +133,12 @@ func (dp *DerivationPipeline) AddUnsafePayload(payload *eth.ExecutionPayload) { ...@@ -165,12 +133,12 @@ func (dp *DerivationPipeline) AddUnsafePayload(payload *eth.ExecutionPayload) {
// An error is expected when the underlying source closes. // An error is expected when the underlying source closes.
// When Step returns nil, it should be called again, to continue the derivation process. // When Step returns nil, it should be called again, to continue the derivation process.
func (dp *DerivationPipeline) Step(ctx context.Context) error { func (dp *DerivationPipeline) Step(ctx context.Context) error {
defer dp.metrics.RecordL1Ref("l1_derived", dp.Progress().Origin) defer dp.metrics.RecordL1Ref("l1_derived", dp.Origin())
// if any stages need to be reset, do that first. // if any stages need to be reset, do that first.
if dp.resetting < len(dp.stages) { if dp.resetting < len(dp.stages) {
if err := dp.stages[dp.resetting].ResetStep(ctx, dp.l1Fetcher); err == io.EOF { if err := dp.stages[dp.resetting].Reset(ctx, dp.eng.Origin()); err == io.EOF {
dp.log.Debug("reset of stage completed", "stage", dp.resetting, "origin", dp.stages[dp.resetting].Progress().Origin) dp.log.Debug("reset of stage completed", "stage", dp.resetting, "origin", dp.eng.Origin())
dp.resetting += 1 dp.resetting += 1
return nil return nil
} else if err != nil { } else if err != nil {
...@@ -179,37 +147,14 @@ func (dp *DerivationPipeline) Step(ctx context.Context) error { ...@@ -179,37 +147,14 @@ func (dp *DerivationPipeline) Step(ctx context.Context) error {
return nil return nil
} }
} }
// Then reset the pull based stages
if dp.pullResetIdx < len(dp.pullStages) {
// Use the last stage's progress as the one to pull from
inner := dp.stages[len(dp.stages)-1].Progress()
// Do the reset
if err := dp.pullStages[dp.pullResetIdx].Reset(ctx, inner.Origin); err == io.EOF {
// dp.log.Debug("reset of stage completed", "stage", dp.pullResetIdx, "origin", dp.pullStages[dp.pullResetIdx].Progress().Origin)
dp.pullResetIdx += 1
return nil
} else if err != nil {
return fmt.Errorf("stage %d failed resetting: %w", dp.pullResetIdx, err)
} else {
return nil
}
}
// Lastly advance the stages // Now step the engine queue. It will pull earlier data as needed.
for i, stage := range dp.stages { if err := dp.eng.Step(ctx); err == io.EOF {
var outer Progress // If every stage has returned io.EOF, try to advance the L1 Origin
if i+1 < len(dp.stages) { return dp.traversal.AdvanceL1Block(ctx)
outer = dp.stages[i+1].Progress() } else if err != nil {
} return fmt.Errorf("engine stage failed: %w", err)
if err := stage.Step(ctx, outer); err == io.EOF { } else {
continue return nil
} else if err != nil {
return fmt.Errorf("stage %d failed: %w", i, err)
} else {
return nil
}
} }
// If every stage has returned io.EOF, try to advance the L1 Origin
return dp.traversal.AdvanceL1Block(ctx)
} }
package derive package derive
import ( import "github.com/ethereum-optimism/optimism/op-node/testutils"
"context"
"io"
"testing"
"github.com/stretchr/testify/mock"
"github.com/ethereum-optimism/optimism/op-node/testutils"
)
var _ Engine = (*testutils.MockEngine)(nil) var _ Engine = (*testutils.MockEngine)(nil)
var _ L1Fetcher = (*testutils.MockL1Source)(nil) var _ L1Fetcher = (*testutils.MockL1Source)(nil)
type MockOriginStage struct {
mock.Mock
progress Progress
}
func (m *MockOriginStage) Progress() Progress {
return m.progress
}
var _ StageProgress = (*MockOriginStage)(nil)
// RepeatResetStep is a test util that will repeat the ResetStep function until an error.
// If the step runs too many times, it will fail the test.
func RepeatResetStep(t *testing.T, step func(ctx context.Context, l1Fetcher L1Fetcher) error, l1Fetcher L1Fetcher, max int) error {
ctx := context.Background()
for i := 0; i < max; i++ {
err := step(ctx, l1Fetcher)
if err == io.EOF {
return nil
}
if err != nil {
return err
}
}
t.Fatal("ran out of steps")
return nil
}
// RepeatStep is a test util that will repeat the Step function until an error.
// If the step runs too many times, it will fail the test.
func RepeatStep(t *testing.T, step func(ctx context.Context, outer Progress) error, outer Progress, max int) error {
ctx := context.Background()
for i := 0; i < max; i++ {
err := step(ctx, outer)
if err == io.EOF {
return nil
}
if err != nil {
return err
}
}
t.Fatal("ran out of steps")
return nil
}
var _ Metrics = (*testutils.TestDerivationMetrics)(nil) var _ Metrics = (*testutils.TestDerivationMetrics)(nil)
package derive
import (
"fmt"
"github.com/ethereum-optimism/optimism/op-node/eth"
)
// Progress represents the progress of a derivation stage:
// the input L1 block that is being processed, and whether it's fully processed yet.
type Progress struct {
Origin eth.L1BlockRef
// Closed means that the Current has no more data that the stage may need.
Closed bool
}
func (pr *Progress) Update(outer Progress) (changed bool, err error) {
if outer.Origin.Number < pr.Origin.Number {
return false, nil
}
if pr.Closed {
if outer.Closed {
if pr.Origin.ID() != outer.Origin.ID() {
return true, NewResetError(fmt.Errorf("outer stage changed origin from %s to %s without opening it", pr.Origin, outer.Origin))
}
return false, nil
} else {
if pr.Origin.Hash != outer.Origin.ParentHash {
return true, NewResetError(fmt.Errorf("detected internal pipeline reorg of L1 origin data from %s to %s", pr.Origin, outer.Origin))
}
pr.Origin = outer.Origin
pr.Closed = false
return true, nil
}
} else {
if pr.Origin.ID() != outer.Origin.ID() {
return true, NewResetError(fmt.Errorf("outer stage changed origin from %s to %s before closing it", pr.Origin, outer.Origin))
}
if outer.Closed {
pr.Closed = true
return true, nil
} else {
return false, nil
}
}
}
...@@ -3,18 +3,14 @@ package driver ...@@ -3,18 +3,14 @@ package driver
import ( import (
"context" "context"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/eth"
"github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-node/rollup/derive" "github.com/ethereum-optimism/optimism/op-node/rollup/derive"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/log"
) )
type Driver struct {
s *state
}
type Metrics interface { type Metrics interface {
RecordPipelineReset() RecordPipelineReset()
RecordSequencingError() RecordSequencingError()
...@@ -34,11 +30,6 @@ type Metrics interface { ...@@ -34,11 +30,6 @@ type Metrics interface {
CountSequencedTxs(count int) CountSequencedTxs(count int)
} }
type Downloader interface {
InfoByHash(ctx context.Context, hash common.Hash) (eth.BlockInfo, error)
Fetch(ctx context.Context, blockHash common.Hash) (eth.BlockInfo, types.Transactions, eth.ReceiptsFetcher, error)
}
type L1Chain interface { type L1Chain interface {
derive.L1Fetcher derive.L1Fetcher
L1BlockRefByLabel(context.Context, eth.BlockLabel) (eth.L1BlockRef, error) L1BlockRefByLabel(context.Context, eth.BlockLabel) (eth.L1BlockRef, error)
...@@ -59,61 +50,64 @@ type DerivationPipeline interface { ...@@ -59,61 +50,64 @@ type DerivationPipeline interface {
Finalized() eth.L2BlockRef Finalized() eth.L2BlockRef
SafeL2Head() eth.L2BlockRef SafeL2Head() eth.L2BlockRef
UnsafeL2Head() eth.L2BlockRef UnsafeL2Head() eth.L2BlockRef
Progress() derive.Progress Origin() eth.L1BlockRef
}
type outputInterface interface {
// createNewBlock builds a new block based on the L2 Head, L1 Origin, and the current mempool.
createNewBlock(ctx context.Context, l2Head eth.L2BlockRef, l2SafeHead eth.BlockID, l2Finalized eth.BlockID, l1Origin eth.L1BlockRef) (eth.L2BlockRef, *eth.ExecutionPayload, error)
}
type Network interface {
// PublishL2Payload is called by the driver whenever there is a new payload to publish, synchronously with the driver main loop.
PublishL2Payload(ctx context.Context, payload *eth.ExecutionPayload) error
} }
func NewDriver(driverCfg *Config, cfg *rollup.Config, l2 L2Chain, l1 L1Chain, network Network, log log.Logger, snapshotLog log.Logger, metrics Metrics) *Driver { type L1StateIface interface {
output := &outputImpl{ HandleNewL1HeadBlock(head eth.L1BlockRef)
Config: cfg, HandleNewL1SafeBlock(safe eth.L1BlockRef)
dl: l1, HandleNewL1FinalizedBlock(finalized eth.L1BlockRef)
l2: l2,
log: log,
}
var state *state
verifConfDepth := NewConfDepth(driverCfg.VerifierConfDepth, func() eth.L1BlockRef { return state.l1Head }, l1)
derivationPipeline := derive.NewDerivationPipeline(log, cfg, verifConfDepth, l2, metrics)
state = NewState(driverCfg, log, snapshotLog, cfg, l1, l2, output, derivationPipeline, network, metrics)
return &Driver{s: state}
}
func (d *Driver) OnL1Head(ctx context.Context, head eth.L1BlockRef) error { L1Head() eth.L1BlockRef
return d.s.OnL1Head(ctx, head) L1Safe() eth.L1BlockRef
L1Finalized() eth.L1BlockRef
} }
func (d *Driver) OnL1Safe(ctx context.Context, safe eth.L1BlockRef) error { type L1OriginSelectorIface interface {
return d.s.OnL1Safe(ctx, safe) FindL1Origin(ctx context.Context, l1Head eth.L1BlockRef, l2Head eth.L2BlockRef) (eth.L1BlockRef, error)
} }
func (d *Driver) OnL1Finalized(ctx context.Context, finalized eth.L1BlockRef) error { type SequencerIface interface {
return d.s.OnL1Finalized(ctx, finalized) StartBuildingBlock(ctx context.Context, l2Head eth.L2BlockRef, l2SafeHead eth.BlockID, l2Finalized eth.BlockID, l1Origin eth.L1BlockRef) error
} CompleteBuildingBlock(ctx context.Context) (*eth.ExecutionPayload, error)
func (d *Driver) OnUnsafeL2Payload(ctx context.Context, payload *eth.ExecutionPayload) error { // createNewBlock builds a new block based on the L2 Head, L1 Origin, and the current mempool.
return d.s.OnUnsafeL2Payload(ctx, payload) CreateNewBlock(ctx context.Context, l2Head eth.L2BlockRef, l2SafeHead eth.BlockID, l2Finalized eth.BlockID, l1Origin eth.L1BlockRef) (eth.L2BlockRef, *eth.ExecutionPayload, error)
} }
func (d *Driver) ResetDerivationPipeline(ctx context.Context) error { type Network interface {
return d.s.ResetDerivationPipeline(ctx) // PublishL2Payload is called by the driver whenever there is a new payload to publish, synchronously with the driver main loop.
PublishL2Payload(ctx context.Context, payload *eth.ExecutionPayload) error
} }
func (d *Driver) SyncStatus(ctx context.Context) (*eth.SyncStatus, error) { // NewDriver composes an events handler that tracks L1 state, triggers L2 derivation, and optionally sequences new L2 blocks.
return d.s.SyncStatus(ctx) func NewDriver(driverCfg *Config, cfg *rollup.Config, l2 L2Chain, l1 L1Chain, network Network, log log.Logger, snapshotLog log.Logger, metrics Metrics) *Driver {
} sequencer := NewSequencer(log, cfg, l1, l2)
l1State := NewL1State(log, metrics)
findL1Origin := NewL1OriginSelector(log, cfg, l1, driverCfg.SequencerConfDepth)
verifConfDepth := NewConfDepth(driverCfg.VerifierConfDepth, l1State.L1Head, l1)
derivationPipeline := derive.NewDerivationPipeline(log, cfg, verifConfDepth, l2, metrics)
func (d *Driver) Start(ctx context.Context) error { return &Driver{
return d.s.Start(ctx) l1State: l1State,
} derivation: derivationPipeline,
func (d *Driver) Close() error { idleDerivation: false,
return d.s.Close() syncStatusReq: make(chan chan eth.SyncStatus, 10),
forceReset: make(chan chan struct{}, 10),
config: cfg,
driverConfig: driverCfg,
done: make(chan struct{}),
log: log,
snapshotLog: snapshotLog,
l1: l1,
l2: l2,
l1OriginSelector: findL1Origin,
sequencer: sequencer,
network: network,
metrics: metrics,
l1HeadSig: make(chan eth.L1BlockRef, 10),
l1SafeSig: make(chan eth.L1BlockRef, 10),
l1FinalizedSig: make(chan eth.L1BlockRef, 10),
unsafeL2Payloads: make(chan *eth.ExecutionPayload, 10),
}
} }
package driver
import (
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum-optimism/optimism/op-node/eth"
)
type L1Metrics interface {
RecordL1ReorgDepth(d uint64)
RecordL1Ref(name string, ref eth.L1BlockRef)
}
// L1State tracks L1 head, safe and finalized blocks. It is not safe to write and read concurrently.
type L1State struct {
log log.Logger
metrics L1Metrics
// Latest recorded head, safe block and finalized block of the L1 Chain, independent of derivation work
l1Head eth.L1BlockRef
l1Safe eth.L1BlockRef
l1Finalized eth.L1BlockRef
}
func NewL1State(log log.Logger, metrics L1Metrics) *L1State {
return &L1State{
log: log,
metrics: metrics,
}
}
func (s *L1State) HandleNewL1HeadBlock(head eth.L1BlockRef) {
// We don't need to do anything if the head hasn't changed.
if s.l1Head == (eth.L1BlockRef{}) {
s.log.Info("Received first L1 head signal", "l1_head", head)
} else if s.l1Head.Hash == head.Hash {
s.log.Trace("Received L1 head signal that is the same as the current head", "l1_head", head)
} else if s.l1Head.Hash == head.ParentHash {
// We got a new L1 block whose parent hash is the same as the current L1 head. Means we're
// dealing with a linear extension (new block is the immediate child of the old one).
s.log.Debug("L1 head moved forward", "l1_head", head)
} else {
if s.l1Head.Number >= head.Number {
s.metrics.RecordL1ReorgDepth(s.l1Head.Number - head.Number)
}
// New L1 block is not the same as the current head or a single step linear extension.
// This could either be a long L1 extension, or a reorg, or we simply missed a head update.
s.log.Warn("L1 head signal indicates a possible L1 re-org", "old_l1_head", s.l1Head, "new_l1_head_parent", head.ParentHash, "new_l1_head", head)
}
s.metrics.RecordL1Ref("l1_head", head)
s.l1Head = head
}
func (s *L1State) HandleNewL1SafeBlock(safe eth.L1BlockRef) {
s.log.Info("New L1 safe block", "l1_safe", safe)
s.metrics.RecordL1Ref("l1_safe", safe)
s.l1Safe = safe
}
func (s *L1State) HandleNewL1FinalizedBlock(finalized eth.L1BlockRef) {
s.log.Info("New L1 finalized block", "l1_finalized", finalized)
s.metrics.RecordL1Ref("l1_finalized", finalized)
s.l1Finalized = finalized
}
func (s *L1State) L1Head() eth.L1BlockRef {
return s.l1Head
}
func (s *L1State) L1Safe() eth.L1BlockRef {
return s.l1Safe
}
func (s *L1State) L1Finalized() eth.L1BlockRef {
return s.l1Finalized
}
package driver
import (
"context"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum-optimism/optimism/op-node/eth"
"github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-node/rollup/derive"
)
type L1Blocks interface {
derive.L1BlockRefByHashFetcher
derive.L1BlockRefByNumberFetcher
}
type L1OriginSelector struct {
log log.Logger
cfg *rollup.Config
l1 L1Blocks
sequencingConfDepth uint64
}
func NewL1OriginSelector(log log.Logger, cfg *rollup.Config, l1 L1Blocks, sequencingConfDepth uint64) *L1OriginSelector {
return &L1OriginSelector{
log: log,
cfg: cfg,
l1: l1,
sequencingConfDepth: sequencingConfDepth,
}
}
// FindL1Origin determines what the next L1 Origin should be.
// The L1 Origin is either the L2 Head's Origin, or the following L1 block
// if the next L2 block's time is greater than or equal to the L2 Head's Origin.
func (los *L1OriginSelector) FindL1Origin(ctx context.Context, l1Head eth.L1BlockRef, l2Head eth.L2BlockRef) (eth.L1BlockRef, error) {
// If we are at the head block, don't do a lookup.
if l2Head.L1Origin.Hash == l1Head.Hash {
return l1Head, nil
}
// Grab a reference to the current L1 origin block.
currentOrigin, err := los.l1.L1BlockRefByHash(ctx, l2Head.L1Origin.Hash)
if err != nil {
return eth.L1BlockRef{}, err
}
if currentOrigin.Number+1+los.sequencingConfDepth > l1Head.Number {
// TODO: we can decide to ignore confirmation depth if we would be forced
// to make an empty block (only deposits) by staying on the current origin.
log.Info("sequencing with old origin to preserve conf depth",
"current", currentOrigin, "current_time", currentOrigin.Time,
"l1_head", l1Head, "l1_head_time", l1Head.Time,
"l2_head", l2Head, "l2_head_time", l2Head.Time,
"depth", los.sequencingConfDepth)
return currentOrigin, nil
}
// Attempt to find the next L1 origin block, where the next origin is the immediate child of
// the current origin block.
nextOrigin, err := los.l1.L1BlockRefByNumber(ctx, currentOrigin.Number+1)
if err != nil {
log.Error("Failed to get next origin. Falling back to current origin", "err", err)
return currentOrigin, nil
}
// If the next L2 block time is greater than the next origin block's time, we can choose to
// start building on top of the next origin. Sequencer implementation has some leeway here and
// could decide to continue to build on top of the previous origin until the Sequencer runs out
// of slack. For simplicity, we implement our Sequencer to always start building on the latest
// L1 block when we can.
if l2Head.Time+los.cfg.BlockTime >= nextOrigin.Time {
return nextOrigin, nil
}
return currentOrigin, nil
}
package driver
import (
"context"
"fmt"
"time"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum-optimism/optimism/op-node/eth"
"github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-node/rollup/derive"
)
type Downloader interface {
InfoByHash(ctx context.Context, hash common.Hash) (eth.BlockInfo, error)
FetchReceipts(ctx context.Context, blockHash common.Hash) (eth.BlockInfo, types.Receipts, error)
}
// Sequencer implements the sequencing interface of the driver: it starts and completes block building jobs.
type Sequencer struct {
log log.Logger
config *rollup.Config
l1 Downloader
l2 derive.Engine
buildingOnto eth.ForkchoiceState
buildingID eth.PayloadID
}
func NewSequencer(log log.Logger, cfg *rollup.Config, l1 Downloader, l2 derive.Engine) *Sequencer {
return &Sequencer{
log: log,
config: cfg,
l1: l1,
l2: l2,
}
}
// StartBuildingBlock initiates a block building job on top of the given L2 head, safe and finalized blocks, and using the provided l1Origin.
func (d *Sequencer) StartBuildingBlock(ctx context.Context, l2Head eth.L2BlockRef, l2SafeHead eth.BlockID, l2Finalized eth.BlockID, l1Origin eth.L1BlockRef) error {
d.log.Info("creating new block", "parent", l2Head, "l1Origin", l1Origin)
if d.buildingID != (eth.PayloadID{}) { // This may happen when we decide to build a different block in response to a reorg. Or when previous block building failed.
d.log.Warn("did not finish previous block building, starting new building now", "prev_onto", d.buildingOnto.HeadBlockHash, "prev_payload_id", d.buildingID, "new_onto", l2Head)
}
fetchCtx, cancel := context.WithTimeout(ctx, time.Second*20)
defer cancel()
attrs, err := derive.PreparePayloadAttributes(fetchCtx, d.config, d.l1, l2Head, l2Head.Time+d.config.BlockTime, l1Origin.ID())
if err != nil {
return err
}
// If our next L2 block timestamp is beyond the Sequencer drift threshold, then we must produce
// empty blocks (other than the L1 info deposit and any user deposits). We handle this by
// setting NoTxPool to true, which will cause the Sequencer to not include any transactions
// from the transaction pool.
attrs.NoTxPool = uint64(attrs.Timestamp) >= l1Origin.Time+d.config.MaxSequencerDrift
// And construct our fork choice state. This is our current fork choice state and will be
// updated as a result of executing the block based on the attributes described above.
fc := eth.ForkchoiceState{
HeadBlockHash: l2Head.Hash,
SafeBlockHash: l2SafeHead.Hash,
FinalizedBlockHash: l2Finalized.Hash,
}
// Start a payload building process.
id, errTyp, err := derive.StartPayload(ctx, d.l2, fc, attrs)
if err != nil {
return fmt.Errorf("failed to start building on top of L2 chain %s, error (%d): %w", l2Head, errTyp, err)
}
d.buildingOnto = fc
d.buildingID = id
return nil
}
// CompleteBuildingBlock takes the current block that is being built, and asks the engine to complete the building, seal the block, and persist it as canonical.
// Warning: the safe and finalized L2 blocks as viewed during the initiation of the block building are reused for completion of the block building.
// The Execution engine should not change the safe and finalized blocks between start and completion of block building.
func (d *Sequencer) CompleteBuildingBlock(ctx context.Context) (*eth.ExecutionPayload, error) {
if d.buildingID == (eth.PayloadID{}) {
return nil, fmt.Errorf("cannot complete payload building: not currently building a payload")
}
// Actually execute the block and add it to the head of the chain.
payload, errTyp, err := derive.ConfirmPayload(ctx, d.log, d.l2, d.buildingOnto, d.buildingID, false)
if err != nil {
return nil, fmt.Errorf("failed to complete building on top of L2 chain %s, error (%d): %w", d.buildingOnto.HeadBlockHash, errTyp, err)
}
return payload, nil
}
// CreateNewBlock sequences a L2 block with immediate building and sealing.
func (d *Sequencer) CreateNewBlock(ctx context.Context, l2Head eth.L2BlockRef, l2SafeHead eth.BlockID, l2Finalized eth.BlockID, l1Origin eth.L1BlockRef) (eth.L2BlockRef, *eth.ExecutionPayload, error) {
if err := d.StartBuildingBlock(ctx, l2Head, l2SafeHead, l2Finalized, l1Origin); err != nil {
return l2Head, nil, err
}
payload, err := d.CompleteBuildingBlock(ctx)
if err != nil {
return l2Head, nil, err
}
d.buildingID = eth.PayloadID{}
// Generate an L2 block ref from the payload.
ref, err := derive.PayloadToBlockRef(payload, &d.config.Genesis)
return ref, payload, err
}
...@@ -9,21 +9,19 @@ import ( ...@@ -9,21 +9,19 @@ import (
gosync "sync" gosync "sync"
"time" "time"
"github.com/ethereum-optimism/optimism/op-node/backoff" "github.com/ethereum/go-ethereum/log"
"github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/eth"
"github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-node/rollup/derive" "github.com/ethereum-optimism/optimism/op-node/rollup/derive"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum-optimism/optimism/op-service/backoff"
) )
// Deprecated: use eth.SyncStatus instead. // Deprecated: use eth.SyncStatus instead.
type SyncStatus = eth.SyncStatus type SyncStatus = eth.SyncStatus
type state struct { type Driver struct {
// Latest recorded head, safe block and finalized block of the L1 Chain, independent of derivation work l1State L1StateIface
l1Head eth.L1BlockRef
l1Safe eth.L1BlockRef
l1Finalized eth.L1BlockRef
// The derivation pipeline is reset whenever we reorg. // The derivation pipeline is reset whenever we reorg.
// The derivation pipeline determines the new l2Safe. // The derivation pipeline determines the new l2Safe.
...@@ -40,10 +38,10 @@ type state struct { ...@@ -40,10 +38,10 @@ type state struct {
forceReset chan chan struct{} forceReset chan chan struct{}
// Rollup config: rollup chain configuration // Rollup config: rollup chain configuration
Config *rollup.Config config *rollup.Config
// Driver config: verifier and sequencer settings // Driver config: verifier and sequencer settings
DriverConfig *Config driverConfig *Config
// L1 Signals: // L1 Signals:
// //
...@@ -58,10 +56,11 @@ type state struct { ...@@ -58,10 +56,11 @@ type state struct {
// L2 Signals: // L2 Signals:
unsafeL2Payloads chan *eth.ExecutionPayload unsafeL2Payloads chan *eth.ExecutionPayload
l1 L1Chain l1 L1Chain
l2 L2Chain l2 L2Chain
output outputInterface l1OriginSelector L1OriginSelectorIface
network Network // may be nil, network for is optional sequencer SequencerIface
network Network // may be nil, network for is optional
metrics Metrics metrics Metrics
log log.Logger log log.Logger
...@@ -71,35 +70,9 @@ type state struct { ...@@ -71,35 +70,9 @@ type state struct {
wg gosync.WaitGroup wg gosync.WaitGroup
} }
// NewState creates a new driver state. State changes take effect though
// the given output, derivation pipeline and network interfaces.
func NewState(driverCfg *Config, log log.Logger, snapshotLog log.Logger, config *rollup.Config, l1Chain L1Chain, l2Chain L2Chain,
output outputInterface, derivationPipeline DerivationPipeline, network Network, metrics Metrics) *state {
return &state{
derivation: derivationPipeline,
idleDerivation: false,
syncStatusReq: make(chan chan eth.SyncStatus, 10),
forceReset: make(chan chan struct{}, 10),
Config: config,
DriverConfig: driverCfg,
done: make(chan struct{}),
log: log,
snapshotLog: snapshotLog,
l1: l1Chain,
l2: l2Chain,
output: output,
network: network,
metrics: metrics,
l1HeadSig: make(chan eth.L1BlockRef, 10),
l1SafeSig: make(chan eth.L1BlockRef, 10),
l1FinalizedSig: make(chan eth.L1BlockRef, 10),
unsafeL2Payloads: make(chan *eth.ExecutionPayload, 10),
}
}
// Start starts up the state loop. // Start starts up the state loop.
// The loop will have been started iff err is not nil. // The loop will have been started iff err is not nil.
func (s *state) Start(_ context.Context) error { func (s *Driver) Start() error {
s.derivation.Reset() s.derivation.Reset()
s.wg.Add(1) s.wg.Add(1)
...@@ -108,7 +81,7 @@ func (s *state) Start(_ context.Context) error { ...@@ -108,7 +81,7 @@ func (s *state) Start(_ context.Context) error {
return nil return nil
} }
func (s *state) Close() error { func (s *Driver) Close() error {
s.done <- struct{}{} s.done <- struct{}{}
s.wg.Wait() s.wg.Wait()
return nil return nil
...@@ -116,7 +89,7 @@ func (s *state) Close() error { ...@@ -116,7 +89,7 @@ func (s *state) Close() error {
// OnL1Head signals the driver that the L1 chain changed the "unsafe" block, // OnL1Head signals the driver that the L1 chain changed the "unsafe" block,
// also known as head of the chain, or "latest". // also known as head of the chain, or "latest".
func (s *state) OnL1Head(ctx context.Context, unsafe eth.L1BlockRef) error { func (s *Driver) OnL1Head(ctx context.Context, unsafe eth.L1BlockRef) error {
select { select {
case <-ctx.Done(): case <-ctx.Done():
return ctx.Err() return ctx.Err()
...@@ -127,7 +100,7 @@ func (s *state) OnL1Head(ctx context.Context, unsafe eth.L1BlockRef) error { ...@@ -127,7 +100,7 @@ func (s *state) OnL1Head(ctx context.Context, unsafe eth.L1BlockRef) error {
// OnL1Safe signals the driver that the L1 chain changed the "safe", // OnL1Safe signals the driver that the L1 chain changed the "safe",
// also known as the justified checkpoint (as seen on L1 beacon-chain). // also known as the justified checkpoint (as seen on L1 beacon-chain).
func (s *state) OnL1Safe(ctx context.Context, safe eth.L1BlockRef) error { func (s *Driver) OnL1Safe(ctx context.Context, safe eth.L1BlockRef) error {
select { select {
case <-ctx.Done(): case <-ctx.Done():
return ctx.Err() return ctx.Err()
...@@ -136,7 +109,7 @@ func (s *state) OnL1Safe(ctx context.Context, safe eth.L1BlockRef) error { ...@@ -136,7 +109,7 @@ func (s *state) OnL1Safe(ctx context.Context, safe eth.L1BlockRef) error {
} }
} }
func (s *state) OnL1Finalized(ctx context.Context, finalized eth.L1BlockRef) error { func (s *Driver) OnL1Finalized(ctx context.Context, finalized eth.L1BlockRef) error {
select { select {
case <-ctx.Done(): case <-ctx.Done():
return ctx.Err() return ctx.Err()
...@@ -145,7 +118,7 @@ func (s *state) OnL1Finalized(ctx context.Context, finalized eth.L1BlockRef) err ...@@ -145,7 +118,7 @@ func (s *state) OnL1Finalized(ctx context.Context, finalized eth.L1BlockRef) err
} }
} }
func (s *state) OnUnsafeL2Payload(ctx context.Context, payload *eth.ExecutionPayload) error { func (s *Driver) OnUnsafeL2Payload(ctx context.Context, payload *eth.ExecutionPayload) error {
select { select {
case <-ctx.Done(): case <-ctx.Done():
return ctx.Err() return ctx.Err()
...@@ -154,94 +127,15 @@ func (s *state) OnUnsafeL2Payload(ctx context.Context, payload *eth.ExecutionPay ...@@ -154,94 +127,15 @@ func (s *state) OnUnsafeL2Payload(ctx context.Context, payload *eth.ExecutionPay
} }
} }
func (s *state) handleNewL1HeadBlock(head eth.L1BlockRef) {
// We don't need to do anything if the head hasn't changed.
if s.l1Head == (eth.L1BlockRef{}) {
s.log.Info("Received first L1 head signal", "l1_head", head)
} else if s.l1Head.Hash == head.Hash {
s.log.Trace("Received L1 head signal that is the same as the current head", "l1_head", head)
} else if s.l1Head.Hash == head.ParentHash {
// We got a new L1 block whose parent hash is the same as the current L1 head. Means we're
// dealing with a linear extension (new block is the immediate child of the old one).
s.log.Debug("L1 head moved forward", "l1_head", head)
} else {
if s.l1Head.Number >= head.Number {
s.metrics.RecordL1ReorgDepth(s.l1Head.Number - head.Number)
}
// New L1 block is not the same as the current head or a single step linear extension.
// This could either be a long L1 extension, or a reorg, or we simply missed a head update.
s.log.Warn("L1 head signal indicates a possible L1 re-org", "old_l1_head", s.l1Head, "new_l1_head_parent", head.ParentHash, "new_l1_head", head)
}
s.snapshot("New L1 Head")
s.metrics.RecordL1Ref("l1_head", head)
s.l1Head = head
}
func (s *state) handleNewL1SafeBlock(safe eth.L1BlockRef) {
s.log.Info("New L1 safe block", "l1_safe", safe)
s.metrics.RecordL1Ref("l1_safe", safe)
s.l1Safe = safe
}
func (s *state) handleNewL1FinalizedBlock(finalized eth.L1BlockRef) {
s.log.Info("New L1 finalized block", "l1_finalized", finalized)
s.metrics.RecordL1Ref("l1_finalized", finalized)
s.l1Finalized = finalized
s.derivation.Finalize(finalized.ID())
}
// findL1Origin determines what the next L1 Origin should be.
// The L1 Origin is either the L2 Head's Origin, or the following L1 block
// if the next L2 block's time is greater than or equal to the L2 Head's Origin.
func (s *state) findL1Origin(ctx context.Context) (eth.L1BlockRef, error) {
l2Head := s.derivation.UnsafeL2Head()
// If we are at the head block, don't do a lookup.
if l2Head.L1Origin.Hash == s.l1Head.Hash {
return s.l1Head, nil
}
// Grab a reference to the current L1 origin block.
currentOrigin, err := s.l1.L1BlockRefByHash(ctx, l2Head.L1Origin.Hash)
if err != nil {
return eth.L1BlockRef{}, err
}
if currentOrigin.Number+1+s.DriverConfig.SequencerConfDepth > s.l1Head.Number {
// TODO: we can decide to ignore confirmation depth if we would be forced
// to make an empty block (only deposits) by staying on the current origin.
s.log.Info("sequencing with old origin to preserve conf depth",
"current", currentOrigin, "current_time", currentOrigin.Time,
"l1_head", s.l1Head, "l1_head_time", s.l1Head.Time,
"l2_head", l2Head, "l2_head_time", l2Head.Time,
"depth", s.DriverConfig.SequencerConfDepth)
return currentOrigin, nil
}
// Attempt to find the next L1 origin block, where the next origin is the immediate child of
// the current origin block.
nextOrigin, err := s.l1.L1BlockRefByNumber(ctx, currentOrigin.Number+1)
if err != nil {
s.log.Error("Failed to get next origin. Falling back to current origin", "err", err)
return currentOrigin, nil
}
// If the next L2 block time is greater than the next origin block's time, we can choose to
// start building on top of the next origin. Sequencer implementation has some leeway here and
// could decide to continue to build on top of the previous origin until the Sequencer runs out
// of slack. For simplicity, we implement our Sequencer to always start building on the latest
// L1 block when we can.
if l2Head.Time+s.Config.BlockTime >= nextOrigin.Time {
return nextOrigin, nil
}
return currentOrigin, nil
}
// createNewL2Block builds a L2 block on top of the L2 Head (unsafe). Used by Sequencer nodes to // createNewL2Block builds a L2 block on top of the L2 Head (unsafe). Used by Sequencer nodes to
// construct new L2 blocks. Verifier nodes will use handleEpoch instead. // construct new L2 blocks. Verifier nodes will use handleEpoch instead.
func (s *state) createNewL2Block(ctx context.Context) error { func (s *Driver) createNewL2Block(ctx context.Context) error {
l2Head := s.derivation.UnsafeL2Head()
l2Safe := s.derivation.SafeL2Head()
l2Finalized := s.derivation.Finalized()
// Figure out which L1 origin block we're going to be building on top of. // Figure out which L1 origin block we're going to be building on top of.
l1Origin, err := s.findL1Origin(ctx) l1Origin, err := s.l1OriginSelector.FindL1Origin(ctx, s.l1State.L1Head(), l2Head)
if err != nil { if err != nil {
s.log.Error("Error finding next L1 Origin", "err", err) s.log.Error("Error finding next L1 Origin", "err", err)
return err return err
...@@ -249,17 +143,13 @@ func (s *state) createNewL2Block(ctx context.Context) error { ...@@ -249,17 +143,13 @@ func (s *state) createNewL2Block(ctx context.Context) error {
// Rollup is configured to not start producing blocks until a specific L1 block has been // Rollup is configured to not start producing blocks until a specific L1 block has been
// reached. Don't produce any blocks until we're at that genesis block. // reached. Don't produce any blocks until we're at that genesis block.
if l1Origin.Number < s.Config.Genesis.L1.Number { if l1Origin.Number < s.config.Genesis.L1.Number {
s.log.Info("Skipping block production because the next L1 Origin is behind the L1 genesis", "next", l1Origin.ID(), "genesis", s.Config.Genesis.L1) s.log.Info("Skipping block production because the next L1 Origin is behind the L1 genesis", "next", l1Origin.ID(), "genesis", s.config.Genesis.L1)
return nil return nil
} }
l2Head := s.derivation.UnsafeL2Head()
l2Safe := s.derivation.SafeL2Head()
l2Finalized := s.derivation.Finalized()
// Should never happen. Sequencer will halt if we get into this situation somehow. // Should never happen. Sequencer will halt if we get into this situation somehow.
nextL2Time := l2Head.Time + s.Config.BlockTime nextL2Time := l2Head.Time + s.config.BlockTime
if nextL2Time < l1Origin.Time { if nextL2Time < l1Origin.Time {
s.log.Error("Cannot build L2 block for time before L1 origin", s.log.Error("Cannot build L2 block for time before L1 origin",
"l2Unsafe", l2Head, "nextL2Time", nextL2Time, "l1Origin", l1Origin, "l1OriginTime", l1Origin.Time) "l2Unsafe", l2Head, "nextL2Time", nextL2Time, "l1Origin", l1Origin, "l1OriginTime", l1Origin.Time)
...@@ -268,7 +158,7 @@ func (s *state) createNewL2Block(ctx context.Context) error { ...@@ -268,7 +158,7 @@ func (s *state) createNewL2Block(ctx context.Context) error {
} }
// Actually create the new block. // Actually create the new block.
newUnsafeL2Head, payload, err := s.output.createNewBlock(ctx, l2Head, l2Safe.ID(), l2Finalized.ID(), l1Origin) newUnsafeL2Head, payload, err := s.sequencer.CreateNewBlock(ctx, l2Head, l2Safe.ID(), l2Finalized.ID(), l1Origin)
if err != nil { if err != nil {
s.log.Error("Could not extend chain as sequencer", "err", err, "l2_parent", l2Head, "l1_origin", l1Origin) s.log.Error("Could not extend chain as sequencer", "err", err, "l2_parent", l2Head, "l1_origin", l1Origin)
return err return err
...@@ -292,7 +182,7 @@ func (s *state) createNewL2Block(ctx context.Context) error { ...@@ -292,7 +182,7 @@ func (s *state) createNewL2Block(ctx context.Context) error {
} }
// the eventLoop responds to L1 changes and internal timers to produce L2 blocks. // the eventLoop responds to L1 changes and internal timers to produce L2 blocks.
func (s *state) eventLoop() { func (s *Driver) eventLoop() {
defer s.wg.Done() defer s.wg.Done()
s.log.Info("State loop started") s.log.Info("State loop started")
...@@ -302,8 +192,8 @@ func (s *state) eventLoop() { ...@@ -302,8 +192,8 @@ func (s *state) eventLoop() {
// Start a ticker to produce L2 blocks at a constant rate. Ticker will only run if we're // Start a ticker to produce L2 blocks at a constant rate. Ticker will only run if we're
// running in Sequencer mode. // running in Sequencer mode.
var l2BlockCreationTickerCh <-chan time.Time var l2BlockCreationTickerCh <-chan time.Time
if s.DriverConfig.SequencerEnabled { if s.driverConfig.SequencerEnabled {
l2BlockCreationTicker := time.NewTicker(time.Duration(s.Config.BlockTime) * time.Second) l2BlockCreationTicker := time.NewTicker(time.Duration(s.config.BlockTime) * time.Second)
defer l2BlockCreationTicker.Stop() defer l2BlockCreationTicker.Stop()
l2BlockCreationTickerCh = l2BlockCreationTicker.C l2BlockCreationTickerCh = l2BlockCreationTicker.C
} }
...@@ -371,8 +261,9 @@ func (s *state) eventLoop() { ...@@ -371,8 +261,9 @@ func (s *state) eventLoop() {
case <-l2BlockCreationReqCh: case <-l2BlockCreationReqCh:
s.snapshot("L2 Block Creation Request") s.snapshot("L2 Block Creation Request")
l1Head := s.l1State.L1Head()
if !s.idleDerivation { if !s.idleDerivation {
s.log.Warn("not creating block, node is deriving new l2 data", "head_l1", s.l1Head) s.log.Warn("not creating block, node is deriving new l2 data", "head_l1", l1Head)
break break
} }
ctx, cancel := context.WithTimeout(ctx, 10*time.Second) ctx, cancel := context.WithTimeout(ctx, 10*time.Second)
...@@ -388,8 +279,8 @@ func (s *state) eventLoop() { ...@@ -388,8 +279,8 @@ func (s *state) eventLoop() {
// requesting a new block ASAP instead of waiting for the next tick. // requesting a new block ASAP instead of waiting for the next tick.
// We don't request a block if the confirmation depth is not met. // We don't request a block if the confirmation depth is not met.
l2Head := s.derivation.UnsafeL2Head() l2Head := s.derivation.UnsafeL2Head()
if s.l1Head.Number > l2Head.L1Origin.Number+s.DriverConfig.SequencerConfDepth { if l1Head.Number > l2Head.L1Origin.Number+s.driverConfig.SequencerConfDepth {
s.log.Trace("Building another L2 block asap to catch up with L1 head", "l2_unsafe", l2Head, "l2_unsafe_l1_origin", l2Head.L1Origin, "l1_head", s.l1Head) s.log.Trace("Building another L2 block asap to catch up with L1 head", "l2_unsafe", l2Head, "l2_unsafe_l1_origin", l2Head.L1Origin, "l1_head", l1Head)
// But not too quickly to minimize busy-waiting for new blocks // But not too quickly to minimize busy-waiting for new blocks
time.AfterFunc(time.Millisecond*10, reqL2BlockCreation) time.AfterFunc(time.Millisecond*10, reqL2BlockCreation)
} }
...@@ -402,13 +293,14 @@ func (s *state) eventLoop() { ...@@ -402,13 +293,14 @@ func (s *state) eventLoop() {
reqStep() reqStep()
case newL1Head := <-s.l1HeadSig: case newL1Head := <-s.l1HeadSig:
s.handleNewL1HeadBlock(newL1Head) s.l1State.HandleNewL1HeadBlock(newL1Head)
reqStep() // a new L1 head may mean we have the data to not get an EOF again. reqStep() // a new L1 head may mean we have the data to not get an EOF again.
case newL1Safe := <-s.l1SafeSig: case newL1Safe := <-s.l1SafeSig:
s.handleNewL1SafeBlock(newL1Safe) s.l1State.HandleNewL1SafeBlock(newL1Safe)
// no step, justified L1 information does not do anything for L2 derivation or status // no step, justified L1 information does not do anything for L2 derivation or status
case newL1Finalized := <-s.l1FinalizedSig: case newL1Finalized := <-s.l1FinalizedSig:
s.handleNewL1FinalizedBlock(newL1Finalized) s.l1State.HandleNewL1FinalizedBlock(newL1Finalized)
s.derivation.Finalize(newL1Finalized.ID())
reqStep() // we may be able to mark more L2 data as finalized now reqStep() // we may be able to mark more L2 data as finalized now
case <-delayedStepReq: case <-delayedStepReq:
delayedStepReq = nil delayedStepReq = nil
...@@ -416,13 +308,13 @@ func (s *state) eventLoop() { ...@@ -416,13 +308,13 @@ func (s *state) eventLoop() {
case <-stepReqCh: case <-stepReqCh:
s.metrics.SetDerivationIdle(false) s.metrics.SetDerivationIdle(false)
s.idleDerivation = false s.idleDerivation = false
s.log.Debug("Derivation process step", "onto_origin", s.derivation.Progress().Origin, "onto_closed", s.derivation.Progress().Closed, "attempts", stepAttempts) s.log.Debug("Derivation process step", "onto_origin", s.derivation.Origin(), "attempts", stepAttempts)
stepCtx, cancel := context.WithTimeout(ctx, time.Second*10) // TODO pick a timeout for executing a single step stepCtx, cancel := context.WithTimeout(ctx, time.Second*10) // TODO pick a timeout for executing a single step
err := s.derivation.Step(stepCtx) err := s.derivation.Step(stepCtx)
cancel() cancel()
stepAttempts += 1 // count as attempt by default. We reset to 0 if we are making healthy progress. stepAttempts += 1 // count as attempt by default. We reset to 0 if we are making healthy progress.
if err == io.EOF { if err == io.EOF {
s.log.Debug("Derivation process went idle", "progress", s.derivation.Progress().Origin) s.log.Debug("Derivation process went idle", "progress", s.derivation.Origin())
s.idleDerivation = true s.idleDerivation = true
stepAttempts = 0 stepAttempts = 0
s.metrics.SetDerivationIdle(true) s.metrics.SetDerivationIdle(true)
...@@ -454,10 +346,10 @@ func (s *state) eventLoop() { ...@@ -454,10 +346,10 @@ func (s *state) eventLoop() {
} }
case respCh := <-s.syncStatusReq: case respCh := <-s.syncStatusReq:
respCh <- eth.SyncStatus{ respCh <- eth.SyncStatus{
CurrentL1: s.derivation.Progress().Origin, CurrentL1: s.derivation.Origin(),
HeadL1: s.l1Head, HeadL1: s.l1State.L1Head(),
SafeL1: s.l1Safe, SafeL1: s.l1State.L1Safe(),
FinalizedL1: s.l1Finalized, FinalizedL1: s.l1State.L1Finalized(),
UnsafeL2: s.derivation.UnsafeL2Head(), UnsafeL2: s.derivation.UnsafeL2Head(),
SafeL2: s.derivation.SafeL2Head(), SafeL2: s.derivation.SafeL2Head(),
FinalizedL2: s.derivation.Finalized(), FinalizedL2: s.derivation.Finalized(),
...@@ -476,8 +368,8 @@ func (s *state) eventLoop() { ...@@ -476,8 +368,8 @@ func (s *state) eventLoop() {
// ResetDerivationPipeline forces a reset of the derivation pipeline. // ResetDerivationPipeline forces a reset of the derivation pipeline.
// It waits for the reset to occur. It simply unblocks the caller rather // It waits for the reset to occur. It simply unblocks the caller rather
// than fully cancelling the reset request upon a context cancellation. // than fully cancelling the reset request upon a context cancellation.
func (s *state) ResetDerivationPipeline(ctx context.Context) error { func (s *Driver) ResetDerivationPipeline(ctx context.Context) error {
respCh := make(chan struct{}) respCh := make(chan struct{}, 1)
select { select {
case <-ctx.Done(): case <-ctx.Done():
return ctx.Err() return ctx.Err()
...@@ -491,8 +383,8 @@ func (s *state) ResetDerivationPipeline(ctx context.Context) error { ...@@ -491,8 +383,8 @@ func (s *state) ResetDerivationPipeline(ctx context.Context) error {
} }
} }
func (s *state) SyncStatus(ctx context.Context) (*eth.SyncStatus, error) { func (s *Driver) SyncStatus(ctx context.Context) (*eth.SyncStatus, error) {
respCh := make(chan eth.SyncStatus) respCh := make(chan eth.SyncStatus, 1)
select { select {
case <-ctx.Done(): case <-ctx.Done():
return nil, ctx.Err() return nil, ctx.Err()
...@@ -516,11 +408,11 @@ func (v deferJSONString) String() string { ...@@ -516,11 +408,11 @@ func (v deferJSONString) String() string {
return string(out) return string(out)
} }
func (s *state) snapshot(event string) { func (s *Driver) snapshot(event string) {
s.snapshotLog.Info("Rollup State Snapshot", s.snapshotLog.Info("Rollup State Snapshot",
"event", event, "event", event,
"l1Head", deferJSONString{s.l1Head}, "l1Head", deferJSONString{s.l1State.L1Head()},
"l1Current", deferJSONString{s.derivation.Progress().Origin}, "l1Current", deferJSONString{s.derivation.Origin()},
"l2Head", deferJSONString{s.derivation.UnsafeL2Head()}, "l2Head", deferJSONString{s.derivation.UnsafeL2Head()},
"l2Safe", deferJSONString{s.derivation.SafeL2Head()}, "l2Safe", deferJSONString{s.derivation.SafeL2Head()},
"l2FinalizedHead", deferJSONString{s.derivation.Finalized()}) "l2FinalizedHead", deferJSONString{s.derivation.Finalized()})
......
package driver
import (
"context"
"fmt"
"time"
"github.com/ethereum-optimism/optimism/op-node/eth"
"github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-node/rollup/derive"
"github.com/ethereum/go-ethereum/log"
)
type outputImpl struct {
dl Downloader
l2 derive.Engine
log log.Logger
Config *rollup.Config
}
func (d *outputImpl) createNewBlock(ctx context.Context, l2Head eth.L2BlockRef, l2SafeHead eth.BlockID, l2Finalized eth.BlockID, l1Origin eth.L1BlockRef) (eth.L2BlockRef, *eth.ExecutionPayload, error) {
d.log.Info("creating new block", "parent", l2Head, "l1Origin", l1Origin)
fetchCtx, cancel := context.WithTimeout(ctx, time.Second*20)
defer cancel()
attrs, err := derive.PreparePayloadAttributes(fetchCtx, d.Config, d.dl, l2Head, l2Head.Time+d.Config.BlockTime, l1Origin.ID())
if err != nil {
return l2Head, nil, err
}
// If our next L2 block timestamp is beyond the Sequencer drift threshold, then we must produce
// empty blocks (other than the L1 info deposit and any user deposits). We handle this by
// setting NoTxPool to true, which will cause the Sequencer to not include any transactions
// from the transaction pool.
attrs.NoTxPool = uint64(attrs.Timestamp) >= l1Origin.Time+d.Config.MaxSequencerDrift
// And construct our fork choice state. This is our current fork choice state and will be
// updated as a result of executing the block based on the attributes described above.
fc := eth.ForkchoiceState{
HeadBlockHash: l2Head.Hash,
SafeBlockHash: l2SafeHead.Hash,
FinalizedBlockHash: l2Finalized.Hash,
}
// Actually execute the block and add it to the head of the chain.
payload, errType, err := derive.InsertHeadBlock(ctx, d.log, d.l2, fc, attrs, false)
if err != nil {
return l2Head, nil, fmt.Errorf("failed to extend L2 chain, error (%d): %w", errType, err)
}
// Generate an L2 block ref from the payload.
ref, err := derive.PayloadToBlockRef(payload, &d.Config.Genesis)
return ref, payload, err
}
...@@ -3,6 +3,7 @@ package sources ...@@ -3,6 +3,7 @@ package sources
import ( import (
"context" "context"
"fmt" "fmt"
"io"
"github.com/ethereum-optimism/optimism/op-node/client" "github.com/ethereum-optimism/optimism/op-node/client"
"github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/eth"
...@@ -80,7 +81,8 @@ type EthClient struct { ...@@ -80,7 +81,8 @@ type EthClient struct {
log log.Logger log log.Logger
// cache receipts in bundles per block hash // cache receipts in bundles per block hash
// common.Hash -> types.Receipts // We cache the receipts fetcher to not lose progress when we have to retry the `Fetch` call
// common.Hash -> eth.ReceiptsFetcher
receiptsCache *caching.LRUCache receiptsCache *caching.LRUCache
// cache transactions in bundles per block hash // cache transactions in bundles per block hash
...@@ -230,21 +232,42 @@ func (s *EthClient) PayloadByLabel(ctx context.Context, label eth.BlockLabel) (* ...@@ -230,21 +232,42 @@ func (s *EthClient) PayloadByLabel(ctx context.Context, label eth.BlockLabel) (*
return s.payloadCall(ctx, "eth_getBlockByNumber", string(label)) return s.payloadCall(ctx, "eth_getBlockByNumber", string(label))
} }
func (s *EthClient) Fetch(ctx context.Context, blockHash common.Hash) (eth.BlockInfo, types.Transactions, eth.ReceiptsFetcher, error) { // FetchReceipts returns a block info and all of the receipts associated with transactions in the block.
// It verifies the receipt hash in the block header against the receipt hash of the fetched receipts
// to ensure that the execution engine did not fail to return any receipts.
func (s *EthClient) FetchReceipts(ctx context.Context, blockHash common.Hash) (eth.BlockInfo, types.Receipts, error) {
info, txs, err := s.InfoAndTxsByHash(ctx, blockHash) info, txs, err := s.InfoAndTxsByHash(ctx, blockHash)
if err != nil { if err != nil {
return nil, nil, nil, err return nil, nil, err
} }
// Try to reuse the receipts fetcher because is caches the results of intermediate calls. This means
// that if just one of many calls fail, we only retry the failed call rather than all of the calls.
// The underlying fetcher uses the receipts hash to verify receipt integrity.
var fetcher eth.ReceiptsFetcher
if v, ok := s.receiptsCache.Get(blockHash); ok { if v, ok := s.receiptsCache.Get(blockHash); ok {
return info, txs, v.(eth.ReceiptsFetcher), nil fetcher = v.(eth.ReceiptsFetcher)
} else {
txHashes := make([]common.Hash, len(txs))
for i := 0; i < len(txs); i++ {
txHashes[i] = txs[i].Hash()
}
fetcher = NewReceiptsFetcher(info.ID(), info.ReceiptHash(), txHashes, s.client.BatchCallContext, s.maxBatchSize)
s.receiptsCache.Add(blockHash, fetcher)
} }
txHashes := make([]common.Hash, len(txs)) // Fetch all receipts
for i := 0; i < len(txs); i++ { for {
txHashes[i] = txs[i].Hash() if err := fetcher.Fetch(ctx); err == io.EOF {
break
} else if err != nil {
return nil, nil, err
}
} }
r := NewReceiptsFetcher(info.ID(), info.ReceiptHash(), txHashes, s.client.BatchCallContext, s.maxBatchSize) receipts, err := fetcher.Result()
s.receiptsCache.Add(blockHash, r) if err != nil {
return info, txs, r, nil return nil, nil, err
}
return info, receipts, nil
} }
func (s *EthClient) GetProof(ctx context.Context, address common.Address, blockTag string) (*eth.AccountResult, error) { func (s *EthClient) GetProof(ctx context.Context, address common.Address, blockTag string) (*eth.AccountResult, error) {
......
...@@ -105,13 +105,13 @@ func (m *MockEthClient) ExpectPayloadByLabel(label eth.BlockLabel, payload *eth. ...@@ -105,13 +105,13 @@ func (m *MockEthClient) ExpectPayloadByLabel(label eth.BlockLabel, payload *eth.
m.Mock.On("PayloadByLabel", label).Once().Return(payload, &err) m.Mock.On("PayloadByLabel", label).Once().Return(payload, &err)
} }
func (m *MockEthClient) Fetch(ctx context.Context, blockHash common.Hash) (eth.BlockInfo, types.Transactions, eth.ReceiptsFetcher, error) { func (m *MockEthClient) FetchReceipts(ctx context.Context, blockHash common.Hash) (eth.BlockInfo, types.Receipts, error) {
out := m.Mock.MethodCalled("Fetch", blockHash) out := m.Mock.MethodCalled("FetchReceipts", blockHash)
return *out[0].(*eth.BlockInfo), out[1].(types.Transactions), out[2].(eth.ReceiptsFetcher), *out[3].(*error) return *out[0].(*eth.BlockInfo), out[1].(types.Receipts), *out[2].(*error)
} }
func (m *MockEthClient) ExpectFetch(hash common.Hash, info eth.BlockInfo, transactions types.Transactions, receipts types.Receipts, err error) { func (m *MockEthClient) ExpectFetchReceipts(hash common.Hash, info eth.BlockInfo, receipts types.Receipts, err error) {
m.Mock.On("Fetch", hash).Once().Return(&info, transactions, eth.FetchedReceipts(receipts), &err) m.Mock.On("FetchReceipts", hash).Once().Return(&info, receipts, &err)
} }
func (m *MockEthClient) GetProof(ctx context.Context, address common.Address, blockTag string) (*eth.AccountResult, error) { func (m *MockEthClient) GetProof(ctx context.Context, address common.Address, blockTag string) (*eth.AccountResult, error) {
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
{ {
"address": "0x4200000000000000000000000000000000000016", "address": "0x4200000000000000000000000000000000000016",
"topics": [ "topics": [
"0x87bf7b546c8de873abb0db5b579ec131f8d0cf5b14f39933551cf9ced23a6136", "0x7744840cae4793a72467311120512aa98e4398bcd2b9d379b2b9c3b60fa03d72",
"0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000004200000000000000000000000000000000000007", "0x0000000000000000000000004200000000000000000000000000000000000007",
"0x0000000000000000000000006900000000000000000000000000000000000002" "0x0000000000000000000000006900000000000000000000000000000000000002"
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
{ {
"address": "0x4200000000000000000000000000000000000016", "address": "0x4200000000000000000000000000000000000016",
"topics": [ "topics": [
"0x2ef6ceb1668fdd882b1f89ddd53a666b0c1113d14cf90c0fbf97c7b1ad880fbb", "0xedd348f9c36ef1a5b0747bb5039752707059f0b934c8e508b3271e08fbd0122c",
"0x0d827f8148288e3a2466018f71b968ece4ea9f9e2a81c30da9bd46cce2868285" "0x0d827f8148288e3a2466018f71b968ece4ea9f9e2a81c30da9bd46cce2868285"
], ],
"data": "0x", "data": "0x",
...@@ -131,4 +131,4 @@ ...@@ -131,4 +131,4 @@
"blockHash": "0xfdd4ad8a984b45687aca0463db491cbd0e85273d970019a3f8bf618b614938df", "blockHash": "0xfdd4ad8a984b45687aca0463db491cbd0e85273d970019a3f8bf618b614938df",
"blockNumber": "0x36", "blockNumber": "0x36",
"transactionIndex": "0x1" "transactionIndex": "0x1"
} }
\ No newline at end of file
...@@ -21,8 +21,8 @@ import ( ...@@ -21,8 +21,8 @@ import (
"github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/rpc"
) )
var WithdrawalInitiatedTopic = crypto.Keccak256Hash([]byte("WithdrawalInitiated(uint256,address,address,uint256,uint256,bytes)")) var MessagePassedTopic = crypto.Keccak256Hash([]byte("MessagePassed(uint256,address,address,uint256,uint256,bytes)"))
var WithdrawalInitiatedExtension1Topic = crypto.Keccak256Hash([]byte("WithdrawalInitiatedExtension1(bytes32)")) var MessagePassedExtension1Topic = crypto.Keccak256Hash([]byte("MessagePassedExtension1(bytes32)"))
// WaitForFinalizationPeriod waits until there is OutputProof for an L2 block number larger than the supplied l2BlockNumber // WaitForFinalizationPeriod waits until there is OutputProof for an L2 block number larger than the supplied l2BlockNumber
// and that the output is finalized. // and that the output is finalized.
...@@ -172,11 +172,11 @@ func FinalizeWithdrawalParameters(ctx context.Context, l2client ProofClient, txH ...@@ -172,11 +172,11 @@ func FinalizeWithdrawalParameters(ctx context.Context, l2client ProofClient, txH
return FinalizedWithdrawalParameters{}, err return FinalizedWithdrawalParameters{}, err
} }
// Parse the receipt // Parse the receipt
ev, err := ParseWithdrawalInitiated(receipt) ev, err := ParseMessagePassed(receipt)
if err != nil { if err != nil {
return FinalizedWithdrawalParameters{}, err return FinalizedWithdrawalParameters{}, err
} }
ev1, err := ParseWithdrawalInitiatedExtension1(receipt) ev1, err := ParseMessagePassedExtension1(receipt)
if err != nil { if err != nil {
return FinalizedWithdrawalParameters{}, err return FinalizedWithdrawalParameters{}, err
} }
...@@ -244,7 +244,7 @@ var ( ...@@ -244,7 +244,7 @@ var (
// - I don't like having to use the ABI Generated struct // - I don't like having to use the ABI Generated struct
// - There should be a better way to run the ABI encoding // - There should be a better way to run the ABI encoding
// - These needs to be fuzzed against the solidity // - These needs to be fuzzed against the solidity
func WithdrawalHash(ev *bindings.L2ToL1MessagePasserWithdrawalInitiated) (common.Hash, error) { func WithdrawalHash(ev *bindings.L2ToL1MessagePasserMessagePassed) (common.Hash, error) {
// abi.encode(nonce, msg.sender, _target, msg.value, _gasLimit, _data) // abi.encode(nonce, msg.sender, _target, msg.value, _gasLimit, _data)
args := abi.Arguments{ args := abi.Arguments{
{Name: "nonce", Type: Uint256Type}, {Name: "nonce", Type: Uint256Type},
...@@ -261,50 +261,50 @@ func WithdrawalHash(ev *bindings.L2ToL1MessagePasserWithdrawalInitiated) (common ...@@ -261,50 +261,50 @@ func WithdrawalHash(ev *bindings.L2ToL1MessagePasserWithdrawalInitiated) (common
return crypto.Keccak256Hash(enc), nil return crypto.Keccak256Hash(enc), nil
} }
// ParseWithdrawalInitiated parses WithdrawalInitiated events from // ParseMessagePassed parses MessagePassed events from
// a transaction receipt. It does not support multiple withdrawals // a transaction receipt. It does not support multiple withdrawals
// per receipt. // per receipt.
func ParseWithdrawalInitiated(receipt *types.Receipt) (*bindings.L2ToL1MessagePasserWithdrawalInitiated, error) { func ParseMessagePassed(receipt *types.Receipt) (*bindings.L2ToL1MessagePasserMessagePassed, error) {
contract, err := bindings.NewL2ToL1MessagePasser(common.Address{}, nil) contract, err := bindings.NewL2ToL1MessagePasser(common.Address{}, nil)
if err != nil { if err != nil {
return nil, err return nil, err
} }
for _, log := range receipt.Logs { for _, log := range receipt.Logs {
if len(log.Topics) == 0 || log.Topics[0] != WithdrawalInitiatedTopic { if len(log.Topics) == 0 || log.Topics[0] != MessagePassedTopic {
continue continue
} }
ev, err := contract.ParseWithdrawalInitiated(*log) ev, err := contract.ParseMessagePassed(*log)
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to parse log: %w", err) return nil, fmt.Errorf("failed to parse log: %w", err)
} }
return ev, nil return ev, nil
} }
return nil, errors.New("Unable to find WithdrawalInitiated event") return nil, errors.New("Unable to find MessagePassed event")
} }
// ParseWithdrawalInitiatedExtension1 parses WithdrawalInitiatedExtension1 events // ParseMessagePassedExtension1 parses MessagePassedExtension1 events
// from a transaction receipt. It does not support multiple withdrawals per // from a transaction receipt. It does not support multiple withdrawals per
// receipt. // receipt.
func ParseWithdrawalInitiatedExtension1(receipt *types.Receipt) (*bindings.L2ToL1MessagePasserWithdrawalInitiatedExtension1, error) { func ParseMessagePassedExtension1(receipt *types.Receipt) (*bindings.L2ToL1MessagePasserMessagePassedExtension1, error) {
contract, err := bindings.NewL2ToL1MessagePasser(common.Address{}, nil) contract, err := bindings.NewL2ToL1MessagePasser(common.Address{}, nil)
if err != nil { if err != nil {
return nil, err return nil, err
} }
for _, log := range receipt.Logs { for _, log := range receipt.Logs {
if len(log.Topics) == 0 || log.Topics[0] != WithdrawalInitiatedExtension1Topic { if len(log.Topics) == 0 || log.Topics[0] != MessagePassedExtension1Topic {
continue continue
} }
ev, err := contract.ParseWithdrawalInitiatedExtension1(*log) ev, err := contract.ParseMessagePassedExtension1(*log)
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to parse log: %w", err) return nil, fmt.Errorf("failed to parse log: %w", err)
} }
return ev, nil return ev, nil
} }
return nil, errors.New("Unable to find WithdrawalInitiatedExtension1 event") return nil, errors.New("Unable to find MessagePassedExtension1 event")
} }
// StorageSlotOfWithdrawalHash determines the storage slot of the Withdrawer contract to look at // StorageSlotOfWithdrawalHash determines the storage slot of the Withdrawer contract to look at
......
...@@ -15,16 +15,16 @@ import ( ...@@ -15,16 +15,16 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
func TestParseWithdrawalInitiated(t *testing.T) { func TestParseMessagePassed(t *testing.T) {
tests := []struct { tests := []struct {
name string name string
file string file string
expected *bindings.L2ToL1MessagePasserWithdrawalInitiated expected *bindings.L2ToL1MessagePasserMessagePassed
}{ }{
{ {
"withdrawal through bridge", "withdrawal through bridge",
"bridge-withdrawal.json", "bridge-withdrawal.json",
&bindings.L2ToL1MessagePasserWithdrawalInitiated{ &bindings.L2ToL1MessagePasserMessagePassed{
Nonce: new(big.Int), Nonce: new(big.Int),
Sender: common.HexToAddress("0x4200000000000000000000000000000000000007"), Sender: common.HexToAddress("0x4200000000000000000000000000000000000007"),
Target: common.HexToAddress("0x6900000000000000000000000000000000000002"), Target: common.HexToAddress("0x6900000000000000000000000000000000000002"),
...@@ -51,7 +51,7 @@ func TestParseWithdrawalInitiated(t *testing.T) { ...@@ -51,7 +51,7 @@ func TestParseWithdrawalInitiated(t *testing.T) {
Raw: types.Log{ Raw: types.Log{
Address: common.HexToAddress("0x4200000000000000000000000000000000000016"), Address: common.HexToAddress("0x4200000000000000000000000000000000000016"),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0x87bf7b546c8de873abb0db5b579ec131f8d0cf5b14f39933551cf9ced23a6136"), common.HexToHash("0x7744840cae4793a72467311120512aa98e4398bcd2b9d379b2b9c3b60fa03d72"),
common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"), common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"),
common.HexToHash("0x0000000000000000000000004200000000000000000000000000000000000007"), common.HexToHash("0x0000000000000000000000004200000000000000000000000000000000000007"),
common.HexToHash("0x0000000000000000000000006900000000000000000000000000000000000002"), common.HexToHash("0x0000000000000000000000006900000000000000000000000000000000000002"),
...@@ -95,7 +95,7 @@ func TestParseWithdrawalInitiated(t *testing.T) { ...@@ -95,7 +95,7 @@ func TestParseWithdrawalInitiated(t *testing.T) {
dec := json.NewDecoder(f) dec := json.NewDecoder(f)
receipt := new(types.Receipt) receipt := new(types.Receipt)
require.NoError(t, dec.Decode(receipt)) require.NoError(t, dec.Decode(receipt))
parsed, err := ParseWithdrawalInitiated(receipt) parsed, err := ParseMessagePassed(receipt)
require.NoError(t, err) require.NoError(t, err)
// Have to do this weird thing to compare zero bigints. // Have to do this weird thing to compare zero bigints.
...@@ -117,21 +117,21 @@ func TestParseWithdrawalInitiated(t *testing.T) { ...@@ -117,21 +117,21 @@ func TestParseWithdrawalInitiated(t *testing.T) {
} }
} }
func TestParseWithdrawalInitiatedExtension1(t *testing.T) { func TestParseMessagePassedExtension1(t *testing.T) {
tests := []struct { tests := []struct {
name string name string
file string file string
expected *bindings.L2ToL1MessagePasserWithdrawalInitiatedExtension1 expected *bindings.L2ToL1MessagePasserMessagePassedExtension1
}{ }{
{ {
"withdrawal through bridge", "withdrawal through bridge",
"bridge-withdrawal.json", "bridge-withdrawal.json",
&bindings.L2ToL1MessagePasserWithdrawalInitiatedExtension1{ &bindings.L2ToL1MessagePasserMessagePassedExtension1{
Hash: common.HexToHash("0x0d827f8148288e3a2466018f71b968ece4ea9f9e2a81c30da9bd46cce2868285"), Hash: common.HexToHash("0x0d827f8148288e3a2466018f71b968ece4ea9f9e2a81c30da9bd46cce2868285"),
Raw: types.Log{ Raw: types.Log{
Address: common.HexToAddress("0x4200000000000000000000000000000000000016"), Address: common.HexToAddress("0x4200000000000000000000000000000000000016"),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0x2ef6ceb1668fdd882b1f89ddd53a666b0c1113d14cf90c0fbf97c7b1ad880fbb"), common.HexToHash("0xedd348f9c36ef1a5b0747bb5039752707059f0b934c8e508b3271e08fbd0122c"),
common.HexToHash("0x0d827f8148288e3a2466018f71b968ece4ea9f9e2a81c30da9bd46cce2868285"), common.HexToHash("0x0d827f8148288e3a2466018f71b968ece4ea9f9e2a81c30da9bd46cce2868285"),
}, },
Data: []byte{}, Data: []byte{},
...@@ -152,7 +152,7 @@ func TestParseWithdrawalInitiatedExtension1(t *testing.T) { ...@@ -152,7 +152,7 @@ func TestParseWithdrawalInitiatedExtension1(t *testing.T) {
dec := json.NewDecoder(f) dec := json.NewDecoder(f)
receipt := new(types.Receipt) receipt := new(types.Receipt)
require.NoError(t, dec.Decode(receipt)) require.NoError(t, dec.Decode(receipt))
parsed, err := ParseWithdrawalInitiatedExtension1(receipt) parsed, err := ParseMessagePassedExtension1(receipt)
require.NoError(t, err) require.NoError(t, err)
require.EqualValues(t, test.expected, parsed) require.EqualValues(t, test.expected, parsed)
}) })
......
...@@ -3,9 +3,9 @@ module github.com/ethereum-optimism/optimism/op-proposer ...@@ -3,9 +3,9 @@ module github.com/ethereum-optimism/optimism/op-proposer
go 1.18 go 1.18
require ( require (
github.com/ethereum-optimism/optimism/op-bindings v0.8.9 github.com/ethereum-optimism/optimism/op-bindings v0.8.10
github.com/ethereum-optimism/optimism/op-node v0.8.9 github.com/ethereum-optimism/optimism/op-node v0.8.10
github.com/ethereum-optimism/optimism/op-service v0.8.9 github.com/ethereum-optimism/optimism/op-service v0.8.10
github.com/ethereum/go-ethereum v1.10.23 github.com/ethereum/go-ethereum v1.10.23
github.com/miguelmota/go-ethereum-hdwallet v0.1.1 github.com/miguelmota/go-ethereum-hdwallet v0.1.1
github.com/stretchr/testify v1.8.0 github.com/stretchr/testify v1.8.0
......
...@@ -150,12 +150,12 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m ...@@ -150,12 +150,12 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/ethereum-optimism/op-geth v0.0.0-20220926184707-53d23c240afd h1:NchOnosWOkH9wlix8QevGHE+6vuRa+OMGvDNsczv2kQ= github.com/ethereum-optimism/op-geth v0.0.0-20220926184707-53d23c240afd h1:NchOnosWOkH9wlix8QevGHE+6vuRa+OMGvDNsczv2kQ=
github.com/ethereum-optimism/op-geth v0.0.0-20220926184707-53d23c240afd/go.mod h1:/6CsT5Ceen2WPLI/oCA3xMcZ5sWMF/D46SjM/ayY0Oo= github.com/ethereum-optimism/op-geth v0.0.0-20220926184707-53d23c240afd/go.mod h1:/6CsT5Ceen2WPLI/oCA3xMcZ5sWMF/D46SjM/ayY0Oo=
github.com/ethereum-optimism/optimism/op-bindings v0.8.9 h1:QeYLhgZP0QkDLxyXhkWLj/iHDFkMNI18abgrHL4I9TE= github.com/ethereum-optimism/optimism/op-bindings v0.8.10 h1:aSAWCQwBQnbmv03Gvtuvn3qfTWrZu/sTlRAWrpQhiHc=
github.com/ethereum-optimism/optimism/op-bindings v0.8.9/go.mod h1:pyTCbh2o/SY+5/AL2Qo5GgAao3Gtt9Ff6tfK9Pa9emM= github.com/ethereum-optimism/optimism/op-bindings v0.8.10/go.mod h1:pyTCbh2o/SY+5/AL2Qo5GgAao3Gtt9Ff6tfK9Pa9emM=
github.com/ethereum-optimism/optimism/op-node v0.8.9 h1:wUxvjeHB1nQtnsxbNxqHthSS+Uune7Xb17NWXDBdSXI= github.com/ethereum-optimism/optimism/op-node v0.8.10 h1:1Gc4FtR5B+HgfQ+byNn3P+tiJarpMZSYjj5iLvA3YtU=
github.com/ethereum-optimism/optimism/op-node v0.8.9/go.mod h1:ETNw9UP6sy/pWf6aoNHEgQKrXN2ca0Fm0OqIbCEghYk= github.com/ethereum-optimism/optimism/op-node v0.8.10/go.mod h1:6NkgIThuQbPY6fA9lI2A52DaeLM2FvrcwGCBVEY2fS8=
github.com/ethereum-optimism/optimism/op-service v0.8.9 h1:YdMBcgXi+NHqX3pKR6UhjGHtBeF8AQK6kLmwpv7LzJM= github.com/ethereum-optimism/optimism/op-service v0.8.10 h1:K3IABHI1b0MDrDXALvTKTbzy6IogGD6NgmbqfKEcEwM=
github.com/ethereum-optimism/optimism/op-service v0.8.9/go.mod h1:K0uybOhICTc2yfhrRj0cD1m7aPkOf5C9e6bUmvf4rGA= github.com/ethereum-optimism/optimism/op-service v0.8.10/go.mod h1:K0uybOhICTc2yfhrRj0cD1m7aPkOf5C9e6bUmvf4rGA=
github.com/ethereum/go-ethereum v1.10.4/go.mod h1:nEE0TP5MtxGzOMd7egIrbPJMQBnhVU3ELNxhBglIzhg= github.com/ethereum/go-ethereum v1.10.4/go.mod h1:nEE0TP5MtxGzOMd7egIrbPJMQBnhVU3ELNxhBglIzhg=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0=
......
package backoff package backoff
import ( import (
"context"
"fmt" "fmt"
"time" "time"
) )
...@@ -24,21 +25,37 @@ func (e *ErrFailedPermanently) Error() string { ...@@ -24,21 +25,37 @@ func (e *ErrFailedPermanently) Error() string {
// with delays in between each retry according to the provided // with delays in between each retry according to the provided
// Strategy. // Strategy.
func Do(maxAttempts int, strategy Strategy, op Operation) error { func Do(maxAttempts int, strategy Strategy, op Operation) error {
return DoCtx(context.Background(), maxAttempts, strategy, op)
}
func DoCtx(ctx context.Context, maxAttempts int, strategy Strategy, op Operation) error {
var attempt int var attempt int
reattemptCh := make(chan struct{}, 1)
doReattempt := func() {
reattemptCh <- struct{}{}
}
doReattempt()
for { for {
attempt++ select {
err := op() case <-ctx.Done():
if err == nil { return ctx.Err()
return nil case <-reattemptCh:
} attempt++
err := op()
if err == nil {
return nil
}
if attempt == maxAttempts { if attempt == maxAttempts {
return &ErrFailedPermanently{ return &ErrFailedPermanently{
attempts: maxAttempts, attempts: maxAttempts,
LastErr: err, LastErr: err,
}
} }
time.AfterFunc(strategy.Duration(attempt-1), doReattempt)
} }
time.Sleep(strategy.Duration(attempt - 1))
} }
} }
...@@ -48,12 +48,19 @@ RUN apt-get update && \ ...@@ -48,12 +48,19 @@ RUN apt-get update && \
apt-get install -y nodejs && \ apt-get install -y nodejs && \
npm i -g yarn && \ npm i -g yarn && \
npm i -g depcheck && \ npm i -g depcheck && \
pip install slither-analyzer && \
go install gotest.tools/gotestsum@latest && \ go install gotest.tools/gotestsum@latest && \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.48.0 && \ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.48.0 && \
curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/master/install.sh | bash && \ curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/master/install.sh | bash && \
chmod +x /usr/local/bin/check-changed chmod +x /usr/local/bin/check-changed
# Install a specific version of slither. The current release does not work with our
# forge test contracts.
WORKDIR /opt
RUN git clone https://github.com/crytic/slither && \
cd slither && \
git checkout 90d13cd3883404a86ef4b3dd6af4d5c234e69a54 && \
python3 setup.py install
RUN echo "downloading solidity compilers" && \ RUN echo "downloading solidity compilers" && \
curl -o solc-linux-amd64-v0.5.17+commit.d19bba13 -sL https://binaries.soliditylang.org/linux-amd64/solc-linux-amd64-v0.5.17+commit.d19bba13 && \ curl -o solc-linux-amd64-v0.5.17+commit.d19bba13 -sL https://binaries.soliditylang.org/linux-amd64/solc-linux-amd64-v0.5.17+commit.d19bba13 && \
curl -o solc-linux-amd64-v0.8.9+commit.e5eed63a -sL https://binaries.soliditylang.org/linux-amd64/solc-linux-amd64-v0.8.9+commit.e5eed63a && \ curl -o solc-linux-amd64-v0.8.9+commit.e5eed63a -sL https://binaries.soliditylang.org/linux-amd64/solc-linux-amd64-v0.8.9+commit.e5eed63a && \
......
...@@ -9,6 +9,8 @@ GasBenchMark_L1StandardBridge_Finalize:test_finalizeETHWithdrawal_benchmark() (g ...@@ -9,6 +9,8 @@ GasBenchMark_L1StandardBridge_Finalize:test_finalizeETHWithdrawal_benchmark() (g
GasBenchMark_L2OutputOracle:test_proposeL2Output_benchmark() (gas: 68671) GasBenchMark_L2OutputOracle:test_proposeL2Output_benchmark() (gas: 68671)
GasBenchMark_OptimismPortal:test_depositTransaction_benchmark() (gas: 74964) GasBenchMark_OptimismPortal:test_depositTransaction_benchmark() (gas: 74964)
GasBenchMark_OptimismPortal:test_depositTransaction_benchmark_1() (gas: 35777) GasBenchMark_OptimismPortal:test_depositTransaction_benchmark_1() (gas: 35777)
CrossDomainMessenger_Test:testFuzz_baseGas(uint32) (runs: 256, μ: 20263, ~: 20263)
CrossDomainMessenger_Test:test_baseGas() (gas: 20100)
CrossDomainOwnableThroughPortal_Test:test_depositTransaction_crossDomainOwner() (gas: 61850) CrossDomainOwnableThroughPortal_Test:test_depositTransaction_crossDomainOwner() (gas: 61850)
CrossDomainOwnable_Test:test_onlyOwner() (gas: 34945) CrossDomainOwnable_Test:test_onlyOwner() (gas: 34945)
CrossDomainOwnable_Test:test_revertOnlyOwner() (gas: 10619) CrossDomainOwnable_Test:test_revertOnlyOwner() (gas: 10619)
...@@ -54,18 +56,18 @@ L1CrossDomainMessenger_Test:testCannot_L1MessengerPause() (gas: 24537) ...@@ -54,18 +56,18 @@ L1CrossDomainMessenger_Test:testCannot_L1MessengerPause() (gas: 24537)
L1CrossDomainMessenger_Test:testCannot_L1MessengerUnpause() (gas: 24562) L1CrossDomainMessenger_Test:testCannot_L1MessengerUnpause() (gas: 24562)
L1CrossDomainMessenger_Test:test_L1MessengerMessageVersion() (gas: 24716) L1CrossDomainMessenger_Test:test_L1MessengerMessageVersion() (gas: 24716)
L1CrossDomainMessenger_Test:test_L1MessengerPause() (gas: 48043) L1CrossDomainMessenger_Test:test_L1MessengerPause() (gas: 48043)
L1CrossDomainMessenger_Test:test_L1MessengerRelayMessageFirstStuckSecondSucceeds() (gas: 197182) L1CrossDomainMessenger_Test:test_L1MessengerRelayMessageFirstStuckSecondSucceeds() (gas: 197171)
L1CrossDomainMessenger_Test:test_L1MessengerRelayMessageRevertsOnReentrancy() (gas: 190790) L1CrossDomainMessenger_Test:test_L1MessengerRelayMessageRevertsOnReentrancy() (gas: 190779)
L1CrossDomainMessenger_Test:test_L1MessengerRelayMessageSucceeds() (gas: 73561) L1CrossDomainMessenger_Test:test_L1MessengerRelayMessageSucceeds() (gas: 73559)
L1CrossDomainMessenger_Test:test_L1MessengerRelayMessageToSystemContract() (gas: 65858) L1CrossDomainMessenger_Test:test_L1MessengerRelayMessageToSystemContract() (gas: 65858)
L1CrossDomainMessenger_Test:test_L1MessengerRelayMessageV0Fails() (gas: 33272) L1CrossDomainMessenger_Test:test_L1MessengerRelayMessageV0Fails() (gas: 33258)
L1CrossDomainMessenger_Test:test_L1MessengerRelayShouldRevertIfPaused() (gas: 60526) L1CrossDomainMessenger_Test:test_L1MessengerRelayShouldRevertIfPaused() (gas: 60526)
L1CrossDomainMessenger_Test:test_L1MessengerReplayMessageWithValue() (gas: 38193) L1CrossDomainMessenger_Test:test_L1MessengerReplayMessageWithValue() (gas: 38193)
L1CrossDomainMessenger_Test:test_L1MessengerSendMessage() (gas: 299481) L1CrossDomainMessenger_Test:test_L1MessengerSendMessage() (gas: 299487)
L1CrossDomainMessenger_Test:test_L1MessengerTwiceSendMessage() (gas: 1490366) L1CrossDomainMessenger_Test:test_L1MessengerTwiceSendMessage() (gas: 1490366)
L1CrossDomainMessenger_Test:test_L1MessengerUnpause() (gas: 41003) L1CrossDomainMessenger_Test:test_L1MessengerUnpause() (gas: 41003)
L1CrossDomainMessenger_Test:test_L1MessengerXDomainSenderReverts() (gas: 24283) L1CrossDomainMessenger_Test:test_L1MessengerXDomainSenderReverts() (gas: 24283)
L1CrossDomainMessenger_Test:test_L1MessengerxDomainMessageSenderResets() (gas: 81947) L1CrossDomainMessenger_Test:test_L1MessengerxDomainMessageSenderResets() (gas: 81945)
L1StandardBridge_DepositERC20To_Test:test_depositERC20To_success() (gas: 575569) L1StandardBridge_DepositERC20To_Test:test_depositERC20To_success() (gas: 575569)
L1StandardBridge_DepositERC20_Test:test_depositERC20_succeeds() (gas: 573459) L1StandardBridge_DepositERC20_Test:test_depositERC20_succeeds() (gas: 573459)
L1StandardBridge_DepositERC20_TestFail:test_depositERC20_revert_notEoa() (gas: 22343) L1StandardBridge_DepositERC20_TestFail:test_depositERC20_revert_notEoa() (gas: 22343)
...@@ -91,7 +93,7 @@ L2CrossDomainMessenger_Test:test_L2MessengerRelayMessageSucceeds() (gas: 53115) ...@@ -91,7 +93,7 @@ L2CrossDomainMessenger_Test:test_L2MessengerRelayMessageSucceeds() (gas: 53115)
L2CrossDomainMessenger_Test:test_L2MessengerRelayMessageToSystemContract() (gas: 36217) L2CrossDomainMessenger_Test:test_L2MessengerRelayMessageToSystemContract() (gas: 36217)
L2CrossDomainMessenger_Test:test_L2MessengerRelayMessageV0Fails() (gas: 18871) L2CrossDomainMessenger_Test:test_L2MessengerRelayMessageV0Fails() (gas: 18871)
L2CrossDomainMessenger_Test:test_L2MessengerRelayShouldRevertIfPaused() (gas: 41637) L2CrossDomainMessenger_Test:test_L2MessengerRelayShouldRevertIfPaused() (gas: 41637)
L2CrossDomainMessenger_Test:test_L2MessengerSendMessage() (gas: 120636) L2CrossDomainMessenger_Test:test_L2MessengerSendMessage() (gas: 120648)
L2CrossDomainMessenger_Test:test_L2MessengerTwiceSendMessage() (gas: 136338) L2CrossDomainMessenger_Test:test_L2MessengerTwiceSendMessage() (gas: 136338)
L2CrossDomainMessenger_Test:test_L2MessengerXDomainSenderReverts() (gas: 10576) L2CrossDomainMessenger_Test:test_L2MessengerXDomainSenderReverts() (gas: 10576)
L2CrossDomainMessenger_Test:test_L2MessengerxDomainMessageSenderResets() (gas: 50459) L2CrossDomainMessenger_Test:test_L2MessengerxDomainMessageSenderResets() (gas: 50459)
...@@ -160,7 +162,7 @@ OptimismPortalUpgradeable_Test:test_cannotInitImpl() (gas: 10813) ...@@ -160,7 +162,7 @@ OptimismPortalUpgradeable_Test:test_cannotInitImpl() (gas: 10813)
OptimismPortalUpgradeable_Test:test_cannotInitProxy() (gas: 15789) OptimismPortalUpgradeable_Test:test_cannotInitProxy() (gas: 15789)
OptimismPortalUpgradeable_Test:test_initValuesOnProxy() (gas: 15967) OptimismPortalUpgradeable_Test:test_initValuesOnProxy() (gas: 15967)
OptimismPortalUpgradeable_Test:test_upgrading() (gas: 180632) OptimismPortalUpgradeable_Test:test_upgrading() (gas: 180632)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_differential(address,address,uint256,uint256,bytes) (runs: 256, μ: 258364, ~: 259036) OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_differential(address,address,uint256,uint256,bytes) (runs: 256, μ: 258471, ~: 259036)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_revertsOnInsufficientGas() (gas: 158312) OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_revertsOnInsufficientGas() (gas: 158312)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_revertsOnInvalidOutputRootProof() (gas: 81265) OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_revertsOnInvalidOutputRootProof() (gas: 81265)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_revertsOnRecentWithdrawal() (gas: 50525) OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_revertsOnRecentWithdrawal() (gas: 50525)
......
...@@ -97,11 +97,11 @@ ...@@ -97,11 +97,11 @@
|----------------------+----------------------------------------+------+--------+-------+------------------------------------------------| |----------------------+----------------------------------------+------+--------+-------+------------------------------------------------|
| params | struct ResourceMetering.ResourceParams | 1 | 0 | 32 | contracts/L1/OptimismPortal.sol:OptimismPortal | | params | struct ResourceMetering.ResourceParams | 1 | 0 | 32 | contracts/L1/OptimismPortal.sol:OptimismPortal |
|----------------------+----------------------------------------+------+--------+-------+------------------------------------------------| |----------------------+----------------------------------------+------+--------+-------+------------------------------------------------|
| __gap | uint256[49] | 2 | 0 | 1568 | contracts/L1/OptimismPortal.sol:OptimismPortal | | __gap | uint256[48] | 2 | 0 | 1536 | contracts/L1/OptimismPortal.sol:OptimismPortal |
|----------------------+----------------------------------------+------+--------+-------+------------------------------------------------| |----------------------+----------------------------------------+------+--------+-------+------------------------------------------------|
| l2Sender | address | 51 | 0 | 20 | contracts/L1/OptimismPortal.sol:OptimismPortal | | l2Sender | address | 50 | 0 | 20 | contracts/L1/OptimismPortal.sol:OptimismPortal |
|----------------------+----------------------------------------+------+--------+-------+------------------------------------------------| |----------------------+----------------------------------------+------+--------+-------+------------------------------------------------|
| finalizedWithdrawals | mapping(bytes32 => bool) | 52 | 0 | 32 | contracts/L1/OptimismPortal.sol:OptimismPortal | | finalizedWithdrawals | mapping(bytes32 => bool) | 51 | 0 | 32 | contracts/L1/OptimismPortal.sol:OptimismPortal |
+----------------------+----------------------------------------+------+--------+-------+------------------------------------------------+ +----------------------+----------------------------------------+------+--------+-------+------------------------------------------------+
======================= =======================
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity 0.8.15; pragma solidity 0.8.15;
import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
import { SafeCall } from "../libraries/SafeCall.sol"; import { SafeCall } from "../libraries/SafeCall.sol";
import { L2OutputOracle } from "./L2OutputOracle.sol"; import { L2OutputOracle } from "./L2OutputOracle.sol";
import { Types } from "../libraries/Types.sol"; import { Types } from "../libraries/Types.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity 0.8.15; pragma solidity 0.8.15;
import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
import { Math } from "@openzeppelin/contracts/utils/math/Math.sol"; import { Math } from "@openzeppelin/contracts/utils/math/Math.sol";
import { SignedMath } from "@openzeppelin/contracts/utils/math/SignedMath.sol"; import { SignedMath } from "@openzeppelin/contracts/utils/math/SignedMath.sol";
import { FixedPointMathLib } from "@rari-capital/solmate/src/utils/FixedPointMathLib.sol"; import { FixedPointMathLib } from "@rari-capital/solmate/src/utils/FixedPointMathLib.sol";
...@@ -62,7 +62,7 @@ abstract contract ResourceMetering is Initializable { ...@@ -62,7 +62,7 @@ abstract contract ResourceMetering is Initializable {
/** /**
* @notice Reserve extra slots (to a total of 50) in the storage layout for future upgrades. * @notice Reserve extra slots (to a total of 50) in the storage layout for future upgrades.
*/ */
uint256[49] private __gap; uint256[48] private __gap;
/** /**
* @notice Meters access to a function based an amount of a requested resource. * @notice Meters access to a function based an amount of a requested resource.
......
...@@ -40,7 +40,7 @@ contract L2ToL1MessagePasser is Semver { ...@@ -40,7 +40,7 @@ contract L2ToL1MessagePasser is Semver {
* @param gasLimit The minimum amount of gas that must be provided when withdrawing on L1. * @param gasLimit The minimum amount of gas that must be provided when withdrawing on L1.
* @param data The data to be forwarded to the target on L1. * @param data The data to be forwarded to the target on L1.
*/ */
event WithdrawalInitiated( event MessagePassed(
uint256 indexed nonce, uint256 indexed nonce,
address indexed sender, address indexed sender,
address indexed target, address indexed target,
...@@ -51,11 +51,11 @@ contract L2ToL1MessagePasser is Semver { ...@@ -51,11 +51,11 @@ contract L2ToL1MessagePasser is Semver {
/** /**
* @notice Emitted any time a withdrawal is initiated. An extension to * @notice Emitted any time a withdrawal is initiated. An extension to
* WithdrawalInitiated so that the interface is maintained. * MessagePassed to allow for a 4th indexed argument.
* *
* @param hash The hash of the withdrawal * @param hash The hash of the withdrawal
*/ */
event WithdrawalInitiatedExtension1(bytes32 indexed hash); event MessagePassedExtension1(bytes32 indexed hash);
/** /**
* @notice Emitted when the balance of this contract is burned. * @notice Emitted when the balance of this contract is burned.
...@@ -113,8 +113,8 @@ contract L2ToL1MessagePasser is Semver { ...@@ -113,8 +113,8 @@ contract L2ToL1MessagePasser is Semver {
sentMessages[withdrawalHash] = true; sentMessages[withdrawalHash] = true;
emit WithdrawalInitiated(nonce, msg.sender, _target, msg.value, _gasLimit, _data); emit MessagePassed(nonce, msg.sender, _target, msg.value, _gasLimit, _data);
emit WithdrawalInitiatedExtension1(withdrawalHash); emit MessagePassedExtension1(withdrawalHash);
unchecked { unchecked {
++nonce; ++nonce;
......
...@@ -190,7 +190,7 @@ contract Messenger_Initializer is L2OutputOracle_Initializer { ...@@ -190,7 +190,7 @@ contract Messenger_Initializer is L2OutputOracle_Initializer {
uint256 value uint256 value
); );
event WithdrawalInitiated( event MessagePassed(
uint256 indexed nonce, uint256 indexed nonce,
address indexed sender, address indexed sender,
address indexed target, address indexed target,
......
// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
import { Messenger_Initializer, Reverter, CallerCaller } from "./CommonTest.t.sol";
// CrossDomainMessenger_Test is for testing functionality which is common to both the L1 and L2
// CrossDomainMessenger contracts. For simplicity, we use the L1 Messenger as the test contract.
contract CrossDomainMessenger_Test is Messenger_Initializer {
// Ensure that baseGas passes for the max value of _minGasLimit,
// this is about 4 Billion.
function test_baseGas() external {
L1Messenger.baseGas(hex"ff", type(uint32).max);
}
// Fuzz for other values which might cause a revert in baseGas.
function testFuzz_baseGas(uint32 _minGasLimit) external {
L1Messenger.baseGas(hex"ff", _minGasLimit);
}
}
...@@ -22,6 +22,9 @@ contract L1CrossDomainMessenger_Test is Messenger_Initializer { ...@@ -22,6 +22,9 @@ contract L1CrossDomainMessenger_Test is Messenger_Initializer {
// Receiver address for testing // Receiver address for testing
address recipient = address(0xabbaacdc); address recipient = address(0xabbaacdc);
// Storage slot of the l2Sender
uint256 constant senderSlotIndex = 50;
function setUp() public override { function setUp() public override {
super.setUp(); super.setUp();
} }
...@@ -138,7 +141,6 @@ contract L1CrossDomainMessenger_Test is Messenger_Initializer { ...@@ -138,7 +141,6 @@ contract L1CrossDomainMessenger_Test is Messenger_Initializer {
address sender = Predeploys.L2_CROSS_DOMAIN_MESSENGER; address sender = Predeploys.L2_CROSS_DOMAIN_MESSENGER;
// set the value of op.l2Sender() to be the L2 Cross Domain Messenger. // set the value of op.l2Sender() to be the L2 Cross Domain Messenger.
uint256 senderSlotIndex = 51;
vm.store(address(op), bytes32(senderSlotIndex), bytes32(abi.encode(sender))); vm.store(address(op), bytes32(senderSlotIndex), bytes32(abi.encode(sender)));
vm.prank(address(op)); vm.prank(address(op));
...@@ -161,7 +163,6 @@ contract L1CrossDomainMessenger_Test is Messenger_Initializer { ...@@ -161,7 +163,6 @@ contract L1CrossDomainMessenger_Test is Messenger_Initializer {
vm.expectCall(target, hex"1111"); vm.expectCall(target, hex"1111");
// set the value of op.l2Sender() to be the L2 Cross Domain Messenger. // set the value of op.l2Sender() to be the L2 Cross Domain Messenger.
uint256 senderSlotIndex = 51;
vm.store(address(op), bytes32(senderSlotIndex), bytes32(abi.encode(sender))); vm.store(address(op), bytes32(senderSlotIndex), bytes32(abi.encode(sender)));
vm.prank(address(op)); vm.prank(address(op));
...@@ -221,8 +222,6 @@ contract L1CrossDomainMessenger_Test is Messenger_Initializer { ...@@ -221,8 +222,6 @@ contract L1CrossDomainMessenger_Test is Messenger_Initializer {
address sender = Predeploys.L2_CROSS_DOMAIN_MESSENGER; address sender = Predeploys.L2_CROSS_DOMAIN_MESSENGER;
uint256 senderSlotIndex = 51;
vm.store(address(op), bytes32(senderSlotIndex), bytes32(abi.encode(sender))); vm.store(address(op), bytes32(senderSlotIndex), bytes32(abi.encode(sender)));
vm.prank(address(op)); vm.prank(address(op));
L1Messenger.relayMessage(Encoding.encodeVersionedNonce(0, 1), address(0), address(0), 0, 0, hex""); L1Messenger.relayMessage(Encoding.encodeVersionedNonce(0, 1), address(0), address(0), 0, 0, hex"");
...@@ -251,7 +250,6 @@ contract L1CrossDomainMessenger_Test is Messenger_Initializer { ...@@ -251,7 +250,6 @@ contract L1CrossDomainMessenger_Test is Messenger_Initializer {
bytes32 hash = Hashing.hashCrossDomainMessage(Encoding.encodeVersionedNonce(0, 1), sender, target, value, 0, hex"1111"); bytes32 hash = Hashing.hashCrossDomainMessage(Encoding.encodeVersionedNonce(0, 1), sender, target, value, 0, hex"1111");
uint256 senderSlotIndex = 51;
vm.store(address(op), bytes32(senderSlotIndex), bytes32(abi.encode(sender))); vm.store(address(op), bytes32(senderSlotIndex), bytes32(abi.encode(sender)));
vm.etch(target, address(new Reverter()).code); vm.etch(target, address(new Reverter()).code);
vm.deal(address(op), value); vm.deal(address(op), value);
...@@ -307,7 +305,6 @@ contract L1CrossDomainMessenger_Test is Messenger_Initializer { ...@@ -307,7 +305,6 @@ contract L1CrossDomainMessenger_Test is Messenger_Initializer {
bytes32 hash = Hashing.hashCrossDomainMessage(Encoding.encodeVersionedNonce(0, 1), sender, target, 0, 0, message); bytes32 hash = Hashing.hashCrossDomainMessage(Encoding.encodeVersionedNonce(0, 1), sender, target, 0, 0, message);
uint256 senderSlotIndex = 51;
vm.store(address(op), bytes32(senderSlotIndex), bytes32(abi.encode(sender))); vm.store(address(op), bytes32(senderSlotIndex), bytes32(abi.encode(sender)));
vm.etch(target, address(new CallerCaller()).code); vm.etch(target, address(new CallerCaller()).code);
......
...@@ -56,9 +56,9 @@ contract L2CrossDomainMessenger_Test is Messenger_Initializer { ...@@ -56,9 +56,9 @@ contract L2CrossDomainMessenger_Test is Messenger_Initializer {
) )
); );
// WithdrawalInitiated event // MessagePassed event
vm.expectEmit(true, true, true, true); vm.expectEmit(true, true, true, true);
emit WithdrawalInitiated( emit MessagePassed(
messagePasser.nonce(), messagePasser.nonce(),
address(L2Messenger), address(L2Messenger),
address(L1Messenger), address(L1Messenger),
......
...@@ -9,7 +9,7 @@ import { Hashing } from "../libraries/Hashing.sol"; ...@@ -9,7 +9,7 @@ import { Hashing } from "../libraries/Hashing.sol";
contract L2ToL1MessagePasserTest is CommonTest { contract L2ToL1MessagePasserTest is CommonTest {
L2ToL1MessagePasser messagePasser; L2ToL1MessagePasser messagePasser;
event WithdrawalInitiated( event MessagePassed(
uint256 indexed nonce, uint256 indexed nonce,
address indexed sender, address indexed sender,
address indexed target, address indexed target,
...@@ -18,7 +18,7 @@ contract L2ToL1MessagePasserTest is CommonTest { ...@@ -18,7 +18,7 @@ contract L2ToL1MessagePasserTest is CommonTest {
bytes data bytes data
); );
event WithdrawalInitiatedExtension1(bytes32 indexed hash); event MessagePassedExtension1(bytes32 indexed hash);
event WithdrawerBalanceBurnt(uint256 indexed amount); event WithdrawerBalanceBurnt(uint256 indexed amount);
...@@ -36,7 +36,7 @@ contract L2ToL1MessagePasserTest is CommonTest { ...@@ -36,7 +36,7 @@ contract L2ToL1MessagePasserTest is CommonTest {
uint256 nonce = messagePasser.nonce(); uint256 nonce = messagePasser.nonce();
vm.expectEmit(true, true, true, true); vm.expectEmit(true, true, true, true);
emit WithdrawalInitiated( emit MessagePassed(
nonce, nonce,
_sender, _sender,
_target, _target,
...@@ -57,7 +57,7 @@ contract L2ToL1MessagePasserTest is CommonTest { ...@@ -57,7 +57,7 @@ contract L2ToL1MessagePasserTest is CommonTest {
); );
vm.expectEmit(true, true, true, true); vm.expectEmit(true, true, true, true);
emit WithdrawalInitiatedExtension1(withdrawalHash); emit MessagePassedExtension1(withdrawalHash);
vm.deal(_sender, _value); vm.deal(_sender, _value);
vm.prank(_sender); vm.prank(_sender);
...@@ -86,7 +86,7 @@ contract L2ToL1MessagePasserTest is CommonTest { ...@@ -86,7 +86,7 @@ contract L2ToL1MessagePasserTest is CommonTest {
// Test: initiateWithdrawal should emit the correct log when called by a contract // Test: initiateWithdrawal should emit the correct log when called by a contract
function test_initiateWithdrawal_fromContract() external { function test_initiateWithdrawal_fromContract() external {
vm.expectEmit(true, true, true, true); vm.expectEmit(true, true, true, true);
emit WithdrawalInitiated( emit MessagePassed(
messagePasser.nonce(), messagePasser.nonce(),
address(this), address(this),
address(4), address(4),
...@@ -107,7 +107,7 @@ contract L2ToL1MessagePasserTest is CommonTest { ...@@ -107,7 +107,7 @@ contract L2ToL1MessagePasserTest is CommonTest {
); );
vm.expectEmit(true, true, true, true); vm.expectEmit(true, true, true, true);
emit WithdrawalInitiatedExtension1(withdrawalHash); emit MessagePassedExtension1(withdrawalHash);
vm.deal(address(this), 2**64); vm.deal(address(this), 2**64);
messagePasser.initiateWithdrawal{ value: 100 }( messagePasser.initiateWithdrawal{ value: 100 }(
...@@ -129,7 +129,7 @@ contract L2ToL1MessagePasserTest is CommonTest { ...@@ -129,7 +129,7 @@ contract L2ToL1MessagePasserTest is CommonTest {
vm.prank(alice, alice); vm.prank(alice, alice);
vm.deal(alice, 2**64); vm.deal(alice, 2**64);
vm.expectEmit(true, true, true, true); vm.expectEmit(true, true, true, true);
emit WithdrawalInitiated( emit MessagePassed(
nonce, nonce,
alice, alice,
target, target,
......
...@@ -53,22 +53,22 @@ abstract contract CrossDomainMessenger is ...@@ -53,22 +53,22 @@ abstract contract CrossDomainMessenger is
/** /**
* @notice Constant overhead added to the base gas for a message. * @notice Constant overhead added to the base gas for a message.
*/ */
uint32 public constant MIN_GAS_CONSTANT_OVERHEAD = 200_000; uint64 public constant MIN_GAS_CONSTANT_OVERHEAD = 200_000;
/** /**
* @notice Numerator for dynamic overhead added to the base gas for a message. * @notice Numerator for dynamic overhead added to the base gas for a message.
*/ */
uint32 public constant MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR = 1016; uint64 public constant MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR = 1016;
/** /**
* @notice Denominator for dynamic overhead added to the base gas for a message. * @notice Denominator for dynamic overhead added to the base gas for a message.
*/ */
uint32 public constant MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR = 1000; uint64 public constant MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR = 1000;
/** /**
* @notice Extra gas added to base gas for each byte of calldata in a message. * @notice Extra gas added to base gas for each byte of calldata in a message.
*/ */
uint32 public constant MIN_GAS_CALLDATA_OVERHEAD = 16; uint64 public constant MIN_GAS_CALLDATA_OVERHEAD = 16;
/** /**
* @notice Minimum amount of gas required to relay a message. * @notice Minimum amount of gas required to relay a message.
...@@ -369,13 +369,16 @@ abstract contract CrossDomainMessenger is ...@@ -369,13 +369,16 @@ abstract contract CrossDomainMessenger is
* *
* @return Amount of gas required to guarantee message receipt. * @return Amount of gas required to guarantee message receipt.
*/ */
function baseGas(bytes calldata _message, uint32 _minGasLimit) public pure returns (uint32) { function baseGas(bytes calldata _message, uint32 _minGasLimit) public pure returns (uint64) {
// We peform the following math on uint64s to avoid overflow errors. Multiplying the
// by MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR would otherwise limit the _mingasLimit to
// approximately 4.2 MM.
return return
// Dynamic overhead // Dynamic overhead
((_minGasLimit * MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR) / ((uint64(_minGasLimit) * MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR) /
MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR) + MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR) +
// Calldata overhead // Calldata overhead
(uint32(_message.length) * MIN_GAS_CALLDATA_OVERHEAD) + (uint64(_message.length) * MIN_GAS_CALLDATA_OVERHEAD) +
// Constant overhead // Constant overhead
MIN_GAS_CONSTANT_OVERHEAD; MIN_GAS_CONSTANT_OVERHEAD;
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"address": "0x5a7749f83b81B301cAb5f48EB8516B986DAef23D",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_admin",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "previousAdmin",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "newAdmin",
"type": "address"
}
],
"name": "AdminChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "implementation",
"type": "address"
}
],
"name": "Upgraded",
"type": "event"
},
{
"stateMutability": "payable",
"type": "fallback"
},
{
"inputs": [],
"name": "admin",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_admin",
"type": "address"
}
],
"name": "changeAdmin",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "implementation",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_implementation",
"type": "address"
}
],
"name": "upgradeTo",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_implementation",
"type": "address"
},
{
"internalType": "bytes",
"name": "_data",
"type": "bytes"
}
],
"name": "upgradeToAndCall",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
],
"transactionHash": "0x7583d011cf1593fb1ffc79b097b0a365192c87dfdccbf860e1ad3f1425a305ef",
"receipt": {
"to": null,
"from": "0x53A6eecC2dD4795Fcc68940ddc6B4d53Bd88Bd9E",
"contractAddress": "0x5a7749f83b81B301cAb5f48EB8516B986DAef23D",
"transactionIndex": 140,
"gasUsed": "532674",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000800000000000000000000000000",
"blockHash": "0xa5c98ae09c1db0857551a9eaca6d88e1bff5f8103814795c0ed1e7863e16a6d5",
"transactionHash": "0x7583d011cf1593fb1ffc79b097b0a365192c87dfdccbf860e1ad3f1425a305ef",
"logs": [
{
"transactionIndex": 140,
"blockNumber": 15677422,
"transactionHash": "0x7583d011cf1593fb1ffc79b097b0a365192c87dfdccbf860e1ad3f1425a305ef",
"address": "0x5a7749f83b81B301cAb5f48EB8516B986DAef23D",
"topics": [
"0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"
],
"data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000053a6eecc2dd4795fcc68940ddc6b4d53bd88bd9e",
"logIndex": 251,
"blockHash": "0xa5c98ae09c1db0857551a9eaca6d88e1bff5f8103814795c0ed1e7863e16a6d5"
}
],
"blockNumber": 15677422,
"cumulativeGasUsed": "12586381",
"status": 1,
"byzantium": true
},
"args": [
"0x53A6eecC2dD4795Fcc68940ddc6B4d53Bd88Bd9E"
],
"numDeployments": 1,
"solcInputHash": "ab9b77493f35e63b7a63fb2fa8d618b4",
"metadata": "{\"compiler\":{\"version\":\"0.8.15+commit.e14f2714\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"events\":{\"AdminChanged(address,address)\":{\"params\":{\"newAdmin\":\"The new owner of the contract\",\"previousAdmin\":\"The previous owner of the contract\"}},\"Upgraded(address)\":{\"params\":{\"implementation\":\"The address of the implementation contract\"}}},\"kind\":\"dev\",\"methods\":{\"admin()\":{\"returns\":{\"_0\":\"Owner address.\"}},\"changeAdmin(address)\":{\"params\":{\"_admin\":\"New owner of the proxy contract.\"}},\"constructor\":{\"params\":{\"_admin\":\"Address of the initial contract admin. Admin as the ability to access the transparent proxy interface.\"}},\"implementation()\":{\"returns\":{\"_0\":\"Implementation address.\"}},\"upgradeTo(address)\":{\"params\":{\"_implementation\":\"Address of the implementation contract.\"}},\"upgradeToAndCall(address,bytes)\":{\"params\":{\"_data\":\"Calldata to delegatecall the new implementation with.\",\"_implementation\":\"Address of the implementation contract.\"}}},\"title\":\"Proxy\",\"version\":1},\"userdoc\":{\"events\":{\"AdminChanged(address,address)\":{\"notice\":\"An event that is emitted each time the owner is upgraded. This event is part of the EIP-1967 specification.\"},\"Upgraded(address)\":{\"notice\":\"An event that is emitted each time the implementation is changed. This event is part of the EIP-1967 specification.\"}},\"kind\":\"user\",\"methods\":{\"admin()\":{\"notice\":\"Gets the owner of the proxy contract.\"},\"changeAdmin(address)\":{\"notice\":\"Changes the owner of the proxy contract. Only callable by the owner.\"},\"constructor\":{\"notice\":\"Sets the initial admin during contract deployment. Admin address is stored at the EIP-1967 admin storage slot so that accidental storage collision with the implementation is not possible.\"},\"implementation()\":{\"notice\":\"Queries the implementation address.\"},\"upgradeTo(address)\":{\"notice\":\"Set the implementation contract address. The code at the given address will execute when this contract is called.\"},\"upgradeToAndCall(address,bytes)\":{\"notice\":\"Set the implementation and call a function in a single transaction. Useful to ensure atomic execution of initialization-based upgrades.\"}},\"notice\":\"Proxy is a transparent proxy that passes through the call if the caller is the owner or if the caller is address(0), meaning that the call originated from an off-chain simulation.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"@eth-optimism/contracts-bedrock/contracts/universal/Proxy.sol\":\"Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@eth-optimism/contracts-bedrock/contracts/universal/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.15;\\n\\n/**\\n * @title Proxy\\n * @notice Proxy is a transparent proxy that passes through the call if the caller is the owner or\\n * if the caller is address(0), meaning that the call originated from an off-chain\\n * simulation.\\n */\\ncontract Proxy {\\n /**\\n * @notice The storage slot that holds the address of the implementation.\\n * bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 internal constant IMPLEMENTATION_KEY =\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @notice The storage slot that holds the address of the owner.\\n * bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)\\n */\\n bytes32 internal constant OWNER_KEY =\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @notice An event that is emitted each time the implementation is changed. This event is part\\n * of the EIP-1967 specification.\\n *\\n * @param implementation The address of the implementation contract\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @notice An event that is emitted each time the owner is upgraded. This event is part of the\\n * EIP-1967 specification.\\n *\\n * @param previousAdmin The previous owner of the contract\\n * @param newAdmin The new owner of the contract\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @notice A modifier that reverts if not called by the owner or by address(0) to allow\\n * eth_call to interact with this proxy without needing to use low-level storage\\n * inspection. We assume that nobody is able to trigger calls from address(0) during\\n * normal EVM execution.\\n */\\n modifier proxyCallIfNotAdmin() {\\n if (msg.sender == _getAdmin() || msg.sender == address(0)) {\\n _;\\n } else {\\n // This WILL halt the call frame on completion.\\n _doProxyCall();\\n }\\n }\\n\\n /**\\n * @notice Sets the initial admin during contract deployment. Admin address is stored at the\\n * EIP-1967 admin storage slot so that accidental storage collision with the\\n * implementation is not possible.\\n *\\n * @param _admin Address of the initial contract admin. Admin as the ability to access the\\n * transparent proxy interface.\\n */\\n constructor(address _admin) {\\n _changeAdmin(_admin);\\n }\\n\\n // slither-disable-next-line locked-ether\\n receive() external payable {\\n // Proxy call by default.\\n _doProxyCall();\\n }\\n\\n // slither-disable-next-line locked-ether\\n fallback() external payable {\\n // Proxy call by default.\\n _doProxyCall();\\n }\\n\\n /**\\n * @notice Set the implementation contract address. The code at the given address will execute\\n * when this contract is called.\\n *\\n * @param _implementation Address of the implementation contract.\\n */\\n function upgradeTo(address _implementation) external proxyCallIfNotAdmin {\\n _setImplementation(_implementation);\\n }\\n\\n /**\\n * @notice Set the implementation and call a function in a single transaction. Useful to ensure\\n * atomic execution of initialization-based upgrades.\\n *\\n * @param _implementation Address of the implementation contract.\\n * @param _data Calldata to delegatecall the new implementation with.\\n */\\n function upgradeToAndCall(address _implementation, bytes calldata _data)\\n external\\n payable\\n proxyCallIfNotAdmin\\n returns (bytes memory)\\n {\\n _setImplementation(_implementation);\\n (bool success, bytes memory returndata) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy: delegatecall to new implementation contract failed\\\");\\n return returndata;\\n }\\n\\n /**\\n * @notice Changes the owner of the proxy contract. Only callable by the owner.\\n *\\n * @param _admin New owner of the proxy contract.\\n */\\n function changeAdmin(address _admin) external proxyCallIfNotAdmin {\\n _changeAdmin(_admin);\\n }\\n\\n /**\\n * @notice Gets the owner of the proxy contract.\\n *\\n * @return Owner address.\\n */\\n function admin() external proxyCallIfNotAdmin returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @notice Queries the implementation address.\\n *\\n * @return Implementation address.\\n */\\n function implementation() external proxyCallIfNotAdmin returns (address) {\\n return _getImplementation();\\n }\\n\\n /**\\n * @notice Sets the implementation address.\\n *\\n * @param _implementation New implementation address.\\n */\\n function _setImplementation(address _implementation) internal {\\n assembly {\\n sstore(IMPLEMENTATION_KEY, _implementation)\\n }\\n emit Upgraded(_implementation);\\n }\\n\\n /**\\n * @notice Changes the owner of the proxy contract.\\n *\\n * @param _admin New owner of the proxy contract.\\n */\\n function _changeAdmin(address _admin) internal {\\n address previous = _getAdmin();\\n assembly {\\n sstore(OWNER_KEY, _admin)\\n }\\n emit AdminChanged(previous, _admin);\\n }\\n\\n /**\\n * @notice Performs the proxy call via a delegatecall.\\n */\\n function _doProxyCall() internal {\\n address impl = _getImplementation();\\n require(impl != address(0), \\\"Proxy: implementation not initialized\\\");\\n\\n assembly {\\n // Copy calldata into memory at 0x0....calldatasize.\\n calldatacopy(0x0, 0x0, calldatasize())\\n\\n // Perform the delegatecall, make sure to pass all available gas.\\n let success := delegatecall(gas(), impl, 0x0, calldatasize(), 0x0, 0x0)\\n\\n // Copy returndata into memory at 0x0....returndatasize. Note that this *will*\\n // overwrite the calldata that we just copied into memory but that doesn't really\\n // matter because we'll be returning in a second anyway.\\n returndatacopy(0x0, 0x0, returndatasize())\\n\\n // Success == 0 means a revert. We'll revert too and pass the data up.\\n if iszero(success) {\\n revert(0x0, returndatasize())\\n }\\n\\n // Otherwise we'll just return and pass the data up.\\n return(0x0, returndatasize())\\n }\\n }\\n\\n /**\\n * @notice Queries the implementation address.\\n *\\n * @return Implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n address impl;\\n assembly {\\n impl := sload(IMPLEMENTATION_KEY)\\n }\\n return impl;\\n }\\n\\n /**\\n * @notice Queries the owner of the proxy contract.\\n *\\n * @return Owner address.\\n */\\n function _getAdmin() internal view returns (address) {\\n address owner;\\n assembly {\\n owner := sload(OWNER_KEY)\\n }\\n return owner;\\n }\\n}\\n\",\"keccak256\":\"0xfa08635f1866139673ac4fe7b07330f752f93800075b895d8fcb8484f4a3f753\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b5060405161094138038061094183398101604081905261002f916100b2565b6100388161003e565b506100e2565b60006100566000805160206109218339815191525490565b600080516020610921833981519152839055604080516001600160a01b038084168252851660208201529192507f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b6000602082840312156100c457600080fd5b81516001600160a01b03811681146100db57600080fd5b9392505050565b610830806100f16000396000f3fe60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100be5780638f283970146100f8578063f851a440146101185761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61012d565b005b61006b61012d565b34801561008157600080fd5b5061006b6100903660046106d9565b610224565b6100a86100a33660046106f4565b610296565b6040516100b59190610777565b60405180910390f35b3480156100ca57600080fd5b506100d3610419565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100b5565b34801561010457600080fd5b5061006b6101133660046106d9565b6104b0565b34801561012457600080fd5b506100d3610517565b60006101577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905073ffffffffffffffffffffffffffffffffffffffff8116610201576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f50726f78793a20696d706c656d656e746174696f6e206e6f7420696e6974696160448201527f6c697a656400000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3660008037600080366000845af43d6000803e8061021e573d6000fd5b503d6000f35b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061027d575033155b1561028e5761028b816105a3565b50565b61028b61012d565b60606102c07fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806102f7575033155b1561040a57610305846105a3565b6000808573ffffffffffffffffffffffffffffffffffffffff16858560405161032f9291906107ea565b600060405180830381855af49150503d806000811461036a576040519150601f19603f3d011682016040523d82523d6000602084013e61036f565b606091505b509150915081610401576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f50726f78793a2064656c656761746563616c6c20746f206e657720696d706c6560448201527f6d656e746174696f6e20636f6e7472616374206661696c65640000000000000060648201526084016101f8565b91506104129050565b61041261012d565b9392505050565b60006104437fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061047a575033155b156104a557507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6104ad61012d565b90565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610509575033155b1561028e5761028b8161060b565b60006105417fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610578575033155b156104a557507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81905560405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60006106357fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038390556040805173ffffffffffffffffffffffffffffffffffffffff8084168252851660208201529192507f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b803573ffffffffffffffffffffffffffffffffffffffff811681146106d457600080fd5b919050565b6000602082840312156106eb57600080fd5b610412826106b0565b60008060006040848603121561070957600080fd5b610712846106b0565b9250602084013567ffffffffffffffff8082111561072f57600080fd5b818601915086601f83011261074357600080fd5b81358181111561075257600080fd5b87602082850101111561076457600080fd5b6020830194508093505050509250925092565b600060208083528351808285015260005b818110156107a457858101830151858201604001528201610788565b818111156107b6576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b818382376000910190815291905056fea2646970667358221220120210f19dd8be0e46312b3b9a2148bbb98ec24cce2aa05af1c3d1fe69f55b2b64736f6c634300080f0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103",
"deployedBytecode": "0x60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100be5780638f283970146100f8578063f851a440146101185761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61012d565b005b61006b61012d565b34801561008157600080fd5b5061006b6100903660046106d9565b610224565b6100a86100a33660046106f4565b610296565b6040516100b59190610777565b60405180910390f35b3480156100ca57600080fd5b506100d3610419565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100b5565b34801561010457600080fd5b5061006b6101133660046106d9565b6104b0565b34801561012457600080fd5b506100d3610517565b60006101577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905073ffffffffffffffffffffffffffffffffffffffff8116610201576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f50726f78793a20696d706c656d656e746174696f6e206e6f7420696e6974696160448201527f6c697a656400000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3660008037600080366000845af43d6000803e8061021e573d6000fd5b503d6000f35b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061027d575033155b1561028e5761028b816105a3565b50565b61028b61012d565b60606102c07fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806102f7575033155b1561040a57610305846105a3565b6000808573ffffffffffffffffffffffffffffffffffffffff16858560405161032f9291906107ea565b600060405180830381855af49150503d806000811461036a576040519150601f19603f3d011682016040523d82523d6000602084013e61036f565b606091505b509150915081610401576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f50726f78793a2064656c656761746563616c6c20746f206e657720696d706c6560448201527f6d656e746174696f6e20636f6e7472616374206661696c65640000000000000060648201526084016101f8565b91506104129050565b61041261012d565b9392505050565b60006104437fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061047a575033155b156104a557507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6104ad61012d565b90565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610509575033155b1561028e5761028b8161060b565b60006105417fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610578575033155b156104a557507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81905560405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60006106357fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038390556040805173ffffffffffffffffffffffffffffffffffffffff8084168252851660208201529192507f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b803573ffffffffffffffffffffffffffffffffffffffff811681146106d457600080fd5b919050565b6000602082840312156106eb57600080fd5b610412826106b0565b60008060006040848603121561070957600080fd5b610712846106b0565b9250602084013567ffffffffffffffff8082111561072f57600080fd5b818601915086601f83011261074357600080fd5b81358181111561075257600080fd5b87602082850101111561076457600080fd5b6020830194508093505050509250925092565b600060208083528351808285015260005b818110156107a457858101830151858201604001528201610788565b818111156107b6576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b818382376000910190815291905056fea2646970667358221220120210f19dd8be0e46312b3b9a2148bbb98ec24cce2aa05af1c3d1fe69f55b2b64736f6c634300080f0033",
"devdoc": {
"events": {
"AdminChanged(address,address)": {
"params": {
"newAdmin": "The new owner of the contract",
"previousAdmin": "The previous owner of the contract"
}
},
"Upgraded(address)": {
"params": {
"implementation": "The address of the implementation contract"
}
}
},
"kind": "dev",
"methods": {
"admin()": {
"returns": {
"_0": "Owner address."
}
},
"changeAdmin(address)": {
"params": {
"_admin": "New owner of the proxy contract."
}
},
"constructor": {
"params": {
"_admin": "Address of the initial contract admin. Admin as the ability to access the transparent proxy interface."
}
},
"implementation()": {
"returns": {
"_0": "Implementation address."
}
},
"upgradeTo(address)": {
"params": {
"_implementation": "Address of the implementation contract."
}
},
"upgradeToAndCall(address,bytes)": {
"params": {
"_data": "Calldata to delegatecall the new implementation with.",
"_implementation": "Address of the implementation contract."
}
}
},
"title": "Proxy",
"version": 1
},
"userdoc": {
"events": {
"AdminChanged(address,address)": {
"notice": "An event that is emitted each time the owner is upgraded. This event is part of the EIP-1967 specification."
},
"Upgraded(address)": {
"notice": "An event that is emitted each time the implementation is changed. This event is part of the EIP-1967 specification."
}
},
"kind": "user",
"methods": {
"admin()": {
"notice": "Gets the owner of the proxy contract."
},
"changeAdmin(address)": {
"notice": "Changes the owner of the proxy contract. Only callable by the owner."
},
"constructor": {
"notice": "Sets the initial admin during contract deployment. Admin address is stored at the EIP-1967 admin storage slot so that accidental storage collision with the implementation is not possible."
},
"implementation()": {
"notice": "Queries the implementation address."
},
"upgradeTo(address)": {
"notice": "Set the implementation contract address. The code at the given address will execute when this contract is called."
},
"upgradeToAndCall(address,bytes)": {
"notice": "Set the implementation and call a function in a single transaction. Useful to ensure atomic execution of initialization-based upgrades."
}
},
"notice": "Proxy is a transparent proxy that passes through the call if the caller is the owner or if the caller is address(0), meaning that the call originated from an off-chain simulation.",
"version": 1
},
"storageLayout": {
"storage": [],
"types": null
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"address": "0x4482B6510dF4C723Bdf80c4441dBDbc855AB29AC",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_admin",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "previousAdmin",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "newAdmin",
"type": "address"
}
],
"name": "AdminChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "implementation",
"type": "address"
}
],
"name": "Upgraded",
"type": "event"
},
{
"stateMutability": "payable",
"type": "fallback"
},
{
"inputs": [],
"name": "admin",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_admin",
"type": "address"
}
],
"name": "changeAdmin",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "implementation",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_implementation",
"type": "address"
}
],
"name": "upgradeTo",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_implementation",
"type": "address"
},
{
"internalType": "bytes",
"name": "_data",
"type": "bytes"
}
],
"name": "upgradeToAndCall",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
],
"transactionHash": "0xe730ca7b4123d14a445606ce0cf449b3c73c12da907c765c63df04d68f3427bb",
"receipt": {
"to": null,
"from": "0x53A6eecC2dD4795Fcc68940ddc6B4d53Bd88Bd9E",
"contractAddress": "0x4482B6510dF4C723Bdf80c4441dBDbc855AB29AC",
"transactionIndex": 0,
"gasUsed": "532674",
"logsBloom": "0x00000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000008000000020000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xc8610148d3e013d22ad9c3d52f6f96c01c9ba33a71bcc2e58dbe058ab5766f82",
"transactionHash": "0xe730ca7b4123d14a445606ce0cf449b3c73c12da907c765c63df04d68f3427bb",
"logs": [
{
"transactionIndex": 0,
"blockNumber": 27396072,
"transactionHash": "0xe730ca7b4123d14a445606ce0cf449b3c73c12da907c765c63df04d68f3427bb",
"address": "0x4482B6510dF4C723Bdf80c4441dBDbc855AB29AC",
"topics": [
"0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"
],
"data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000053a6eecc2dd4795fcc68940ddc6b4d53bd88bd9e",
"logIndex": 0,
"blockHash": "0xc8610148d3e013d22ad9c3d52f6f96c01c9ba33a71bcc2e58dbe058ab5766f82"
}
],
"blockNumber": 27396072,
"cumulativeGasUsed": "532674",
"status": 1,
"byzantium": true
},
"args": [
"0x53A6eecC2dD4795Fcc68940ddc6B4d53Bd88Bd9E"
],
"numDeployments": 1,
"solcInputHash": "ab9b77493f35e63b7a63fb2fa8d618b4",
"metadata": "{\"compiler\":{\"version\":\"0.8.15+commit.e14f2714\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"events\":{\"AdminChanged(address,address)\":{\"params\":{\"newAdmin\":\"The new owner of the contract\",\"previousAdmin\":\"The previous owner of the contract\"}},\"Upgraded(address)\":{\"params\":{\"implementation\":\"The address of the implementation contract\"}}},\"kind\":\"dev\",\"methods\":{\"admin()\":{\"returns\":{\"_0\":\"Owner address.\"}},\"changeAdmin(address)\":{\"params\":{\"_admin\":\"New owner of the proxy contract.\"}},\"constructor\":{\"params\":{\"_admin\":\"Address of the initial contract admin. Admin as the ability to access the transparent proxy interface.\"}},\"implementation()\":{\"returns\":{\"_0\":\"Implementation address.\"}},\"upgradeTo(address)\":{\"params\":{\"_implementation\":\"Address of the implementation contract.\"}},\"upgradeToAndCall(address,bytes)\":{\"params\":{\"_data\":\"Calldata to delegatecall the new implementation with.\",\"_implementation\":\"Address of the implementation contract.\"}}},\"title\":\"Proxy\",\"version\":1},\"userdoc\":{\"events\":{\"AdminChanged(address,address)\":{\"notice\":\"An event that is emitted each time the owner is upgraded. This event is part of the EIP-1967 specification.\"},\"Upgraded(address)\":{\"notice\":\"An event that is emitted each time the implementation is changed. This event is part of the EIP-1967 specification.\"}},\"kind\":\"user\",\"methods\":{\"admin()\":{\"notice\":\"Gets the owner of the proxy contract.\"},\"changeAdmin(address)\":{\"notice\":\"Changes the owner of the proxy contract. Only callable by the owner.\"},\"constructor\":{\"notice\":\"Sets the initial admin during contract deployment. Admin address is stored at the EIP-1967 admin storage slot so that accidental storage collision with the implementation is not possible.\"},\"implementation()\":{\"notice\":\"Queries the implementation address.\"},\"upgradeTo(address)\":{\"notice\":\"Set the implementation contract address. The code at the given address will execute when this contract is called.\"},\"upgradeToAndCall(address,bytes)\":{\"notice\":\"Set the implementation and call a function in a single transaction. Useful to ensure atomic execution of initialization-based upgrades.\"}},\"notice\":\"Proxy is a transparent proxy that passes through the call if the caller is the owner or if the caller is address(0), meaning that the call originated from an off-chain simulation.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"@eth-optimism/contracts-bedrock/contracts/universal/Proxy.sol\":\"Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@eth-optimism/contracts-bedrock/contracts/universal/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.15;\\n\\n/**\\n * @title Proxy\\n * @notice Proxy is a transparent proxy that passes through the call if the caller is the owner or\\n * if the caller is address(0), meaning that the call originated from an off-chain\\n * simulation.\\n */\\ncontract Proxy {\\n /**\\n * @notice The storage slot that holds the address of the implementation.\\n * bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 internal constant IMPLEMENTATION_KEY =\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @notice The storage slot that holds the address of the owner.\\n * bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)\\n */\\n bytes32 internal constant OWNER_KEY =\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @notice An event that is emitted each time the implementation is changed. This event is part\\n * of the EIP-1967 specification.\\n *\\n * @param implementation The address of the implementation contract\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @notice An event that is emitted each time the owner is upgraded. This event is part of the\\n * EIP-1967 specification.\\n *\\n * @param previousAdmin The previous owner of the contract\\n * @param newAdmin The new owner of the contract\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @notice A modifier that reverts if not called by the owner or by address(0) to allow\\n * eth_call to interact with this proxy without needing to use low-level storage\\n * inspection. We assume that nobody is able to trigger calls from address(0) during\\n * normal EVM execution.\\n */\\n modifier proxyCallIfNotAdmin() {\\n if (msg.sender == _getAdmin() || msg.sender == address(0)) {\\n _;\\n } else {\\n // This WILL halt the call frame on completion.\\n _doProxyCall();\\n }\\n }\\n\\n /**\\n * @notice Sets the initial admin during contract deployment. Admin address is stored at the\\n * EIP-1967 admin storage slot so that accidental storage collision with the\\n * implementation is not possible.\\n *\\n * @param _admin Address of the initial contract admin. Admin as the ability to access the\\n * transparent proxy interface.\\n */\\n constructor(address _admin) {\\n _changeAdmin(_admin);\\n }\\n\\n // slither-disable-next-line locked-ether\\n receive() external payable {\\n // Proxy call by default.\\n _doProxyCall();\\n }\\n\\n // slither-disable-next-line locked-ether\\n fallback() external payable {\\n // Proxy call by default.\\n _doProxyCall();\\n }\\n\\n /**\\n * @notice Set the implementation contract address. The code at the given address will execute\\n * when this contract is called.\\n *\\n * @param _implementation Address of the implementation contract.\\n */\\n function upgradeTo(address _implementation) external proxyCallIfNotAdmin {\\n _setImplementation(_implementation);\\n }\\n\\n /**\\n * @notice Set the implementation and call a function in a single transaction. Useful to ensure\\n * atomic execution of initialization-based upgrades.\\n *\\n * @param _implementation Address of the implementation contract.\\n * @param _data Calldata to delegatecall the new implementation with.\\n */\\n function upgradeToAndCall(address _implementation, bytes calldata _data)\\n external\\n payable\\n proxyCallIfNotAdmin\\n returns (bytes memory)\\n {\\n _setImplementation(_implementation);\\n (bool success, bytes memory returndata) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy: delegatecall to new implementation contract failed\\\");\\n return returndata;\\n }\\n\\n /**\\n * @notice Changes the owner of the proxy contract. Only callable by the owner.\\n *\\n * @param _admin New owner of the proxy contract.\\n */\\n function changeAdmin(address _admin) external proxyCallIfNotAdmin {\\n _changeAdmin(_admin);\\n }\\n\\n /**\\n * @notice Gets the owner of the proxy contract.\\n *\\n * @return Owner address.\\n */\\n function admin() external proxyCallIfNotAdmin returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @notice Queries the implementation address.\\n *\\n * @return Implementation address.\\n */\\n function implementation() external proxyCallIfNotAdmin returns (address) {\\n return _getImplementation();\\n }\\n\\n /**\\n * @notice Sets the implementation address.\\n *\\n * @param _implementation New implementation address.\\n */\\n function _setImplementation(address _implementation) internal {\\n assembly {\\n sstore(IMPLEMENTATION_KEY, _implementation)\\n }\\n emit Upgraded(_implementation);\\n }\\n\\n /**\\n * @notice Changes the owner of the proxy contract.\\n *\\n * @param _admin New owner of the proxy contract.\\n */\\n function _changeAdmin(address _admin) internal {\\n address previous = _getAdmin();\\n assembly {\\n sstore(OWNER_KEY, _admin)\\n }\\n emit AdminChanged(previous, _admin);\\n }\\n\\n /**\\n * @notice Performs the proxy call via a delegatecall.\\n */\\n function _doProxyCall() internal {\\n address impl = _getImplementation();\\n require(impl != address(0), \\\"Proxy: implementation not initialized\\\");\\n\\n assembly {\\n // Copy calldata into memory at 0x0....calldatasize.\\n calldatacopy(0x0, 0x0, calldatasize())\\n\\n // Perform the delegatecall, make sure to pass all available gas.\\n let success := delegatecall(gas(), impl, 0x0, calldatasize(), 0x0, 0x0)\\n\\n // Copy returndata into memory at 0x0....returndatasize. Note that this *will*\\n // overwrite the calldata that we just copied into memory but that doesn't really\\n // matter because we'll be returning in a second anyway.\\n returndatacopy(0x0, 0x0, returndatasize())\\n\\n // Success == 0 means a revert. We'll revert too and pass the data up.\\n if iszero(success) {\\n revert(0x0, returndatasize())\\n }\\n\\n // Otherwise we'll just return and pass the data up.\\n return(0x0, returndatasize())\\n }\\n }\\n\\n /**\\n * @notice Queries the implementation address.\\n *\\n * @return Implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n address impl;\\n assembly {\\n impl := sload(IMPLEMENTATION_KEY)\\n }\\n return impl;\\n }\\n\\n /**\\n * @notice Queries the owner of the proxy contract.\\n *\\n * @return Owner address.\\n */\\n function _getAdmin() internal view returns (address) {\\n address owner;\\n assembly {\\n owner := sload(OWNER_KEY)\\n }\\n return owner;\\n }\\n}\\n\",\"keccak256\":\"0xfa08635f1866139673ac4fe7b07330f752f93800075b895d8fcb8484f4a3f753\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b5060405161094138038061094183398101604081905261002f916100b2565b6100388161003e565b506100e2565b60006100566000805160206109218339815191525490565b600080516020610921833981519152839055604080516001600160a01b038084168252851660208201529192507f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b6000602082840312156100c457600080fd5b81516001600160a01b03811681146100db57600080fd5b9392505050565b610830806100f16000396000f3fe60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100be5780638f283970146100f8578063f851a440146101185761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61012d565b005b61006b61012d565b34801561008157600080fd5b5061006b6100903660046106d9565b610224565b6100a86100a33660046106f4565b610296565b6040516100b59190610777565b60405180910390f35b3480156100ca57600080fd5b506100d3610419565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100b5565b34801561010457600080fd5b5061006b6101133660046106d9565b6104b0565b34801561012457600080fd5b506100d3610517565b60006101577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905073ffffffffffffffffffffffffffffffffffffffff8116610201576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f50726f78793a20696d706c656d656e746174696f6e206e6f7420696e6974696160448201527f6c697a656400000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3660008037600080366000845af43d6000803e8061021e573d6000fd5b503d6000f35b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061027d575033155b1561028e5761028b816105a3565b50565b61028b61012d565b60606102c07fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806102f7575033155b1561040a57610305846105a3565b6000808573ffffffffffffffffffffffffffffffffffffffff16858560405161032f9291906107ea565b600060405180830381855af49150503d806000811461036a576040519150601f19603f3d011682016040523d82523d6000602084013e61036f565b606091505b509150915081610401576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f50726f78793a2064656c656761746563616c6c20746f206e657720696d706c6560448201527f6d656e746174696f6e20636f6e7472616374206661696c65640000000000000060648201526084016101f8565b91506104129050565b61041261012d565b9392505050565b60006104437fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061047a575033155b156104a557507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6104ad61012d565b90565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610509575033155b1561028e5761028b8161060b565b60006105417fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610578575033155b156104a557507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81905560405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60006106357fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038390556040805173ffffffffffffffffffffffffffffffffffffffff8084168252851660208201529192507f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b803573ffffffffffffffffffffffffffffffffffffffff811681146106d457600080fd5b919050565b6000602082840312156106eb57600080fd5b610412826106b0565b60008060006040848603121561070957600080fd5b610712846106b0565b9250602084013567ffffffffffffffff8082111561072f57600080fd5b818601915086601f83011261074357600080fd5b81358181111561075257600080fd5b87602082850101111561076457600080fd5b6020830194508093505050509250925092565b600060208083528351808285015260005b818110156107a457858101830151858201604001528201610788565b818111156107b6576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b818382376000910190815291905056fea2646970667358221220120210f19dd8be0e46312b3b9a2148bbb98ec24cce2aa05af1c3d1fe69f55b2b64736f6c634300080f0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103",
"deployedBytecode": "0x60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100be5780638f283970146100f8578063f851a440146101185761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61012d565b005b61006b61012d565b34801561008157600080fd5b5061006b6100903660046106d9565b610224565b6100a86100a33660046106f4565b610296565b6040516100b59190610777565b60405180910390f35b3480156100ca57600080fd5b506100d3610419565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100b5565b34801561010457600080fd5b5061006b6101133660046106d9565b6104b0565b34801561012457600080fd5b506100d3610517565b60006101577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905073ffffffffffffffffffffffffffffffffffffffff8116610201576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f50726f78793a20696d706c656d656e746174696f6e206e6f7420696e6974696160448201527f6c697a656400000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3660008037600080366000845af43d6000803e8061021e573d6000fd5b503d6000f35b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061027d575033155b1561028e5761028b816105a3565b50565b61028b61012d565b60606102c07fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806102f7575033155b1561040a57610305846105a3565b6000808573ffffffffffffffffffffffffffffffffffffffff16858560405161032f9291906107ea565b600060405180830381855af49150503d806000811461036a576040519150601f19603f3d011682016040523d82523d6000602084013e61036f565b606091505b509150915081610401576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f50726f78793a2064656c656761746563616c6c20746f206e657720696d706c6560448201527f6d656e746174696f6e20636f6e7472616374206661696c65640000000000000060648201526084016101f8565b91506104129050565b61041261012d565b9392505050565b60006104437fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061047a575033155b156104a557507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6104ad61012d565b90565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610509575033155b1561028e5761028b8161060b565b60006105417fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610578575033155b156104a557507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81905560405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60006106357fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038390556040805173ffffffffffffffffffffffffffffffffffffffff8084168252851660208201529192507f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b803573ffffffffffffffffffffffffffffffffffffffff811681146106d457600080fd5b919050565b6000602082840312156106eb57600080fd5b610412826106b0565b60008060006040848603121561070957600080fd5b610712846106b0565b9250602084013567ffffffffffffffff8082111561072f57600080fd5b818601915086601f83011261074357600080fd5b81358181111561075257600080fd5b87602082850101111561076457600080fd5b6020830194508093505050509250925092565b600060208083528351808285015260005b818110156107a457858101830151858201604001528201610788565b818111156107b6576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b818382376000910190815291905056fea2646970667358221220120210f19dd8be0e46312b3b9a2148bbb98ec24cce2aa05af1c3d1fe69f55b2b64736f6c634300080f0033",
"devdoc": {
"events": {
"AdminChanged(address,address)": {
"params": {
"newAdmin": "The new owner of the contract",
"previousAdmin": "The previous owner of the contract"
}
},
"Upgraded(address)": {
"params": {
"implementation": "The address of the implementation contract"
}
}
},
"kind": "dev",
"methods": {
"admin()": {
"returns": {
"_0": "Owner address."
}
},
"changeAdmin(address)": {
"params": {
"_admin": "New owner of the proxy contract."
}
},
"constructor": {
"params": {
"_admin": "Address of the initial contract admin. Admin as the ability to access the transparent proxy interface."
}
},
"implementation()": {
"returns": {
"_0": "Implementation address."
}
},
"upgradeTo(address)": {
"params": {
"_implementation": "Address of the implementation contract."
}
},
"upgradeToAndCall(address,bytes)": {
"params": {
"_data": "Calldata to delegatecall the new implementation with.",
"_implementation": "Address of the implementation contract."
}
}
},
"title": "Proxy",
"version": 1
},
"userdoc": {
"events": {
"AdminChanged(address,address)": {
"notice": "An event that is emitted each time the owner is upgraded. This event is part of the EIP-1967 specification."
},
"Upgraded(address)": {
"notice": "An event that is emitted each time the implementation is changed. This event is part of the EIP-1967 specification."
}
},
"kind": "user",
"methods": {
"admin()": {
"notice": "Gets the owner of the proxy contract."
},
"changeAdmin(address)": {
"notice": "Changes the owner of the proxy contract. Only callable by the owner."
},
"constructor": {
"notice": "Sets the initial admin during contract deployment. Admin address is stored at the EIP-1967 admin storage slot so that accidental storage collision with the implementation is not possible."
},
"implementation()": {
"notice": "Queries the implementation address."
},
"upgradeTo(address)": {
"notice": "Set the implementation contract address. The code at the given address will execute when this contract is called."
},
"upgradeToAndCall(address,bytes)": {
"notice": "Set the implementation and call a function in a single transaction. Useful to ensure atomic execution of initialization-based upgrades."
}
},
"notice": "Proxy is a transparent proxy that passes through the call if the caller is the owner or if the caller is address(0), meaning that the call originated from an off-chain simulation.",
"version": 1
},
"storageLayout": {
"storage": [],
"types": null
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -24,6 +24,7 @@ export const isTargetL2Network = (network: string): boolean => { ...@@ -24,6 +24,7 @@ export const isTargetL2Network = (network: string): boolean => {
export const isTargetL1Network = (network: string): boolean => { export const isTargetL1Network = (network: string): boolean => {
switch (network) { switch (network) {
case 'mainnet': case 'mainnet':
case 'ethereum':
case 'goerli': case 'goerli':
case 'ops-l1': case 'ops-l1':
case 'kovan': case 'kovan':
...@@ -38,6 +39,7 @@ export const getProxyAdmin = (network: string): string => { ...@@ -38,6 +39,7 @@ export const getProxyAdmin = (network: string): string => {
case 'optimism': case 'optimism':
return l2MainnetMultisig return l2MainnetMultisig
case 'mainnet': case 'mainnet':
case 'ethereum':
return l1MainnetMultisig return l1MainnetMultisig
case 'kovan': case 'kovan':
case 'optimism-kovan': case 'optimism-kovan':
......
...@@ -1212,30 +1212,30 @@ export class CrossChainMessenger { ...@@ -1212,30 +1212,30 @@ export class CrossChainMessenger {
) )
interface WithdrawalEntry { interface WithdrawalEntry {
withdrawalInitiated: any MessagePassed: any
withdrawalInitiatedExtension1: any MessagePassedExtension1: any
} }
// Handle multiple withdrawals in the same tx and be backwards // Handle multiple withdrawals in the same tx and be backwards
// compatible without WithdrawalInitiatedExtension1 // compatible without MessagePassedExtension1
const logs: Partial<{ number: WithdrawalEntry }> = {} const logs: Partial<{ number: WithdrawalEntry }> = {}
for (const [i, log] of Object.entries(receipt.logs)) { for (const [i, log] of Object.entries(receipt.logs)) {
if (log.address === this.contracts.l2.BedrockMessagePasser.address) { if (log.address === this.contracts.l2.BedrockMessagePasser.address) {
const decoded = const decoded =
this.contracts.l2.L2ToL1MessagePasser.interface.parseLog(log) this.contracts.l2.L2ToL1MessagePasser.interface.parseLog(log)
// Find the withdrawal initiated events // Find the withdrawal initiated events
if (decoded.name === 'WithdrawalInitiated') { if (decoded.name === 'MessagePassed') {
logs[log.logIndex] = { logs[log.logIndex] = {
withdrawalInitiated: decoded.args, MessagePassed: decoded.args,
withdrawalInitiatedExtension1: null, MessagePassedExtension1: null,
} }
if (receipt.logs[i + 1]) { if (receipt.logs[i + 1]) {
const next = const next =
this.contracts.l2.L2ToL1MessagePasser.interface.parseLog( this.contracts.l2.L2ToL1MessagePasser.interface.parseLog(
receipt.logs[i + 1] receipt.logs[i + 1]
) )
if (next.name === 'WithdrawalInitiatedExtension1') { if (next.name === 'MessagePassedExtension1') {
logs[log.logIndex].withdrawalInitiatedExtension1 = next.args logs[log.logIndex].MessagePassedExtension1 = next.args
} }
} }
} }
...@@ -1252,17 +1252,17 @@ export class CrossChainMessenger { ...@@ -1252,17 +1252,17 @@ export class CrossChainMessenger {
} }
const withdrawalHash = hashWithdrawal( const withdrawalHash = hashWithdrawal(
withdrawal.withdrawalInitiated.nonce, withdrawal.MessagePassed.nonce,
withdrawal.withdrawalInitiated.sender, withdrawal.MessagePassed.sender,
withdrawal.withdrawalInitiated.target, withdrawal.MessagePassed.target,
withdrawal.withdrawalInitiated.value, withdrawal.MessagePassed.value,
withdrawal.withdrawalInitiated.gasLimit, withdrawal.MessagePassed.gasLimit,
withdrawal.withdrawalInitiated.data withdrawal.MessagePassed.data
) )
// Sanity check // Sanity check
if (withdrawal.withdrawalInitiatedExtension1) { if (withdrawal.MessagePassedExtension1) {
if (withdrawal.withdrawalInitiatedExtension1.hash !== withdrawalHash) { if (withdrawal.MessagePassedExtension1.hash !== withdrawalHash) {
throw new Error(`Mismatched withdrawal hashes`) throw new Error(`Mismatched withdrawal hashes`)
} }
} }
...@@ -1314,12 +1314,12 @@ export class CrossChainMessenger { ...@@ -1314,12 +1314,12 @@ export class CrossChainMessenger {
output, output,
// TODO(tynes): use better type, typechain? // TODO(tynes): use better type, typechain?
{ {
messageNonce: withdrawal.withdrawalInitiated.nonce, messageNonce: withdrawal.MessagePassed.nonce,
sender: withdrawal.withdrawalInitiated.sender, sender: withdrawal.MessagePassed.sender,
target: withdrawal.withdrawalInitiated.target, target: withdrawal.MessagePassed.target,
value: withdrawal.withdrawalInitiated.value, value: withdrawal.MessagePassed.value,
minGasLimit: withdrawal.withdrawalInitiated.gasLimit, minGasLimit: withdrawal.MessagePassed.gasLimit,
message: withdrawal.withdrawalInitiated.data, message: withdrawal.MessagePassed.data,
}, },
] ]
} }
......
...@@ -78,7 +78,7 @@ which stores messages to be withdrawn. ...@@ -78,7 +78,7 @@ which stores messages to be withdrawn.
```js ```js
interface L2ToL1MessagePasser { interface L2ToL1MessagePasser {
event WithdrawalInitiated( event MessagePassed(
uint256 indexed nonce, // this is a global nonce value for all withdrawal messages uint256 indexed nonce, // this is a global nonce value for all withdrawal messages
address indexed sender, address indexed sender,
address indexed target, address indexed target,
...@@ -87,7 +87,7 @@ interface L2ToL1MessagePasser { ...@@ -87,7 +87,7 @@ interface L2ToL1MessagePasser {
bytes data bytes data
); );
event WithdrawalInitiatedExtension1(bytes32 indexed hash); event MessagePassedExtension1(bytes32 indexed hash);
event WithdrawerBalanceBurnt(uint256 indexed amount); event WithdrawerBalanceBurnt(uint256 indexed amount);
...@@ -102,8 +102,8 @@ interface L2ToL1MessagePasser { ...@@ -102,8 +102,8 @@ interface L2ToL1MessagePasser {
``` ```
The `WithdrawalInitiated` event includes all of the data that is hashed and The `MessagePassed` event includes all of the data that is hashed and
stored in the `sentMessages` mapping. The `WithdrawalInitiatedExtension1` emits stored in the `sentMessages` mapping. The `MessagePassedExtension1` emits
the hash that was computed and used as part of the storage proof used to the hash that was computed and used as part of the storage proof used to
finalize the withdrawal on L1. finalize the withdrawal on L1.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment