From 067b3275bcc590ff4b3c707077ff9234a3ed9097 Mon Sep 17 00:00:00 2001 From: protolambda Date: Fri, 9 Sep 2022 10:55:43 +0200 Subject: [PATCH 01/32] op-node,op-proposer: move rollup bindings into op-node to avoid unnecessary op-proposer dependency in tooling --- op-batcher/batch_submitter.go | 6 ++-- op-batcher/sequencer/driver.go | 4 +-- op-e2e/system_test.go | 6 ++-- op-node/eth/sync_status.go | 27 +++++++++++++++ op-node/node/api.go | 5 ++- op-node/node/server_test.go | 9 +++-- op-node/rollup/driver/driver.go | 2 +- op-node/rollup/driver/state.go | 37 ++++---------------- op-node/sources/rollupclient.go | 43 ++++++++++++++++++++++++ op-proposer/drivers/l2output/driver.go | 5 +-- op-proposer/l2_output_submitter.go | 7 ++-- op-proposer/rollupclient/rollupclient.go | 42 ++++------------------- 12 files changed, 105 insertions(+), 88 deletions(-) create mode 100644 op-node/eth/sync_status.go create mode 100644 op-node/sources/rollupclient.go diff --git a/op-batcher/batch_submitter.go b/op-batcher/batch_submitter.go index 82a7b74b2a009..daf63f8909ce5 100644 --- a/op-batcher/batch_submitter.go +++ b/op-batcher/batch_submitter.go @@ -16,6 +16,7 @@ import ( "syscall" "time" + "github.com/ethereum-optimism/optimism/op-node/sources" oplog "github.com/ethereum-optimism/optimism/op-service/log" opmetrics "github.com/ethereum-optimism/optimism/op-service/metrics" oppprof "github.com/ethereum-optimism/optimism/op-service/pprof" @@ -25,7 +26,6 @@ import ( "github.com/ethereum-optimism/optimism/op-batcher/sequencer" "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/rollup/derive" - "github.com/ethereum-optimism/optimism/op-proposer/rollupclient" "github.com/ethereum-optimism/optimism/op-proposer/txmgr" "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" @@ -491,7 +491,7 @@ func dialEthClientWithTimeout(ctx context.Context, url string) ( // dialRollupClientWithTimeout attempts to dial the RPC provider using the provided // URL. If the dial doesn't complete within defaultDialTimeout seconds, this // method will return an error. -func dialRollupClientWithTimeout(ctx context.Context, url string) (*rollupclient.RollupClient, error) { +func dialRollupClientWithTimeout(ctx context.Context, url string) (*sources.RollupClient, error) { ctxt, cancel := context.WithTimeout(ctx, defaultDialTimeout) defer cancel() @@ -500,7 +500,7 @@ func dialRollupClientWithTimeout(ctx context.Context, url string) (*rollupclient return nil, err } - return rollupclient.NewRollupClient(client), nil + return sources.NewRollupClient(client), nil } // parseAddress parses an ETH address from a hex string. This method will fail if diff --git a/op-batcher/sequencer/driver.go b/op-batcher/sequencer/driver.go index cf79f669de98a..dfe95fe794a50 100644 --- a/op-batcher/sequencer/driver.go +++ b/op-batcher/sequencer/driver.go @@ -5,7 +5,7 @@ import ( "math/big" "time" - "github.com/ethereum-optimism/optimism/op-proposer/rollupclient" + "github.com/ethereum-optimism/optimism/op-node/sources" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" @@ -22,7 +22,7 @@ type Config struct { // API to hit for batch data L2Client *ethclient.Client - RollupNode *rollupclient.RollupClient + RollupNode *sources.RollupClient // Limit the size of txs MinL1TxSize uint64 diff --git a/op-e2e/system_test.go b/op-e2e/system_test.go index ba7977af9105b..2ad7ad0611bf4 100644 --- a/op-e2e/system_test.go +++ b/op-e2e/system_test.go @@ -18,9 +18,9 @@ import ( "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/driver" + "github.com/ethereum-optimism/optimism/op-node/sources" "github.com/ethereum-optimism/optimism/op-node/testlog" "github.com/ethereum-optimism/optimism/op-node/withdrawals" - "github.com/ethereum-optimism/optimism/op-proposer/rollupclient" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/accounts/abi/bind" @@ -168,7 +168,7 @@ func TestL2OutputSubmitter(t *testing.T) { rollupRPCClient, err := rpc.DialContext(context.Background(), cfg.Nodes["sequencer"].RPC.HttpEndpoint()) require.Nil(t, err) - rollupClient := rollupclient.NewRollupClient(rollupRPCClient) + rollupClient := sources.NewRollupClient(rollupRPCClient) // OutputOracle is already deployed l2OutputOracle, err := bindings.NewL2OutputOracleCaller(sys.L2OOContractAddr, l1Client) @@ -330,7 +330,7 @@ func TestSystemE2E(t *testing.T) { rollupRPCClient, err := rpc.DialContext(context.Background(), cfg.Nodes["sequencer"].RPC.HttpEndpoint()) require.Nil(t, err) - rollupClient := rollupclient.NewRollupClient(rollupRPCClient) + rollupClient := sources.NewRollupClient(rollupRPCClient) // basic check that sync status works seqStatus, err := rollupClient.SyncStatus(context.Background()) require.Nil(t, err) diff --git a/op-node/eth/sync_status.go b/op-node/eth/sync_status.go new file mode 100644 index 0000000000000..d9a2c124c5e6d --- /dev/null +++ b/op-node/eth/sync_status.go @@ -0,0 +1,27 @@ +package eth + +// SyncStatus is a snapshot of the driver. +// Values may be zeroed if not yet initialized. +type SyncStatus struct { + // CurrentL1 is the block that the derivation process is currently at, + // this may not be fully derived into L2 data yet. + // If the node is synced, this matches the HeadL1, minus the verifier confirmation distance. + CurrentL1 L1BlockRef `json:"current_l1"` + // HeadL1 is the perceived head of the L1 chain, no confirmation distance. + // The head is not guaranteed to build on the other L1 sync status fields, + // as the node may be in progress of resetting to adapt to a L1 reorg. + HeadL1 L1BlockRef `json:"head_l1"` + SafeL1 L1BlockRef `json:"safe_l1"` + FinalizedL1 L1BlockRef `json:"finalized_l1"` + // UnsafeL2 is the absolute tip of the L2 chain, + // pointing to block data that has not been submitted to L1 yet. + // The sequencer is building this, and verifiers may also be ahead of the + // SafeL2 block if they sync blocks via p2p or other offchain sources. + UnsafeL2 L2BlockRef `json:"unsafe_l2"` + // SafeL2 points to the L2 block that was derived from the L1 chain. + // This point may still reorg if the L1 chain reorgs. + SafeL2 L2BlockRef `json:"safe_l2"` + // FinalizedL2 points to the L2 block that was derived fully from + // finalized L1 information, thus irreversible. + FinalizedL2 L2BlockRef `json:"finalized_l2"` +} diff --git a/op-node/node/api.go b/op-node/node/api.go index b84badbd6730f..3d2637688e95d 100644 --- a/op-node/node/api.go +++ b/op-node/node/api.go @@ -8,7 +8,6 @@ import ( "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/metrics" "github.com/ethereum-optimism/optimism/op-node/rollup" - "github.com/ethereum-optimism/optimism/op-node/rollup/driver" "github.com/ethereum-optimism/optimism/op-node/version" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" @@ -23,7 +22,7 @@ type l2EthClient interface { } type driverClient interface { - SyncStatus(ctx context.Context) (*driver.SyncStatus, error) + SyncStatus(ctx context.Context) (*eth.SyncStatus, error) ResetDerivationPipeline(context.Context) error } @@ -97,7 +96,7 @@ func (n *nodeAPI) OutputAtBlock(ctx context.Context, number rpc.BlockNumber) ([] return []eth.Bytes32{l2OutputRootVersion, l2OutputRoot}, nil } -func (n *nodeAPI) SyncStatus(ctx context.Context) (*driver.SyncStatus, error) { +func (n *nodeAPI) SyncStatus(ctx context.Context) (*eth.SyncStatus, error) { recordDur := n.m.RecordRPCServerRequest("optimism_syncStatus") defer recordDur() return n.dr.SyncStatus(ctx) diff --git a/op-node/node/server_test.go b/op-node/node/server_test.go index 5ef4f536bb4ea..58ee2b6ba9053 100644 --- a/op-node/node/server_test.go +++ b/op-node/node/server_test.go @@ -7,7 +7,6 @@ import ( "github.com/ethereum/go-ethereum/rpc" - "github.com/ethereum-optimism/optimism/op-node/rollup/driver" "github.com/ethereum-optimism/optimism/op-node/testutils" "github.com/ethereum-optimism/optimism/op-node/metrics" @@ -149,7 +148,7 @@ func TestSyncStatus(t *testing.T) { l2Client := &testutils.MockL2Client{} drClient := &mockDriverClient{} rng := rand.New(rand.NewSource(1234)) - status := driver.SyncStatus{ + status := eth.SyncStatus{ CurrentL1: testutils.RandomBlockRef(rng), HeadL1: testutils.RandomBlockRef(rng), UnsafeL2: testutils.RandomL2BlockRef(rng), @@ -173,7 +172,7 @@ func TestSyncStatus(t *testing.T) { client, err := dialRPCClientWithBackoff(context.Background(), log, "http://"+server.Addr().String()) assert.NoError(t, err) - var out *driver.SyncStatus + var out *eth.SyncStatus err = client.CallContext(context.Background(), &out, "optimism_syncStatus") assert.NoError(t, err) assert.Equal(t, &status, out) @@ -183,8 +182,8 @@ type mockDriverClient struct { mock.Mock } -func (c *mockDriverClient) SyncStatus(ctx context.Context) (*driver.SyncStatus, error) { - return c.Mock.MethodCalled("SyncStatus").Get(0).(*driver.SyncStatus), nil +func (c *mockDriverClient) SyncStatus(ctx context.Context) (*eth.SyncStatus, error) { + return c.Mock.MethodCalled("SyncStatus").Get(0).(*eth.SyncStatus), nil } func (c *mockDriverClient) ResetDerivationPipeline(ctx context.Context) error { diff --git a/op-node/rollup/driver/driver.go b/op-node/rollup/driver/driver.go index 15009c9c28a97..c082e73050465 100644 --- a/op-node/rollup/driver/driver.go +++ b/op-node/rollup/driver/driver.go @@ -106,7 +106,7 @@ func (d *Driver) ResetDerivationPipeline(ctx context.Context) error { return d.s.ResetDerivationPipeline(ctx) } -func (d *Driver) SyncStatus(ctx context.Context) (*SyncStatus, error) { +func (d *Driver) SyncStatus(ctx context.Context) (*eth.SyncStatus, error) { return d.s.SyncStatus(ctx) } diff --git a/op-node/rollup/driver/state.go b/op-node/rollup/driver/state.go index ffeff19ff3b33..2452f864981c3 100644 --- a/op-node/rollup/driver/state.go +++ b/op-node/rollup/driver/state.go @@ -16,31 +16,8 @@ import ( "github.com/ethereum/go-ethereum/log" ) -// SyncStatus is a snapshot of the driver. -// Values may be zeroed if not yet initialized. -type SyncStatus struct { - // CurrentL1 is the block that the derivation process is currently at, - // this may not be fully derived into L2 data yet. - // If the node is synced, this matches the HeadL1, minus the verifier confirmation distance. - CurrentL1 eth.L1BlockRef `json:"current_l1"` - // HeadL1 is the perceived head of the L1 chain, no confirmation distance. - // The head is not guaranteed to build on the other L1 sync status fields, - // as the node may be in progress of resetting to adapt to a L1 reorg. - HeadL1 eth.L1BlockRef `json:"head_l1"` - SafeL1 eth.L1BlockRef `json:"safe_l1"` - FinalizedL1 eth.L1BlockRef `json:"finalized_l1"` - // UnsafeL2 is the absolute tip of the L2 chain, - // pointing to block data that has not been submitted to L1 yet. - // The sequencer is building this, and verifiers may also be ahead of the - // SafeL2 block if they sync blocks via p2p or other offchain sources. - UnsafeL2 eth.L2BlockRef `json:"unsafe_l2"` - // SafeL2 points to the L2 block that was derived from the L1 chain. - // This point may still reorg if the L1 chain reorgs. - SafeL2 eth.L2BlockRef `json:"safe_l2"` - // FinalizedL2 points to the L2 block that was derived fully from - // finalized L1 information, thus irreversible. - FinalizedL2 eth.L2BlockRef `json:"finalized_l2"` -} +// Deprecated: use eth.SyncStatus instead. +type SyncStatus = eth.SyncStatus type state struct { // Latest recorded head, safe block and finalized block of the L1 Chain, independent of derivation work @@ -56,7 +33,7 @@ type state struct { idleDerivation bool // Requests for sync status. Synchronized with event loop to avoid reading an inconsistent sync status. - syncStatusReq chan chan SyncStatus + syncStatusReq chan chan eth.SyncStatus // Upon receiving a channel in this channel, the derivation pipeline is forced to be reset. // It tells the caller that the reset occurred by closing the passed in channel. @@ -101,7 +78,7 @@ func NewState(driverCfg *Config, log log.Logger, snapshotLog log.Logger, config return &state{ derivation: derivationPipeline, idleDerivation: false, - syncStatusReq: make(chan chan SyncStatus, 10), + syncStatusReq: make(chan chan eth.SyncStatus, 10), forceReset: make(chan chan struct{}, 10), Config: config, DriverConfig: driverCfg, @@ -472,7 +449,7 @@ func (s *state) eventLoop() { reqStep() // continue with the next step if we can } case respCh := <-s.syncStatusReq: - respCh <- SyncStatus{ + respCh <- eth.SyncStatus{ CurrentL1: s.derivation.Progress().Origin, HeadL1: s.l1Head, SafeL1: s.l1Safe, @@ -510,8 +487,8 @@ func (s *state) ResetDerivationPipeline(ctx context.Context) error { } } -func (s *state) SyncStatus(ctx context.Context) (*SyncStatus, error) { - respCh := make(chan SyncStatus) +func (s *state) SyncStatus(ctx context.Context) (*eth.SyncStatus, error) { + respCh := make(chan eth.SyncStatus) select { case <-ctx.Done(): return nil, ctx.Err() diff --git a/op-node/sources/rollupclient.go b/op-node/sources/rollupclient.go new file mode 100644 index 0000000000000..1c10583ca2e88 --- /dev/null +++ b/op-node/sources/rollupclient.go @@ -0,0 +1,43 @@ +package sources + +import ( + "context" + "math/big" + + "github.com/ethereum-optimism/optimism/op-node/eth" + "github.com/ethereum-optimism/optimism/op-node/rollup" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/rpc" +) + +type RollupClient struct { + rpc *rpc.Client +} + +func NewRollupClient(rpc *rpc.Client) *RollupClient { + return &RollupClient{rpc} +} + +func (r *RollupClient) OutputAtBlock(ctx context.Context, blockNum *big.Int) ([]eth.Bytes32, error) { + var output []eth.Bytes32 + err := r.rpc.CallContext(ctx, &output, "optimism_outputAtBlock", hexutil.EncodeBig(blockNum)) + return output, err +} + +func (r *RollupClient) SyncStatus(ctx context.Context) (*eth.SyncStatus, error) { + var output *eth.SyncStatus + err := r.rpc.CallContext(ctx, &output, "optimism_syncStatus") + return output, err +} + +func (r *RollupClient) RollupConfig(ctx context.Context) (*rollup.Config, error) { + var output *rollup.Config + err := r.rpc.CallContext(ctx, &output, "optimism_rollupConfig") + return output, err +} + +func (r *RollupClient) Version(ctx context.Context) (string, error) { + var output string + err := r.rpc.CallContext(ctx, &output, "optimism_version") + return output, err +} diff --git a/op-proposer/drivers/l2output/driver.go b/op-proposer/drivers/l2output/driver.go index 10f8fed6b8a9a..f0c85abc2151d 100644 --- a/op-proposer/drivers/l2output/driver.go +++ b/op-proposer/drivers/l2output/driver.go @@ -7,9 +7,10 @@ import ( "math/big" "strings" + "github.com/ethereum-optimism/optimism/op-node/sources" + "github.com/ethereum-optimism/optimism/op-bindings/bindings" "github.com/ethereum-optimism/optimism/op-node/eth" - "github.com/ethereum-optimism/optimism/op-proposer/rollupclient" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -27,7 +28,7 @@ type Config struct { Name string L1Client *ethclient.Client L2Client *ethclient.Client - RollupClient *rollupclient.RollupClient + RollupClient *sources.RollupClient L2OOAddr common.Address ChainID *big.Int PrivKey *ecdsa.PrivateKey diff --git a/op-proposer/l2_output_submitter.go b/op-proposer/l2_output_submitter.go index 6540aefbfee85..373f23a7f4617 100644 --- a/op-proposer/l2_output_submitter.go +++ b/op-proposer/l2_output_submitter.go @@ -12,6 +12,8 @@ import ( "syscall" "time" + "github.com/ethereum-optimism/optimism/op-node/sources" + "github.com/ethereum/go-ethereum/crypto" oplog "github.com/ethereum-optimism/optimism/op-service/log" @@ -20,7 +22,6 @@ import ( oprpc "github.com/ethereum-optimism/optimism/op-service/rpc" "github.com/ethereum-optimism/optimism/op-proposer/drivers/l2output" - "github.com/ethereum-optimism/optimism/op-proposer/rollupclient" "github.com/ethereum-optimism/optimism/op-proposer/txmgr" "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" @@ -247,7 +248,7 @@ func dialEthClientWithTimeout(ctx context.Context, url string) ( // dialRollupClientWithTimeout attempts to dial the RPC provider using the provided // URL. If the dial doesn't complete within defaultDialTimeout seconds, this // method will return an error. -func dialRollupClientWithTimeout(ctx context.Context, url string) (*rollupclient.RollupClient, error) { +func dialRollupClientWithTimeout(ctx context.Context, url string) (*sources.RollupClient, error) { ctxt, cancel := context.WithTimeout(ctx, defaultDialTimeout) defer cancel() @@ -256,7 +257,7 @@ func dialRollupClientWithTimeout(ctx context.Context, url string) (*rollupclient return nil, err } - return rollupclient.NewRollupClient(client), nil + return sources.NewRollupClient(client), nil } // parseAddress parses an ETH address from a hex string. This method will fail if diff --git a/op-proposer/rollupclient/rollupclient.go b/op-proposer/rollupclient/rollupclient.go index 6a857987212ad..d6bd8a37389f1 100644 --- a/op-proposer/rollupclient/rollupclient.go +++ b/op-proposer/rollupclient/rollupclient.go @@ -1,44 +1,14 @@ package rollupclient import ( - "context" - "math/big" - - "github.com/ethereum-optimism/optimism/op-node/eth" - "github.com/ethereum-optimism/optimism/op-node/rollup" - "github.com/ethereum-optimism/optimism/op-node/rollup/driver" - "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum-optimism/optimism/op-node/sources" "github.com/ethereum/go-ethereum/rpc" ) -type RollupClient struct { - rpc *rpc.Client -} - -func NewRollupClient(rpc *rpc.Client) *RollupClient { - return &RollupClient{rpc} -} - -func (r *RollupClient) OutputAtBlock(ctx context.Context, blockNum *big.Int) ([]eth.Bytes32, error) { - var output []eth.Bytes32 - err := r.rpc.CallContext(ctx, &output, "optimism_outputAtBlock", hexutil.EncodeBig(blockNum)) - return output, err -} - -func (r *RollupClient) SyncStatus(ctx context.Context) (*driver.SyncStatus, error) { - var output *driver.SyncStatus - err := r.rpc.CallContext(ctx, &output, "optimism_syncStatus") - return output, err -} - -func (r *RollupClient) RollupConfig(ctx context.Context) (*rollup.Config, error) { - var output *rollup.Config - err := r.rpc.CallContext(ctx, &output, "optimism_rollupConfig") - return output, err -} +// Deprecated: use sources.RollupClient instead +type RollupClient = sources.RollupClient -func (r *RollupClient) Version(ctx context.Context) (string, error) { - var output string - err := r.rpc.CallContext(ctx, &output, "optimism_version") - return output, err +// Deprecated: use sources.NewRollupClient instead +func NewRollupClient(rpc *rpc.Client) *sources.RollupClient { + return sources.NewRollupClient(rpc) } From c6fab69f6a479cd9506157ab4fa529de7d9b237c Mon Sep 17 00:00:00 2001 From: Maurelian Date: Fri, 9 Sep 2022 12:45:17 -0400 Subject: [PATCH 02/32] chore: Upgrade foundry --- .changeset/afraid-jokes-run.md | 6 ++++++ ops/docker/foundry/Dockerfile | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/afraid-jokes-run.md diff --git a/.changeset/afraid-jokes-run.md b/.changeset/afraid-jokes-run.md new file mode 100644 index 0000000000000..a8e8133d679e5 --- /dev/null +++ b/.changeset/afraid-jokes-run.md @@ -0,0 +1,6 @@ +--- +'@eth-optimism/ci-builder': patch +'@eth-optimism/foundry': patch +--- + +Update foundry to fix a bug in coverage generation diff --git a/ops/docker/foundry/Dockerfile b/ops/docker/foundry/Dockerfile index 40b1e137a5429..6be0f6dc08816 100644 --- a/ops/docker/foundry/Dockerfile +++ b/ops/docker/foundry/Dockerfile @@ -9,7 +9,7 @@ WORKDIR /opt/foundry # Only diff from upstream docker image is this clone instead # of COPY. We select a specific commit to use. RUN git clone https://github.com/foundry-rs/foundry.git . \ - && git checkout a4b04caf66643e42d3d2c10f9b9845b4bc0cb0d8 + && git checkout f540aa9ebde88dce720140b332412089c2ee85b6 RUN source $HOME/.profile && cargo build --release \ && strip /opt/foundry/target/release/forge \ From 93ea58208ea80a914f489a0393ed2fd17a5217d4 Mon Sep 17 00:00:00 2001 From: Mark Tyneway Date: Sat, 10 Sep 2022 01:00:37 -0700 Subject: [PATCH 03/32] op-chain-ops: add more predeploys (#3384) Every L2 predeploy that has `Semver` must be built so that it's immutables are handled, even though they are hardcoded in the bytecode. Co-authored-by: Matthew Slipper --- op-bindings/Makefile | 9 +- op-bindings/bindings/deployerwhitelist.go | 793 +++++++++++++++++++++ op-bindings/bindings/l1blocknumber.go | 306 ++++++++ op-chain-ops/immutables/immutables.go | 16 +- op-chain-ops/immutables/immutables_test.go | 2 + 5 files changed, 1121 insertions(+), 5 deletions(-) create mode 100644 op-bindings/bindings/deployerwhitelist.go create mode 100644 op-bindings/bindings/l1blocknumber.go diff --git a/op-bindings/Makefile b/op-bindings/Makefile index 73c9cb876da40..ffdba49904630 100644 --- a/op-bindings/Makefile +++ b/op-bindings/Makefile @@ -20,7 +20,8 @@ bindings: l1block-bindings \ proxy-bindings \ proxy-admin-bindings \ erc20-bindings \ - weth9-bindings + weth9-bindings \ + deployer-whitelist-bindings compile: cd ../packages/contracts-bedrock/ && \ @@ -77,6 +78,12 @@ erc20-bindings: compile weth9-bindings: compile ./gen_bindings.sh contracts/vendor/WETH9.sol:WETH9 $(pkg) +deployer-whitelist-bindings: compile + ./gen_bindings.sh contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist $(pkg) + +l1-blocknumber-bindings: compile + ./gen_bindings.sh contracts/legacy/L1BlockNumber.sol:L1BlockNumber $(pkg) + more: go run ./gen/main.go \ -artifacts ../packages/contracts-bedrock/artifacts,../packages/contracts-governance/artifacts \ diff --git a/op-bindings/bindings/deployerwhitelist.go b/op-bindings/bindings/deployerwhitelist.go new file mode 100644 index 0000000000000..e18e75bd17968 --- /dev/null +++ b/op-bindings/bindings/deployerwhitelist.go @@ -0,0 +1,793 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// DeployerWhitelistMetaData contains all meta data concerning the DeployerWhitelist contract. +var DeployerWhitelistMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldOwner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldOwner\",\"type\":\"address\"}],\"name\":\"WhitelistDisabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"deployer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"whitelisted\",\"type\":\"bool\"}],\"name\":\"WhitelistStatusChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"enableArbitraryContractDeployment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_deployer\",\"type\":\"address\"}],\"name\":\"isDeployerAllowed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_deployer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_isWhitelisted\",\"type\":\"bool\"}],\"name\":\"setWhitelistedDeployer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"whitelist\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x60e060405234801561001057600080fd5b506000608081905260a052600160c05260805160a05160c051610b3761004f60003960006105450152600061051c015260006104f30152610b376000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80638da5cb5b1161005b5780638da5cb5b146100c85780639b19251a1461010d578063b1540a0114610140578063bdc7b54f1461015357600080fd5b806308fd63221461008257806313af40351461009757806354fd4d50146100aa575b600080fd5b61009561009036600461088a565b61015b565b005b6100956100a53660046108c6565b6102bb565b6100b26104ec565b6040516100bf9190610918565b60405180910390f35b6000546100e89073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100bf565b61013061011b3660046108c6565b60016020526000908152604090205460ff1681565b60405190151581526020016100bf565b61013061014e3660046108c6565b61058f565b6100956105e0565b60005473ffffffffffffffffffffffffffffffffffffffff16331461022d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604c60248201527f4465706c6f79657257686974656c6973743a2066756e6374696f6e2063616e2060448201527f6f6e6c792062652063616c6c656420627920746865206f776e6572206f66207460648201527f68697320636f6e74726163740000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821660008181526001602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168515159081179091558251938452908301527f8daaf060c3306c38e068a75c054bf96ecd85a3db1252712c4d93632744c42e0d910160405180910390a15050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610388576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604c60248201527f4465706c6f79657257686974656c6973743a2066756e6374696f6e2063616e2060448201527f6f6e6c792062652063616c6c656420627920746865206f776e6572206f66207460648201527f68697320636f6e74726163740000000000000000000000000000000000000000608482015260a401610224565b73ffffffffffffffffffffffffffffffffffffffff8116610451576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604d60248201527f4465706c6f79657257686974656c6973743a2063616e206f6e6c79206265206460448201527f697361626c65642076696120656e61626c65417262697472617279436f6e747260648201527f6163744465706c6f796d656e7400000000000000000000000000000000000000608482015260a401610224565b6000546040805173ffffffffffffffffffffffffffffffffffffffff928316815291831660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a1600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60606105177f0000000000000000000000000000000000000000000000000000000000000000610724565b6105407f0000000000000000000000000000000000000000000000000000000000000000610724565b6105697f0000000000000000000000000000000000000000000000000000000000000000610724565b60405160200161057b93929190610969565b604051602081830303815290604052905090565b6000805473ffffffffffffffffffffffffffffffffffffffff1615806105da575073ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604090205460ff165b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146106ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604c60248201527f4465706c6f79657257686974656c6973743a2066756e6374696f6e2063616e2060448201527f6f6e6c792062652063616c6c656420627920746865206f776e6572206f66207460648201527f68697320636f6e74726163740000000000000000000000000000000000000000608482015260a401610224565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681527fc0e106cf568e50698fdbde1eff56f5a5c966cc7958e37e276918e9e4ccdf8cd49060200160405180910390a1600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60608160000361076757505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115610791578061077b81610a0e565b915061078a9050600a83610a75565b915061076b565b60008167ffffffffffffffff8111156107ac576107ac610a89565b6040519080825280601f01601f1916602001820160405280156107d6576020820181803683370190505b5090505b8415610859576107eb600183610ab8565b91506107f8600a86610acf565b610803906030610ae3565b60f81b81838151811061081857610818610afb565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350610852600a86610a75565b94506107da565b949350505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461088557600080fd5b919050565b6000806040838503121561089d57600080fd5b6108a683610861565b9150602083013580151581146108bb57600080fd5b809150509250929050565b6000602082840312156108d857600080fd5b6108e182610861565b9392505050565b60005b838110156109035781810151838201526020016108eb565b83811115610912576000848401525b50505050565b60208152600082518060208401526109378160408501602087016108e8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000845161097b8184602089016108e8565b80830190507f2e0000000000000000000000000000000000000000000000000000000000000080825285516109b7816001850160208a016108e8565b600192019182015283516109d28160028401602088016108e8565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610a3f57610a3f6109df565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082610a8457610a84610a46565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082821015610aca57610aca6109df565b500390565b600082610ade57610ade610a46565b500690565b60008219821115610af657610af66109df565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea164736f6c634300080f000a", +} + +// DeployerWhitelistABI is the input ABI used to generate the binding from. +// Deprecated: Use DeployerWhitelistMetaData.ABI instead. +var DeployerWhitelistABI = DeployerWhitelistMetaData.ABI + +// DeployerWhitelistBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use DeployerWhitelistMetaData.Bin instead. +var DeployerWhitelistBin = DeployerWhitelistMetaData.Bin + +// DeployDeployerWhitelist deploys a new Ethereum contract, binding an instance of DeployerWhitelist to it. +func DeployDeployerWhitelist(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *DeployerWhitelist, error) { + parsed, err := DeployerWhitelistMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(DeployerWhitelistBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &DeployerWhitelist{DeployerWhitelistCaller: DeployerWhitelistCaller{contract: contract}, DeployerWhitelistTransactor: DeployerWhitelistTransactor{contract: contract}, DeployerWhitelistFilterer: DeployerWhitelistFilterer{contract: contract}}, nil +} + +// DeployerWhitelist is an auto generated Go binding around an Ethereum contract. +type DeployerWhitelist struct { + DeployerWhitelistCaller // Read-only binding to the contract + DeployerWhitelistTransactor // Write-only binding to the contract + DeployerWhitelistFilterer // Log filterer for contract events +} + +// DeployerWhitelistCaller is an auto generated read-only Go binding around an Ethereum contract. +type DeployerWhitelistCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// DeployerWhitelistTransactor is an auto generated write-only Go binding around an Ethereum contract. +type DeployerWhitelistTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// DeployerWhitelistFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type DeployerWhitelistFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// DeployerWhitelistSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type DeployerWhitelistSession struct { + Contract *DeployerWhitelist // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// DeployerWhitelistCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type DeployerWhitelistCallerSession struct { + Contract *DeployerWhitelistCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// DeployerWhitelistTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type DeployerWhitelistTransactorSession struct { + Contract *DeployerWhitelistTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// DeployerWhitelistRaw is an auto generated low-level Go binding around an Ethereum contract. +type DeployerWhitelistRaw struct { + Contract *DeployerWhitelist // Generic contract binding to access the raw methods on +} + +// DeployerWhitelistCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type DeployerWhitelistCallerRaw struct { + Contract *DeployerWhitelistCaller // Generic read-only contract binding to access the raw methods on +} + +// DeployerWhitelistTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type DeployerWhitelistTransactorRaw struct { + Contract *DeployerWhitelistTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewDeployerWhitelist creates a new instance of DeployerWhitelist, bound to a specific deployed contract. +func NewDeployerWhitelist(address common.Address, backend bind.ContractBackend) (*DeployerWhitelist, error) { + contract, err := bindDeployerWhitelist(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &DeployerWhitelist{DeployerWhitelistCaller: DeployerWhitelistCaller{contract: contract}, DeployerWhitelistTransactor: DeployerWhitelistTransactor{contract: contract}, DeployerWhitelistFilterer: DeployerWhitelistFilterer{contract: contract}}, nil +} + +// NewDeployerWhitelistCaller creates a new read-only instance of DeployerWhitelist, bound to a specific deployed contract. +func NewDeployerWhitelistCaller(address common.Address, caller bind.ContractCaller) (*DeployerWhitelistCaller, error) { + contract, err := bindDeployerWhitelist(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &DeployerWhitelistCaller{contract: contract}, nil +} + +// NewDeployerWhitelistTransactor creates a new write-only instance of DeployerWhitelist, bound to a specific deployed contract. +func NewDeployerWhitelistTransactor(address common.Address, transactor bind.ContractTransactor) (*DeployerWhitelistTransactor, error) { + contract, err := bindDeployerWhitelist(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &DeployerWhitelistTransactor{contract: contract}, nil +} + +// NewDeployerWhitelistFilterer creates a new log filterer instance of DeployerWhitelist, bound to a specific deployed contract. +func NewDeployerWhitelistFilterer(address common.Address, filterer bind.ContractFilterer) (*DeployerWhitelistFilterer, error) { + contract, err := bindDeployerWhitelist(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &DeployerWhitelistFilterer{contract: contract}, nil +} + +// bindDeployerWhitelist binds a generic wrapper to an already deployed contract. +func bindDeployerWhitelist(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(DeployerWhitelistABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_DeployerWhitelist *DeployerWhitelistRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _DeployerWhitelist.Contract.DeployerWhitelistCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_DeployerWhitelist *DeployerWhitelistRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _DeployerWhitelist.Contract.DeployerWhitelistTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_DeployerWhitelist *DeployerWhitelistRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _DeployerWhitelist.Contract.DeployerWhitelistTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_DeployerWhitelist *DeployerWhitelistCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _DeployerWhitelist.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_DeployerWhitelist *DeployerWhitelistTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _DeployerWhitelist.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_DeployerWhitelist *DeployerWhitelistTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _DeployerWhitelist.Contract.contract.Transact(opts, method, params...) +} + +// IsDeployerAllowed is a free data retrieval call binding the contract method 0xb1540a01. +// +// Solidity: function isDeployerAllowed(address _deployer) view returns(bool) +func (_DeployerWhitelist *DeployerWhitelistCaller) IsDeployerAllowed(opts *bind.CallOpts, _deployer common.Address) (bool, error) { + var out []interface{} + err := _DeployerWhitelist.contract.Call(opts, &out, "isDeployerAllowed", _deployer) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsDeployerAllowed is a free data retrieval call binding the contract method 0xb1540a01. +// +// Solidity: function isDeployerAllowed(address _deployer) view returns(bool) +func (_DeployerWhitelist *DeployerWhitelistSession) IsDeployerAllowed(_deployer common.Address) (bool, error) { + return _DeployerWhitelist.Contract.IsDeployerAllowed(&_DeployerWhitelist.CallOpts, _deployer) +} + +// IsDeployerAllowed is a free data retrieval call binding the contract method 0xb1540a01. +// +// Solidity: function isDeployerAllowed(address _deployer) view returns(bool) +func (_DeployerWhitelist *DeployerWhitelistCallerSession) IsDeployerAllowed(_deployer common.Address) (bool, error) { + return _DeployerWhitelist.Contract.IsDeployerAllowed(&_DeployerWhitelist.CallOpts, _deployer) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_DeployerWhitelist *DeployerWhitelistCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _DeployerWhitelist.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_DeployerWhitelist *DeployerWhitelistSession) Owner() (common.Address, error) { + return _DeployerWhitelist.Contract.Owner(&_DeployerWhitelist.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_DeployerWhitelist *DeployerWhitelistCallerSession) Owner() (common.Address, error) { + return _DeployerWhitelist.Contract.Owner(&_DeployerWhitelist.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_DeployerWhitelist *DeployerWhitelistCaller) Version(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _DeployerWhitelist.contract.Call(opts, &out, "version") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_DeployerWhitelist *DeployerWhitelistSession) Version() (string, error) { + return _DeployerWhitelist.Contract.Version(&_DeployerWhitelist.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_DeployerWhitelist *DeployerWhitelistCallerSession) Version() (string, error) { + return _DeployerWhitelist.Contract.Version(&_DeployerWhitelist.CallOpts) +} + +// Whitelist is a free data retrieval call binding the contract method 0x9b19251a. +// +// Solidity: function whitelist(address ) view returns(bool) +func (_DeployerWhitelist *DeployerWhitelistCaller) Whitelist(opts *bind.CallOpts, arg0 common.Address) (bool, error) { + var out []interface{} + err := _DeployerWhitelist.contract.Call(opts, &out, "whitelist", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Whitelist is a free data retrieval call binding the contract method 0x9b19251a. +// +// Solidity: function whitelist(address ) view returns(bool) +func (_DeployerWhitelist *DeployerWhitelistSession) Whitelist(arg0 common.Address) (bool, error) { + return _DeployerWhitelist.Contract.Whitelist(&_DeployerWhitelist.CallOpts, arg0) +} + +// Whitelist is a free data retrieval call binding the contract method 0x9b19251a. +// +// Solidity: function whitelist(address ) view returns(bool) +func (_DeployerWhitelist *DeployerWhitelistCallerSession) Whitelist(arg0 common.Address) (bool, error) { + return _DeployerWhitelist.Contract.Whitelist(&_DeployerWhitelist.CallOpts, arg0) +} + +// EnableArbitraryContractDeployment is a paid mutator transaction binding the contract method 0xbdc7b54f. +// +// Solidity: function enableArbitraryContractDeployment() returns() +func (_DeployerWhitelist *DeployerWhitelistTransactor) EnableArbitraryContractDeployment(opts *bind.TransactOpts) (*types.Transaction, error) { + return _DeployerWhitelist.contract.Transact(opts, "enableArbitraryContractDeployment") +} + +// EnableArbitraryContractDeployment is a paid mutator transaction binding the contract method 0xbdc7b54f. +// +// Solidity: function enableArbitraryContractDeployment() returns() +func (_DeployerWhitelist *DeployerWhitelistSession) EnableArbitraryContractDeployment() (*types.Transaction, error) { + return _DeployerWhitelist.Contract.EnableArbitraryContractDeployment(&_DeployerWhitelist.TransactOpts) +} + +// EnableArbitraryContractDeployment is a paid mutator transaction binding the contract method 0xbdc7b54f. +// +// Solidity: function enableArbitraryContractDeployment() returns() +func (_DeployerWhitelist *DeployerWhitelistTransactorSession) EnableArbitraryContractDeployment() (*types.Transaction, error) { + return _DeployerWhitelist.Contract.EnableArbitraryContractDeployment(&_DeployerWhitelist.TransactOpts) +} + +// SetOwner is a paid mutator transaction binding the contract method 0x13af4035. +// +// Solidity: function setOwner(address _owner) returns() +func (_DeployerWhitelist *DeployerWhitelistTransactor) SetOwner(opts *bind.TransactOpts, _owner common.Address) (*types.Transaction, error) { + return _DeployerWhitelist.contract.Transact(opts, "setOwner", _owner) +} + +// SetOwner is a paid mutator transaction binding the contract method 0x13af4035. +// +// Solidity: function setOwner(address _owner) returns() +func (_DeployerWhitelist *DeployerWhitelistSession) SetOwner(_owner common.Address) (*types.Transaction, error) { + return _DeployerWhitelist.Contract.SetOwner(&_DeployerWhitelist.TransactOpts, _owner) +} + +// SetOwner is a paid mutator transaction binding the contract method 0x13af4035. +// +// Solidity: function setOwner(address _owner) returns() +func (_DeployerWhitelist *DeployerWhitelistTransactorSession) SetOwner(_owner common.Address) (*types.Transaction, error) { + return _DeployerWhitelist.Contract.SetOwner(&_DeployerWhitelist.TransactOpts, _owner) +} + +// SetWhitelistedDeployer is a paid mutator transaction binding the contract method 0x08fd6322. +// +// Solidity: function setWhitelistedDeployer(address _deployer, bool _isWhitelisted) returns() +func (_DeployerWhitelist *DeployerWhitelistTransactor) SetWhitelistedDeployer(opts *bind.TransactOpts, _deployer common.Address, _isWhitelisted bool) (*types.Transaction, error) { + return _DeployerWhitelist.contract.Transact(opts, "setWhitelistedDeployer", _deployer, _isWhitelisted) +} + +// SetWhitelistedDeployer is a paid mutator transaction binding the contract method 0x08fd6322. +// +// Solidity: function setWhitelistedDeployer(address _deployer, bool _isWhitelisted) returns() +func (_DeployerWhitelist *DeployerWhitelistSession) SetWhitelistedDeployer(_deployer common.Address, _isWhitelisted bool) (*types.Transaction, error) { + return _DeployerWhitelist.Contract.SetWhitelistedDeployer(&_DeployerWhitelist.TransactOpts, _deployer, _isWhitelisted) +} + +// SetWhitelistedDeployer is a paid mutator transaction binding the contract method 0x08fd6322. +// +// Solidity: function setWhitelistedDeployer(address _deployer, bool _isWhitelisted) returns() +func (_DeployerWhitelist *DeployerWhitelistTransactorSession) SetWhitelistedDeployer(_deployer common.Address, _isWhitelisted bool) (*types.Transaction, error) { + return _DeployerWhitelist.Contract.SetWhitelistedDeployer(&_DeployerWhitelist.TransactOpts, _deployer, _isWhitelisted) +} + +// DeployerWhitelistOwnerChangedIterator is returned from FilterOwnerChanged and is used to iterate over the raw logs and unpacked data for OwnerChanged events raised by the DeployerWhitelist contract. +type DeployerWhitelistOwnerChangedIterator struct { + Event *DeployerWhitelistOwnerChanged // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *DeployerWhitelistOwnerChangedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(DeployerWhitelistOwnerChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(DeployerWhitelistOwnerChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *DeployerWhitelistOwnerChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *DeployerWhitelistOwnerChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// DeployerWhitelistOwnerChanged represents a OwnerChanged event raised by the DeployerWhitelist contract. +type DeployerWhitelistOwnerChanged struct { + OldOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnerChanged is a free log retrieval operation binding the contract event 0xb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c. +// +// Solidity: event OwnerChanged(address oldOwner, address newOwner) +func (_DeployerWhitelist *DeployerWhitelistFilterer) FilterOwnerChanged(opts *bind.FilterOpts) (*DeployerWhitelistOwnerChangedIterator, error) { + + logs, sub, err := _DeployerWhitelist.contract.FilterLogs(opts, "OwnerChanged") + if err != nil { + return nil, err + } + return &DeployerWhitelistOwnerChangedIterator{contract: _DeployerWhitelist.contract, event: "OwnerChanged", logs: logs, sub: sub}, nil +} + +// WatchOwnerChanged is a free log subscription operation binding the contract event 0xb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c. +// +// Solidity: event OwnerChanged(address oldOwner, address newOwner) +func (_DeployerWhitelist *DeployerWhitelistFilterer) WatchOwnerChanged(opts *bind.WatchOpts, sink chan<- *DeployerWhitelistOwnerChanged) (event.Subscription, error) { + + logs, sub, err := _DeployerWhitelist.contract.WatchLogs(opts, "OwnerChanged") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(DeployerWhitelistOwnerChanged) + if err := _DeployerWhitelist.contract.UnpackLog(event, "OwnerChanged", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnerChanged is a log parse operation binding the contract event 0xb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c. +// +// Solidity: event OwnerChanged(address oldOwner, address newOwner) +func (_DeployerWhitelist *DeployerWhitelistFilterer) ParseOwnerChanged(log types.Log) (*DeployerWhitelistOwnerChanged, error) { + event := new(DeployerWhitelistOwnerChanged) + if err := _DeployerWhitelist.contract.UnpackLog(event, "OwnerChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// DeployerWhitelistWhitelistDisabledIterator is returned from FilterWhitelistDisabled and is used to iterate over the raw logs and unpacked data for WhitelistDisabled events raised by the DeployerWhitelist contract. +type DeployerWhitelistWhitelistDisabledIterator struct { + Event *DeployerWhitelistWhitelistDisabled // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *DeployerWhitelistWhitelistDisabledIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(DeployerWhitelistWhitelistDisabled) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(DeployerWhitelistWhitelistDisabled) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *DeployerWhitelistWhitelistDisabledIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *DeployerWhitelistWhitelistDisabledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// DeployerWhitelistWhitelistDisabled represents a WhitelistDisabled event raised by the DeployerWhitelist contract. +type DeployerWhitelistWhitelistDisabled struct { + OldOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWhitelistDisabled is a free log retrieval operation binding the contract event 0xc0e106cf568e50698fdbde1eff56f5a5c966cc7958e37e276918e9e4ccdf8cd4. +// +// Solidity: event WhitelistDisabled(address oldOwner) +func (_DeployerWhitelist *DeployerWhitelistFilterer) FilterWhitelistDisabled(opts *bind.FilterOpts) (*DeployerWhitelistWhitelistDisabledIterator, error) { + + logs, sub, err := _DeployerWhitelist.contract.FilterLogs(opts, "WhitelistDisabled") + if err != nil { + return nil, err + } + return &DeployerWhitelistWhitelistDisabledIterator{contract: _DeployerWhitelist.contract, event: "WhitelistDisabled", logs: logs, sub: sub}, nil +} + +// WatchWhitelistDisabled is a free log subscription operation binding the contract event 0xc0e106cf568e50698fdbde1eff56f5a5c966cc7958e37e276918e9e4ccdf8cd4. +// +// Solidity: event WhitelistDisabled(address oldOwner) +func (_DeployerWhitelist *DeployerWhitelistFilterer) WatchWhitelistDisabled(opts *bind.WatchOpts, sink chan<- *DeployerWhitelistWhitelistDisabled) (event.Subscription, error) { + + logs, sub, err := _DeployerWhitelist.contract.WatchLogs(opts, "WhitelistDisabled") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(DeployerWhitelistWhitelistDisabled) + if err := _DeployerWhitelist.contract.UnpackLog(event, "WhitelistDisabled", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseWhitelistDisabled is a log parse operation binding the contract event 0xc0e106cf568e50698fdbde1eff56f5a5c966cc7958e37e276918e9e4ccdf8cd4. +// +// Solidity: event WhitelistDisabled(address oldOwner) +func (_DeployerWhitelist *DeployerWhitelistFilterer) ParseWhitelistDisabled(log types.Log) (*DeployerWhitelistWhitelistDisabled, error) { + event := new(DeployerWhitelistWhitelistDisabled) + if err := _DeployerWhitelist.contract.UnpackLog(event, "WhitelistDisabled", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// DeployerWhitelistWhitelistStatusChangedIterator is returned from FilterWhitelistStatusChanged and is used to iterate over the raw logs and unpacked data for WhitelistStatusChanged events raised by the DeployerWhitelist contract. +type DeployerWhitelistWhitelistStatusChangedIterator struct { + Event *DeployerWhitelistWhitelistStatusChanged // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *DeployerWhitelistWhitelistStatusChangedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(DeployerWhitelistWhitelistStatusChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(DeployerWhitelistWhitelistStatusChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *DeployerWhitelistWhitelistStatusChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *DeployerWhitelistWhitelistStatusChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// DeployerWhitelistWhitelistStatusChanged represents a WhitelistStatusChanged event raised by the DeployerWhitelist contract. +type DeployerWhitelistWhitelistStatusChanged struct { + Deployer common.Address + Whitelisted bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWhitelistStatusChanged is a free log retrieval operation binding the contract event 0x8daaf060c3306c38e068a75c054bf96ecd85a3db1252712c4d93632744c42e0d. +// +// Solidity: event WhitelistStatusChanged(address deployer, bool whitelisted) +func (_DeployerWhitelist *DeployerWhitelistFilterer) FilterWhitelistStatusChanged(opts *bind.FilterOpts) (*DeployerWhitelistWhitelistStatusChangedIterator, error) { + + logs, sub, err := _DeployerWhitelist.contract.FilterLogs(opts, "WhitelistStatusChanged") + if err != nil { + return nil, err + } + return &DeployerWhitelistWhitelistStatusChangedIterator{contract: _DeployerWhitelist.contract, event: "WhitelistStatusChanged", logs: logs, sub: sub}, nil +} + +// WatchWhitelistStatusChanged is a free log subscription operation binding the contract event 0x8daaf060c3306c38e068a75c054bf96ecd85a3db1252712c4d93632744c42e0d. +// +// Solidity: event WhitelistStatusChanged(address deployer, bool whitelisted) +func (_DeployerWhitelist *DeployerWhitelistFilterer) WatchWhitelistStatusChanged(opts *bind.WatchOpts, sink chan<- *DeployerWhitelistWhitelistStatusChanged) (event.Subscription, error) { + + logs, sub, err := _DeployerWhitelist.contract.WatchLogs(opts, "WhitelistStatusChanged") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(DeployerWhitelistWhitelistStatusChanged) + if err := _DeployerWhitelist.contract.UnpackLog(event, "WhitelistStatusChanged", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseWhitelistStatusChanged is a log parse operation binding the contract event 0x8daaf060c3306c38e068a75c054bf96ecd85a3db1252712c4d93632744c42e0d. +// +// Solidity: event WhitelistStatusChanged(address deployer, bool whitelisted) +func (_DeployerWhitelist *DeployerWhitelistFilterer) ParseWhitelistStatusChanged(log types.Log) (*DeployerWhitelistWhitelistStatusChanged, error) { + event := new(DeployerWhitelistWhitelistStatusChanged) + if err := _DeployerWhitelist.contract.UnpackLog(event, "WhitelistStatusChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/op-bindings/bindings/l1blocknumber.go b/op-bindings/bindings/l1blocknumber.go new file mode 100644 index 0000000000000..9ef4a32d4fcc2 --- /dev/null +++ b/op-bindings/bindings/l1blocknumber.go @@ -0,0 +1,306 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// L1BlockNumberMetaData contains all meta data concerning the L1BlockNumber contract. +var L1BlockNumberMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"getL1BlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x60e060405234801561001057600080fd5b506000608081905260a052600160c05260805160a05160c05161059461004f600039600061018d015260006101640152600061013b01526105946000f3fe60806040526004361061002d5760003560e01c806354fd4d5014610052578063b9b3efe91461007d57610048565b3661004857600061003c6100a0565b90508060005260206000f35b600061003c6100a0565b34801561005e57600080fd5b50610067610134565b6040516100749190610344565b60405180910390f35b34801561008957600080fd5b506100926100a0565b604051908152602001610074565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638381f58a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610101573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101259190610395565b67ffffffffffffffff16905090565b606061015f7f00000000000000000000000000000000000000000000000000000000000000006101d7565b6101887f00000000000000000000000000000000000000000000000000000000000000006101d7565b6101b17f00000000000000000000000000000000000000000000000000000000000000006101d7565b6040516020016101c3939291906103c6565b604051602081830303815290604052905090565b60608160000361021a57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115610244578061022e8161046b565b915061023d9050600a836104d2565b915061021e565b60008167ffffffffffffffff81111561025f5761025f6104e6565b6040519080825280601f01601f191660200182016040528015610289576020820181803683370190505b5090505b841561030c5761029e600183610515565b91506102ab600a8661052c565b6102b6906030610540565b60f81b8183815181106102cb576102cb610558565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350610305600a866104d2565b945061028d565b949350505050565b60005b8381101561032f578181015183820152602001610317565b8381111561033e576000848401525b50505050565b6020815260008251806020840152610363816040850160208701610314565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000602082840312156103a757600080fd5b815167ffffffffffffffff811681146103bf57600080fd5b9392505050565b600084516103d8818460208901610314565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610414816001850160208a01610314565b6001920191820152835161042f816002840160208801610314565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361049c5761049c61043c565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826104e1576104e16104a3565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000828210156105275761052761043c565b500390565b60008261053b5761053b6104a3565b500690565b600082198211156105535761055361043c565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea164736f6c634300080f000a", +} + +// L1BlockNumberABI is the input ABI used to generate the binding from. +// Deprecated: Use L1BlockNumberMetaData.ABI instead. +var L1BlockNumberABI = L1BlockNumberMetaData.ABI + +// L1BlockNumberBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use L1BlockNumberMetaData.Bin instead. +var L1BlockNumberBin = L1BlockNumberMetaData.Bin + +// DeployL1BlockNumber deploys a new Ethereum contract, binding an instance of L1BlockNumber to it. +func DeployL1BlockNumber(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *L1BlockNumber, error) { + parsed, err := L1BlockNumberMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(L1BlockNumberBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &L1BlockNumber{L1BlockNumberCaller: L1BlockNumberCaller{contract: contract}, L1BlockNumberTransactor: L1BlockNumberTransactor{contract: contract}, L1BlockNumberFilterer: L1BlockNumberFilterer{contract: contract}}, nil +} + +// L1BlockNumber is an auto generated Go binding around an Ethereum contract. +type L1BlockNumber struct { + L1BlockNumberCaller // Read-only binding to the contract + L1BlockNumberTransactor // Write-only binding to the contract + L1BlockNumberFilterer // Log filterer for contract events +} + +// L1BlockNumberCaller is an auto generated read-only Go binding around an Ethereum contract. +type L1BlockNumberCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L1BlockNumberTransactor is an auto generated write-only Go binding around an Ethereum contract. +type L1BlockNumberTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L1BlockNumberFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type L1BlockNumberFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L1BlockNumberSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type L1BlockNumberSession struct { + Contract *L1BlockNumber // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// L1BlockNumberCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type L1BlockNumberCallerSession struct { + Contract *L1BlockNumberCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// L1BlockNumberTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type L1BlockNumberTransactorSession struct { + Contract *L1BlockNumberTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// L1BlockNumberRaw is an auto generated low-level Go binding around an Ethereum contract. +type L1BlockNumberRaw struct { + Contract *L1BlockNumber // Generic contract binding to access the raw methods on +} + +// L1BlockNumberCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type L1BlockNumberCallerRaw struct { + Contract *L1BlockNumberCaller // Generic read-only contract binding to access the raw methods on +} + +// L1BlockNumberTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type L1BlockNumberTransactorRaw struct { + Contract *L1BlockNumberTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewL1BlockNumber creates a new instance of L1BlockNumber, bound to a specific deployed contract. +func NewL1BlockNumber(address common.Address, backend bind.ContractBackend) (*L1BlockNumber, error) { + contract, err := bindL1BlockNumber(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &L1BlockNumber{L1BlockNumberCaller: L1BlockNumberCaller{contract: contract}, L1BlockNumberTransactor: L1BlockNumberTransactor{contract: contract}, L1BlockNumberFilterer: L1BlockNumberFilterer{contract: contract}}, nil +} + +// NewL1BlockNumberCaller creates a new read-only instance of L1BlockNumber, bound to a specific deployed contract. +func NewL1BlockNumberCaller(address common.Address, caller bind.ContractCaller) (*L1BlockNumberCaller, error) { + contract, err := bindL1BlockNumber(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &L1BlockNumberCaller{contract: contract}, nil +} + +// NewL1BlockNumberTransactor creates a new write-only instance of L1BlockNumber, bound to a specific deployed contract. +func NewL1BlockNumberTransactor(address common.Address, transactor bind.ContractTransactor) (*L1BlockNumberTransactor, error) { + contract, err := bindL1BlockNumber(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &L1BlockNumberTransactor{contract: contract}, nil +} + +// NewL1BlockNumberFilterer creates a new log filterer instance of L1BlockNumber, bound to a specific deployed contract. +func NewL1BlockNumberFilterer(address common.Address, filterer bind.ContractFilterer) (*L1BlockNumberFilterer, error) { + contract, err := bindL1BlockNumber(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &L1BlockNumberFilterer{contract: contract}, nil +} + +// bindL1BlockNumber binds a generic wrapper to an already deployed contract. +func bindL1BlockNumber(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(L1BlockNumberABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_L1BlockNumber *L1BlockNumberRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _L1BlockNumber.Contract.L1BlockNumberCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_L1BlockNumber *L1BlockNumberRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _L1BlockNumber.Contract.L1BlockNumberTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_L1BlockNumber *L1BlockNumberRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _L1BlockNumber.Contract.L1BlockNumberTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_L1BlockNumber *L1BlockNumberCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _L1BlockNumber.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_L1BlockNumber *L1BlockNumberTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _L1BlockNumber.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_L1BlockNumber *L1BlockNumberTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _L1BlockNumber.Contract.contract.Transact(opts, method, params...) +} + +// GetL1BlockNumber is a free data retrieval call binding the contract method 0xb9b3efe9. +// +// Solidity: function getL1BlockNumber() view returns(uint256) +func (_L1BlockNumber *L1BlockNumberCaller) GetL1BlockNumber(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _L1BlockNumber.contract.Call(opts, &out, "getL1BlockNumber") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetL1BlockNumber is a free data retrieval call binding the contract method 0xb9b3efe9. +// +// Solidity: function getL1BlockNumber() view returns(uint256) +func (_L1BlockNumber *L1BlockNumberSession) GetL1BlockNumber() (*big.Int, error) { + return _L1BlockNumber.Contract.GetL1BlockNumber(&_L1BlockNumber.CallOpts) +} + +// GetL1BlockNumber is a free data retrieval call binding the contract method 0xb9b3efe9. +// +// Solidity: function getL1BlockNumber() view returns(uint256) +func (_L1BlockNumber *L1BlockNumberCallerSession) GetL1BlockNumber() (*big.Int, error) { + return _L1BlockNumber.Contract.GetL1BlockNumber(&_L1BlockNumber.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L1BlockNumber *L1BlockNumberCaller) Version(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _L1BlockNumber.contract.Call(opts, &out, "version") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L1BlockNumber *L1BlockNumberSession) Version() (string, error) { + return _L1BlockNumber.Contract.Version(&_L1BlockNumber.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_L1BlockNumber *L1BlockNumberCallerSession) Version() (string, error) { + return _L1BlockNumber.Contract.Version(&_L1BlockNumber.CallOpts) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_L1BlockNumber *L1BlockNumberTransactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) { + return _L1BlockNumber.contract.RawTransact(opts, calldata) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_L1BlockNumber *L1BlockNumberSession) Fallback(calldata []byte) (*types.Transaction, error) { + return _L1BlockNumber.Contract.Fallback(&_L1BlockNumber.TransactOpts, calldata) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_L1BlockNumber *L1BlockNumberTransactorSession) Fallback(calldata []byte) (*types.Transaction, error) { + return _L1BlockNumber.Contract.Fallback(&_L1BlockNumber.TransactOpts, calldata) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_L1BlockNumber *L1BlockNumberTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _L1BlockNumber.contract.RawTransact(opts, nil) // calldata is disallowed for receive function +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_L1BlockNumber *L1BlockNumberSession) Receive() (*types.Transaction, error) { + return _L1BlockNumber.Contract.Receive(&_L1BlockNumber.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_L1BlockNumber *L1BlockNumberTransactorSession) Receive() (*types.Transaction, error) { + return _L1BlockNumber.Contract.Receive(&_L1BlockNumber.TransactOpts) +} diff --git a/op-chain-ops/immutables/immutables.go b/op-chain-ops/immutables/immutables.go index e99d0a946ba1e..4f90eb5d4194e 100644 --- a/op-chain-ops/immutables/immutables.go +++ b/op-chain-ops/immutables/immutables.go @@ -16,10 +16,8 @@ import ( // contracts so that the immutables can be set properly in the bytecode. type DeploymentResults map[string]hexutil.Bytes -// TODO(tynes): once there are deploy time config params, -// pass in a config struct to this function that comes from -// a JSON file/cli flags and then populate the Deployment -// Args. +// BuildOptimism will deploy the L2 predeploys so that their immutables are set +// correctly. func BuildOptimism() (DeploymentResults, error) { deployments := []deployer.Constructor{ { @@ -43,6 +41,12 @@ func BuildOptimism() (DeploymentResults, error) { { Name: "OptimismMintableERC20Factory", }, + { + Name: "DeployerWhitelist", + }, + { + Name: "L1BlockNumber", + }, } return BuildL2(deployments) } @@ -91,6 +95,10 @@ func l2Deployer(backend *backends.SimulatedBackend, opts *bind.TransactOpts, dep addr, _, _, err = bindings.DeploySequencerFeeVault(opts, backend) case "OptimismMintableERC20Factory": addr, _, _, err = bindings.DeployOptimismMintableERC20Factory(opts, backend, predeploys.L2StandardBridgeAddr) + case "DeployerWhitelist": + addr, _, _, err = bindings.DeployDeployerWhitelist(opts, backend) + case "L1BlockNumber": + addr, _, _, err = bindings.DeployL1BlockNumber(opts, backend) default: return addr, fmt.Errorf("unknown contract: %s", deployment.Name) } diff --git a/op-chain-ops/immutables/immutables_test.go b/op-chain-ops/immutables/immutables_test.go index be118be14eb67..32067d8384c64 100644 --- a/op-chain-ops/immutables/immutables_test.go +++ b/op-chain-ops/immutables/immutables_test.go @@ -20,6 +20,8 @@ func TestBuildOptimism(t *testing.T) { "L2ToL1MessagePasser": true, "SequencerFeeVault": true, "OptimismMintableERC20Factory": true, + "DeployerWhitelist": true, + "L1BlockNumber": true, } // Only the exact contracts that we care about are being From 6e5df3ef08768bd261224d18c970a7477ba13f1d Mon Sep 17 00:00:00 2001 From: Mark Tyneway Date: Sat, 10 Sep 2022 01:00:54 -0700 Subject: [PATCH 04/32] contracts-bedrock: migrate GovernanceToken (#3386) Moves the `GovernanceToken` into `contracts-bedrock` so that its artifact can be easily inspected. This is the first step in deleting `contracts-governance`. The other files should be moved to `contracts-periphery`. --- op-bindings/Makefile | 2 +- op-bindings/bindings/gaspriceoracle_more.go | 2 +- op-bindings/bindings/governancetoken_more.go | 4 +- op-bindings/bindings/legacyerc20eth_more.go | 2 +- .../contracts/L2/GovernanceToken.sol | 64 +++++++++++++++++++ 5 files changed, 69 insertions(+), 5 deletions(-) create mode 100644 packages/contracts-bedrock/contracts/L2/GovernanceToken.sol diff --git a/op-bindings/Makefile b/op-bindings/Makefile index ffdba49904630..20ebc2ea671cf 100644 --- a/op-bindings/Makefile +++ b/op-bindings/Makefile @@ -86,7 +86,7 @@ l1-blocknumber-bindings: compile more: go run ./gen/main.go \ - -artifacts ../packages/contracts-bedrock/artifacts,../packages/contracts-governance/artifacts \ + -artifacts ../packages/contracts-bedrock/artifacts \ -out ./bindings \ -contracts OptimismMintableERC20Factory,L2StandardBridge,L1BlockNumber,DeployerWhitelist,Proxy,OptimismPortal,L2ToL1MessagePasser,L2CrossDomainMessenger,GasPriceOracle,SequencerFeeVault,L1Block,LegacyERC20ETH,WETH9,GovernanceToken \ -package bindings diff --git a/op-bindings/bindings/gaspriceoracle_more.go b/op-bindings/bindings/gaspriceoracle_more.go index e080dcad8582b..3a871b3f8ebd5 100755 --- a/op-bindings/bindings/gaspriceoracle_more.go +++ b/op-bindings/bindings/gaspriceoracle_more.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum-optimism/optimism/op-bindings/solc" ) -const GasPriceOracleStorageLayoutJSON = "{\"storage\":[{\"astId\":26690,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":1663,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer0\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"},{\"astId\":1666,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer1\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":1669,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"overhead\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_uint256\"},{\"astId\":1672,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"scalar\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_uint256\"},{\"astId\":1675,\"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\":50056,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":1663,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer0\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"},{\"astId\":1666,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer1\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":1669,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"overhead\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_uint256\"},{\"astId\":1672,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"scalar\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_uint256\"},{\"astId\":1675,\"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) diff --git a/op-bindings/bindings/governancetoken_more.go b/op-bindings/bindings/governancetoken_more.go index 0917a128fabed..39aecc6dfa6c7 100755 --- a/op-bindings/bindings/governancetoken_more.go +++ b/op-bindings/bindings/governancetoken_more.go @@ -9,11 +9,11 @@ import ( "github.com/ethereum-optimism/optimism/op-bindings/solc" ) -const GovernanceTokenStorageLayoutJSON = "{\"storage\":[{\"astId\":198,\"contract\":\"contracts/GovernanceToken.sol:GovernanceToken\",\"label\":\"_balances\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":204,\"contract\":\"contracts/GovernanceToken.sol:GovernanceToken\",\"label\":\"_allowances\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"},{\"astId\":206,\"contract\":\"contracts/GovernanceToken.sol:GovernanceToken\",\"label\":\"_totalSupply\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":208,\"contract\":\"contracts/GovernanceToken.sol:GovernanceToken\",\"label\":\"_name\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_string_storage\"},{\"astId\":210,\"contract\":\"contracts/GovernanceToken.sol:GovernanceToken\",\"label\":\"_symbol\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_string_storage\"},{\"astId\":1577,\"contract\":\"contracts/GovernanceToken.sol:GovernanceToken\",\"label\":\"_nonces\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_mapping(t_address,t_struct(Counter)1787_storage)\"},{\"astId\":918,\"contract\":\"contracts/GovernanceToken.sol:GovernanceToken\",\"label\":\"_delegates\",\"offset\":0,\"slot\":\"6\",\"type\":\"t_mapping(t_address,t_address)\"},{\"astId\":924,\"contract\":\"contracts/GovernanceToken.sol:GovernanceToken\",\"label\":\"_checkpoints\",\"offset\":0,\"slot\":\"7\",\"type\":\"t_mapping(t_address,t_array(t_struct(Checkpoint)909_storage)dyn_storage)\"},{\"astId\":928,\"contract\":\"contracts/GovernanceToken.sol:GovernanceToken\",\"label\":\"_totalSupplyCheckpoints\",\"offset\":0,\"slot\":\"8\",\"type\":\"t_array(t_struct(Checkpoint)909_storage)dyn_storage\"},{\"astId\":7,\"contract\":\"contracts/GovernanceToken.sol:GovernanceToken\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"9\",\"type\":\"t_address\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_struct(Checkpoint)909_storage)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"struct ERC20Votes.Checkpoint[]\",\"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)909_storage)dyn_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct ERC20Votes.Checkpoint[])\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_array(t_struct(Checkpoint)909_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)1787_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct Counters.Counter)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_struct(Counter)1787_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)909_storage\":{\"encoding\":\"inplace\",\"label\":\"struct ERC20Votes.Checkpoint\",\"numberOfBytes\":\"32\"},\"t_struct(Counter)1787_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\":307,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_balances\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":313,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_allowances\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"},{\"astId\":315,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_totalSupply\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":317,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_name\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_string_storage\"},{\"astId\":319,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_symbol\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_string_storage\"},{\"astId\":1684,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_nonces\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_mapping(t_address,t_struct(Counter)1897_storage)\"},{\"astId\":1692,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_PERMIT_TYPEHASH_DEPRECATED_SLOT\",\"offset\":0,\"slot\":\"6\",\"type\":\"t_bytes32\"},{\"astId\":1025,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_delegates\",\"offset\":0,\"slot\":\"7\",\"type\":\"t_mapping(t_address,t_address)\"},{\"astId\":1031,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_checkpoints\",\"offset\":0,\"slot\":\"8\",\"type\":\"t_mapping(t_address,t_array(t_struct(Checkpoint)1016_storage)dyn_storage)\"},{\"astId\":1035,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_totalSupplyCheckpoints\",\"offset\":0,\"slot\":\"9\",\"type\":\"t_array(t_struct(Checkpoint)1016_storage)dyn_storage\"},{\"astId\":108,\"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)1016_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)1016_storage)dyn_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct ERC20Votes.Checkpoint[])\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_array(t_struct(Checkpoint)1016_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)1897_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct Counters.Counter)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_struct(Counter)1897_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)1016_storage\":{\"encoding\":\"inplace\",\"label\":\"struct ERC20Votes.Checkpoint\",\"numberOfBytes\":\"32\"},\"t_struct(Counter)1897_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 GovernanceTokenDeployedBin = "0x608060405234801561001057600080fd5b50600436106101c45760003560e01c8063715018a6116100f9578063a457c2d711610097578063d505accf11610071578063d505accf14610553578063dd62ed3e1461056f578063f1127ed81461059f578063f2fde38b146105cf576101c4565b8063a457c2d7146104d7578063a9059cbb14610507578063c3cda52014610537576101c4565b80638da5cb5b116100d35780638da5cb5b1461043b5780638e539e8c1461045957806395d89b41146104895780639ab24eb0146104a7576101c4565b8063715018a6146103e557806379cc6790146103ef5780637ecebe001461040b576101c4565b80633a46b1a811610166578063587cde1e11610140578063587cde1e146103395780635c19a95c146103695780636fcfff451461038557806370a08231146103b5576101c4565b80633a46b1a8146102d157806340c10f191461030157806342966c681461031d576101c4565b806323b872dd116101a257806323b872dd14610235578063313ce567146102655780633644e5151461028357806339509351146102a1576101c4565b806306fdde03146101c9578063095ea7b3146101e757806318160ddd14610217575b600080fd5b6101d16105eb565b6040516101de9190612a9e565b60405180910390f35b61020160048036038101906101fc9190612b59565b61067d565b60405161020e9190612bb4565b60405180910390f35b61021f6106a0565b60405161022c9190612bde565b60405180910390f35b61024f600480360381019061024a9190612bf9565b6106aa565b60405161025c9190612bb4565b60405180910390f35b61026d6106d9565b60405161027a9190612c68565b60405180910390f35b61028b6106e2565b6040516102989190612c9c565b60405180910390f35b6102bb60048036038101906102b69190612b59565b6106f1565b6040516102c89190612bb4565b60405180910390f35b6102eb60048036038101906102e69190612b59565b61079b565b6040516102f89190612bde565b60405180910390f35b61031b60048036038101906103169190612b59565b61082f565b005b61033760048036038101906103329190612cb7565b6108b9565b005b610353600480360381019061034e9190612ce4565b6108cd565b6040516103609190612d20565b60405180910390f35b610383600480360381019061037e9190612ce4565b610936565b005b61039f600480360381019061039a9190612ce4565b61094a565b6040516103ac9190612d5a565b60405180910390f35b6103cf60048036038101906103ca9190612ce4565b61099e565b6040516103dc9190612bde565b60405180910390f35b6103ed6109e6565b005b61040960048036038101906104049190612b59565b610a6e565b005b61042560048036038101906104209190612ce4565b610a8e565b6040516104329190612bde565b60405180910390f35b610443610ade565b6040516104509190612d20565b60405180910390f35b610473600480360381019061046e9190612cb7565b610b08565b6040516104809190612bde565b60405180910390f35b610491610b5e565b60405161049e9190612a9e565b60405180910390f35b6104c160048036038101906104bc9190612ce4565b610bf0565b6040516104ce9190612bde565b60405180910390f35b6104f160048036038101906104ec9190612b59565b610d01565b6040516104fe9190612bb4565b60405180910390f35b610521600480360381019061051c9190612b59565b610deb565b60405161052e9190612bb4565b60405180910390f35b610551600480360381019061054c9190612dcd565b610e0e565b005b61056d60048036038101906105689190612e5a565b610f12565b005b61058960048036038101906105849190612efc565b611054565b6040516105969190612bde565b60405180910390f35b6105b960048036038101906105b49190612f68565b6110db565b6040516105c6919061301d565b60405180910390f35b6105e960048036038101906105e49190612ce4565b6111eb565b005b6060600380546105fa90613067565b80601f016020809104026020016040519081016040528092919081815260200182805461062690613067565b80156106735780601f1061064857610100808354040283529160200191610673565b820191906000526020600020905b81548152906001019060200180831161065657829003601f168201915b5050505050905090565b6000806106886112e3565b90506106958185856112eb565b600191505092915050565b6000600254905090565b6000806106b56112e3565b90506106c28582856114b6565b6106cd858585611542565b60019150509392505050565b60006012905090565b60006106ec6117c3565b905090565b6000806106fc6112e3565b9050610790818585600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461078b91906130c8565b6112eb565b600191505092915050565b60004382106107df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107d69061316a565b60405180910390fd5b610827600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020836118dd565b905092915050565b6108376112e3565b73ffffffffffffffffffffffffffffffffffffffff16610855610ade565b73ffffffffffffffffffffffffffffffffffffffff16146108ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108a2906131d6565b60405180910390fd5b6108b582826119e9565b5050565b6108ca6108c46112e3565b826119f7565b50565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6109476109416112e3565b82611a05565b50565b6000610997600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080549050611b1f565b9050919050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6109ee6112e3565b73ffffffffffffffffffffffffffffffffffffffff16610a0c610ade565b73ffffffffffffffffffffffffffffffffffffffff1614610a62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a59906131d6565b60405180910390fd5b610a6c6000611b72565b565b610a8082610a7a6112e3565b836114b6565b610a8a82826119f7565b5050565b6000610ad7600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611c38565b9050919050565b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000438210610b4c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b439061316a565b60405180910390fd5b610b576008836118dd565b9050919050565b606060048054610b6d90613067565b80601f0160208091040260200160405190810160405280929190818152602001828054610b9990613067565b8015610be65780601f10610bbb57610100808354040283529160200191610be6565b820191906000526020600020905b815481529060010190602001808311610bc957829003601f168201915b5050505050905090565b600080600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080549050905060008114610cd857600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600182610c8c91906131f6565b81548110610c9d57610c9c61322a565b5b9060005260206000200160000160049054906101000a90047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16610cdb565b60005b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16915050919050565b600080610d0c6112e3565b90506000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905083811015610dd2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc9906132cb565b60405180910390fd5b610ddf82868684036112eb565b60019250505092915050565b600080610df66112e3565b9050610e03818585611542565b600191505092915050565b83421115610e51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4890613337565b60405180910390fd5b6000610eb3610eab7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf898989604051602001610e909493929190613357565b60405160208183030381529060405280519060200120611c46565b858585611c60565b9050610ebe81611c8b565b8614610eff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ef6906133e8565b60405180910390fd5b610f098188611a05565b50505050505050565b83421115610f55576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4c90613454565b60405180910390fd5b60007f0000000000000000000000000000000000000000000000000000000000000000888888610f848c611c8b565b89604051602001610f9a96959493929190613474565b6040516020818303038152906040528051906020012090506000610fbd82611c46565b90506000610fcd82878787611c60565b90508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461103d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161103490613521565b60405180910390fd5b6110488a8a8a6112eb565b50505050505050505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6110e36129c7565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208263ffffffff168154811061113a5761113961322a565b5b906000526020600020016040518060400160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a90047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1681525050905092915050565b6111f36112e3565b73ffffffffffffffffffffffffffffffffffffffff16611211610ade565b73ffffffffffffffffffffffffffffffffffffffff1614611267576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161125e906131d6565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156112d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ce906135b3565b60405180910390fd5b6112e081611b72565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561135b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135290613645565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113c2906136d7565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114a99190612bde565b60405180910390a3505050565b60006114c28484611054565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461153c578181101561152e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161152590613743565b60405180910390fd5b61153b84848484036112eb565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156115b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115a9906137d5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611622576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161161990613867565b60405180910390fd5b61162d838383611ce9565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156116b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116aa906138f9565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461174691906130c8565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516117aa9190612bde565b60405180910390a36117bd848484611cee565b50505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614801561183f57507f000000000000000000000000000000000000000000000000000000000000000046145b1561186c577f000000000000000000000000000000000000000000000000000000000000000090506118da565b6118d77f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611cfe565b90505b90565b6000808380549050905060005b8181101561195c5760006118fe8284611d38565b9050848682815481106119145761191361322a565b5b9060005260206000200160000160009054906101000a900463ffffffff1663ffffffff16111561194657809250611956565b60018161195391906130c8565b91505b506118ea565b600082146119be578460018361197291906131f6565b815481106119835761198261322a565b5b9060005260206000200160000160049054906101000a90047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166119c1565b60005b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169250505092915050565b6119f38282611d5e565b5050565b611a018282611deb565b5050565b6000611a10836108cd565b90506000611a1d8461099e565b905082600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f60405160405180910390a4611b19828483611e09565b50505050565b600063ffffffff8016821115611b6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b619061398b565b60405180910390fd5b819050919050565b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081600001549050919050565b6000611c59611c536117c3565b83612002565b9050919050565b6000806000611c7187878787612035565b91509150611c7e81612142565b8192505050949350505050565b600080600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050611cd881611c38565b9150611ce381612317565b50919050565b505050565b611cf983838361232d565b505050565b60008383834630604051602001611d199594939291906139ab565b6040516020818303038152906040528051906020012090509392505050565b60006002828418611d499190613a2d565b828416611d5691906130c8565b905092915050565b611d688282612358565b611d706124b8565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16611d966106a0565b1115611dd7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dce90613ad0565b60405180910390fd5b611de560086124dc836124f2565b50505050565b611df5828261276a565b611e036008612941836124f2565b50505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611e455750600081115b15611ffd57600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611f2357600080611ecc600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020612941856124f2565b915091508473ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051611f18929190613af0565b60405180910390a250505b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611ffc57600080611fa5600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206124dc856124f2565b915091508373ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051611ff1929190613af0565b60405180910390a250505b5b505050565b60008282604051602001612017929190613b91565b60405160208183030381529060405280519060200120905092915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c1115612070576000600391509150612139565b601b8560ff16141580156120885750601c8560ff1614155b1561209a576000600491509150612139565b6000600187878787604051600081526020016040526040516120bf9493929190613bc8565b6020604051602081039080840390855afa1580156120e1573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561213057600060019250925050612139565b80600092509250505b94509492505050565b6000600481111561215657612155613c0d565b5b81600481111561216957612168613c0d565b5b141561217457612314565b6001600481111561218857612187613c0d565b5b81600481111561219b5761219a613c0d565b5b14156121dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121d390613c88565b60405180910390fd5b600260048111156121f0576121ef613c0d565b5b81600481111561220357612202613c0d565b5b1415612244576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223b90613cf4565b60405180910390fd5b6003600481111561225857612257613c0d565b5b81600481111561226b5761226a613c0d565b5b14156122ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122a390613d86565b60405180910390fd5b6004808111156122bf576122be613c0d565b5b8160048111156122d2576122d1613c0d565b5b1415612313576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161230a90613e18565b60405180910390fd5b5b50565b6001816000016000828254019250508190555050565b612338838383612957565b612353612344846108cd565b61234d846108cd565b83611e09565b505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156123c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123bf90613e84565b60405180910390fd5b6123d460008383611ce9565b80600260008282546123e691906130c8565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461243b91906130c8565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516124a09190612bde565b60405180910390a36124b460008383611cee565b5050565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff905090565b600081836124ea91906130c8565b905092915050565b60008060008580549050905060008114612560578560018261251491906131f6565b815481106125255761252461322a565b5b9060005260206000200160000160049054906101000a90047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16612563565b60005b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16925061259183858763ffffffff16565b91506000811180156125e4575043866001836125ad91906131f6565b815481106125be576125bd61322a565b5b9060005260206000200160000160009054906101000a900463ffffffff1663ffffffff16145b15612671576125f28261295c565b8660018361260091906131f6565b815481106126115761261061322a565b5b9060005260206000200160000160046101000a8154817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff02191690837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff160217905550612761565b85604051806040016040528061268643611b1f565b63ffffffff16815260200161269a8561295c565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff168152509080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a8154817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff02191690837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16021790555050505b50935093915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156127da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127d190613f16565b60405180910390fd5b6127e682600083611ce9565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561286c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161286390613fa8565b60405180910390fd5b8181036000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600260008282546128c391906131f6565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516129289190612bde565b60405180910390a361293c83600084611cee565b505050565b6000818361294f91906131f6565b905092915050565b505050565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff80168211156129bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129b69061403a565b60405180910390fd5b819050919050565b6040518060400160405280600063ffffffff16815260200160007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1681525090565b600081519050919050565b600082825260208201905092915050565b60005b83811015612a3f578082015181840152602081019050612a24565b83811115612a4e576000848401525b50505050565b6000601f19601f8301169050919050565b6000612a7082612a05565b612a7a8185612a10565b9350612a8a818560208601612a21565b612a9381612a54565b840191505092915050565b60006020820190508181036000830152612ab88184612a65565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612af082612ac5565b9050919050565b612b0081612ae5565b8114612b0b57600080fd5b50565b600081359050612b1d81612af7565b92915050565b6000819050919050565b612b3681612b23565b8114612b4157600080fd5b50565b600081359050612b5381612b2d565b92915050565b60008060408385031215612b7057612b6f612ac0565b5b6000612b7e85828601612b0e565b9250506020612b8f85828601612b44565b9150509250929050565b60008115159050919050565b612bae81612b99565b82525050565b6000602082019050612bc96000830184612ba5565b92915050565b612bd881612b23565b82525050565b6000602082019050612bf36000830184612bcf565b92915050565b600080600060608486031215612c1257612c11612ac0565b5b6000612c2086828701612b0e565b9350506020612c3186828701612b0e565b9250506040612c4286828701612b44565b9150509250925092565b600060ff82169050919050565b612c6281612c4c565b82525050565b6000602082019050612c7d6000830184612c59565b92915050565b6000819050919050565b612c9681612c83565b82525050565b6000602082019050612cb16000830184612c8d565b92915050565b600060208284031215612ccd57612ccc612ac0565b5b6000612cdb84828501612b44565b91505092915050565b600060208284031215612cfa57612cf9612ac0565b5b6000612d0884828501612b0e565b91505092915050565b612d1a81612ae5565b82525050565b6000602082019050612d356000830184612d11565b92915050565b600063ffffffff82169050919050565b612d5481612d3b565b82525050565b6000602082019050612d6f6000830184612d4b565b92915050565b612d7e81612c4c565b8114612d8957600080fd5b50565b600081359050612d9b81612d75565b92915050565b612daa81612c83565b8114612db557600080fd5b50565b600081359050612dc781612da1565b92915050565b60008060008060008060c08789031215612dea57612de9612ac0565b5b6000612df889828a01612b0e565b9650506020612e0989828a01612b44565b9550506040612e1a89828a01612b44565b9450506060612e2b89828a01612d8c565b9350506080612e3c89828a01612db8565b92505060a0612e4d89828a01612db8565b9150509295509295509295565b600080600080600080600060e0888a031215612e7957612e78612ac0565b5b6000612e878a828b01612b0e565b9750506020612e988a828b01612b0e565b9650506040612ea98a828b01612b44565b9550506060612eba8a828b01612b44565b9450506080612ecb8a828b01612d8c565b93505060a0612edc8a828b01612db8565b92505060c0612eed8a828b01612db8565b91505092959891949750929550565b60008060408385031215612f1357612f12612ac0565b5b6000612f2185828601612b0e565b9250506020612f3285828601612b0e565b9150509250929050565b612f4581612d3b565b8114612f5057600080fd5b50565b600081359050612f6281612f3c565b92915050565b60008060408385031215612f7f57612f7e612ac0565b5b6000612f8d85828601612b0e565b9250506020612f9e85828601612f53565b9150509250929050565b612fb181612d3b565b82525050565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff82169050919050565b612fe881612fb7565b82525050565b6040820160008201516130046000850182612fa8565b5060208201516130176020850182612fdf565b50505050565b60006040820190506130326000830184612fee565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061307f57607f821691505b6020821081141561309357613092613038565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006130d382612b23565b91506130de83612b23565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561311357613112613099565b5b828201905092915050565b7f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e656400600082015250565b6000613154601f83612a10565b915061315f8261311e565b602082019050919050565b6000602082019050818103600083015261318381613147565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006131c0602083612a10565b91506131cb8261318a565b602082019050919050565b600060208201905081810360008301526131ef816131b3565b9050919050565b600061320182612b23565b915061320c83612b23565b92508282101561321f5761321e613099565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b60006132b5602583612a10565b91506132c082613259565b604082019050919050565b600060208201905081810360008301526132e4816132a8565b9050919050565b7f4552433230566f7465733a207369676e61747572652065787069726564000000600082015250565b6000613321601d83612a10565b915061332c826132eb565b602082019050919050565b6000602082019050818103600083015261335081613314565b9050919050565b600060808201905061336c6000830187612c8d565b6133796020830186612d11565b6133866040830185612bcf565b6133936060830184612bcf565b95945050505050565b7f4552433230566f7465733a20696e76616c6964206e6f6e636500000000000000600082015250565b60006133d2601983612a10565b91506133dd8261339c565b602082019050919050565b60006020820190508181036000830152613401816133c5565b9050919050565b7f45524332305065726d69743a206578706972656420646561646c696e65000000600082015250565b600061343e601d83612a10565b915061344982613408565b602082019050919050565b6000602082019050818103600083015261346d81613431565b9050919050565b600060c0820190506134896000830189612c8d565b6134966020830188612d11565b6134a36040830187612d11565b6134b06060830186612bcf565b6134bd6080830185612bcf565b6134ca60a0830184612bcf565b979650505050505050565b7f45524332305065726d69743a20696e76616c6964207369676e61747572650000600082015250565b600061350b601e83612a10565b9150613516826134d5565b602082019050919050565b6000602082019050818103600083015261353a816134fe565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061359d602683612a10565b91506135a882613541565b604082019050919050565b600060208201905081810360008301526135cc81613590565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b600061362f602483612a10565b915061363a826135d3565b604082019050919050565b6000602082019050818103600083015261365e81613622565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006136c1602283612a10565b91506136cc82613665565b604082019050919050565b600060208201905081810360008301526136f0816136b4565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b600061372d601d83612a10565b9150613738826136f7565b602082019050919050565b6000602082019050818103600083015261375c81613720565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b60006137bf602583612a10565b91506137ca82613763565b604082019050919050565b600060208201905081810360008301526137ee816137b2565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613851602383612a10565b915061385c826137f5565b604082019050919050565b6000602082019050818103600083015261388081613844565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006138e3602683612a10565b91506138ee82613887565b604082019050919050565b60006020820190508181036000830152613912816138d6565b9050919050565b7f53616665436173743a2076616c756520646f65736e27742066697420696e203360008201527f3220626974730000000000000000000000000000000000000000000000000000602082015250565b6000613975602683612a10565b915061398082613919565b604082019050919050565b600060208201905081810360008301526139a481613968565b9050919050565b600060a0820190506139c06000830188612c8d565b6139cd6020830187612c8d565b6139da6040830186612c8d565b6139e76060830185612bcf565b6139f46080830184612d11565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613a3882612b23565b9150613a4383612b23565b925082613a5357613a526139fe565b5b828204905092915050565b7f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60008201527f766572666c6f77696e6720766f74657300000000000000000000000000000000602082015250565b6000613aba603083612a10565b9150613ac582613a5e565b604082019050919050565b60006020820190508181036000830152613ae981613aad565b9050919050565b6000604082019050613b056000830185612bcf565b613b126020830184612bcf565b9392505050565b600081905092915050565b7f1901000000000000000000000000000000000000000000000000000000000000600082015250565b6000613b5a600283613b19565b9150613b6582613b24565b600282019050919050565b6000819050919050565b613b8b613b8682612c83565b613b70565b82525050565b6000613b9c82613b4d565b9150613ba88285613b7a565b602082019150613bb88284613b7a565b6020820191508190509392505050565b6000608082019050613bdd6000830187612c8d565b613bea6020830186612c59565b613bf76040830185612c8d565b613c046060830184612c8d565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b6000613c72601883612a10565b9150613c7d82613c3c565b602082019050919050565b60006020820190508181036000830152613ca181613c65565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b6000613cde601f83612a10565b9150613ce982613ca8565b602082019050919050565b60006020820190508181036000830152613d0d81613cd1565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b6000613d70602283612a10565b9150613d7b82613d14565b604082019050919050565b60006020820190508181036000830152613d9f81613d63565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202776272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b6000613e02602283612a10565b9150613e0d82613da6565b604082019050919050565b60006020820190508181036000830152613e3181613df5565b9050919050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b6000613e6e601f83612a10565b9150613e7982613e38565b602082019050919050565b60006020820190508181036000830152613e9d81613e61565b9050919050565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000613f00602183612a10565b9150613f0b82613ea4565b604082019050919050565b60006020820190508181036000830152613f2f81613ef3565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b6000613f92602283612a10565b9150613f9d82613f36565b604082019050919050565b60006020820190508181036000830152613fc181613f85565b9050919050565b7f53616665436173743a2076616c756520646f65736e27742066697420696e203260008201527f3234206269747300000000000000000000000000000000000000000000000000602082015250565b6000614024602783612a10565b915061402f82613fc8565b604082019050919050565b6000602082019050818103600083015261405381614017565b905091905056fea264697066735822122045dad6b0baf930a578db6b014d4fbf359073e8c1d7d2777a11b487c012850a4564736f6c634300080c0033" +var GovernanceTokenDeployedBin = "0x608060405234801561001057600080fd5b50600436106101c45760003560e01c8063715018a6116100f9578063a457c2d711610097578063d505accf11610071578063d505accf14610416578063dd62ed3e14610429578063f1127ed81461046f578063f2fde38b146104c157600080fd5b8063a457c2d7146103dd578063a9059cbb146103f0578063c3cda5201461040357600080fd5b80638da5cb5b116100d35780638da5cb5b146103915780638e539e8c146103af57806395d89b41146103c25780639ab24eb0146103ca57600080fd5b8063715018a61461036357806379cc67901461036b5780637ecebe001461037e57600080fd5b80633a46b1a811610166578063587cde1e11610140578063587cde1e146102945780635c19a95c146102f25780636fcfff451461030557806370a082311461032d57600080fd5b80633a46b1a81461025957806340c10f191461026c57806342966c681461028157600080fd5b806323b872dd116101a257806323b872dd1461021c578063313ce5671461022f5780633644e5151461023e578063395093511461024657600080fd5b806306fdde03146101c9578063095ea7b3146101e757806318160ddd1461020a575b600080fd5b6101d16104d4565b6040516101de91906124a2565b60405180910390f35b6101fa6101f536600461253e565b610566565b60405190151581526020016101de565b6002545b6040519081526020016101de565b6101fa61022a366004612568565b61057e565b604051601281526020016101de565b61020e6105a2565b6101fa61025436600461253e565b6105b1565b61020e61026736600461253e565b6105fd565b61027f61027a36600461253e565b6106a3565b005b61027f61028f3660046125a4565b6106b9565b6102cd6102a23660046125bd565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600760205260409020541690565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101de565b61027f6103003660046125bd565b6106c6565b6103186103133660046125bd565b6106d0565b60405163ffffffff90911681526020016101de565b61020e61033b3660046125bd565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b61027f610705565b61027f61037936600461253e565b610719565b61020e61038c3660046125bd565b61072e565b600a5473ffffffffffffffffffffffffffffffffffffffff166102cd565b61020e6103bd3660046125a4565b610759565b6101d16107cf565b61020e6103d83660046125bd565b6107de565b6101fa6103eb36600461253e565b6108a9565b6101fa6103fe36600461253e565b61097a565b61027f6104113660046125e9565b610988565b61027f610424366004612641565b610aff565b61020e6104373660046126ab565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b61048261047d3660046126de565b610cbe565b60408051825163ffffffff1681526020928301517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1692810192909252016101de565b61027f6104cf3660046125bd565b610d64565b6060600380546104e39061271e565b80601f016020809104026020016040519081016040528092919081815260200182805461050f9061271e565b801561055c5780601f106105315761010080835404028352916020019161055c565b820191906000526020600020905b81548152906001019060200180831161053f57829003601f168201915b5050505050905090565b600033610574818585610e18565b5060019392505050565b60003361058c858285610fcb565b6105978585856110a2565b506001949350505050565b60006105ac61135b565b905090565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919061057490829086906105f890879061279b565b610e18565b600043821061066d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e65640060448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260086020526040902061069c908361148f565b9392505050565b6106ab611576565b6106b582826115f7565b5050565b6106c33382611601565b50565b6106c3338261160b565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600860205260408120546106ff906116a9565b92915050565b61070d611576565b6107176000611743565b565b610724823383610fcb565b6106b58282611601565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600560205260408120546106ff565b60004382106107c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e6564006044820152606401610664565b6106ff60098361148f565b6060600480546104e39061271e565b73ffffffffffffffffffffffffffffffffffffffff811660009081526008602052604081205480156108815773ffffffffffffffffffffffffffffffffffffffff8316600090815260086020526040902061083a6001836127b3565b8154811061084a5761084a6127ca565b60009182526020909120015464010000000090047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16610884565b60005b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169392505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091908381101561096d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610664565b6105978286868403610e18565b6000336105748185856110a2565b834211156109f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4552433230566f7465733a207369676e617475726520657870697265640000006044820152606401610664565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf602082015273ffffffffffffffffffffffffffffffffffffffff8816918101919091526060810186905260808101859052600090610a7990610a719060a001604051602081830303815290604052805190602001206117ba565b858585611823565b9050610a848161184b565b8614610aec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e6365000000000000006044820152606401610664565b610af6818861160b565b50505050505050565b83421115610b69576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610664565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888610b988c61184b565b60408051602081019690965273ffffffffffffffffffffffffffffffffffffffff94851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610c00826117ba565b90506000610c1082878787611823565b90508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610ca7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610664565b610cb28a8a8a610e18565b50505050505050505050565b604080518082019091526000808252602082015273ffffffffffffffffffffffffffffffffffffffff83166000908152600860205260409020805463ffffffff8416908110610d0f57610d0f6127ca565b60009182526020918290206040805180820190915291015463ffffffff8116825264010000000090047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16918101919091529392505050565b610d6c611576565b73ffffffffffffffffffffffffffffffffffffffff8116610e0f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610664565b6106c381611743565b73ffffffffffffffffffffffffffffffffffffffff8316610eba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610664565b73ffffffffffffffffffffffffffffffffffffffff8216610f5d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610664565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461109c578181101561108f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610664565b61109c8484848403610e18565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316611145576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610664565b73ffffffffffffffffffffffffffffffffffffffff82166111e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610664565b73ffffffffffffffffffffffffffffffffffffffff83166000908152602081905260409020548181101561129e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610664565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152602081905260408082208585039055918516815290812080548492906112e290849061279b565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161134891815260200190565b60405180910390a361109c848484611885565b60003073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161480156113c157507f000000000000000000000000000000000000000000000000000000000000000046145b156113eb57507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b8154600090815b818110156114f35760006114aa8284611890565b9050848682815481106114bf576114bf6127ca565b60009182526020909120015463ffffffff1611156114df578092506114ed565b6114ea81600161279b565b91505b50611496565b811561154c57846115056001846127b3565b81548110611515576115156127ca565b60009182526020909120015464010000000090047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1661154f565b60005b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1695945050505050565b600a5473ffffffffffffffffffffffffffffffffffffffff163314610717576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610664565b6106b582826118ab565b6106b58282611971565b73ffffffffffffffffffffffffffffffffffffffff8281166000818152600760208181526040808420805485845282862054949093528787167fffffffffffffffffffffffff00000000000000000000000000000000000000008416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a461109c828483611989565b600063ffffffff82111561173f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201527f32206269747300000000000000000000000000000000000000000000000000006064820152608401610664565b5090565b600a805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006106ff6117c761135b565b836040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061183487878787611b2e565b9150915061184181611c46565b5095945050505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526005602052604090208054600181018255905b50919050565b505050565b611880838383611e9f565b600061189f60028484186127f9565b61069c9084841661279b565b6118b58282611ede565b6002547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1015611963576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201527f766572666c6f77696e6720766f746573000000000000000000000000000000006064820152608401610664565b61109c600961200683612012565b61197b82826121f4565b61109c60096123e883612012565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156119c55750600081115b156118805773ffffffffffffffffffffffffffffffffffffffff831615611a7a5773ffffffffffffffffffffffffffffffffffffffff831660009081526008602052604081208190611a1a906123e885612012565b915091508473ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051611a6f929190918252602082015260400190565b60405180910390a250505b73ffffffffffffffffffffffffffffffffffffffff8216156118805773ffffffffffffffffffffffffffffffffffffffff821660009081526008602052604081208190611aca9061200685612012565b915091508373ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051611b1f929190918252602082015260400190565b60405180910390a25050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611b655750600090506003611c3d565b8460ff16601b14158015611b7d57508460ff16601c14155b15611b8e5750600090506004611c3d565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611be2573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611c3657600060019250925050611c3d565b9150600090505b94509492505050565b6000816004811115611c5a57611c5a612834565b1415611c635750565b6001816004811115611c7757611c77612834565b1415611cdf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610664565b6002816004811115611cf357611cf3612834565b1415611d5b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610664565b6003816004811115611d6f57611d6f612834565b1415611dfd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610664565b6004816004811115611e1157611e11612834565b14156106c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610664565b73ffffffffffffffffffffffffffffffffffffffff83811660009081526007602052604080822054858416835291205461188092918216911683611989565b73ffffffffffffffffffffffffffffffffffffffff8216611f5b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610664565b8060026000828254611f6d919061279b565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604081208054839290611fa790849061279b565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a36106b560008383611885565b600061069c828461279b565b825460009081908015612072578561202b6001836127b3565b8154811061203b5761203b6127ca565b60009182526020909120015464010000000090047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16612075565b60005b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1692506120a383858763ffffffff16565b91506000811180156120e1575043866120bd6001846127b3565b815481106120cd576120cd6127ca565b60009182526020909120015463ffffffff16145b1561216b576120ef826123f4565b866120fb6001846127b3565b8154811061210b5761210b6127ca565b9060005260206000200160000160046101000a8154817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff02191690837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1602179055506121eb565b856040518060400160405280612180436116a9565b63ffffffff168152602001612194856123f4565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90811690915282546001810184556000938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b50935093915050565b73ffffffffffffffffffffffffffffffffffffffff8216612297576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610664565b73ffffffffffffffffffffffffffffffffffffffff82166000908152602081905260409020548181101561234d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610664565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604081208383039055600280548492906123899084906127b3565b909155505060405182815260009073ffffffffffffffffffffffffffffffffffffffff8516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a361188083600084611885565b600061069c82846127b3565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff82111561173f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203260448201527f32342062697473000000000000000000000000000000000000000000000000006064820152608401610664565b600060208083528351808285015260005b818110156124cf578581018301518582016040015282016124b3565b818111156124e1576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461253957600080fd5b919050565b6000806040838503121561255157600080fd5b61255a83612515565b946020939093013593505050565b60008060006060848603121561257d57600080fd5b61258684612515565b925061259460208501612515565b9150604084013590509250925092565b6000602082840312156125b657600080fd5b5035919050565b6000602082840312156125cf57600080fd5b61069c82612515565b803560ff8116811461253957600080fd5b60008060008060008060c0878903121561260257600080fd5b61260b87612515565b95506020870135945060408701359350612627606088016125d8565b92506080870135915060a087013590509295509295509295565b600080600080600080600060e0888a03121561265c57600080fd5b61266588612515565b965061267360208901612515565b9550604088013594506060880135935061268f608089016125d8565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156126be57600080fd5b6126c783612515565b91506126d560208401612515565b90509250929050565b600080604083850312156126f157600080fd5b6126fa83612515565b9150602083013563ffffffff8116811461271357600080fd5b809150509250929050565b600181811c9082168061273257607f821691505b6020821081141561187a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082198211156127ae576127ae61276c565b500190565b6000828210156127c5576127c561276c565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008261282f577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea164736f6c634300080c000a" func init() { if err := json.Unmarshal([]byte(GovernanceTokenStorageLayoutJSON), GovernanceTokenStorageLayout); err != nil { diff --git a/op-bindings/bindings/legacyerc20eth_more.go b/op-bindings/bindings/legacyerc20eth_more.go index aac08a3b8a178..8b26294c3f832 100755 --- a/op-bindings/bindings/legacyerc20eth_more.go +++ b/op-bindings/bindings/legacyerc20eth_more.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum-optimism/optimism/op-bindings/solc" ) -const LegacyERC20ETHStorageLayoutJSON = "{\"storage\":[{\"astId\":26811,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_balances\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":26817,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_allowances\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"},{\"astId\":26819,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_totalSupply\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":26821,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_name\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_string_storage\"},{\"astId\":26823,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_symbol\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_string_storage\"},{\"astId\":24078,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"remoteToken\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_address\"},{\"astId\":24081,\"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\":50177,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_balances\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":50183,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_allowances\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"},{\"astId\":50185,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_totalSupply\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":50187,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_name\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_string_storage\"},{\"astId\":50189,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_symbol\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_string_storage\"},{\"astId\":24078,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"remoteToken\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_address\"},{\"astId\":24081,\"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) diff --git a/packages/contracts-bedrock/contracts/L2/GovernanceToken.sol b/packages/contracts-bedrock/contracts/L2/GovernanceToken.sol new file mode 100644 index 0000000000000..ac6842e80f393 --- /dev/null +++ b/packages/contracts-bedrock/contracts/L2/GovernanceToken.sol @@ -0,0 +1,64 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.12; + +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; +import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol"; +import "@openzeppelin/contracts/access/Ownable.sol"; + +/** + * @custom:predeploy 0x4200000000000000000000000000000000000042 + * @title GovernanceToken + * @notice The Optimism token used in governance and supporting voting and delegation. Implements + * EIP 2612 allowing signed approvals. Contract is "owned" by a `MintManager` instance with + * permission to the `mint` function only, for the purposes of enforcing the token inflation + * schedule. + */ +contract GovernanceToken is ERC20Burnable, ERC20Votes, Ownable { + constructor() ERC20("Optimism", "OP") ERC20Permit("Optimism") {} + + /** + * @notice Allows the owner to mint tokens + * + * @param _account The account receiving minted tokens + * @param _amount The amount of tokens to mint + */ + function mint(address _account, uint256 _amount) public onlyOwner { + _mint(_account, _amount); + } + + /** + * @notice Callback called after a token transfer + * + * @param from The account sending tokens + * @param to The account receiving tokens + * @param amount The amount of tokens being transfered + */ + function _afterTokenTransfer( + address from, + address to, + uint256 amount + ) internal override(ERC20, ERC20Votes) { + super._afterTokenTransfer(from, to, amount); + } + + /** + * @notice Internal mint function + * + * @param to The account receiving minted tokens + * @param amount The amount of tokens to mint + */ + function _mint(address to, uint256 amount) internal override(ERC20, ERC20Votes) { + super._mint(to, amount); + } + + /** + * @notice Internal burn function + * + * @param account The account that tokens will be burned from + * @param amount The amount of tokens that will be burned + */ + function _burn(address account, uint256 amount) internal override(ERC20, ERC20Votes) { + super._burn(account, amount); + } +} From a28bfa5651d93e41f02119e92ed10cd5a9b9c811 Mon Sep 17 00:00:00 2001 From: Mark Tyneway Date: Sat, 10 Sep 2022 01:01:16 -0700 Subject: [PATCH 05/32] op-bindings: ensure integrity of artifacts (#3387) Use `hardhat compile` so that it ensures that the artifacts used by the generator are up to date --- op-bindings/Makefile | 2 +- op-bindings/gen_bindings.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/op-bindings/Makefile b/op-bindings/Makefile index 20ebc2ea671cf..8f2b6937f1de0 100644 --- a/op-bindings/Makefile +++ b/op-bindings/Makefile @@ -25,7 +25,7 @@ bindings: l1block-bindings \ compile: cd ../packages/contracts-bedrock/ && \ - forge build -o ./tmp-artifacts + npx hardhat compile l1-cross-domain-messenger-bindings: compile ./gen_bindings.sh contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger $(pkg) diff --git a/op-bindings/gen_bindings.sh b/op-bindings/gen_bindings.sh index a44307fa6ed2c..bbe2206f166a1 100755 --- a/op-bindings/gen_bindings.sh +++ b/op-bindings/gen_bindings.sh @@ -37,9 +37,9 @@ TEMP=$(mktemp -d) CWD=$(pwd) # Build contracts cd ${CONTRACTS_PATH} -forge inspect -o ./tmp-artifacts ${NAME} abi > ${TEMP}/${TYPE}.abi -forge inspect -o ./tmp-artifacts ${NAME} bytecode > ${TEMP}/${TYPE}.bin -forge inspect -o ./tmp-artifacts ${NAME} deployedBytecode > ${CWD}/bin/${TYPE_LOWER}_deployed.hex +forge inspect ${NAME} abi > ${TEMP}/${TYPE}.abi +forge inspect ${NAME} bytecode > ${TEMP}/${TYPE}.bin +forge inspect ${NAME} deployedBytecode > ${CWD}/bin/${TYPE_LOWER}_deployed.hex # Run ABIGEN cd ${CWD} From cee753f4b1b028491a63fc6307f9b394e671a3dc Mon Sep 17 00:00:00 2001 From: Matthew Slipper Date: Sat, 10 Sep 2022 05:56:20 -0600 Subject: [PATCH 06/32] op-node: Add heartbeater (#3391) * op-node: Add heartbeater * Update op-node/heartbeat/service.go Co-authored-by: Joshua Gutow * imports Co-authored-by: Joshua Gutow --- op-node/cmd/main.go | 26 +++++++++++ op-node/flags/flags.go | 20 ++++++++- op-node/heartbeat/service.go | 72 +++++++++++++++++++++++++++++++ op-node/heartbeat/service_test.go | 57 ++++++++++++++++++++++++ op-node/node/config.go | 9 +++- op-node/service.go | 5 +++ 6 files changed, 187 insertions(+), 2 deletions(-) create mode 100644 op-node/heartbeat/service.go create mode 100644 op-node/heartbeat/service_test.go diff --git a/op-node/cmd/main.go b/op-node/cmd/main.go index 08711ef7c1d41..3985e0a265ebc 100644 --- a/op-node/cmd/main.go +++ b/op-node/cmd/main.go @@ -9,6 +9,8 @@ import ( "syscall" "time" + "github.com/ethereum-optimism/optimism/op-node/heartbeat" + "github.com/ethereum-optimism/optimism/op-node/cmd/genesis" "github.com/ethereum-optimism/optimism/op-node/cmd/p2p" @@ -117,6 +119,30 @@ func RollupNodeMain(ctx *cli.Context) error { m.RecordUp() log.Info("Rollup node started") + if cfg.Heartbeat.Enabled { + var peerID string + if cfg.P2P == nil { + peerID = "disabled" + } else { + peerID = n.P2P().Host().ID().String() + } + + beatCtx, beatCtxCancel := context.WithCancel(context.Background()) + payload := &heartbeat.Payload{ + Version: version.Version, + Meta: version.Meta, + Moniker: cfg.Heartbeat.Moniker, + PeerID: peerID, + ChainID: cfg.Rollup.L2ChainID.Uint64(), + } + go func() { + if err := heartbeat.Beat(beatCtx, log, cfg.Heartbeat.URL, payload); err != nil { + log.Error("heartbeat goroutine crashed", "err", err) + } + }() + defer beatCtxCancel() + } + if cfg.Pprof.Enabled { var srv http.Server srv.Addr = net.JoinHostPort(cfg.Pprof.ListenAddr, cfg.Pprof.ListenPort) diff --git a/op-node/flags/flags.go b/op-node/flags/flags.go index ac0879779df95..3d252041ed9cd 100644 --- a/op-node/flags/flags.go +++ b/op-node/flags/flags.go @@ -140,12 +140,27 @@ var ( Value: 6060, EnvVar: prefixEnvVar("PPROF_PORT"), } - SnapshotLog = cli.StringFlag{ Name: "snapshotlog.file", Usage: "Path to the snapshot log file", EnvVar: prefixEnvVar("SNAPSHOT_LOG"), } + HeartbeatEnabledFlag = cli.BoolFlag{ + Name: "heartbeat.enabled", + Usage: "Enables or disables heartbeating", + EnvVar: prefixEnvVar("HEARTBEAT_ENABLED"), + } + HeartbeatMonikerFlag = cli.StringFlag{ + Name: "heartbeat.moniker", + Usage: "Sets a moniker for this node", + EnvVar: prefixEnvVar("HEARTBEAT_MONIKER"), + } + HeartbeatURLFlag = cli.StringFlag{ + Name: "heartbeat.url", + Usage: "Sets the URL to heartbeat to", + EnvVar: prefixEnvVar("HEARTBEAT_URL"), + Value: "https://heartbeat.bedrock-goerli.optimism.io", + } ) var requiredFlags = []cli.Flag{ @@ -174,6 +189,9 @@ var optionalFlags = append([]cli.Flag{ PprofAddrFlag, PprofPortFlag, SnapshotLog, + HeartbeatEnabledFlag, + HeartbeatMonikerFlag, + HeartbeatURLFlag, }, p2pFlags...) // Flags contains the list of configuration options available to the binary. diff --git a/op-node/heartbeat/service.go b/op-node/heartbeat/service.go new file mode 100644 index 0000000000000..132184adef5f9 --- /dev/null +++ b/op-node/heartbeat/service.go @@ -0,0 +1,72 @@ +package heartbeat + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "net/http" + "time" + + "github.com/ethereum/go-ethereum/log" +) + +var SendInterval = 10 * time.Minute + +type Payload struct { + Version string `json:"version"` + Meta string `json:"meta"` + Moniker string `json:"moniker"` + PeerID string `json:"peerID"` + ChainID uint64 `json:"chainID"` +} + +func Beat( + ctx context.Context, + log log.Logger, + url string, + payload *Payload, +) error { + payloadJSON, err := json.Marshal(payload) + if err != nil { + return fmt.Errorf("telemetry crashed: %w", err) + } + + client := &http.Client{ + Timeout: 10 * time.Second, + } + + send := func() { + req, err := http.NewRequestWithContext(ctx, "POST", url, bytes.NewReader(payloadJSON)) + req.Header.Set("Content-Type", "application/json") + if err != nil { + log.Error("error creating heartbeat HTTP request", "err", err) + return + } + res, err := client.Do(req) + if err != nil { + log.Warn("error sending heartbeat", "err", err) + return + } + res.Body.Close() + + if res.StatusCode < 200 || res.StatusCode > 204 { + log.Warn("heartbeat server returned non-200 status code", "status", res.StatusCode) + return + } + + log.Info("sent heartbeat") + } + + send() + tick := time.NewTicker(SendInterval) + defer tick.Stop() + for { + select { + case <-tick.C: + send() + case <-ctx.Done(): + return nil + } + } +} diff --git a/op-node/heartbeat/service_test.go b/op-node/heartbeat/service_test.go new file mode 100644 index 0000000000000..0ddf38d942d65 --- /dev/null +++ b/op-node/heartbeat/service_test.go @@ -0,0 +1,57 @@ +package heartbeat + +import ( + "context" + "io" + "net/http" + "net/http/httptest" + "testing" + "time" + + "github.com/ethereum/go-ethereum/log" + "github.com/stretchr/testify/require" +) + +const expHeartbeat = `{ + "version": "v1.2.3", + "meta": "meta", + "moniker": "yeet", + "peerID": "1UiUfoobar", + "chainID": 1234 +}` + +func TestBeat(t *testing.T) { + ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second) + defer cancel() + + reqCh := make(chan string, 2) + s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(204) + body, err := io.ReadAll(r.Body) + require.NoError(t, err) + reqCh <- string(body) + r.Body.Close() + })) + defer s.Close() + + doneCh := make(chan struct{}) + go func() { + _ = Beat(ctx, log.Root(), s.URL, &Payload{ + Version: "v1.2.3", + Meta: "meta", + Moniker: "yeet", + PeerID: "1UiUfoobar", + ChainID: 1234, + }) + doneCh <- struct{}{} + }() + + select { + case hb := <-reqCh: + require.JSONEq(t, expHeartbeat, hb) + cancel() + <-doneCh + case <-ctx.Done(): + t.Fatalf("error: %v", ctx.Err()) + } +} diff --git a/op-node/node/config.go b/op-node/node/config.go index 5c10ff5656166..e52f8508f6f4b 100644 --- a/op-node/node/config.go +++ b/op-node/node/config.go @@ -35,7 +35,8 @@ type Config struct { L1EpochPollInterval time.Duration // Optional - Tracer Tracer + Tracer Tracer + Heartbeat HeartbeatConfig } type RPCConfig struct { @@ -76,6 +77,12 @@ func (p PprofConfig) Check() error { return nil } +type HeartbeatConfig struct { + Enabled bool + Moniker string + URL string +} + // Check verifies that the given configuration makes sense func (cfg *Config) Check() error { if err := cfg.L2.Check(); err != nil { diff --git a/op-node/service.go b/op-node/service.go index b237ed76d4b44..86e1767266295 100644 --- a/op-node/service.go +++ b/op-node/service.go @@ -81,6 +81,11 @@ func NewConfig(ctx *cli.Context, log log.Logger) (*node.Config, error) { P2P: p2pConfig, P2PSigner: p2pSignerSetup, L1EpochPollInterval: ctx.GlobalDuration(flags.L1EpochPollIntervalFlag.Name), + Heartbeat: node.HeartbeatConfig{ + Enabled: ctx.GlobalBool(flags.HeartbeatEnabledFlag.Name), + Moniker: ctx.GlobalString(flags.HeartbeatMonikerFlag.Name), + URL: ctx.GlobalString(flags.HeartbeatURLFlag.Name), + }, } if err := cfg.Check(); err != nil { return nil, err From e965517ac68371851be35b60011e97c1b96cad21 Mon Sep 17 00:00:00 2001 From: protolambda Date: Sat, 10 Sep 2022 15:10:41 +0200 Subject: [PATCH 07/32] op-node: config that disables itself should not init further (#3395) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- op-node/node/node.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op-node/node/node.go b/op-node/node/node.go index 37b19102ed868..e331ea1b84cc3 100644 --- a/op-node/node/node.go +++ b/op-node/node/node.go @@ -198,7 +198,7 @@ func (n *OpNode) initMetricsServer(ctx context.Context, cfg *Config) error { func (n *OpNode) initP2P(ctx context.Context, cfg *Config) error { if cfg.P2P != nil { p2pNode, err := p2p.NewNodeP2P(n.resourcesCtx, &cfg.Rollup, n.log, cfg.P2P, n) - if err != nil { + if err != nil || p2pNode == nil { return err } n.p2pNode = p2pNode From 545ed8dec19fc0c900ac8b6c5c9d4d0add80e519 Mon Sep 17 00:00:00 2001 From: Matthew Slipper Date: Sat, 10 Sep 2022 08:47:04 -0600 Subject: [PATCH 08/32] op-node: Fix block numbe rin rollup config generation (#3399) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- op-node/cmd/genesis/cmd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op-node/cmd/genesis/cmd.go b/op-node/cmd/genesis/cmd.go index 4228e9d21dc41..b228ac9b00a1b 100644 --- a/op-node/cmd/genesis/cmd.go +++ b/op-node/cmd/genesis/cmd.go @@ -182,7 +182,7 @@ func makeRollupConfig( Genesis: rollup.Genesis{ L1: eth.BlockID{ Hash: l1StartBlock.Hash(), - Number: 0, + Number: l1StartBlock.NumberU64(), }, L2: eth.BlockID{ Hash: l2Genesis.ToBlock().Hash(), From 6162238af79604cf191957edec03cfc3899db675 Mon Sep 17 00:00:00 2001 From: protolambda Date: Sat, 10 Sep 2022 16:51:42 +0200 Subject: [PATCH 09/32] op-node: handle when engine changes safe head unexpectedly (#3397) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- op-node/rollup/derive/engine_queue.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/op-node/rollup/derive/engine_queue.go b/op-node/rollup/derive/engine_queue.go index 040802c057495..71bbc6914c8a9 100644 --- a/op-node/rollup/derive/engine_queue.go +++ b/op-node/rollup/derive/engine_queue.go @@ -302,6 +302,10 @@ func (eq *EngineQueue) consolidateNextSafeAttributes(ctx context.Context) error payload, err := eq.engine.PayloadByNumber(ctx, eq.safeHead.Number+1) if err != nil { + if errors.Is(err, ethereum.NotFound) { + // engine may have restarted, or inconsistent safe head. We need to reset + return NewResetError(fmt.Errorf("expected engine was synced and had unsafe block to reconcile, but cannot find the block: %w", err)) + } return NewTemporaryError(fmt.Errorf("failed to get existing unsafe payload to compare against derived attributes from L1: %w", err)) } if err := AttributesMatchBlock(eq.safeAttributes[0], eq.safeHead.Hash, payload); err != nil { From 7fdc490c5f740ed87f7d7cb620bf6a9043d7356d Mon Sep 17 00:00:00 2001 From: Kelvin Fichter Date: Sat, 10 Sep 2022 14:19:52 +0200 Subject: [PATCH 10/32] feat(ctb): make StandardBridge vars immutable Updates the StandardBridge to use immutable variables instead of state variables. Primary reason for this change is to guarantee that the storage layout will not be a problem during the upgrade. Plus, there's really no reason why these variables shouldn't be immutable. --- .changeset/brave-glasses-dress.md | 5 + .../bindings/deployerwhitelist_more.go | 2 +- op-bindings/bindings/erc20.go | 2 +- op-bindings/bindings/gaspriceoracle_more.go | 2 +- op-bindings/bindings/l1block_more.go | 2 +- op-bindings/bindings/l1standardbridge.go | 159 +----------------- .../bindings/l2crossdomainmessenger_more.go | 2 +- op-bindings/bindings/l2standardbridge.go | 159 +----------------- op-bindings/bindings/l2standardbridge_more.go | 4 +- .../bindings/l2tol1messagepasser_more.go | 2 +- op-bindings/bindings/legacyerc20eth_more.go | 2 +- op-bindings/bindings/optimismportal_more.go | 2 +- .../bindings/sequencerfeevault_more.go | 2 +- op-chain-ops/genesis/config.go | 19 ++- op-chain-ops/genesis/layer_one.go | 10 +- op-chain-ops/genesis/layer_two.go | 12 +- op-chain-ops/genesis/setters.go | 4 +- op-chain-ops/immutables/immutables.go | 20 ++- op-chain-ops/immutables/immutables_test.go | 7 +- packages/contracts-bedrock/.gas-snapshot | 52 +++--- packages/contracts-bedrock/.gitignore | 1 + .../contracts/L1/L1StandardBridge.sol | 18 +- .../contracts/L2/L2StandardBridge.sol | 18 +- .../contracts/test/CommonTest.t.sol | 4 +- .../contracts/universal/StandardBridge.sol | 43 ++--- .../deploy/001-InitImplementations.deploy.ts | 13 +- .../contracts-bedrock/tasks/genesis-l2.ts | 8 +- 27 files changed, 143 insertions(+), 431 deletions(-) create mode 100644 .changeset/brave-glasses-dress.md diff --git a/.changeset/brave-glasses-dress.md b/.changeset/brave-glasses-dress.md new file mode 100644 index 0000000000000..d38d79912d8ee --- /dev/null +++ b/.changeset/brave-glasses-dress.md @@ -0,0 +1,5 @@ +--- +'@eth-optimism/contracts-bedrock': minor +--- + +Removes initializer from StandardBridge in favor of immutables diff --git a/op-bindings/bindings/deployerwhitelist_more.go b/op-bindings/bindings/deployerwhitelist_more.go index 69d40a2b4398a..2c0eb958e2027 100755 --- a/op-bindings/bindings/deployerwhitelist_more.go +++ b/op-bindings/bindings/deployerwhitelist_more.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum-optimism/optimism/op-bindings/solc" ) -const DeployerWhitelistStorageLayoutJSON = "{\"storage\":[{\"astId\":2700,\"contract\":\"contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist\",\"label\":\"owner\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":2705,\"contract\":\"contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist\",\"label\":\"whitelist\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_mapping(t_address,t_bool)\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_mapping(t_address,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_bool\"}}}" +const DeployerWhitelistStorageLayoutJSON = "{\"storage\":[{\"astId\":2672,\"contract\":\"contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist\",\"label\":\"owner\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":2677,\"contract\":\"contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist\",\"label\":\"whitelist\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_mapping(t_address,t_bool)\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_mapping(t_address,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_bool\"}}}" var DeployerWhitelistStorageLayout = new(solc.StorageLayout) diff --git a/op-bindings/bindings/erc20.go b/op-bindings/bindings/erc20.go index 766f6eb69b117..67a5950ed1e01 100644 --- a/op-bindings/bindings/erc20.go +++ b/op-bindings/bindings/erc20.go @@ -31,7 +31,7 @@ var ( // ERC20MetaData contains all meta data concerning the ERC20 contract. var ERC20MetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60806040523480156200001157600080fd5b5060405162000e3c38038062000e3c833981016040819052620000349162000127565b600362000042838262000220565b50600462000051828262000220565b505050620002ec565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008257600080fd5b81516001600160401b03808211156200009f576200009f6200005a565b604051601f8301601f19908116603f01168101908282118183101715620000ca57620000ca6200005a565b81604052838152602092508683858801011115620000e757600080fd5b600091505b838210156200010b5785820183015181830184015290820190620000ec565b838211156200011d5760008385830101525b9695505050505050565b600080604083850312156200013b57600080fd5b82516001600160401b03808211156200015357600080fd5b620001618683870162000070565b935060208501519150808211156200017857600080fd5b50620001878582860162000070565b9150509250929050565b600181811c90821680620001a657607f821691505b602082108103620001c757634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021b57600081815260208120601f850160051c81016020861015620001f65750805b601f850160051c820191505b81811015620002175782815560010162000202565b5050505b505050565b81516001600160401b038111156200023c576200023c6200005a565b62000254816200024d845462000191565b84620001cd565b602080601f8311600181146200028c5760008415620002735750858301515b600019600386901b1c1916600185901b17855562000217565b600085815260208120601f198616915b82811015620002bd578886015182559484019460019091019084016200029c565b5085821015620002dc5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b610b4080620002fc6000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80633950935111610081578063a457c2d71161005b578063a457c2d714610194578063a9059cbb146101a7578063dd62ed3e146101ba57600080fd5b8063395093511461014357806370a082311461015657806395d89b411461018c57600080fd5b806318160ddd116100b257806318160ddd1461010f57806323b872dd14610121578063313ce5671461013457600080fd5b806306fdde03146100ce578063095ea7b3146100ec575b600080fd5b6100d6610200565b6040516100e3919061094a565b60405180910390f35b6100ff6100fa3660046109e6565b610292565b60405190151581526020016100e3565b6002545b6040519081526020016100e3565b6100ff61012f366004610a10565b6102aa565b604051601281526020016100e3565b6100ff6101513660046109e6565b6102ce565b610113610164366004610a4c565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6100d661031a565b6100ff6101a23660046109e6565b610329565b6100ff6101b53660046109e6565b6103ff565b6101136101c8366004610a6e565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b60606003805461020f90610aa1565b80601f016020809104026020016040519081016040528092919081815260200182805461023b90610aa1565b80156102885780601f1061025d57610100808354040283529160200191610288565b820191906000526020600020905b81548152906001019060200180831161026b57829003601f168201915b5050505050905090565b6000336102a081858561040d565b5060019392505050565b6000336102b88582856105c0565b6102c3858585610697565b506001949350505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091906102a09082908690610315908790610af4565b61040d565b60606004805461020f90610aa1565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168452909152812054909190838110156103f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6102c3828686840361040d565b6000336102a0818585610697565b73ffffffffffffffffffffffffffffffffffffffff83166104af576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016103e9565b73ffffffffffffffffffffffffffffffffffffffff8216610552576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016103e9565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146106915781811015610684576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016103e9565b610691848484840361040d565b50505050565b73ffffffffffffffffffffffffffffffffffffffff831661073a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016103e9565b73ffffffffffffffffffffffffffffffffffffffff82166107dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016103e9565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610893576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016103e9565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152602081905260408082208585039055918516815290812080548492906108d7908490610af4565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161093d91815260200190565b60405180910390a3610691565b600060208083528351808285015260005b818110156109775785810183015185820160400152820161095b565b81811115610989576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146109e157600080fd5b919050565b600080604083850312156109f957600080fd5b610a02836109bd565b946020939093013593505050565b600080600060608486031215610a2557600080fd5b610a2e846109bd565b9250610a3c602085016109bd565b9150604084013590509250925092565b600060208284031215610a5e57600080fd5b610a67826109bd565b9392505050565b60008060408385031215610a8157600080fd5b610a8a836109bd565b9150610a98602084016109bd565b90509250929050565b600181811c90821680610ab557607f821691505b602082108103610aee577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60008219821115610b2e577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50019056fea164736f6c634300080f000a", + Bin: "0x60806040523480156200001157600080fd5b5060405162000dd338038062000dd38339810160408190526200003491620001db565b81516200004990600390602085019062000068565b5080516200005f90600490602084019062000068565b50505062000282565b828054620000769062000245565b90600052602060002090601f0160209004810192826200009a5760008555620000e5565b82601f10620000b557805160ff1916838001178555620000e5565b82800160010185558215620000e5579182015b82811115620000e5578251825591602001919060010190620000c8565b50620000f3929150620000f7565b5090565b5b80821115620000f35760008155600101620000f8565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200013657600080fd5b81516001600160401b03808211156200015357620001536200010e565b604051601f8301601f19908116603f011681019082821181831017156200017e576200017e6200010e565b816040528381526020925086838588010111156200019b57600080fd5b600091505b83821015620001bf5785820183015181830184015290820190620001a0565b83821115620001d15760008385830101525b9695505050505050565b60008060408385031215620001ef57600080fd5b82516001600160401b03808211156200020757600080fd5b620002158683870162000124565b935060208501519150808211156200022c57600080fd5b506200023b8582860162000124565b9150509250929050565b600181811c908216806200025a57607f821691505b602082108114156200027c57634e487b7160e01b600052602260045260246000fd5b50919050565b610b4180620002926000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80633950935111610081578063a457c2d71161005b578063a457c2d714610194578063a9059cbb146101a7578063dd62ed3e146101ba57600080fd5b8063395093511461014357806370a082311461015657806395d89b411461018c57600080fd5b806318160ddd116100b257806318160ddd1461010f57806323b872dd14610121578063313ce5671461013457600080fd5b806306fdde03146100ce578063095ea7b3146100ec575b600080fd5b6100d6610200565b6040516100e3919061094a565b60405180910390f35b6100ff6100fa3660046109e6565b610292565b60405190151581526020016100e3565b6002545b6040519081526020016100e3565b6100ff61012f366004610a10565b6102aa565b604051601281526020016100e3565b6100ff6101513660046109e6565b6102ce565b610113610164366004610a4c565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6100d661031a565b6100ff6101a23660046109e6565b610329565b6100ff6101b53660046109e6565b6103ff565b6101136101c8366004610a6e565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b60606003805461020f90610aa1565b80601f016020809104026020016040519081016040528092919081815260200182805461023b90610aa1565b80156102885780601f1061025d57610100808354040283529160200191610288565b820191906000526020600020905b81548152906001019060200180831161026b57829003601f168201915b5050505050905090565b6000336102a081858561040d565b5060019392505050565b6000336102b88582856105c0565b6102c3858585610697565b506001949350505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091906102a09082908690610315908790610af5565b61040d565b60606004805461020f90610aa1565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168452909152812054909190838110156103f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6102c3828686840361040d565b6000336102a0818585610697565b73ffffffffffffffffffffffffffffffffffffffff83166104af576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016103e9565b73ffffffffffffffffffffffffffffffffffffffff8216610552576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016103e9565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146106915781811015610684576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016103e9565b610691848484840361040d565b50505050565b73ffffffffffffffffffffffffffffffffffffffff831661073a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016103e9565b73ffffffffffffffffffffffffffffffffffffffff82166107dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016103e9565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610893576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016103e9565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152602081905260408082208585039055918516815290812080548492906108d7908490610af5565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161093d91815260200190565b60405180910390a3610691565b600060208083528351808285015260005b818110156109775785810183015185820160400152820161095b565b81811115610989576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146109e157600080fd5b919050565b600080604083850312156109f957600080fd5b610a02836109bd565b946020939093013593505050565b600080600060608486031215610a2557600080fd5b610a2e846109bd565b9250610a3c602085016109bd565b9150604084013590509250925092565b600060208284031215610a5e57600080fd5b610a67826109bd565b9392505050565b60008060408385031215610a8157600080fd5b610a8a836109bd565b9150610a98602084016109bd565b90509250929050565b600181811c90821680610ab557607f821691505b60208210811415610aef577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60008219821115610b2f577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50019056fea164736f6c634300080c000a", } // ERC20ABI is the input ABI used to generate the binding from. diff --git a/op-bindings/bindings/gaspriceoracle_more.go b/op-bindings/bindings/gaspriceoracle_more.go index 3a871b3f8ebd5..e947bcfbc7bd1 100755 --- a/op-bindings/bindings/gaspriceoracle_more.go +++ b/op-bindings/bindings/gaspriceoracle_more.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum-optimism/optimism/op-bindings/solc" ) -const GasPriceOracleStorageLayoutJSON = "{\"storage\":[{\"astId\":50056,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":1663,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer0\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"},{\"astId\":1666,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer1\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":1669,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"overhead\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_uint256\"},{\"astId\":1672,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"scalar\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_uint256\"},{\"astId\":1675,\"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\":26637,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":1649,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer0\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"},{\"astId\":1652,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer1\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":1655,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"overhead\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_uint256\"},{\"astId\":1658,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"scalar\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_uint256\"},{\"astId\":1661,\"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) diff --git a/op-bindings/bindings/l1block_more.go b/op-bindings/bindings/l1block_more.go index dbbf17f13a626..6995d8404decf 100755 --- a/op-bindings/bindings/l1block_more.go +++ b/op-bindings/bindings/l1block_more.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum-optimism/optimism/op-bindings/solc" ) -const L1BlockStorageLayoutJSON = "{\"storage\":[{\"astId\":1909,\"contract\":\"contracts/L2/L1Block.sol:L1Block\",\"label\":\"number\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint64\"},{\"astId\":1912,\"contract\":\"contracts/L2/L1Block.sol:L1Block\",\"label\":\"timestamp\",\"offset\":8,\"slot\":\"0\",\"type\":\"t_uint64\"},{\"astId\":1915,\"contract\":\"contracts/L2/L1Block.sol:L1Block\",\"label\":\"basefee\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"},{\"astId\":1918,\"contract\":\"contracts/L2/L1Block.sol:L1Block\",\"label\":\"hash\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_bytes32\"},{\"astId\":1921,\"contract\":\"contracts/L2/L1Block.sol:L1Block\",\"label\":\"sequenceNumber\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_uint64\"}],\"types\":{\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint64\":{\"encoding\":\"inplace\",\"label\":\"uint64\",\"numberOfBytes\":\"8\"}}}" +const L1BlockStorageLayoutJSON = "{\"storage\":[{\"astId\":1895,\"contract\":\"contracts/L2/L1Block.sol:L1Block\",\"label\":\"number\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint64\"},{\"astId\":1898,\"contract\":\"contracts/L2/L1Block.sol:L1Block\",\"label\":\"timestamp\",\"offset\":8,\"slot\":\"0\",\"type\":\"t_uint64\"},{\"astId\":1901,\"contract\":\"contracts/L2/L1Block.sol:L1Block\",\"label\":\"basefee\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"},{\"astId\":1904,\"contract\":\"contracts/L2/L1Block.sol:L1Block\",\"label\":\"hash\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_bytes32\"},{\"astId\":1907,\"contract\":\"contracts/L2/L1Block.sol:L1Block\",\"label\":\"sequenceNumber\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_uint64\"}],\"types\":{\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint64\":{\"encoding\":\"inplace\",\"label\":\"uint64\",\"numberOfBytes\":\"8\"}}}" var L1BlockStorageLayout = new(solc.StorageLayout) diff --git a/op-bindings/bindings/l1standardbridge.go b/op-bindings/bindings/l1standardbridge.go index 2f8d5cdd1febd..431ce2f112740 100644 --- a/op-bindings/bindings/l1standardbridge.go +++ b/op-bindings/bindings/l1standardbridge.go @@ -30,8 +30,8 @@ var ( // L1StandardBridgeMetaData contains all meta data concerning the L1StandardBridge contract. var L1StandardBridgeMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"_messenger\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20BridgeFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20BridgeFinalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20BridgeInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20DepositInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20WithdrawalFinalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ETHBridgeFinalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ETHBridgeInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ETHDepositInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ETHWithdrawalFinalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_localToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"bridgeERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_localToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"bridgeERC20To\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"bridgeETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"bridgeETHTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_localToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"completeOutboundTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"depositERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"depositERC20To\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"depositETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"depositETHTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"deposits\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_localToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"finalizeBridgeERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"finalizeBridgeETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"finalizeERC20Withdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"finalizeETHWithdrawal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"_messenger\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2TokenBridge\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"contractCrossDomainMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"otherBridge\",\"outputs\":[{\"internalType\":\"contractStandardBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x60e06040523480156200001157600080fd5b50604051620032f2380380620032f2833981016040819052620000349162000254565b6000608081905260a052600160c0526200004e8162000055565b5062000286565b600054610100900460ff1615808015620000765750600054600160ff909116105b80620000a6575062000093306200019e60201b620004961760201c565b158015620000a6575060005460ff166001145b6200010f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801562000133576000805461ff0019166101001790555b6200015382734200000000000000000000000000000000000010620001ad565b80156200019a576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b6001600160a01b03163b151590565b600054610100900460ff166200021a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840162000106565b6000805462010000600160b01b031916620100006001600160a01b0394851602179055600180546001600160a01b03191691909216179055565b6000602082840312156200026757600080fd5b81516001600160a01b03811681146200027f57600080fd5b9392505050565b60805160a05160c05161303c620002b660003960006110cf015260006110a60152600061107d015261303c6000f3fe6080604052600436106101485760003560e01c806387087623116100c0578063af565a1311610074578063c4d66de811610059578063c4d66de814610436578063c89701a214610456578063e11013dd1461048357600080fd5b8063af565a1314610403578063b1a1a8821461042357600080fd5b806391c49bf8116100a557806391c49bf8146103a55780639a2ac6d5146103d0578063a9f9e675146103e357600080fd5b8063870876231461033f5780638f601f661461035f57600080fd5b80633cb747bf1161011757806354fd4d50116100fc57806354fd4d50146102dd57806358a997f6146102ff578063838b25201461031f57600080fd5b80633cb747bf14610260578063540abf73146102bd57600080fd5b80630166a07a1461020757806309fc8843146102275780631532ec341461023a5780631635f5fd1461024d57600080fd5b3661020257333b156101e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084015b60405180910390fd5b61020033333462030d40604051806020016040528060008152506104b2565b005b600080fd5b34801561021357600080fd5b50610200610222366004612869565b61064e565b61020061023536600461291a565b610999565b61020061024836600461296d565b610a70565b61020061025b36600461296d565b610c81565b34801561026c57600080fd5b506000546102939062010000900473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156102c957600080fd5b506102006102d83660046129e0565b611066565b3480156102e957600080fd5b506102f2611076565b6040516102b49190612acd565b34801561030b57600080fd5b5061020061031a366004612ae0565b611119565b34801561032b57600080fd5b5061020061033a3660046129e0565b6111b8565b34801561034b57600080fd5b5061020061035a366004612ae0565b6111c8565b34801561036b57600080fd5b5061039761037a366004612b63565b600260209081526000928352604080842090915290825290205481565b6040519081526020016102b4565b3480156103b157600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff16610293565b6102006103de366004612b9c565b611267565b3480156103ef57600080fd5b506102006103fe366004612869565b61127a565b34801561040f57600080fd5b5061020061041e366004612bff565b61149f565b61020061043136600461291a565b6117ac565b34801561044257600080fd5b50610200610451366004612c50565b611848565b34801561046257600080fd5b506001546102939073ffffffffffffffffffffffffffffffffffffffff1681565b610200610491366004612b9c565b6119f1565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f2849b43074093a05396b6f2a937dee8565b15a48a7b3d4bffb732a5017380af58584604051610511929190612c6d565b60405180910390a360005460015460405173ffffffffffffffffffffffffffffffffffffffff62010000909304831692633dbb202b9287929116907f1635f5fd0000000000000000000000000000000000000000000000000000000090610582908b908b9086908a90602401612c86565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e086901b909216825261061592918890600401612ccf565b6000604051808303818588803b15801561062e57600080fd5b505af1158015610642573d6000803e3d6000fd5b50505050505050505050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff16331480156107305750600154600054604080517f6e296e45000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff938416936201000090930490921691636e296e45916004808201926020929091908290030181865afa1580156106f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107189190612d14565b73ffffffffffffffffffffffffffffffffffffffff16145b6107e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101d8565b6040517faf565a1300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808916600483015280881660248301528516604482015260648101849052309063af565a1390608401600060405180830381600087803b15801561086057600080fd5b505af1925050508015610871575060015b61090d57610886878786888760008888611a34565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f2755817676249910615f0a6a240ad225abe5343df8d527f7294c4af36a92009a878787876040516109009493929190612d7a565b60405180910390a4610990565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fd59c65b35445225835c83f50b6ede06a7be047d22e357073e250d9af537518cd878787876040516109879493929190612d7a565b60405180910390a45b50505050505050565b333b15610a28576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101d8565b610a6b3333348686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506104b292505050565b505050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff1633148015610b525750600154600054604080517f6e296e45000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff938416936201000090930490921691636e296e45916004808201926020929091908290030181865afa158015610b16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3a9190612d14565b73ffffffffffffffffffffffffffffffffffffffff16145b610c04576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101d8565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f2ac69ee804d9a7a0984249f508dfab7cb2534b465b6ce1580f99a38ba9c5e631858585604051610c6593929190612db0565b60405180910390a3610c7a8585858585610c81565b5050505050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff1633148015610d635750600154600054604080517f6e296e45000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff938416936201000090930490921691636e296e45916004808201926020929091908290030181865afa158015610d27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4b9190612d14565b73ffffffffffffffffffffffffffffffffffffffff16145b610e15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101d8565b823414610ea4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5374616e646172644272696467653a20616d6f756e742073656e7420646f657360448201527f206e6f74206d6174636820616d6f756e7420726571756972656400000000000060648201526084016101d8565b3073ffffffffffffffffffffffffffffffffffffffff851603610f49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a2063616e6e6f742073656e6420746f207360448201527f656c66000000000000000000000000000000000000000000000000000000000060648201526084016101d8565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f31b2166ff604fc5672ea5df08a78081d2bc6d746cadce880747f3643d819e83d858585604051610faa93929190612db0565b60405180910390a36000610fcf855a8660405180602001604052806000815250611bf1565b90508061105e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a20455448207472616e736665722066616960448201527f6c6564000000000000000000000000000000000000000000000000000000000060648201526084016101d8565b505050505050565b6109908787338888888888611c0b565b60606110a17f0000000000000000000000000000000000000000000000000000000000000000611eb5565b6110ca7f0000000000000000000000000000000000000000000000000000000000000000611eb5565b6110f37f0000000000000000000000000000000000000000000000000000000000000000611eb5565b60405160200161110593929190612dd3565b604051602081830303815290604052905090565b333b156111a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101d8565b61105e8686333388888888611ff2565b6109908787338888888888611ff2565b333b15611257576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101d8565b61105e8686333388888888611c0b565b6112743385858585612084565b50505050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff163314801561135c5750600154600054604080517f6e296e45000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff938416936201000090930490921691636e296e45916004808201926020929091908290030181865afa158015611320573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113449190612d14565b73ffffffffffffffffffffffffffffffffffffffff16145b61140e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101d8565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f3ceee06c1e37648fcbb6ed52e17b3e1f275a1f8c7b22a84b2b84732431e046b3878787876040516114889493929190612d7a565b60405180910390a46109908787878787878761064e565b33301461152e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642062792073656c660000000000000000000000000060648201526084016101d8565b3073ffffffffffffffffffffffffffffffffffffffff8516036115d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5374616e646172644272696467653a206c6f63616c20746f6b656e2063616e6e60448201527f6f742062652073656c660000000000000000000000000000000000000000000060648201526084016101d8565b6115dc84612130565b1561172a576115eb8484612162565b61169d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a4016101d8565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390528516906340c10f1990604401600060405180830381600087803b15801561170d57600080fd5b505af1158015611721573d6000803e3d6000fd5b50505050611274565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260026020908152604080832093871683529290522054611768908290612e78565b73ffffffffffffffffffffffffffffffffffffffff808616600081815260026020908152604080832094891683529390529190912091909155611274908383612209565b333b1561183b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101d8565b610a6b3333858585612084565b600054610100900460ff16158080156118685750600054600160ff909116105b806118825750303b158015611882575060005460ff166001145b61190e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016101d8565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561196c57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b61198a827342000000000000000000000000000000000000106122dd565b80156119ed57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b6112743385348686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506104b292505050565b60005460015460405173ffffffffffffffffffffffffffffffffffffffff62010000909304831692633dbb202b9216907f0166a07a0000000000000000000000000000000000000000000000000000000090611aa0908c908e908d908d908d908c908c90602401612e8f565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e085901b9092168252611b3392918890600401612ccf565b600060405180830381600087803b158015611b4d57600080fd5b505af1158015611b61573d6000803e3d6000fd5b505050508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167f7ff126db8024424bbfd9826e8ab82ff59136289ea440b04b39a0df1b03b9cabf88888787604051611bdf9493929190612d7a565b60405180910390a45050505050505050565b600080600080845160208601878a8af19695505050505050565b3073ffffffffffffffffffffffffffffffffffffffff891603611cb0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5374616e646172644272696467653a206c6f63616c20746f6b656e2063616e6e60448201527f6f742062652073656c660000000000000000000000000000000000000000000060648201526084016101d8565b611cb988612130565b15611e0757611cc88888612162565b611d7a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a4016101d8565b6040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015260248201869052891690639dc29fac90604401600060405180830381600087803b158015611dea57600080fd5b505af1158015611dfe573d6000803e3d6000fd5b50505050611e9b565b611e2973ffffffffffffffffffffffffffffffffffffffff89168730876123e9565b73ffffffffffffffffffffffffffffffffffffffff8089166000908152600260209081526040808320938b1683529290522054611e67908590612eec565b73ffffffffffffffffffffffffffffffffffffffff808a166000908152600260209081526040808320938c16835292905220555b611eab8888888888888888611a34565b5050505050505050565b606081600003611ef857505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611f225780611f0c81612f04565b9150611f1b9050600a83612f6b565b9150611efc565b60008167ffffffffffffffff811115611f3d57611f3d612f7f565b6040519080825280601f01601f191660200182016040528015611f67576020820181803683370190505b5090505b8415611fea57611f7c600183612e78565b9150611f89600a86612fae565b611f94906030612eec565b60f81b818381518110611fa957611fa9612fc2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611fe3600a86612f6b565b9450611f6b565b949350505050565b8573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167f718594027abd4eaed59f95162563e0cc6d0e8d5b86b1c7be8b1b0ac3343d03968888878760405161206c9493929190612d7a565b60405180910390a4611eab8888888888888888611c0b565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f35d79ab81f2b2017e19afb5c5571778877782d7a8786f5907f93b0f4702f4f233485856040516120e593929190612db0565b60405180910390a3610c7a8585348686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506104b292505050565b600061215c827f1d1d8b6300000000000000000000000000000000000000000000000000000000612447565b92915050565b60008273ffffffffffffffffffffffffffffffffffffffff1663c01e1bd66040518163ffffffff1660e01b8152600401602060405180830381865afa1580156121af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121d39190612d14565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610a6b9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261246a565b600054610100900460ff16612374576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016101d8565b600080547fffffffffffffffffffff0000000000000000000000000000000000000000ffff166201000073ffffffffffffffffffffffffffffffffffffffff94851602179055600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909216179055565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526112749085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161225b565b600061245283612576565b8015612463575061246383836125da565b9392505050565b60006124cc826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166126a99092919063ffffffff16565b805190915015610a6b57808060200190518101906124ea9190612ff1565b610a6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016101d8565b60006125a2827f01ffc9a7000000000000000000000000000000000000000000000000000000006125da565b801561215c57506125d3827fffffffff000000000000000000000000000000000000000000000000000000006125da565b1592915050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000178152825160009392849283928392918391908a617530fa92503d91506000519050828015612692575060208210155b801561269e5750600081115b979650505050505050565b6060611fea84846000858573ffffffffffffffffffffffffffffffffffffffff85163b612732576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016101d8565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161275b9190613013565b60006040518083038185875af1925050503d8060008114612798576040519150601f19603f3d011682016040523d82523d6000602084013e61279d565b606091505b509150915061269e828286606083156127b7575081612463565b8251156127c75782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d89190612acd565b73ffffffffffffffffffffffffffffffffffffffff8116811461281d57600080fd5b50565b60008083601f84011261283257600080fd5b50813567ffffffffffffffff81111561284a57600080fd5b60208301915083602082850101111561286257600080fd5b9250929050565b600080600080600080600060c0888a03121561288457600080fd5b873561288f816127fb565b9650602088013561289f816127fb565b955060408801356128af816127fb565b945060608801356128bf816127fb565b93506080880135925060a088013567ffffffffffffffff8111156128e257600080fd5b6128ee8a828b01612820565b989b979a50959850939692959293505050565b803563ffffffff8116811461291557600080fd5b919050565b60008060006040848603121561292f57600080fd5b61293884612901565b9250602084013567ffffffffffffffff81111561295457600080fd5b61296086828701612820565b9497909650939450505050565b60008060008060006080868803121561298557600080fd5b8535612990816127fb565b945060208601356129a0816127fb565b935060408601359250606086013567ffffffffffffffff8111156129c357600080fd5b6129cf88828901612820565b969995985093965092949392505050565b600080600080600080600060c0888a0312156129fb57600080fd5b8735612a06816127fb565b96506020880135612a16816127fb565b95506040880135612a26816127fb565b945060608801359350612a3b60808901612901565b925060a088013567ffffffffffffffff8111156128e257600080fd5b60005b83811015612a72578181015183820152602001612a5a565b838111156112745750506000910152565b60008151808452612a9b816020860160208601612a57565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006124636020830184612a83565b60008060008060008060a08789031215612af957600080fd5b8635612b04816127fb565b95506020870135612b14816127fb565b945060408701359350612b2960608801612901565b9250608087013567ffffffffffffffff811115612b4557600080fd5b612b5189828a01612820565b979a9699509497509295939492505050565b60008060408385031215612b7657600080fd5b8235612b81816127fb565b91506020830135612b91816127fb565b809150509250929050565b60008060008060608587031215612bb257600080fd5b8435612bbd816127fb565b9350612bcb60208601612901565b9250604085013567ffffffffffffffff811115612be757600080fd5b612bf387828801612820565b95989497509550505050565b60008060008060808587031215612c1557600080fd5b8435612c20816127fb565b93506020850135612c30816127fb565b92506040850135612c40816127fb565b9396929550929360600135925050565b600060208284031215612c6257600080fd5b8135612463816127fb565b828152604060208201526000611fea6040830184612a83565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152612cc56080830184612a83565b9695505050505050565b73ffffffffffffffffffffffffffffffffffffffff84168152606060208201526000612cfe6060830185612a83565b905063ffffffff83166040830152949350505050565b600060208284031215612d2657600080fd5b8151612463816127fb565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff85168152836020820152606060408201526000612cc5606083018486612d31565b838152604060208201526000612dca604083018486612d31565b95945050505050565b60008451612de5818460208901612a57565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551612e21816001850160208a01612a57565b60019201918201528351612e3c816002840160208801612a57565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015612e8a57612e8a612e49565b500390565b600073ffffffffffffffffffffffffffffffffffffffff808a1683528089166020840152808816604084015280871660608401525084608083015260c060a0830152612edf60c083018486612d31565b9998505050505050505050565b60008219821115612eff57612eff612e49565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612f3557612f35612e49565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082612f7a57612f7a612f3c565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082612fbd57612fbd612f3c565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561300357600080fd5b8151801515811461246357600080fd5b60008251613025818460208701612a57565b919091019291505056fea164736f6c634300080f000a", + ABI: "[{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"_messenger\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20BridgeFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20BridgeFinalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20BridgeInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20DepositInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20WithdrawalFinalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ETHBridgeFinalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ETHBridgeInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ETHDepositInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ETHWithdrawalFinalized\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_localToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"bridgeERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_localToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"bridgeERC20To\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"bridgeETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"bridgeETHTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_localToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"completeOutboundTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"depositERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"depositERC20To\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"depositETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"depositETHTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"deposits\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_localToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"finalizeBridgeERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"finalizeBridgeETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"finalizeERC20Withdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"finalizeETHWithdrawal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2TokenBridge\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"contractCrossDomainMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"otherBridge\",\"outputs\":[{\"internalType\":\"contractStandardBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x6101206040523480156200001257600080fd5b5060405162002f9a38038062002f9a83398101604081905262000035916200006f565b6001600160a01b031660805273420000000000000000000000000000000000001060a052600060c081905260e052600261010052620000a1565b6000602082840312156200008257600080fd5b81516001600160a01b03811681146200009a57600080fd5b9392505050565b60805160a05160c05160e05161010051612e3d6200015d600039600061115001526000611127015260006110fe01526000818161039a01528181610436015281816105110152818161065d01528181610abb01528181610d080152818161133d0152611986015260008181610257015281816104d4015281816106330152818161069401528181610a9101528181610af201528181610cde01528181610d3f0152818161131301528181611374015261194a0152612e3d6000f3fe60806040526004361061012d5760003560e01c806387087623116100a5578063a9f9e67511610074578063b1a1a88211610059578063b1a1a88214610411578063c89701a214610424578063e11013dd1461045857600080fd5b8063a9f9e675146103d1578063af565a13146103f157600080fd5b806387087623146103255780638f601f661461034557806391c49bf81461038b5780639a2ac6d5146103be57600080fd5b80633cb747bf116100fc57806354fd4d50116100e157806354fd4d50146102c357806358a997f6146102e5578063838b25201461030557600080fd5b80633cb747bf14610245578063540abf73146102a357600080fd5b80630166a07a146101ec57806309fc88431461020c5780631532ec341461021f5780631635f5fd1461023257600080fd5b366101e757333b156101c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084015b60405180910390fd5b6101e533333462030d406040518060200160405280600081525061046b565b005b600080fd5b3480156101f857600080fd5b506101e5610207366004612687565b61061b565b6101e561021a366004612738565b6109a2565b6101e561022d36600461278b565b610a79565b6101e561024036600461278b565b610cc6565b34801561025157600080fd5b506102797f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156102af57600080fd5b506101e56102be3660046127fe565b6110e7565b3480156102cf57600080fd5b506102d86110f7565b60405161029a91906128eb565b3480156102f157600080fd5b506101e56103003660046128fe565b61119a565b34801561031157600080fd5b506101e56103203660046127fe565b611239565b34801561033157600080fd5b506101e56103403660046128fe565b611249565b34801561035157600080fd5b5061037d610360366004612981565b600260209081526000928352604080842090915290825290205481565b60405190815260200161029a565b34801561039757600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610279565b6101e56103cc3660046129ba565b6112e8565b3480156103dd57600080fd5b506101e56103ec366004612687565b6112fb565b3480156103fd57600080fd5b506101e561040c366004612a1d565b61155c565b6101e561041f366004612738565b611869565b34801561043057600080fd5b506102797f000000000000000000000000000000000000000000000000000000000000000081565b6101e56104663660046129ba565b611905565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f2849b43074093a05396b6f2a937dee8565b15a48a7b3d4bffb732a5017380af585846040516104ca929190612a6e565b60405180910390a37f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633dbb202b847f0000000000000000000000000000000000000000000000000000000000000000631635f5fd60e01b8989898860405160240161054f9493929190612a87565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e086901b90921682526105e292918890600401612ad0565b6000604051808303818588803b1580156105fb57600080fd5b505af115801561060f573d6000803e3d6000fd5b50505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801561073957507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107219190612b15565b73ffffffffffffffffffffffffffffffffffffffff16145b6107eb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101bd565b6040517faf565a1300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808916600483015280881660248301528516604482015260648101849052309063af565a1390608401600060405180830381600087803b15801561086957600080fd5b505af192505050801561087a575060015b6109165761088f878786888760008888611948565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f2755817676249910615f0a6a240ad225abe5343df8d527f7294c4af36a92009a878787876040516109099493929190612b7b565b60405180910390a4610999565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fd59c65b35445225835c83f50b6ede06a7be047d22e357073e250d9af537518cd878787876040516109909493929190612b7b565b60405180910390a45b50505050505050565b333b15610a31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101bd565b610a743333348686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061046b92505050565b505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015610b9757507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7f9190612b15565b73ffffffffffffffffffffffffffffffffffffffff16145b610c49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101bd565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f2ac69ee804d9a7a0984249f508dfab7cb2534b465b6ce1580f99a38ba9c5e631858585604051610caa93929190612bb1565b60405180910390a3610cbf8585858585610cc6565b5050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015610de457507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610da8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dcc9190612b15565b73ffffffffffffffffffffffffffffffffffffffff16145b610e96576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101bd565b823414610f25576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5374616e646172644272696467653a20616d6f756e742073656e7420646f657360448201527f206e6f74206d6174636820616d6f756e7420726571756972656400000000000060648201526084016101bd565b3073ffffffffffffffffffffffffffffffffffffffff851603610fca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a2063616e6e6f742073656e6420746f207360448201527f656c66000000000000000000000000000000000000000000000000000000000060648201526084016101bd565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f31b2166ff604fc5672ea5df08a78081d2bc6d746cadce880747f3643d819e83d85858560405161102b93929190612bb1565b60405180910390a36000611050855a8660405180602001604052806000815250611b1b565b9050806110df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a20455448207472616e736665722066616960448201527f6c6564000000000000000000000000000000000000000000000000000000000060648201526084016101bd565b505050505050565b6109998787338888888888611b35565b60606111227f0000000000000000000000000000000000000000000000000000000000000000611ddf565b61114b7f0000000000000000000000000000000000000000000000000000000000000000611ddf565b6111747f0000000000000000000000000000000000000000000000000000000000000000611ddf565b60405160200161118693929190612bd4565b604051602081830303815290604052905090565b333b15611229576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101bd565b6110df8686333388888888611f1c565b6109998787338888888888611f1c565b333b156112d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101bd565b6110df8686333388888888611b35565b6112f53385858585611fae565b50505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801561141957507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114019190612b15565b73ffffffffffffffffffffffffffffffffffffffff16145b6114cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101bd565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f3ceee06c1e37648fcbb6ed52e17b3e1f275a1f8c7b22a84b2b84732431e046b3878787876040516115459493929190612b7b565b60405180910390a46109998787878787878761061b565b3330146115eb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642062792073656c660000000000000000000000000060648201526084016101bd565b3073ffffffffffffffffffffffffffffffffffffffff851603611690576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5374616e646172644272696467653a206c6f63616c20746f6b656e2063616e6e60448201527f6f742062652073656c660000000000000000000000000000000000000000000060648201526084016101bd565b6116998461205a565b156117e7576116a8848461208c565b61175a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a4016101bd565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390528516906340c10f1990604401600060405180830381600087803b1580156117ca57600080fd5b505af11580156117de573d6000803e3d6000fd5b505050506112f5565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260026020908152604080832093871683529290522054611825908290612c79565b73ffffffffffffffffffffffffffffffffffffffff8086166000818152600260209081526040808320948916835293905291909120919091556112f5908383612133565b333b156118f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101bd565b610a743333858585611fae565b6112f53385348686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061046b92505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633dbb202b7f0000000000000000000000000000000000000000000000000000000000000000630166a07a60e01b8a8c8b8b8b8a8a6040516024016119ca9796959493929190612c90565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e085901b9092168252611a5d92918890600401612ad0565b600060405180830381600087803b158015611a7757600080fd5b505af1158015611a8b573d6000803e3d6000fd5b505050508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167f7ff126db8024424bbfd9826e8ab82ff59136289ea440b04b39a0df1b03b9cabf88888787604051611b099493929190612b7b565b60405180910390a45050505050505050565b600080600080845160208601878a8af19695505050505050565b3073ffffffffffffffffffffffffffffffffffffffff891603611bda576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5374616e646172644272696467653a206c6f63616c20746f6b656e2063616e6e60448201527f6f742062652073656c660000000000000000000000000000000000000000000060648201526084016101bd565b611be38861205a565b15611d3157611bf2888861208c565b611ca4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a4016101bd565b6040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015260248201869052891690639dc29fac90604401600060405180830381600087803b158015611d1457600080fd5b505af1158015611d28573d6000803e3d6000fd5b50505050611dc5565b611d5373ffffffffffffffffffffffffffffffffffffffff8916873087612207565b73ffffffffffffffffffffffffffffffffffffffff8089166000908152600260209081526040808320938b1683529290522054611d91908590612ced565b73ffffffffffffffffffffffffffffffffffffffff808a166000908152600260209081526040808320938c16835292905220555b611dd58888888888888888611948565b5050505050505050565b606081600003611e2257505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611e4c5780611e3681612d05565b9150611e459050600a83612d6c565b9150611e26565b60008167ffffffffffffffff811115611e6757611e67612d80565b6040519080825280601f01601f191660200182016040528015611e91576020820181803683370190505b5090505b8415611f1457611ea6600183612c79565b9150611eb3600a86612daf565b611ebe906030612ced565b60f81b818381518110611ed357611ed3612dc3565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611f0d600a86612d6c565b9450611e95565b949350505050565b8573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167f718594027abd4eaed59f95162563e0cc6d0e8d5b86b1c7be8b1b0ac3343d039688888787604051611f969493929190612b7b565b60405180910390a4611dd58888888888888888611b35565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f35d79ab81f2b2017e19afb5c5571778877782d7a8786f5907f93b0f4702f4f2334858560405161200f93929190612bb1565b60405180910390a3610cbf8585348686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061046b92505050565b6000612086827f1d1d8b6300000000000000000000000000000000000000000000000000000000612265565b92915050565b60008273ffffffffffffffffffffffffffffffffffffffff1663c01e1bd66040518163ffffffff1660e01b8152600401602060405180830381865afa1580156120d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120fd9190612b15565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610a749084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612288565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526112f59085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401612185565b600061227083612394565b8015612281575061228183836123f8565b9392505050565b60006122ea826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166124c79092919063ffffffff16565b805190915015610a7457808060200190518101906123089190612df2565b610a74576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016101bd565b60006123c0827f01ffc9a7000000000000000000000000000000000000000000000000000000006123f8565b801561208657506123f1827fffffffff000000000000000000000000000000000000000000000000000000006123f8565b1592915050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000178152825160009392849283928392918391908a617530fa92503d915060005190508280156124b0575060208210155b80156124bc5750600081115b979650505050505050565b6060611f1484846000858573ffffffffffffffffffffffffffffffffffffffff85163b612550576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016101bd565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516125799190612e14565b60006040518083038185875af1925050503d80600081146125b6576040519150601f19603f3d011682016040523d82523d6000602084013e6125bb565b606091505b50915091506124bc828286606083156125d5575081612281565b8251156125e55782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101bd91906128eb565b73ffffffffffffffffffffffffffffffffffffffff8116811461263b57600080fd5b50565b60008083601f84011261265057600080fd5b50813567ffffffffffffffff81111561266857600080fd5b60208301915083602082850101111561268057600080fd5b9250929050565b600080600080600080600060c0888a0312156126a257600080fd5b87356126ad81612619565b965060208801356126bd81612619565b955060408801356126cd81612619565b945060608801356126dd81612619565b93506080880135925060a088013567ffffffffffffffff81111561270057600080fd5b61270c8a828b0161263e565b989b979a50959850939692959293505050565b803563ffffffff8116811461273357600080fd5b919050565b60008060006040848603121561274d57600080fd5b6127568461271f565b9250602084013567ffffffffffffffff81111561277257600080fd5b61277e8682870161263e565b9497909650939450505050565b6000806000806000608086880312156127a357600080fd5b85356127ae81612619565b945060208601356127be81612619565b935060408601359250606086013567ffffffffffffffff8111156127e157600080fd5b6127ed8882890161263e565b969995985093965092949392505050565b600080600080600080600060c0888a03121561281957600080fd5b873561282481612619565b9650602088013561283481612619565b9550604088013561284481612619565b9450606088013593506128596080890161271f565b925060a088013567ffffffffffffffff81111561270057600080fd5b60005b83811015612890578181015183820152602001612878565b838111156112f55750506000910152565b600081518084526128b9816020860160208601612875565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061228160208301846128a1565b60008060008060008060a0878903121561291757600080fd5b863561292281612619565b9550602087013561293281612619565b9450604087013593506129476060880161271f565b9250608087013567ffffffffffffffff81111561296357600080fd5b61296f89828a0161263e565b979a9699509497509295939492505050565b6000806040838503121561299457600080fd5b823561299f81612619565b915060208301356129af81612619565b809150509250929050565b600080600080606085870312156129d057600080fd5b84356129db81612619565b93506129e96020860161271f565b9250604085013567ffffffffffffffff811115612a0557600080fd5b612a118782880161263e565b95989497509550505050565b60008060008060808587031215612a3357600080fd5b8435612a3e81612619565b93506020850135612a4e81612619565b92506040850135612a5e81612619565b9396929550929360600135925050565b828152604060208201526000611f1460408301846128a1565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152612ac660808301846128a1565b9695505050505050565b73ffffffffffffffffffffffffffffffffffffffff84168152606060208201526000612aff60608301856128a1565b905063ffffffff83166040830152949350505050565b600060208284031215612b2757600080fd5b815161228181612619565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff85168152836020820152606060408201526000612ac6606083018486612b32565b838152604060208201526000612bcb604083018486612b32565b95945050505050565b60008451612be6818460208901612875565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551612c22816001850160208a01612875565b60019201918201528351612c3d816002840160208801612875565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015612c8b57612c8b612c4a565b500390565b600073ffffffffffffffffffffffffffffffffffffffff808a1683528089166020840152808816604084015280871660608401525084608083015260c060a0830152612ce060c083018486612b32565b9998505050505050505050565b60008219821115612d0057612d00612c4a565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612d3657612d36612c4a565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082612d7b57612d7b612d3d565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082612dbe57612dbe612d3d565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215612e0457600080fd5b8151801515811461228157600080fd5b60008251612e26818460208701612875565b919091019291505056fea164736f6c634300080f000a", } // L1StandardBridgeABI is the input ABI used to generate the binding from. @@ -629,27 +629,6 @@ func (_L1StandardBridge *L1StandardBridgeTransactorSession) FinalizeETHWithdrawa return _L1StandardBridge.Contract.FinalizeETHWithdrawal(&_L1StandardBridge.TransactOpts, _from, _to, _amount, _extraData) } -// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. -// -// Solidity: function initialize(address _messenger) returns() -func (_L1StandardBridge *L1StandardBridgeTransactor) Initialize(opts *bind.TransactOpts, _messenger common.Address) (*types.Transaction, error) { - return _L1StandardBridge.contract.Transact(opts, "initialize", _messenger) -} - -// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. -// -// Solidity: function initialize(address _messenger) returns() -func (_L1StandardBridge *L1StandardBridgeSession) Initialize(_messenger common.Address) (*types.Transaction, error) { - return _L1StandardBridge.Contract.Initialize(&_L1StandardBridge.TransactOpts, _messenger) -} - -// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. -// -// Solidity: function initialize(address _messenger) returns() -func (_L1StandardBridge *L1StandardBridgeTransactorSession) Initialize(_messenger common.Address) (*types.Transaction, error) { - return _L1StandardBridge.Contract.Initialize(&_L1StandardBridge.TransactOpts, _messenger) -} - // Receive is a paid mutator transaction binding the contract receive function. // // Solidity: receive() payable returns() @@ -2115,137 +2094,3 @@ func (_L1StandardBridge *L1StandardBridgeFilterer) ParseETHWithdrawalFinalized(l event.Raw = log return event, nil } - -// L1StandardBridgeInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the L1StandardBridge contract. -type L1StandardBridgeInitializedIterator struct { - Event *L1StandardBridgeInitialized // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *L1StandardBridgeInitializedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(L1StandardBridgeInitialized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(L1StandardBridgeInitialized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *L1StandardBridgeInitializedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *L1StandardBridgeInitializedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// L1StandardBridgeInitialized represents a Initialized event raised by the L1StandardBridge contract. -type L1StandardBridgeInitialized struct { - Version uint8 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. -// -// Solidity: event Initialized(uint8 version) -func (_L1StandardBridge *L1StandardBridgeFilterer) FilterInitialized(opts *bind.FilterOpts) (*L1StandardBridgeInitializedIterator, error) { - - logs, sub, err := _L1StandardBridge.contract.FilterLogs(opts, "Initialized") - if err != nil { - return nil, err - } - return &L1StandardBridgeInitializedIterator{contract: _L1StandardBridge.contract, event: "Initialized", logs: logs, sub: sub}, nil -} - -// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. -// -// Solidity: event Initialized(uint8 version) -func (_L1StandardBridge *L1StandardBridgeFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *L1StandardBridgeInitialized) (event.Subscription, error) { - - logs, sub, err := _L1StandardBridge.contract.WatchLogs(opts, "Initialized") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(L1StandardBridgeInitialized) - if err := _L1StandardBridge.contract.UnpackLog(event, "Initialized", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. -// -// Solidity: event Initialized(uint8 version) -func (_L1StandardBridge *L1StandardBridgeFilterer) ParseInitialized(log types.Log) (*L1StandardBridgeInitialized, error) { - event := new(L1StandardBridgeInitialized) - if err := _L1StandardBridge.contract.UnpackLog(event, "Initialized", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/op-bindings/bindings/l2crossdomainmessenger_more.go b/op-bindings/bindings/l2crossdomainmessenger_more.go index 18d16ec403626..fdc7094175a51 100755 --- a/op-bindings/bindings/l2crossdomainmessenger_more.go +++ b/op-bindings/bindings/l2crossdomainmessenger_more.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum-optimism/optimism/op-bindings/solc" ) -const L2CrossDomainMessengerStorageLayoutJSON = "{\"storage\":[{\"astId\":26067,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":26070,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":26681,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_uint256)50_storage\"},{\"astId\":25939,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":26059,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":26232,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_paused\",\"offset\":0,\"slot\":\"101\",\"type\":\"t_bool\"},{\"astId\":26337,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"102\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":26352,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_status\",\"offset\":0,\"slot\":\"151\",\"type\":\"t_uint256\"},{\"astId\":26396,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"152\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":23674,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"successfulMessages\",\"offset\":0,\"slot\":\"201\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":23677,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"xDomainMsgSender\",\"offset\":0,\"slot\":\"202\",\"type\":\"t_address\"},{\"astId\":23680,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"msgNonce\",\"offset\":0,\"slot\":\"203\",\"type\":\"t_uint240\"},{\"astId\":23683,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"otherMessenger\",\"offset\":0,\"slot\":\"204\",\"type\":\"t_address\"},{\"astId\":23688,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"receivedMessages\",\"offset\":0,\"slot\":\"205\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":23693,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"blockedSystemAddresses\",\"offset\":0,\"slot\":\"206\",\"type\":\"t_mapping(t_address,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_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_address,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_bool\"},\"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\":26014,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":26017,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":26628,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_uint256)50_storage\"},{\"astId\":25886,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":26006,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":26179,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_paused\",\"offset\":0,\"slot\":\"101\",\"type\":\"t_bool\"},{\"astId\":26284,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"102\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":26299,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_status\",\"offset\":0,\"slot\":\"151\",\"type\":\"t_uint256\"},{\"astId\":26343,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"152\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":23621,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"successfulMessages\",\"offset\":0,\"slot\":\"201\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":23624,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"xDomainMsgSender\",\"offset\":0,\"slot\":\"202\",\"type\":\"t_address\"},{\"astId\":23627,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"msgNonce\",\"offset\":0,\"slot\":\"203\",\"type\":\"t_uint240\"},{\"astId\":23630,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"otherMessenger\",\"offset\":0,\"slot\":\"204\",\"type\":\"t_address\"},{\"astId\":23635,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"receivedMessages\",\"offset\":0,\"slot\":\"205\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":23640,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"blockedSystemAddresses\",\"offset\":0,\"slot\":\"206\",\"type\":\"t_mapping(t_address,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_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_address,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_bool\"},\"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) diff --git a/op-bindings/bindings/l2standardbridge.go b/op-bindings/bindings/l2standardbridge.go index 86c2c519940cb..27128a478f0cf 100644 --- a/op-bindings/bindings/l2standardbridge.go +++ b/op-bindings/bindings/l2standardbridge.go @@ -30,8 +30,8 @@ var ( // L2StandardBridgeMetaData contains all meta data concerning the L2StandardBridge contract. var L2StandardBridgeMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"_otherBridge\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"DepositFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"DepositFinalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20BridgeFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20BridgeFinalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20BridgeInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ETHBridgeFinalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ETHBridgeInitiated\",\"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\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"WithdrawalInitiated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_localToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"bridgeERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_localToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"bridgeERC20To\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"bridgeETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"bridgeETHTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_localToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"completeOutboundTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"deposits\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_localToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"finalizeBridgeERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"finalizeBridgeETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"finalizeDeposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"_otherBridge\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"contractCrossDomainMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"otherBridge\",\"outputs\":[{\"internalType\":\"contractStandardBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"withdrawTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x60e06040523480156200001157600080fd5b5060405162002f6b38038062002f6b833981016040819052620000349162000254565b6000608081905260a052600160c0526200004e8162000055565b5062000286565b600054610100900460ff1615808015620000765750600054600160ff909116105b80620000a6575062000093306200019e60201b620003af1760201c565b158015620000a6575060005460ff166001145b6200010f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801562000133576000805461ff0019166101001790555b6200015373420000000000000000000000000000000000000783620001ad565b80156200019a576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b6001600160a01b03163b151590565b600054610100900460ff166200021a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840162000106565b6000805462010000600160b01b031916620100006001600160a01b0394851602179055600180546001600160a01b03191691909216179055565b6000602082840312156200026757600080fd5b81516001600160a01b03811681146200027f57600080fd5b9392505050565b60805160a05160c051612cb5620002b66000396000610e7c01526000610e5301526000610e2a0152612cb56000f3fe6080604052600436106100ec5760003560e01c8063662a633a1161008a578063af565a1311610059578063af565a131461032f578063c4d66de81461034f578063c89701a21461036f578063e11013dd1461039c57600080fd5b8063662a633a146102a357806387087623146102b65780638f601f66146102d6578063a3a795481461031c57600080fd5b806332b7006d116100c657806332b7006d146101f15780633cb747bf14610204578063540abf731461026157806354fd4d501461028157600080fd5b80630166a07a146101ab57806309fc8843146101cb5780631635f5fd146101de57600080fd5b366101a657333b15610185576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084015b60405180910390fd5b6101a433333462030d40604051806020016040528060008152506103cb565b005b600080fd5b3480156101b757600080fd5b506101a46101c636600461248e565b610567565b6101a46101d936600461253f565b6108b2565b6101a46101ec366004612592565b610989565b6101a46101ff366004612605565b610d6e565b34801561021057600080fd5b506000546102379062010000900473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561026d57600080fd5b506101a461027c366004612659565b610e13565b34801561028d57600080fd5b50610296610e23565b6040516102589190612746565b6101a46102b136600461248e565b610ec6565b3480156102c257600080fd5b506101a46102d1366004612759565b610fb3565b3480156102e257600080fd5b5061030e6102f13660046127dc565b600260209081526000928352604080842090915290825290205481565b604051908152602001610258565b6101a461032a366004612759565b611052565b34801561033b57600080fd5b506101a461034a366004612815565b611061565b34801561035b57600080fd5b506101a461036a366004612866565b611374565b34801561037b57600080fd5b506001546102379073ffffffffffffffffffffffffffffffffffffffff1681565b6101a46103aa366004612883565b61151d565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f2849b43074093a05396b6f2a937dee8565b15a48a7b3d4bffb732a5017380af5858460405161042a9291906128e6565b60405180910390a360005460015460405173ffffffffffffffffffffffffffffffffffffffff62010000909304831692633dbb202b9287929116907f1635f5fd000000000000000000000000000000000000000000000000000000009061049b908b908b9086908a906024016128ff565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e086901b909216825261052e92918890600401612948565b6000604051808303818588803b15801561054757600080fd5b505af115801561055b573d6000803e3d6000fd5b50505050505050505050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff16331480156106495750600154600054604080517f6e296e45000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff938416936201000090930490921691636e296e45916004808201926020929091908290030181865afa15801561060d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610631919061298d565b73ffffffffffffffffffffffffffffffffffffffff16145b6106fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a40161017c565b6040517faf565a1300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808916600483015280881660248301528516604482015260648101849052309063af565a1390608401600060405180830381600087803b15801561077957600080fd5b505af192505050801561078a575060015b6108265761079f878786888760008888611560565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f2755817676249910615f0a6a240ad225abe5343df8d527f7294c4af36a92009a8787878760405161081994939291906129f3565b60405180910390a46108a9565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fd59c65b35445225835c83f50b6ede06a7be047d22e357073e250d9af537518cd878787876040516108a094939291906129f3565b60405180910390a45b50505050505050565b333b15610941576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f41000000000000000000606482015260840161017c565b6109843333348686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506103cb92505050565b505050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff1633148015610a6b5750600154600054604080517f6e296e45000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff938416936201000090930490921691636e296e45916004808201926020929091908290030181865afa158015610a2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a53919061298d565b73ffffffffffffffffffffffffffffffffffffffff16145b610b1d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a40161017c565b823414610bac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5374616e646172644272696467653a20616d6f756e742073656e7420646f657360448201527f206e6f74206d6174636820616d6f756e74207265717569726564000000000000606482015260840161017c565b3073ffffffffffffffffffffffffffffffffffffffff851603610c51576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a2063616e6e6f742073656e6420746f207360448201527f656c660000000000000000000000000000000000000000000000000000000000606482015260840161017c565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f31b2166ff604fc5672ea5df08a78081d2bc6d746cadce880747f3643d819e83d858585604051610cb293929190612a29565b60405180910390a36000610cd7855a866040518060200160405280600081525061171d565b905080610d66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a20455448207472616e736665722066616960448201527f6c65640000000000000000000000000000000000000000000000000000000000606482015260840161017c565b505050505050565b333b15610dfd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f41000000000000000000606482015260840161017c565b610e0c85333387878787611737565b5050505050565b6108a9878733888888888861196e565b6060610e4e7f0000000000000000000000000000000000000000000000000000000000000000611c18565b610e777f0000000000000000000000000000000000000000000000000000000000000000611c18565b610ea07f0000000000000000000000000000000000000000000000000000000000000000611c18565b604051602001610eb293929190612a4c565b604051602081830303815290604052905090565b73ffffffffffffffffffffffffffffffffffffffff8716158015610f13575073ffffffffffffffffffffffffffffffffffffffff861673deaddeaddeaddeaddeaddeaddeaddeaddead0000145b15610f2a57610f258585858585610989565b610f39565b610f3986888787878787610567565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fb0444523268717a02698be47d0803aa7468c00acbed2f8bd93a0459cde61dd89878787876040516108a094939291906129f3565b333b15611042576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f41000000000000000000606482015260840161017c565b610d66868633338888888861196e565b610d6686338787878787611737565b3330146110f0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642062792073656c6600000000000000000000000000606482015260840161017c565b3073ffffffffffffffffffffffffffffffffffffffff851603611195576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5374616e646172644272696467653a206c6f63616c20746f6b656e2063616e6e60448201527f6f742062652073656c6600000000000000000000000000000000000000000000606482015260840161017c565b61119e84611d55565b156112ec576111ad8484611d87565b61125f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a40161017c565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390528516906340c10f1990604401600060405180830381600087803b1580156112cf57600080fd5b505af11580156112e3573d6000803e3d6000fd5b5050505061136e565b73ffffffffffffffffffffffffffffffffffffffff80851660009081526002602090815260408083209387168352929052205461132a908290612af1565b73ffffffffffffffffffffffffffffffffffffffff80861660008181526002602090815260408083209489168352939052919091209190915561136e908383611e2e565b50505050565b600054610100900460ff16158080156113945750600054600160ff909116105b806113ae5750303b1580156113ae575060005460ff166001145b61143a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161017c565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561149857600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6114b673420000000000000000000000000000000000000783611f02565b801561151957600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b61136e3385348686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506103cb92505050565b60005460015460405173ffffffffffffffffffffffffffffffffffffffff62010000909304831692633dbb202b9216907f0166a07a00000000000000000000000000000000000000000000000000000000906115cc908c908e908d908d908d908c908c90602401612b08565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e085901b909216825261165f92918890600401612948565b600060405180830381600087803b15801561167957600080fd5b505af115801561168d573d6000803e3d6000fd5b505050508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167f7ff126db8024424bbfd9826e8ab82ff59136289ea440b04b39a0df1b03b9cabf8888878760405161170b94939291906129f3565b60405180910390a45050505050505050565b600080600080845160208601878a8af19695505050505050565b60008773ffffffffffffffffffffffffffffffffffffffff1663c01e1bd66040518163ffffffff1660e01b8152600401602060405180830381865afa158015611784573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a8919061298d565b90507fffffffffffffffffffffffff215221522152215221522152215221522153000073ffffffffffffffffffffffffffffffffffffffff8916016118e45784341461189c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f4c325374616e646172644272696467653a20455448207769746864726177616c60448201527f73206d75737420696e636c7564652073756666696369656e742045544820766160648201527f6c75650000000000000000000000000000000000000000000000000000000000608482015260a40161017c565b6118df8787878787878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506103cb92505050565b6118f4565b6118f4888289898989898961196e565b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f73d170910aba9e6d50b102db522b1dbcd796216f5128b445aa2135272886497e8989888860405161170b94939291906129f3565b3073ffffffffffffffffffffffffffffffffffffffff891603611a13576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5374616e646172644272696467653a206c6f63616c20746f6b656e2063616e6e60448201527f6f742062652073656c6600000000000000000000000000000000000000000000606482015260840161017c565b611a1c88611d55565b15611b6a57611a2b8888611d87565b611add576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a40161017c565b6040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015260248201869052891690639dc29fac90604401600060405180830381600087803b158015611b4d57600080fd5b505af1158015611b61573d6000803e3d6000fd5b50505050611bfe565b611b8c73ffffffffffffffffffffffffffffffffffffffff891687308761200e565b73ffffffffffffffffffffffffffffffffffffffff8089166000908152600260209081526040808320938b1683529290522054611bca908590612b65565b73ffffffffffffffffffffffffffffffffffffffff808a166000908152600260209081526040808320938c16835292905220555b611c0e8888888888888888611560565b5050505050505050565b606081600003611c5b57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611c855780611c6f81612b7d565b9150611c7e9050600a83612be4565b9150611c5f565b60008167ffffffffffffffff811115611ca057611ca0612bf8565b6040519080825280601f01601f191660200182016040528015611cca576020820181803683370190505b5090505b8415611d4d57611cdf600183612af1565b9150611cec600a86612c27565b611cf7906030612b65565b60f81b818381518110611d0c57611d0c612c3b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611d46600a86612be4565b9450611cce565b949350505050565b6000611d81827f1d1d8b630000000000000000000000000000000000000000000000000000000061206c565b92915050565b60008273ffffffffffffffffffffffffffffffffffffffff1663c01e1bd66040518163ffffffff1660e01b8152600401602060405180830381865afa158015611dd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611df8919061298d565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526109849084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261208f565b600054610100900460ff16611f99576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161017c565b600080547fffffffffffffffffffff0000000000000000000000000000000000000000ffff166201000073ffffffffffffffffffffffffffffffffffffffff94851602179055600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909216179055565b60405173ffffffffffffffffffffffffffffffffffffffff8085166024830152831660448201526064810182905261136e9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611e80565b60006120778361219b565b8015612088575061208883836121ff565b9392505050565b60006120f1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166122ce9092919063ffffffff16565b805190915015610984578080602001905181019061210f9190612c6a565b610984576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161017c565b60006121c7827f01ffc9a7000000000000000000000000000000000000000000000000000000006121ff565b8015611d8157506121f8827fffffffff000000000000000000000000000000000000000000000000000000006121ff565b1592915050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000178152825160009392849283928392918391908a617530fa92503d915060005190508280156122b7575060208210155b80156122c35750600081115b979650505050505050565b6060611d4d84846000858573ffffffffffffffffffffffffffffffffffffffff85163b612357576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161017c565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516123809190612c8c565b60006040518083038185875af1925050503d80600081146123bd576040519150601f19603f3d011682016040523d82523d6000602084013e6123c2565b606091505b50915091506122c3828286606083156123dc575081612088565b8251156123ec5782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017c9190612746565b73ffffffffffffffffffffffffffffffffffffffff8116811461244257600080fd5b50565b60008083601f84011261245757600080fd5b50813567ffffffffffffffff81111561246f57600080fd5b60208301915083602082850101111561248757600080fd5b9250929050565b600080600080600080600060c0888a0312156124a957600080fd5b87356124b481612420565b965060208801356124c481612420565b955060408801356124d481612420565b945060608801356124e481612420565b93506080880135925060a088013567ffffffffffffffff81111561250757600080fd5b6125138a828b01612445565b989b979a50959850939692959293505050565b803563ffffffff8116811461253a57600080fd5b919050565b60008060006040848603121561255457600080fd5b61255d84612526565b9250602084013567ffffffffffffffff81111561257957600080fd5b61258586828701612445565b9497909650939450505050565b6000806000806000608086880312156125aa57600080fd5b85356125b581612420565b945060208601356125c581612420565b935060408601359250606086013567ffffffffffffffff8111156125e857600080fd5b6125f488828901612445565b969995985093965092949392505050565b60008060008060006080868803121561261d57600080fd5b853561262881612420565b94506020860135935061263d60408701612526565b9250606086013567ffffffffffffffff8111156125e857600080fd5b600080600080600080600060c0888a03121561267457600080fd5b873561267f81612420565b9650602088013561268f81612420565b9550604088013561269f81612420565b9450606088013593506126b460808901612526565b925060a088013567ffffffffffffffff81111561250757600080fd5b60005b838110156126eb5781810151838201526020016126d3565b8381111561136e5750506000910152565b600081518084526127148160208601602086016126d0565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061208860208301846126fc565b60008060008060008060a0878903121561277257600080fd5b863561277d81612420565b9550602087013561278d81612420565b9450604087013593506127a260608801612526565b9250608087013567ffffffffffffffff8111156127be57600080fd5b6127ca89828a01612445565b979a9699509497509295939492505050565b600080604083850312156127ef57600080fd5b82356127fa81612420565b9150602083013561280a81612420565b809150509250929050565b6000806000806080858703121561282b57600080fd5b843561283681612420565b9350602085013561284681612420565b9250604085013561285681612420565b9396929550929360600135925050565b60006020828403121561287857600080fd5b813561208881612420565b6000806000806060858703121561289957600080fd5b84356128a481612420565b93506128b260208601612526565b9250604085013567ffffffffffffffff8111156128ce57600080fd5b6128da87828801612445565b95989497509550505050565b828152604060208201526000611d4d60408301846126fc565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152508360408301526080606083015261293e60808301846126fc565b9695505050505050565b73ffffffffffffffffffffffffffffffffffffffff8416815260606020820152600061297760608301856126fc565b905063ffffffff83166040830152949350505050565b60006020828403121561299f57600080fd5b815161208881612420565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff8516815283602082015260606040820152600061293e6060830184866129aa565b838152604060208201526000612a436040830184866129aa565b95945050505050565b60008451612a5e8184602089016126d0565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551612a9a816001850160208a016126d0565b60019201918201528351612ab58160028401602088016126d0565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015612b0357612b03612ac2565b500390565b600073ffffffffffffffffffffffffffffffffffffffff808a1683528089166020840152808816604084015280871660608401525084608083015260c060a0830152612b5860c0830184866129aa565b9998505050505050505050565b60008219821115612b7857612b78612ac2565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612bae57612bae612ac2565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082612bf357612bf3612bb5565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082612c3657612c36612bb5565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215612c7c57600080fd5b8151801515811461208857600080fd5b60008251612c9e8184602087016126d0565b919091019291505056fea164736f6c634300080f000a", + ABI: "[{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"_otherBridge\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"DepositFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"DepositFinalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20BridgeFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20BridgeFinalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20BridgeInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ETHBridgeFinalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ETHBridgeInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"WithdrawalInitiated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_localToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"bridgeERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_localToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"bridgeERC20To\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"bridgeETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"bridgeETHTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_localToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"completeOutboundTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"deposits\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_localToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"finalizeBridgeERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"finalizeBridgeETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"finalizeDeposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"contractCrossDomainMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"otherBridge\",\"outputs\":[{\"internalType\":\"contractStandardBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"withdrawTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x6101206040523480156200001257600080fd5b5060405162002b7238038062002b7283398101604081905262000035916200006f565b7342000000000000000000000000000000000000076080526001600160a01b031660a052600060c081905260e052600261010052620000a1565b6000602082840312156200008257600080fd5b81516001600160a01b03811681146200009a57600080fd5b9392505050565b60805160a05160c05160e05161010051612a466200012c6000396000610ec901526000610ea001526000610e77015260008181610357015281816104320152818161057e015281816109dc015261144201526000818161020b015281816103f501528181610554015281816105b5015281816109b201528181610a1301526114060152612a466000f3fe6080604052600436106100e15760003560e01c8063662a633a1161007f578063a3a7954811610059578063a3a7954814610312578063af565a1314610325578063c89701a214610345578063e11013dd1461037957600080fd5b8063662a633a1461029957806387087623146102ac5780638f601f66146102cc57600080fd5b806332b7006d116100bb57806332b7006d146101e65780633cb747bf146101f9578063540abf731461025757806354fd4d501461027757600080fd5b80630166a07a146101a057806309fc8843146101c05780631635f5fd146101d357600080fd5b3661019b57333b1561017a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084015b60405180910390fd5b61019933333462030d406040518060200160405280600081525061038c565b005b600080fd5b3480156101ac57600080fd5b506101996101bb36600461223c565b61053c565b6101996101ce3660046122ed565b6108c3565b6101996101e1366004612340565b61099a565b6101996101f43660046123b3565b610dbb565b34801561020557600080fd5b5061022d7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561026357600080fd5b50610199610272366004612407565b610e60565b34801561028357600080fd5b5061028c610e70565b60405161024e91906124f4565b6101996102a736600461223c565b610f13565b3480156102b857600080fd5b506101996102c7366004612507565b611000565b3480156102d857600080fd5b506103046102e736600461258a565b600260209081526000928352604080842090915290825290205481565b60405190815260200161024e565b610199610320366004612507565b61109f565b34801561033157600080fd5b506101996103403660046125c3565b6110ae565b34801561035157600080fd5b5061022d7f000000000000000000000000000000000000000000000000000000000000000081565b610199610387366004612614565b6113c1565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f2849b43074093a05396b6f2a937dee8565b15a48a7b3d4bffb732a5017380af585846040516103eb929190612677565b60405180910390a37f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633dbb202b847f0000000000000000000000000000000000000000000000000000000000000000631635f5fd60e01b898989886040516024016104709493929190612690565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e086901b9092168252610503929188906004016126d9565b6000604051808303818588803b15801561051c57600080fd5b505af1158015610530573d6000803e3d6000fd5b50505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801561065a57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa15801561061e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610642919061271e565b73ffffffffffffffffffffffffffffffffffffffff16145b61070c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a401610171565b6040517faf565a1300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808916600483015280881660248301528516604482015260648101849052309063af565a1390608401600060405180830381600087803b15801561078a57600080fd5b505af192505050801561079b575060015b610837576107b0878786888760008888611404565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f2755817676249910615f0a6a240ad225abe5343df8d527f7294c4af36a92009a8787878760405161082a9493929190612784565b60405180910390a46108ba565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fd59c65b35445225835c83f50b6ede06a7be047d22e357073e250d9af537518cd878787876040516108b19493929190612784565b60405180910390a45b50505050505050565b333b15610952576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f410000000000000000006064820152608401610171565b6109953333348686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061038c92505050565b505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015610ab857507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa0919061271e565b73ffffffffffffffffffffffffffffffffffffffff16145b610b6a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a401610171565b823414610bf9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5374616e646172644272696467653a20616d6f756e742073656e7420646f657360448201527f206e6f74206d6174636820616d6f756e742072657175697265640000000000006064820152608401610171565b3073ffffffffffffffffffffffffffffffffffffffff851603610c9e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a2063616e6e6f742073656e6420746f207360448201527f656c6600000000000000000000000000000000000000000000000000000000006064820152608401610171565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f31b2166ff604fc5672ea5df08a78081d2bc6d746cadce880747f3643d819e83d858585604051610cff939291906127ba565b60405180910390a36000610d24855a86604051806020016040528060008152506115d7565b905080610db3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a20455448207472616e736665722066616960448201527f6c656400000000000000000000000000000000000000000000000000000000006064820152608401610171565b505050505050565b333b15610e4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f410000000000000000006064820152608401610171565b610e59853333878787876115f1565b5050505050565b6108ba8787338888888888611828565b6060610e9b7f0000000000000000000000000000000000000000000000000000000000000000611ad2565b610ec47f0000000000000000000000000000000000000000000000000000000000000000611ad2565b610eed7f0000000000000000000000000000000000000000000000000000000000000000611ad2565b604051602001610eff939291906127dd565b604051602081830303815290604052905090565b73ffffffffffffffffffffffffffffffffffffffff8716158015610f60575073ffffffffffffffffffffffffffffffffffffffff861673deaddeaddeaddeaddeaddeaddeaddeaddead0000145b15610f7757610f72858585858561099a565b610f86565b610f868688878787878761053c565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fb0444523268717a02698be47d0803aa7468c00acbed2f8bd93a0459cde61dd89878787876040516108b19493929190612784565b333b1561108f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f410000000000000000006064820152608401610171565b610db38686333388888888611828565b610db3863387878787876115f1565b33301461113d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642062792073656c66000000000000000000000000006064820152608401610171565b3073ffffffffffffffffffffffffffffffffffffffff8516036111e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5374616e646172644272696467653a206c6f63616c20746f6b656e2063616e6e60448201527f6f742062652073656c66000000000000000000000000000000000000000000006064820152608401610171565b6111eb84611c0f565b15611339576111fa8484611c41565b6112ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a401610171565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390528516906340c10f1990604401600060405180830381600087803b15801561131c57600080fd5b505af1158015611330573d6000803e3d6000fd5b505050506113bb565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260026020908152604080832093871683529290522054611377908290612882565b73ffffffffffffffffffffffffffffffffffffffff8086166000818152600260209081526040808320948916835293905291909120919091556113bb908383611ce8565b50505050565b6113bb3385348686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061038c92505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633dbb202b7f0000000000000000000000000000000000000000000000000000000000000000630166a07a60e01b8a8c8b8b8b8a8a6040516024016114869796959493929190612899565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e085901b9092168252611519929188906004016126d9565b600060405180830381600087803b15801561153357600080fd5b505af1158015611547573d6000803e3d6000fd5b505050508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167f7ff126db8024424bbfd9826e8ab82ff59136289ea440b04b39a0df1b03b9cabf888887876040516115c59493929190612784565b60405180910390a45050505050505050565b600080600080845160208601878a8af19695505050505050565b60008773ffffffffffffffffffffffffffffffffffffffff1663c01e1bd66040518163ffffffff1660e01b8152600401602060405180830381865afa15801561163e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611662919061271e565b90507fffffffffffffffffffffffff215221522152215221522152215221522153000073ffffffffffffffffffffffffffffffffffffffff89160161179e57843414611756576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f4c325374616e646172644272696467653a20455448207769746864726177616c60448201527f73206d75737420696e636c7564652073756666696369656e742045544820766160648201527f6c75650000000000000000000000000000000000000000000000000000000000608482015260a401610171565b6117998787878787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061038c92505050565b6117ae565b6117ae8882898989898989611828565b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f73d170910aba9e6d50b102db522b1dbcd796216f5128b445aa2135272886497e898988886040516115c59493929190612784565b3073ffffffffffffffffffffffffffffffffffffffff8916036118cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5374616e646172644272696467653a206c6f63616c20746f6b656e2063616e6e60448201527f6f742062652073656c66000000000000000000000000000000000000000000006064820152608401610171565b6118d688611c0f565b15611a24576118e58888611c41565b611997576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a401610171565b6040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015260248201869052891690639dc29fac90604401600060405180830381600087803b158015611a0757600080fd5b505af1158015611a1b573d6000803e3d6000fd5b50505050611ab8565b611a4673ffffffffffffffffffffffffffffffffffffffff8916873087611dbc565b73ffffffffffffffffffffffffffffffffffffffff8089166000908152600260209081526040808320938b1683529290522054611a849085906128f6565b73ffffffffffffffffffffffffffffffffffffffff808a166000908152600260209081526040808320938c16835292905220555b611ac88888888888888888611404565b5050505050505050565b606081600003611b1557505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611b3f5780611b298161290e565b9150611b389050600a83612975565b9150611b19565b60008167ffffffffffffffff811115611b5a57611b5a612989565b6040519080825280601f01601f191660200182016040528015611b84576020820181803683370190505b5090505b8415611c0757611b99600183612882565b9150611ba6600a866129b8565b611bb19060306128f6565b60f81b818381518110611bc657611bc66129cc565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611c00600a86612975565b9450611b88565b949350505050565b6000611c3b827f1d1d8b6300000000000000000000000000000000000000000000000000000000611e1a565b92915050565b60008273ffffffffffffffffffffffffffffffffffffffff1663c01e1bd66040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cb2919061271e565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526109959084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611e3d565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526113bb9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611d3a565b6000611e2583611f49565b8015611e365750611e368383611fad565b9392505050565b6000611e9f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661207c9092919063ffffffff16565b8051909150156109955780806020019051810190611ebd91906129fb565b610995576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610171565b6000611f75827f01ffc9a700000000000000000000000000000000000000000000000000000000611fad565b8015611c3b5750611fa6827fffffffff00000000000000000000000000000000000000000000000000000000611fad565b1592915050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000178152825160009392849283928392918391908a617530fa92503d91506000519050828015612065575060208210155b80156120715750600081115b979650505050505050565b6060611c0784846000858573ffffffffffffffffffffffffffffffffffffffff85163b612105576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610171565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161212e9190612a1d565b60006040518083038185875af1925050503d806000811461216b576040519150601f19603f3d011682016040523d82523d6000602084013e612170565b606091505b50915091506120718282866060831561218a575081611e36565b82511561219a5782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017191906124f4565b73ffffffffffffffffffffffffffffffffffffffff811681146121f057600080fd5b50565b60008083601f84011261220557600080fd5b50813567ffffffffffffffff81111561221d57600080fd5b60208301915083602082850101111561223557600080fd5b9250929050565b600080600080600080600060c0888a03121561225757600080fd5b8735612262816121ce565b96506020880135612272816121ce565b95506040880135612282816121ce565b94506060880135612292816121ce565b93506080880135925060a088013567ffffffffffffffff8111156122b557600080fd5b6122c18a828b016121f3565b989b979a50959850939692959293505050565b803563ffffffff811681146122e857600080fd5b919050565b60008060006040848603121561230257600080fd5b61230b846122d4565b9250602084013567ffffffffffffffff81111561232757600080fd5b612333868287016121f3565b9497909650939450505050565b60008060008060006080868803121561235857600080fd5b8535612363816121ce565b94506020860135612373816121ce565b935060408601359250606086013567ffffffffffffffff81111561239657600080fd5b6123a2888289016121f3565b969995985093965092949392505050565b6000806000806000608086880312156123cb57600080fd5b85356123d6816121ce565b9450602086013593506123eb604087016122d4565b9250606086013567ffffffffffffffff81111561239657600080fd5b600080600080600080600060c0888a03121561242257600080fd5b873561242d816121ce565b9650602088013561243d816121ce565b9550604088013561244d816121ce565b945060608801359350612462608089016122d4565b925060a088013567ffffffffffffffff8111156122b557600080fd5b60005b83811015612499578181015183820152602001612481565b838111156113bb5750506000910152565b600081518084526124c281602086016020860161247e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611e3660208301846124aa565b60008060008060008060a0878903121561252057600080fd5b863561252b816121ce565b9550602087013561253b816121ce565b945060408701359350612550606088016122d4565b9250608087013567ffffffffffffffff81111561256c57600080fd5b61257889828a016121f3565b979a9699509497509295939492505050565b6000806040838503121561259d57600080fd5b82356125a8816121ce565b915060208301356125b8816121ce565b809150509250929050565b600080600080608085870312156125d957600080fd5b84356125e4816121ce565b935060208501356125f4816121ce565b92506040850135612604816121ce565b9396929550929360600135925050565b6000806000806060858703121561262a57600080fd5b8435612635816121ce565b9350612643602086016122d4565b9250604085013567ffffffffffffffff81111561265f57600080fd5b61266b878288016121f3565b95989497509550505050565b828152604060208201526000611c0760408301846124aa565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250836040830152608060608301526126cf60808301846124aa565b9695505050505050565b73ffffffffffffffffffffffffffffffffffffffff8416815260606020820152600061270860608301856124aa565b905063ffffffff83166040830152949350505050565b60006020828403121561273057600080fd5b8151611e36816121ce565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff851681528360208201526060604082015260006126cf60608301848661273b565b8381526040602082015260006127d460408301848661273b565b95945050505050565b600084516127ef81846020890161247e565b80830190507f2e00000000000000000000000000000000000000000000000000000000000000808252855161282b816001850160208a0161247e565b6001920191820152835161284681600284016020880161247e565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561289457612894612853565b500390565b600073ffffffffffffffffffffffffffffffffffffffff808a1683528089166020840152808816604084015280871660608401525084608083015260c060a08301526128e960c08301848661273b565b9998505050505050505050565b6000821982111561290957612909612853565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361293f5761293f612853565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261298457612984612946565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000826129c7576129c7612946565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215612a0d57600080fd5b81518015158114611e3657600080fd5b60008251612a2f81846020870161247e565b919091019291505056fea164736f6c634300080f000a", } // L2StandardBridgeABI is the input ABI used to generate the binding from. @@ -493,27 +493,6 @@ func (_L2StandardBridge *L2StandardBridgeTransactorSession) FinalizeDeposit(_l1T return _L2StandardBridge.Contract.FinalizeDeposit(&_L2StandardBridge.TransactOpts, _l1Token, _l2Token, _from, _to, _amount, _extraData) } -// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. -// -// Solidity: function initialize(address _otherBridge) returns() -func (_L2StandardBridge *L2StandardBridgeTransactor) Initialize(opts *bind.TransactOpts, _otherBridge common.Address) (*types.Transaction, error) { - return _L2StandardBridge.contract.Transact(opts, "initialize", _otherBridge) -} - -// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. -// -// Solidity: function initialize(address _otherBridge) returns() -func (_L2StandardBridge *L2StandardBridgeSession) Initialize(_otherBridge common.Address) (*types.Transaction, error) { - return _L2StandardBridge.Contract.Initialize(&_L2StandardBridge.TransactOpts, _otherBridge) -} - -// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. -// -// Solidity: function initialize(address _otherBridge) returns() -func (_L2StandardBridge *L2StandardBridgeTransactorSession) Initialize(_otherBridge common.Address) (*types.Transaction, error) { - return _L2StandardBridge.Contract.Initialize(&_L2StandardBridge.TransactOpts, _otherBridge) -} - // Withdraw is a paid mutator transaction binding the contract method 0x32b7006d. // // Solidity: function withdraw(address _l2Token, uint256 _amount, uint32 _minGasLimit, bytes _extraData) payable returns() @@ -1712,140 +1691,6 @@ func (_L2StandardBridge *L2StandardBridgeFilterer) ParseETHBridgeInitiated(log t return event, nil } -// L2StandardBridgeInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the L2StandardBridge contract. -type L2StandardBridgeInitializedIterator struct { - Event *L2StandardBridgeInitialized // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *L2StandardBridgeInitializedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(L2StandardBridgeInitialized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(L2StandardBridgeInitialized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *L2StandardBridgeInitializedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *L2StandardBridgeInitializedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// L2StandardBridgeInitialized represents a Initialized event raised by the L2StandardBridge contract. -type L2StandardBridgeInitialized struct { - Version uint8 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. -// -// Solidity: event Initialized(uint8 version) -func (_L2StandardBridge *L2StandardBridgeFilterer) FilterInitialized(opts *bind.FilterOpts) (*L2StandardBridgeInitializedIterator, error) { - - logs, sub, err := _L2StandardBridge.contract.FilterLogs(opts, "Initialized") - if err != nil { - return nil, err - } - return &L2StandardBridgeInitializedIterator{contract: _L2StandardBridge.contract, event: "Initialized", logs: logs, sub: sub}, nil -} - -// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. -// -// Solidity: event Initialized(uint8 version) -func (_L2StandardBridge *L2StandardBridgeFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *L2StandardBridgeInitialized) (event.Subscription, error) { - - logs, sub, err := _L2StandardBridge.contract.WatchLogs(opts, "Initialized") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(L2StandardBridgeInitialized) - if err := _L2StandardBridge.contract.UnpackLog(event, "Initialized", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. -// -// Solidity: event Initialized(uint8 version) -func (_L2StandardBridge *L2StandardBridgeFilterer) ParseInitialized(log types.Log) (*L2StandardBridgeInitialized, error) { - event := new(L2StandardBridgeInitialized) - if err := _L2StandardBridge.contract.UnpackLog(event, "Initialized", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - // L2StandardBridgeWithdrawalInitiatedIterator is returned from FilterWithdrawalInitiated and is used to iterate over the raw logs and unpacked data for WithdrawalInitiated events raised by the L2StandardBridge contract. type L2StandardBridgeWithdrawalInitiatedIterator struct { Event *L2StandardBridgeWithdrawalInitiated // Event containing the contract specifics and raw log diff --git a/op-bindings/bindings/l2standardbridge_more.go b/op-bindings/bindings/l2standardbridge_more.go index 3360e55e6f6e9..51f2398e117cb 100755 --- a/op-bindings/bindings/l2standardbridge_more.go +++ b/op-bindings/bindings/l2standardbridge_more.go @@ -9,11 +9,11 @@ import ( "github.com/ethereum-optimism/optimism/op-bindings/solc" ) -const L2StandardBridgeStorageLayoutJSON = "{\"storage\":[{\"astId\":26067,\"contract\":\"contracts/L2/L2StandardBridge.sol:L2StandardBridge\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":26070,\"contract\":\"contracts/L2/L2StandardBridge.sol:L2StandardBridge\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":25154,\"contract\":\"contracts/L2/L2StandardBridge.sol:L2StandardBridge\",\"label\":\"messenger\",\"offset\":2,\"slot\":\"0\",\"type\":\"t_contract(CrossDomainMessenger)24067\"},{\"astId\":25158,\"contract\":\"contracts/L2/L2StandardBridge.sol:L2StandardBridge\",\"label\":\"otherBridge\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_contract(StandardBridge)25835\"},{\"astId\":25165,\"contract\":\"contracts/L2/L2StandardBridge.sol:L2StandardBridge\",\"label\":\"deposits\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_contract(CrossDomainMessenger)24067\":{\"encoding\":\"inplace\",\"label\":\"contract CrossDomainMessenger\",\"numberOfBytes\":\"20\"},\"t_contract(StandardBridge)25835\":{\"encoding\":\"inplace\",\"label\":\"contract StandardBridge\",\"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_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}" +const L2StandardBridgeStorageLayoutJSON = "{\"storage\":[{\"astId\":25104,\"contract\":\"contracts/L2/L2StandardBridge.sol:L2StandardBridge\",\"label\":\"spacer0\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint256\"},{\"astId\":25107,\"contract\":\"contracts/L2/L2StandardBridge.sol:L2StandardBridge\",\"label\":\"spacer1\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"},{\"astId\":25114,\"contract\":\"contracts/L2/L2StandardBridge.sol:L2StandardBridge\",\"label\":\"deposits\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"}],\"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_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"}}}" var L2StandardBridgeStorageLayout = new(solc.StorageLayout) -var L2StandardBridgeDeployedBin = "0x6080604052600436106100ec5760003560e01c8063662a633a1161008a578063af565a1311610059578063af565a131461032f578063c4d66de81461034f578063c89701a21461036f578063e11013dd1461039c57600080fd5b8063662a633a146102a357806387087623146102b65780638f601f66146102d6578063a3a795481461031c57600080fd5b806332b7006d116100c657806332b7006d146101f15780633cb747bf14610204578063540abf731461026157806354fd4d501461028157600080fd5b80630166a07a146101ab57806309fc8843146101cb5780631635f5fd146101de57600080fd5b366101a657333b15610185576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084015b60405180910390fd5b6101a433333462030d40604051806020016040528060008152506103cb565b005b600080fd5b3480156101b757600080fd5b506101a46101c636600461248e565b610567565b6101a46101d936600461253f565b6108b2565b6101a46101ec366004612592565b610989565b6101a46101ff366004612605565b610d6e565b34801561021057600080fd5b506000546102379062010000900473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561026d57600080fd5b506101a461027c366004612659565b610e13565b34801561028d57600080fd5b50610296610e23565b6040516102589190612746565b6101a46102b136600461248e565b610ec6565b3480156102c257600080fd5b506101a46102d1366004612759565b610fb3565b3480156102e257600080fd5b5061030e6102f13660046127dc565b600260209081526000928352604080842090915290825290205481565b604051908152602001610258565b6101a461032a366004612759565b611052565b34801561033b57600080fd5b506101a461034a366004612815565b611061565b34801561035b57600080fd5b506101a461036a366004612866565b611374565b34801561037b57600080fd5b506001546102379073ffffffffffffffffffffffffffffffffffffffff1681565b6101a46103aa366004612883565b61151d565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f2849b43074093a05396b6f2a937dee8565b15a48a7b3d4bffb732a5017380af5858460405161042a9291906128e6565b60405180910390a360005460015460405173ffffffffffffffffffffffffffffffffffffffff62010000909304831692633dbb202b9287929116907f1635f5fd000000000000000000000000000000000000000000000000000000009061049b908b908b9086908a906024016128ff565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e086901b909216825261052e92918890600401612948565b6000604051808303818588803b15801561054757600080fd5b505af115801561055b573d6000803e3d6000fd5b50505050505050505050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff16331480156106495750600154600054604080517f6e296e45000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff938416936201000090930490921691636e296e45916004808201926020929091908290030181865afa15801561060d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610631919061298d565b73ffffffffffffffffffffffffffffffffffffffff16145b6106fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a40161017c565b6040517faf565a1300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808916600483015280881660248301528516604482015260648101849052309063af565a1390608401600060405180830381600087803b15801561077957600080fd5b505af192505050801561078a575060015b6108265761079f878786888760008888611560565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f2755817676249910615f0a6a240ad225abe5343df8d527f7294c4af36a92009a8787878760405161081994939291906129f3565b60405180910390a46108a9565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fd59c65b35445225835c83f50b6ede06a7be047d22e357073e250d9af537518cd878787876040516108a094939291906129f3565b60405180910390a45b50505050505050565b333b15610941576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f41000000000000000000606482015260840161017c565b6109843333348686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506103cb92505050565b505050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff1633148015610a6b5750600154600054604080517f6e296e45000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff938416936201000090930490921691636e296e45916004808201926020929091908290030181865afa158015610a2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a53919061298d565b73ffffffffffffffffffffffffffffffffffffffff16145b610b1d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a40161017c565b823414610bac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5374616e646172644272696467653a20616d6f756e742073656e7420646f657360448201527f206e6f74206d6174636820616d6f756e74207265717569726564000000000000606482015260840161017c565b3073ffffffffffffffffffffffffffffffffffffffff851603610c51576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a2063616e6e6f742073656e6420746f207360448201527f656c660000000000000000000000000000000000000000000000000000000000606482015260840161017c565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f31b2166ff604fc5672ea5df08a78081d2bc6d746cadce880747f3643d819e83d858585604051610cb293929190612a29565b60405180910390a36000610cd7855a866040518060200160405280600081525061171d565b905080610d66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a20455448207472616e736665722066616960448201527f6c65640000000000000000000000000000000000000000000000000000000000606482015260840161017c565b505050505050565b333b15610dfd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f41000000000000000000606482015260840161017c565b610e0c85333387878787611737565b5050505050565b6108a9878733888888888861196e565b6060610e4e7f0000000000000000000000000000000000000000000000000000000000000000611c18565b610e777f0000000000000000000000000000000000000000000000000000000000000000611c18565b610ea07f0000000000000000000000000000000000000000000000000000000000000000611c18565b604051602001610eb293929190612a4c565b604051602081830303815290604052905090565b73ffffffffffffffffffffffffffffffffffffffff8716158015610f13575073ffffffffffffffffffffffffffffffffffffffff861673deaddeaddeaddeaddeaddeaddeaddeaddead0000145b15610f2a57610f258585858585610989565b610f39565b610f3986888787878787610567565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fb0444523268717a02698be47d0803aa7468c00acbed2f8bd93a0459cde61dd89878787876040516108a094939291906129f3565b333b15611042576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f41000000000000000000606482015260840161017c565b610d66868633338888888861196e565b610d6686338787878787611737565b3330146110f0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642062792073656c6600000000000000000000000000606482015260840161017c565b3073ffffffffffffffffffffffffffffffffffffffff851603611195576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5374616e646172644272696467653a206c6f63616c20746f6b656e2063616e6e60448201527f6f742062652073656c6600000000000000000000000000000000000000000000606482015260840161017c565b61119e84611d55565b156112ec576111ad8484611d87565b61125f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a40161017c565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390528516906340c10f1990604401600060405180830381600087803b1580156112cf57600080fd5b505af11580156112e3573d6000803e3d6000fd5b5050505061136e565b73ffffffffffffffffffffffffffffffffffffffff80851660009081526002602090815260408083209387168352929052205461132a908290612af1565b73ffffffffffffffffffffffffffffffffffffffff80861660008181526002602090815260408083209489168352939052919091209190915561136e908383611e2e565b50505050565b600054610100900460ff16158080156113945750600054600160ff909116105b806113ae5750303b1580156113ae575060005460ff166001145b61143a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161017c565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561149857600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6114b673420000000000000000000000000000000000000783611f02565b801561151957600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b61136e3385348686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506103cb92505050565b60005460015460405173ffffffffffffffffffffffffffffffffffffffff62010000909304831692633dbb202b9216907f0166a07a00000000000000000000000000000000000000000000000000000000906115cc908c908e908d908d908d908c908c90602401612b08565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e085901b909216825261165f92918890600401612948565b600060405180830381600087803b15801561167957600080fd5b505af115801561168d573d6000803e3d6000fd5b505050508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167f7ff126db8024424bbfd9826e8ab82ff59136289ea440b04b39a0df1b03b9cabf8888878760405161170b94939291906129f3565b60405180910390a45050505050505050565b600080600080845160208601878a8af19695505050505050565b60008773ffffffffffffffffffffffffffffffffffffffff1663c01e1bd66040518163ffffffff1660e01b8152600401602060405180830381865afa158015611784573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a8919061298d565b90507fffffffffffffffffffffffff215221522152215221522152215221522153000073ffffffffffffffffffffffffffffffffffffffff8916016118e45784341461189c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f4c325374616e646172644272696467653a20455448207769746864726177616c60448201527f73206d75737420696e636c7564652073756666696369656e742045544820766160648201527f6c75650000000000000000000000000000000000000000000000000000000000608482015260a40161017c565b6118df8787878787878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506103cb92505050565b6118f4565b6118f4888289898989898961196e565b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f73d170910aba9e6d50b102db522b1dbcd796216f5128b445aa2135272886497e8989888860405161170b94939291906129f3565b3073ffffffffffffffffffffffffffffffffffffffff891603611a13576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5374616e646172644272696467653a206c6f63616c20746f6b656e2063616e6e60448201527f6f742062652073656c6600000000000000000000000000000000000000000000606482015260840161017c565b611a1c88611d55565b15611b6a57611a2b8888611d87565b611add576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a40161017c565b6040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015260248201869052891690639dc29fac90604401600060405180830381600087803b158015611b4d57600080fd5b505af1158015611b61573d6000803e3d6000fd5b50505050611bfe565b611b8c73ffffffffffffffffffffffffffffffffffffffff891687308761200e565b73ffffffffffffffffffffffffffffffffffffffff8089166000908152600260209081526040808320938b1683529290522054611bca908590612b65565b73ffffffffffffffffffffffffffffffffffffffff808a166000908152600260209081526040808320938c16835292905220555b611c0e8888888888888888611560565b5050505050505050565b606081600003611c5b57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611c855780611c6f81612b7d565b9150611c7e9050600a83612be4565b9150611c5f565b60008167ffffffffffffffff811115611ca057611ca0612bf8565b6040519080825280601f01601f191660200182016040528015611cca576020820181803683370190505b5090505b8415611d4d57611cdf600183612af1565b9150611cec600a86612c27565b611cf7906030612b65565b60f81b818381518110611d0c57611d0c612c3b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611d46600a86612be4565b9450611cce565b949350505050565b6000611d81827f1d1d8b630000000000000000000000000000000000000000000000000000000061206c565b92915050565b60008273ffffffffffffffffffffffffffffffffffffffff1663c01e1bd66040518163ffffffff1660e01b8152600401602060405180830381865afa158015611dd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611df8919061298d565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526109849084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261208f565b600054610100900460ff16611f99576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161017c565b600080547fffffffffffffffffffff0000000000000000000000000000000000000000ffff166201000073ffffffffffffffffffffffffffffffffffffffff94851602179055600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909216179055565b60405173ffffffffffffffffffffffffffffffffffffffff8085166024830152831660448201526064810182905261136e9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611e80565b60006120778361219b565b8015612088575061208883836121ff565b9392505050565b60006120f1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166122ce9092919063ffffffff16565b805190915015610984578080602001905181019061210f9190612c6a565b610984576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161017c565b60006121c7827f01ffc9a7000000000000000000000000000000000000000000000000000000006121ff565b8015611d8157506121f8827fffffffff000000000000000000000000000000000000000000000000000000006121ff565b1592915050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000178152825160009392849283928392918391908a617530fa92503d915060005190508280156122b7575060208210155b80156122c35750600081115b979650505050505050565b6060611d4d84846000858573ffffffffffffffffffffffffffffffffffffffff85163b612357576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161017c565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516123809190612c8c565b60006040518083038185875af1925050503d80600081146123bd576040519150601f19603f3d011682016040523d82523d6000602084013e6123c2565b606091505b50915091506122c3828286606083156123dc575081612088565b8251156123ec5782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017c9190612746565b73ffffffffffffffffffffffffffffffffffffffff8116811461244257600080fd5b50565b60008083601f84011261245757600080fd5b50813567ffffffffffffffff81111561246f57600080fd5b60208301915083602082850101111561248757600080fd5b9250929050565b600080600080600080600060c0888a0312156124a957600080fd5b87356124b481612420565b965060208801356124c481612420565b955060408801356124d481612420565b945060608801356124e481612420565b93506080880135925060a088013567ffffffffffffffff81111561250757600080fd5b6125138a828b01612445565b989b979a50959850939692959293505050565b803563ffffffff8116811461253a57600080fd5b919050565b60008060006040848603121561255457600080fd5b61255d84612526565b9250602084013567ffffffffffffffff81111561257957600080fd5b61258586828701612445565b9497909650939450505050565b6000806000806000608086880312156125aa57600080fd5b85356125b581612420565b945060208601356125c581612420565b935060408601359250606086013567ffffffffffffffff8111156125e857600080fd5b6125f488828901612445565b969995985093965092949392505050565b60008060008060006080868803121561261d57600080fd5b853561262881612420565b94506020860135935061263d60408701612526565b9250606086013567ffffffffffffffff8111156125e857600080fd5b600080600080600080600060c0888a03121561267457600080fd5b873561267f81612420565b9650602088013561268f81612420565b9550604088013561269f81612420565b9450606088013593506126b460808901612526565b925060a088013567ffffffffffffffff81111561250757600080fd5b60005b838110156126eb5781810151838201526020016126d3565b8381111561136e5750506000910152565b600081518084526127148160208601602086016126d0565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061208860208301846126fc565b60008060008060008060a0878903121561277257600080fd5b863561277d81612420565b9550602087013561278d81612420565b9450604087013593506127a260608801612526565b9250608087013567ffffffffffffffff8111156127be57600080fd5b6127ca89828a01612445565b979a9699509497509295939492505050565b600080604083850312156127ef57600080fd5b82356127fa81612420565b9150602083013561280a81612420565b809150509250929050565b6000806000806080858703121561282b57600080fd5b843561283681612420565b9350602085013561284681612420565b9250604085013561285681612420565b9396929550929360600135925050565b60006020828403121561287857600080fd5b813561208881612420565b6000806000806060858703121561289957600080fd5b84356128a481612420565b93506128b260208601612526565b9250604085013567ffffffffffffffff8111156128ce57600080fd5b6128da87828801612445565b95989497509550505050565b828152604060208201526000611d4d60408301846126fc565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152508360408301526080606083015261293e60808301846126fc565b9695505050505050565b73ffffffffffffffffffffffffffffffffffffffff8416815260606020820152600061297760608301856126fc565b905063ffffffff83166040830152949350505050565b60006020828403121561299f57600080fd5b815161208881612420565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff8516815283602082015260606040820152600061293e6060830184866129aa565b838152604060208201526000612a436040830184866129aa565b95945050505050565b60008451612a5e8184602089016126d0565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551612a9a816001850160208a016126d0565b60019201918201528351612ab58160028401602088016126d0565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015612b0357612b03612ac2565b500390565b600073ffffffffffffffffffffffffffffffffffffffff808a1683528089166020840152808816604084015280871660608401525084608083015260c060a0830152612b5860c0830184866129aa565b9998505050505050505050565b60008219821115612b7857612b78612ac2565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612bae57612bae612ac2565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082612bf357612bf3612bb5565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082612c3657612c36612bb5565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215612c7c57600080fd5b8151801515811461208857600080fd5b60008251612c9e8184602087016126d0565b919091019291505056fea164736f6c634300080f000a" +var L2StandardBridgeDeployedBin = "0x6080604052600436106100e15760003560e01c8063662a633a1161007f578063a3a7954811610059578063a3a7954814610312578063af565a1314610325578063c89701a214610345578063e11013dd1461037957600080fd5b8063662a633a1461029957806387087623146102ac5780638f601f66146102cc57600080fd5b806332b7006d116100bb57806332b7006d146101e65780633cb747bf146101f9578063540abf731461025757806354fd4d501461027757600080fd5b80630166a07a146101a057806309fc8843146101c05780631635f5fd146101d357600080fd5b3661019b57333b1561017a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084015b60405180910390fd5b61019933333462030d406040518060200160405280600081525061038c565b005b600080fd5b3480156101ac57600080fd5b506101996101bb36600461223c565b61053c565b6101996101ce3660046122ed565b6108c3565b6101996101e1366004612340565b61099a565b6101996101f43660046123b3565b610dbb565b34801561020557600080fd5b5061022d7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561026357600080fd5b50610199610272366004612407565b610e60565b34801561028357600080fd5b5061028c610e70565b60405161024e91906124f4565b6101996102a736600461223c565b610f13565b3480156102b857600080fd5b506101996102c7366004612507565b611000565b3480156102d857600080fd5b506103046102e736600461258a565b600260209081526000928352604080842090915290825290205481565b60405190815260200161024e565b610199610320366004612507565b61109f565b34801561033157600080fd5b506101996103403660046125c3565b6110ae565b34801561035157600080fd5b5061022d7f000000000000000000000000000000000000000000000000000000000000000081565b610199610387366004612614565b6113c1565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f2849b43074093a05396b6f2a937dee8565b15a48a7b3d4bffb732a5017380af585846040516103eb929190612677565b60405180910390a37f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633dbb202b847f0000000000000000000000000000000000000000000000000000000000000000631635f5fd60e01b898989886040516024016104709493929190612690565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e086901b9092168252610503929188906004016126d9565b6000604051808303818588803b15801561051c57600080fd5b505af1158015610530573d6000803e3d6000fd5b50505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801561065a57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa15801561061e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610642919061271e565b73ffffffffffffffffffffffffffffffffffffffff16145b61070c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a401610171565b6040517faf565a1300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808916600483015280881660248301528516604482015260648101849052309063af565a1390608401600060405180830381600087803b15801561078a57600080fd5b505af192505050801561079b575060015b610837576107b0878786888760008888611404565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f2755817676249910615f0a6a240ad225abe5343df8d527f7294c4af36a92009a8787878760405161082a9493929190612784565b60405180910390a46108ba565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fd59c65b35445225835c83f50b6ede06a7be047d22e357073e250d9af537518cd878787876040516108b19493929190612784565b60405180910390a45b50505050505050565b333b15610952576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f410000000000000000006064820152608401610171565b6109953333348686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061038c92505050565b505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015610ab857507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa0919061271e565b73ffffffffffffffffffffffffffffffffffffffff16145b610b6a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a401610171565b823414610bf9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5374616e646172644272696467653a20616d6f756e742073656e7420646f657360448201527f206e6f74206d6174636820616d6f756e742072657175697265640000000000006064820152608401610171565b3073ffffffffffffffffffffffffffffffffffffffff851603610c9e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a2063616e6e6f742073656e6420746f207360448201527f656c6600000000000000000000000000000000000000000000000000000000006064820152608401610171565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f31b2166ff604fc5672ea5df08a78081d2bc6d746cadce880747f3643d819e83d858585604051610cff939291906127ba565b60405180910390a36000610d24855a86604051806020016040528060008152506115d7565b905080610db3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a20455448207472616e736665722066616960448201527f6c656400000000000000000000000000000000000000000000000000000000006064820152608401610171565b505050505050565b333b15610e4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f410000000000000000006064820152608401610171565b610e59853333878787876115f1565b5050505050565b6108ba8787338888888888611828565b6060610e9b7f0000000000000000000000000000000000000000000000000000000000000000611ad2565b610ec47f0000000000000000000000000000000000000000000000000000000000000000611ad2565b610eed7f0000000000000000000000000000000000000000000000000000000000000000611ad2565b604051602001610eff939291906127dd565b604051602081830303815290604052905090565b73ffffffffffffffffffffffffffffffffffffffff8716158015610f60575073ffffffffffffffffffffffffffffffffffffffff861673deaddeaddeaddeaddeaddeaddeaddeaddead0000145b15610f7757610f72858585858561099a565b610f86565b610f868688878787878761053c565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fb0444523268717a02698be47d0803aa7468c00acbed2f8bd93a0459cde61dd89878787876040516108b19493929190612784565b333b1561108f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f410000000000000000006064820152608401610171565b610db38686333388888888611828565b610db3863387878787876115f1565b33301461113d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642062792073656c66000000000000000000000000006064820152608401610171565b3073ffffffffffffffffffffffffffffffffffffffff8516036111e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5374616e646172644272696467653a206c6f63616c20746f6b656e2063616e6e60448201527f6f742062652073656c66000000000000000000000000000000000000000000006064820152608401610171565b6111eb84611c0f565b15611339576111fa8484611c41565b6112ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a401610171565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390528516906340c10f1990604401600060405180830381600087803b15801561131c57600080fd5b505af1158015611330573d6000803e3d6000fd5b505050506113bb565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260026020908152604080832093871683529290522054611377908290612882565b73ffffffffffffffffffffffffffffffffffffffff8086166000818152600260209081526040808320948916835293905291909120919091556113bb908383611ce8565b50505050565b6113bb3385348686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061038c92505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633dbb202b7f0000000000000000000000000000000000000000000000000000000000000000630166a07a60e01b8a8c8b8b8b8a8a6040516024016114869796959493929190612899565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e085901b9092168252611519929188906004016126d9565b600060405180830381600087803b15801561153357600080fd5b505af1158015611547573d6000803e3d6000fd5b505050508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167f7ff126db8024424bbfd9826e8ab82ff59136289ea440b04b39a0df1b03b9cabf888887876040516115c59493929190612784565b60405180910390a45050505050505050565b600080600080845160208601878a8af19695505050505050565b60008773ffffffffffffffffffffffffffffffffffffffff1663c01e1bd66040518163ffffffff1660e01b8152600401602060405180830381865afa15801561163e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611662919061271e565b90507fffffffffffffffffffffffff215221522152215221522152215221522153000073ffffffffffffffffffffffffffffffffffffffff89160161179e57843414611756576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f4c325374616e646172644272696467653a20455448207769746864726177616c60448201527f73206d75737420696e636c7564652073756666696369656e742045544820766160648201527f6c75650000000000000000000000000000000000000000000000000000000000608482015260a401610171565b6117998787878787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061038c92505050565b6117ae565b6117ae8882898989898989611828565b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f73d170910aba9e6d50b102db522b1dbcd796216f5128b445aa2135272886497e898988886040516115c59493929190612784565b3073ffffffffffffffffffffffffffffffffffffffff8916036118cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5374616e646172644272696467653a206c6f63616c20746f6b656e2063616e6e60448201527f6f742062652073656c66000000000000000000000000000000000000000000006064820152608401610171565b6118d688611c0f565b15611a24576118e58888611c41565b611997576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a401610171565b6040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015260248201869052891690639dc29fac90604401600060405180830381600087803b158015611a0757600080fd5b505af1158015611a1b573d6000803e3d6000fd5b50505050611ab8565b611a4673ffffffffffffffffffffffffffffffffffffffff8916873087611dbc565b73ffffffffffffffffffffffffffffffffffffffff8089166000908152600260209081526040808320938b1683529290522054611a849085906128f6565b73ffffffffffffffffffffffffffffffffffffffff808a166000908152600260209081526040808320938c16835292905220555b611ac88888888888888888611404565b5050505050505050565b606081600003611b1557505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611b3f5780611b298161290e565b9150611b389050600a83612975565b9150611b19565b60008167ffffffffffffffff811115611b5a57611b5a612989565b6040519080825280601f01601f191660200182016040528015611b84576020820181803683370190505b5090505b8415611c0757611b99600183612882565b9150611ba6600a866129b8565b611bb19060306128f6565b60f81b818381518110611bc657611bc66129cc565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611c00600a86612975565b9450611b88565b949350505050565b6000611c3b827f1d1d8b6300000000000000000000000000000000000000000000000000000000611e1a565b92915050565b60008273ffffffffffffffffffffffffffffffffffffffff1663c01e1bd66040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cb2919061271e565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526109959084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611e3d565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526113bb9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611d3a565b6000611e2583611f49565b8015611e365750611e368383611fad565b9392505050565b6000611e9f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661207c9092919063ffffffff16565b8051909150156109955780806020019051810190611ebd91906129fb565b610995576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610171565b6000611f75827f01ffc9a700000000000000000000000000000000000000000000000000000000611fad565b8015611c3b5750611fa6827fffffffff00000000000000000000000000000000000000000000000000000000611fad565b1592915050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000178152825160009392849283928392918391908a617530fa92503d91506000519050828015612065575060208210155b80156120715750600081115b979650505050505050565b6060611c0784846000858573ffffffffffffffffffffffffffffffffffffffff85163b612105576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610171565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161212e9190612a1d565b60006040518083038185875af1925050503d806000811461216b576040519150601f19603f3d011682016040523d82523d6000602084013e612170565b606091505b50915091506120718282866060831561218a575081611e36565b82511561219a5782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017191906124f4565b73ffffffffffffffffffffffffffffffffffffffff811681146121f057600080fd5b50565b60008083601f84011261220557600080fd5b50813567ffffffffffffffff81111561221d57600080fd5b60208301915083602082850101111561223557600080fd5b9250929050565b600080600080600080600060c0888a03121561225757600080fd5b8735612262816121ce565b96506020880135612272816121ce565b95506040880135612282816121ce565b94506060880135612292816121ce565b93506080880135925060a088013567ffffffffffffffff8111156122b557600080fd5b6122c18a828b016121f3565b989b979a50959850939692959293505050565b803563ffffffff811681146122e857600080fd5b919050565b60008060006040848603121561230257600080fd5b61230b846122d4565b9250602084013567ffffffffffffffff81111561232757600080fd5b612333868287016121f3565b9497909650939450505050565b60008060008060006080868803121561235857600080fd5b8535612363816121ce565b94506020860135612373816121ce565b935060408601359250606086013567ffffffffffffffff81111561239657600080fd5b6123a2888289016121f3565b969995985093965092949392505050565b6000806000806000608086880312156123cb57600080fd5b85356123d6816121ce565b9450602086013593506123eb604087016122d4565b9250606086013567ffffffffffffffff81111561239657600080fd5b600080600080600080600060c0888a03121561242257600080fd5b873561242d816121ce565b9650602088013561243d816121ce565b9550604088013561244d816121ce565b945060608801359350612462608089016122d4565b925060a088013567ffffffffffffffff8111156122b557600080fd5b60005b83811015612499578181015183820152602001612481565b838111156113bb5750506000910152565b600081518084526124c281602086016020860161247e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611e3660208301846124aa565b60008060008060008060a0878903121561252057600080fd5b863561252b816121ce565b9550602087013561253b816121ce565b945060408701359350612550606088016122d4565b9250608087013567ffffffffffffffff81111561256c57600080fd5b61257889828a016121f3565b979a9699509497509295939492505050565b6000806040838503121561259d57600080fd5b82356125a8816121ce565b915060208301356125b8816121ce565b809150509250929050565b600080600080608085870312156125d957600080fd5b84356125e4816121ce565b935060208501356125f4816121ce565b92506040850135612604816121ce565b9396929550929360600135925050565b6000806000806060858703121561262a57600080fd5b8435612635816121ce565b9350612643602086016122d4565b9250604085013567ffffffffffffffff81111561265f57600080fd5b61266b878288016121f3565b95989497509550505050565b828152604060208201526000611c0760408301846124aa565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250836040830152608060608301526126cf60808301846124aa565b9695505050505050565b73ffffffffffffffffffffffffffffffffffffffff8416815260606020820152600061270860608301856124aa565b905063ffffffff83166040830152949350505050565b60006020828403121561273057600080fd5b8151611e36816121ce565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff851681528360208201526060604082015260006126cf60608301848661273b565b8381526040602082015260006127d460408301848661273b565b95945050505050565b600084516127ef81846020890161247e565b80830190507f2e00000000000000000000000000000000000000000000000000000000000000808252855161282b816001850160208a0161247e565b6001920191820152835161284681600284016020880161247e565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561289457612894612853565b500390565b600073ffffffffffffffffffffffffffffffffffffffff808a1683528089166020840152808816604084015280871660608401525084608083015260c060a08301526128e960c08301848661273b565b9998505050505050505050565b6000821982111561290957612909612853565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361293f5761293f612853565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261298457612984612946565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000826129c7576129c7612946565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215612a0d57600080fd5b81518015158114611e3657600080fd5b60008251612a2f81846020870161247e565b919091019291505056fea164736f6c634300080f000a" func init() { if err := json.Unmarshal([]byte(L2StandardBridgeStorageLayoutJSON), L2StandardBridgeStorageLayout); err != nil { diff --git a/op-bindings/bindings/l2tol1messagepasser_more.go b/op-bindings/bindings/l2tol1messagepasser_more.go index 3ce9619d99a98..6982b549604d4 100755 --- a/op-bindings/bindings/l2tol1messagepasser_more.go +++ b/op-bindings/bindings/l2tol1messagepasser_more.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum-optimism/optimism/op-bindings/solc" ) -const L2ToL1MessagePasserStorageLayoutJSON = "{\"storage\":[{\"astId\":2393,\"contract\":\"contracts/L2/L2ToL1MessagePasser.sol:L2ToL1MessagePasser\",\"label\":\"sentMessages\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":2396,\"contract\":\"contracts/L2/L2ToL1MessagePasser.sol:L2ToL1MessagePasser\",\"label\":\"nonce\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"}],\"types\":{\"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_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"}}}" +const L2ToL1MessagePasserStorageLayoutJSON = "{\"storage\":[{\"astId\":2365,\"contract\":\"contracts/L2/L2ToL1MessagePasser.sol:L2ToL1MessagePasser\",\"label\":\"sentMessages\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":2368,\"contract\":\"contracts/L2/L2ToL1MessagePasser.sol:L2ToL1MessagePasser\",\"label\":\"nonce\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"}],\"types\":{\"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_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"}}}" var L2ToL1MessagePasserStorageLayout = new(solc.StorageLayout) diff --git a/op-bindings/bindings/legacyerc20eth_more.go b/op-bindings/bindings/legacyerc20eth_more.go index 8b26294c3f832..260fcde6be199 100755 --- a/op-bindings/bindings/legacyerc20eth_more.go +++ b/op-bindings/bindings/legacyerc20eth_more.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum-optimism/optimism/op-bindings/solc" ) -const LegacyERC20ETHStorageLayoutJSON = "{\"storage\":[{\"astId\":50177,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_balances\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":50183,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_allowances\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"},{\"astId\":50185,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_totalSupply\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":50187,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_name\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_string_storage\"},{\"astId\":50189,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_symbol\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_string_storage\"},{\"astId\":24078,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"remoteToken\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_address\"},{\"astId\":24081,\"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\":26758,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_balances\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":26764,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_allowances\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"},{\"astId\":26766,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_totalSupply\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":26768,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_name\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_string_storage\"},{\"astId\":26770,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_symbol\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_string_storage\"},{\"astId\":24025,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"remoteToken\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_address\"},{\"astId\":24028,\"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) diff --git a/op-bindings/bindings/optimismportal_more.go b/op-bindings/bindings/optimismportal_more.go index bcda4761d407b..d1e9bfbcc2139 100755 --- a/op-bindings/bindings/optimismportal_more.go +++ b/op-bindings/bindings/optimismportal_more.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum-optimism/optimism/op-bindings/solc" ) -const OptimismPortalStorageLayoutJSON = "{\"storage\":[{\"astId\":26067,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":26070,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1388,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"params\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_struct(ResourceParams)1358_storage\"},{\"astId\":1393,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":961,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"l2Sender\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":974,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"finalizedWithdrawals\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":979,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"53\",\"type\":\"t_array(t_uint256)48_storage\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)48_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[48]\",\"numberOfBytes\":\"1536\"},\"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)1358_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\":26014,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":26017,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1374,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"params\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_struct(ResourceParams)1344_storage\"},{\"astId\":1379,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":947,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"l2Sender\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":960,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"finalizedWithdrawals\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":965,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"53\",\"type\":\"t_array(t_uint256)48_storage\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)48_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[48]\",\"numberOfBytes\":\"1536\"},\"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)1344_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) diff --git a/op-bindings/bindings/sequencerfeevault_more.go b/op-bindings/bindings/sequencerfeevault_more.go index a0735a8ffaacd..ea79d46fb57e4 100755 --- a/op-bindings/bindings/sequencerfeevault_more.go +++ b/op-bindings/bindings/sequencerfeevault_more.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum-optimism/optimism/op-bindings/solc" ) -const SequencerFeeVaultStorageLayoutJSON = "{\"storage\":[{\"astId\":2541,\"contract\":\"contracts/L2/SequencerFeeVault.sol:SequencerFeeVault\",\"label\":\"l1FeeWallet\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"}}}" +const SequencerFeeVaultStorageLayoutJSON = "{\"storage\":[{\"astId\":2513,\"contract\":\"contracts/L2/SequencerFeeVault.sol:SequencerFeeVault\",\"label\":\"l1FeeWallet\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"}}}" var SequencerFeeVaultStorageLayout = new(solc.StorageLayout) diff --git a/op-chain-ops/genesis/config.go b/op-chain-ops/genesis/config.go index d9bd0ce55fd7d..90294fe71f74b 100644 --- a/op-chain-ops/genesis/config.go +++ b/op-chain-ops/genesis/config.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum/go-ethereum/rpc" "github.com/ethereum-optimism/optimism/op-bindings/predeploys" + "github.com/ethereum-optimism/optimism/op-chain-ops/immutables" "github.com/ethereum-optimism/optimism/op-chain-ops/state" "github.com/ethereum/go-ethereum/common" ) @@ -99,6 +100,18 @@ func NewDeployConfigWithNetwork(network, path string) (*DeployConfig, error) { return NewDeployConfig(deployConfig) } +// NewL2ImmutableConfig will create an ImmutableConfig given an instance of a +// Hardhat and a DeployConfig. +func NewL2ImmutableConfig(config *DeployConfig, block *types.Block, proxyL1StandardBridge common.Address, proxyL1CrossDomainMessenger common.Address) (immutables.ImmutableConfig, error) { + immutable := make(immutables.ImmutableConfig) + + immutable["L2StandardBridge"] = immutables.ImmutableValues{ + "otherBridge": proxyL1StandardBridge, + } + + return immutable, nil +} + // StorageConfig represents the storage configuration for the L2 predeploy // contracts. type StorageConfig map[string]state.StorageValues @@ -132,12 +145,6 @@ func NewL2StorageConfig(config *DeployConfig, block *types.Block, proxyL1Standar "scalar": config.GasPriceOracleScalar, "decimals": config.GasPriceOracleDecimals, } - storage["L2StandardBridge"] = state.StorageValues{ - "_initialized": true, - "_initializing": false, - "messenger": predeploys.L2CrossDomainMessenger, - "otherBridge": proxyL1StandardBridge, - } storage["SequencerFeeVault"] = state.StorageValues{ "l1FeeWallet": config.OptimismL1FeeRecipient, } diff --git a/op-chain-ops/genesis/layer_one.go b/op-chain-ops/genesis/layer_one.go index 50f536b9669c3..181c0ecda9d9f 100644 --- a/op-chain-ops/genesis/layer_one.go +++ b/op-chain-ops/genesis/layer_one.go @@ -123,20 +123,12 @@ func BuildL1DeveloperGenesis(config *DeployConfig) (*core.Genesis, error) { return nil, err } - l1SBrABI, err := bindings.L1StandardBridgeMetaData.GetAbi() - if err != nil { - return nil, err - } - data, err = l1SBrABI.Pack("initialize", predeploys.DevL1CrossDomainMessengerAddr) - if err != nil { - return nil, err - } if err := upgradeProxy( backend, opts, depsByName["L1StandardBridgeProxy"].Address, depsByName["L1StandardBridge"].Address, - data, + nil, ); err != nil { return nil, err } diff --git a/op-chain-ops/genesis/layer_two.go b/op-chain-ops/genesis/layer_two.go index 112c28ceea391..f1726a06afdb3 100644 --- a/op-chain-ops/genesis/layer_two.go +++ b/op-chain-ops/genesis/layer_two.go @@ -52,7 +52,17 @@ func BuildL2Genesis(db *state.MemoryStateDB, config *DeployConfig, l1Block *type return nil, err } - if err := SetImplementations(db, storage); err != nil { + immutable, err := NewL2ImmutableConfig( + config, + l1Block, + l2Addrs.L1StandardBridgeProxy, + l2Addrs.L1CrossDomainMessengerProxy, + ) + if err != nil { + return nil, err + } + + if err := SetImplementations(db, storage, immutable); err != nil { return nil, err } diff --git a/op-chain-ops/genesis/setters.go b/op-chain-ops/genesis/setters.go index 940a9372bab2d..05237e51d9e35 100644 --- a/op-chain-ops/genesis/setters.go +++ b/op-chain-ops/genesis/setters.go @@ -62,8 +62,8 @@ func setProxies(db vm.StateDB, proxyAdminAddr common.Address, namespace *big.Int // SetImplementations will set the implmentations of the contracts in the state // and configure the proxies to point to the implementations. It also sets // the appropriate storage values for each contract at the proxy address. -func SetImplementations(db vm.StateDB, storage StorageConfig) error { - deployResults, err := immutables.BuildOptimism() +func SetImplementations(db vm.StateDB, storage StorageConfig, immutable immutables.ImmutableConfig) error { + deployResults, err := immutables.BuildOptimism(immutable) if err != nil { return err } diff --git a/op-chain-ops/immutables/immutables.go b/op-chain-ops/immutables/immutables.go index 4f90eb5d4194e..62611b6fa7c83 100644 --- a/op-chain-ops/immutables/immutables.go +++ b/op-chain-ops/immutables/immutables.go @@ -12,13 +12,22 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" ) +// ImmutableValues represents the values to be set in immutable code. +// The key is the name of the variable and the value is the value to set in +// immutable code. +type ImmutableValues map[string]any + +// ImmutableConfig represents the immutable configuration for the L2 predeploy +// contracts. +type ImmutableConfig map[string]ImmutableValues + // DeploymentResults represents the output of deploying each of the // contracts so that the immutables can be set properly in the bytecode. type DeploymentResults map[string]hexutil.Bytes // BuildOptimism will deploy the L2 predeploys so that their immutables are set // correctly. -func BuildOptimism() (DeploymentResults, error) { +func BuildOptimism(immutable ImmutableConfig) (DeploymentResults, error) { deployments := []deployer.Constructor{ { Name: "GasPriceOracle", @@ -31,6 +40,9 @@ func BuildOptimism() (DeploymentResults, error) { }, { Name: "L2StandardBridge", + Args: []interface{}{ + immutable["L2StandardBridge"]["otherBridge"], + }, }, { Name: "L2ToL1MessagePasser", @@ -84,8 +96,10 @@ func l2Deployer(backend *backends.SimulatedBackend, opts *bind.TransactOpts, dep l1CrossDomainMessenger := common.Address{} addr, _, _, err = bindings.DeployL2CrossDomainMessenger(opts, backend, l1CrossDomainMessenger) case "L2StandardBridge": - // The OtherBridge value is not immutable, no need to set - otherBridge := common.Address{} + otherBridge, ok := deployment.Args[0].(common.Address) + if !ok { + return common.Address{}, fmt.Errorf("invalid type for otherBridge") + } addr, _, _, err = bindings.DeployL2StandardBridge(opts, backend, otherBridge) case "L2ToL1MessagePasser": // No arguments required for L2ToL1MessagePasser diff --git a/op-chain-ops/immutables/immutables_test.go b/op-chain-ops/immutables/immutables_test.go index 32067d8384c64..fcd08d7037550 100644 --- a/op-chain-ops/immutables/immutables_test.go +++ b/op-chain-ops/immutables/immutables_test.go @@ -4,11 +4,16 @@ import ( "testing" "github.com/ethereum-optimism/optimism/op-chain-ops/immutables" + "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" ) func TestBuildOptimism(t *testing.T) { - results, err := immutables.BuildOptimism() + results, err := immutables.BuildOptimism(immutables.ImmutableConfig{ + "L2StandardBridge": { + "otherBridge": common.HexToAddress("0x1234567890123456789012345678901234567890"), + }, + }) require.Nil(t, err) require.NotNil(t, results) diff --git a/packages/contracts-bedrock/.gas-snapshot b/packages/contracts-bedrock/.gas-snapshot index b9b55d8c15ae4..bda73083021dd 100644 --- a/packages/contracts-bedrock/.gas-snapshot +++ b/packages/contracts-bedrock/.gas-snapshot @@ -1,10 +1,10 @@ GasBenchMark_L1CrossDomainMessenger:test_L1MessengerSendMessage_benchmark_0() (gas: 263442) GasBenchMark_L1CrossDomainMessenger:test_L1MessengerSendMessage_benchmark_1() (gas: 77602) -GasBenchMark_L1StandardBridge_Deposit:test_depositERC20_benchmark_0() (gas: 354414) -GasBenchMark_L1StandardBridge_Deposit:test_depositERC20_benchmark_1() (gas: 118592) -GasBenchMark_L1StandardBridge_Deposit:test_depositETH_benchmark_0() (gas: 354436) -GasBenchMark_L1StandardBridge_Deposit:test_depositETH_benchmark_1() (gas: 118567) -GasBenchMark_L1StandardBridge_Finalize:test_finalizeETHWithdrawal_benchmark() (gas: 45250) +GasBenchMark_L1StandardBridge_Deposit:test_depositERC20_benchmark_0() (gas: 350159) +GasBenchMark_L1StandardBridge_Deposit:test_depositERC20_benchmark_1() (gas: 114337) +GasBenchMark_L1StandardBridge_Deposit:test_depositETH_benchmark_0() (gas: 350181) +GasBenchMark_L1StandardBridge_Deposit:test_depositETH_benchmark_1() (gas: 114312) +GasBenchMark_L1StandardBridge_Finalize:test_finalizeETHWithdrawal_benchmark() (gas: 40534) GasBenchMark_L2OutputOracle:test_proposeL2Output_benchmark() (gas: 68671) GasBenchMark_OptimismPortal:test_depositTransaction_benchmark() (gas: 74964) GasBenchMark_OptimismPortal:test_depositTransaction_benchmark_1() (gas: 35777) @@ -48,19 +48,19 @@ L1CrossDomainMessenger_Test:test_L1MessengerTwiceSendMessage() (gas: 1492584) L1CrossDomainMessenger_Test:test_L1MessengerUnpause() (gas: 40948) L1CrossDomainMessenger_Test:test_L1MessengerXDomainSenderReverts() (gas: 24305) L1CrossDomainMessenger_Test:test_L1MessengerxDomainMessageSenderResets() (gas: 86170) -L1StandardBridge_Test:test_depositERC20() (gas: 579126) -L1StandardBridge_Test:test_depositERC20To() (gas: 581333) -L1StandardBridge_Test:test_depositETH() (gas: 373955) -L1StandardBridge_Test:test_depositETHTo() (gas: 331091) -L1StandardBridge_Test:test_finalizeBridgeERC20FailSendBack() (gas: 680116) -L1StandardBridge_Test:test_finalizeERC20Withdrawal() (gas: 489836) -L1StandardBridge_Test:test_finalizeETHWithdrawal() (gas: 64091) -L1StandardBridge_Test:test_initialize() (gas: 26334) +L1StandardBridge_Test:test_depositERC20() (gas: 574877) +L1StandardBridge_Test:test_depositERC20To() (gas: 577084) +L1StandardBridge_Test:test_depositETH() (gas: 369700) +L1StandardBridge_Test:test_depositETHTo() (gas: 326881) +L1StandardBridge_Test:test_finalizeBridgeERC20FailSendBack() (gas: 676113) +L1StandardBridge_Test:test_finalizeERC20Withdrawal() (gas: 485692) +L1StandardBridge_Test:test_finalizeETHWithdrawal() (gas: 58786) +L1StandardBridge_Test:test_initialize() (gas: 22105) L1StandardBridge_Test:test_onlyEOADepositERC20() (gas: 22376) -L1StandardBridge_Test:test_onlyEOADepositETH() (gas: 40859) -L1StandardBridge_Test:test_onlyL2BridgeFinalizeERC20Withdrawal() (gas: 36268) -L1StandardBridge_Test:test_onlyPortalFinalizeERC20Withdrawal() (gas: 35573) -L1StandardBridge_Test:test_receive() (gas: 520573) +L1StandardBridge_Test:test_onlyEOADepositETH() (gas: 40836) +L1StandardBridge_Test:test_onlyL2BridgeFinalizeERC20Withdrawal() (gas: 31626) +L1StandardBridge_Test:test_onlyPortalFinalizeERC20Withdrawal() (gas: 31189) +L1StandardBridge_Test:test_receive() (gas: 516341) L2CrossDomainMessenger_Test:testCannot_L2MessengerPause() (gas: 10860) L2CrossDomainMessenger_Test:test_L1MessengerRelayMessageRevertsOnReentrancy() (gas: 171735) L2CrossDomainMessenger_Test:test_L2MessengerMessageVersion() (gas: 8411) @@ -96,15 +96,15 @@ L2OutputOracleUpgradeable_Test:test_cannotInitImpl() (gas: 19555) L2OutputOracleUpgradeable_Test:test_cannotInitProxy() (gas: 24554) L2OutputOracleUpgradeable_Test:test_initValuesOnProxy() (gas: 39086) L2OutputOracleUpgradeable_Test:test_upgrading() (gas: 180632) -L2StandardBridge_Test:test_ERC20BridgeFailed_whenLocalTokenIsBridge() (gas: 135507) +L2StandardBridge_Test:test_ERC20BridgeFailed_whenLocalTokenIsBridge() (gas: 130716) L2StandardBridge_Test:test_cannotWithdrawEthWithoutSendingIt() (gas: 21619) -L2StandardBridge_Test:test_finalizeBridgeERC20FailSendBack() (gas: 499033) -L2StandardBridge_Test:test_finalizeDeposit() (gas: 91457) -L2StandardBridge_Test:test_finalizeDeposit_failsToCompleteOutboundTransfer() (gas: 142171) -L2StandardBridge_Test:test_initialize() (gas: 14823) -L2StandardBridge_Test:test_receive() (gas: 139070) -L2StandardBridge_Test:test_withdraw() (gas: 353023) -L2StandardBridge_Test:test_withdrawTo() (gas: 353778) +L2StandardBridge_Test:test_finalizeBridgeERC20FailSendBack() (gas: 495104) +L2StandardBridge_Test:test_finalizeDeposit() (gas: 86892) +L2StandardBridge_Test:test_finalizeDeposit_failsToCompleteOutboundTransfer() (gas: 137380) +L2StandardBridge_Test:test_initialize() (gas: 10594) +L2StandardBridge_Test:test_receive() (gas: 134838) +L2StandardBridge_Test:test_withdraw() (gas: 349642) +L2StandardBridge_Test:test_withdrawTo() (gas: 350344) L2StandardBridge_Test:test_withdraw_onlyEOA() (gas: 251674) L2ToL1MessagePasserTest:test_burn() (gas: 113395) L2ToL1MessagePasserTest:test_initiateWithdrawal_fromContract() (gas: 72486) @@ -279,4 +279,4 @@ SequencerFeeVault_Test:test_constructor() (gas: 7678) SequencerFeeVault_Test:test_minWithdrawalAmount() (gas: 5440) SequencerFeeVault_Test:test_receive() (gas: 17338) SequencerFeeVault_Test:test_revertWithdraw() (gas: 9342) -SequencerFeeVault_Test:test_withdraw() (gas: 149933) +SequencerFeeVault_Test:test_withdraw() (gas: 145634) diff --git a/packages/contracts-bedrock/.gitignore b/packages/contracts-bedrock/.gitignore index 3a6772b8acb9a..3037147a2d8be 100644 --- a/packages/contracts-bedrock/.gitignore +++ b/packages/contracts-bedrock/.gitignore @@ -7,3 +7,4 @@ coverage.out broadcast genesis.json src/contract-artifacts.ts +tmp-artifacts diff --git a/packages/contracts-bedrock/contracts/L1/L1StandardBridge.sol b/packages/contracts-bedrock/contracts/L1/L1StandardBridge.sol index 52023a87a9311..f2332573adbd4 100644 --- a/packages/contracts-bedrock/contracts/L1/L1StandardBridge.sol +++ b/packages/contracts-bedrock/contracts/L1/L1StandardBridge.sol @@ -86,13 +86,14 @@ contract L1StandardBridge is StandardBridge, Semver { ); /** - * @custom:semver 0.0.1 + * @custom:semver 0.0.2 * * @param _messenger Address of the L1CrossDomainMessenger. */ - constructor(address payable _messenger) Semver(0, 0, 1) { - initialize(_messenger); - } + constructor(address payable _messenger) + Semver(0, 0, 2) + StandardBridge(_messenger, payable(Predeploys.L2_STANDARD_BRIDGE)) + {} /** * @custom:legacy @@ -243,15 +244,6 @@ contract L1StandardBridge is StandardBridge, Semver { return address(otherBridge); } - /** - * @notice Initializer. - * - * @param _messenger Address of the L1CrossDomainMessenger. - */ - function initialize(address payable _messenger) public initializer { - __StandardBridge_init(_messenger, payable(Predeploys.L2_STANDARD_BRIDGE)); - } - /** * @notice Internal function for initiating an ETH deposit. * diff --git a/packages/contracts-bedrock/contracts/L2/L2StandardBridge.sol b/packages/contracts-bedrock/contracts/L2/L2StandardBridge.sol index 0a79d8c92ca62..2129f569baac5 100644 --- a/packages/contracts-bedrock/contracts/L2/L2StandardBridge.sol +++ b/packages/contracts-bedrock/contracts/L2/L2StandardBridge.sol @@ -79,13 +79,14 @@ contract L2StandardBridge is StandardBridge, Semver { ); /** - * @custom:semver 0.0.1 + * @custom:semver 0.0.2 * * @param _otherBridge Address of the L1StandardBridge. */ - constructor(address payable _otherBridge) Semver(0, 0, 1) { - initialize(_otherBridge); - } + constructor(address payable _otherBridge) + Semver(0, 0, 2) + StandardBridge(payable(Predeploys.L2_CROSS_DOMAIN_MESSENGER), _otherBridge) + {} /** * @custom:legacy @@ -156,15 +157,6 @@ contract L2StandardBridge is StandardBridge, Semver { emit DepositFinalized(_l1Token, _l2Token, _from, _to, _amount, _extraData); } - /** - * @notice Initializer. - * - * @param _otherBridge Address of the L1StandardBridge. - */ - function initialize(address payable _otherBridge) public initializer { - __StandardBridge_init(payable(Predeploys.L2_CROSS_DOMAIN_MESSENGER), _otherBridge); - } - /** * @custom:legacy * @notice Internal function to a withdrawal from L2 to L1 to a target account on L1. diff --git a/packages/contracts-bedrock/contracts/test/CommonTest.t.sol b/packages/contracts-bedrock/contracts/test/CommonTest.t.sol index 5f0813ce8cc1f..bd5699fe7a64b 100644 --- a/packages/contracts-bedrock/contracts/test/CommonTest.t.sol +++ b/packages/contracts-bedrock/contracts/test/CommonTest.t.sol @@ -393,17 +393,15 @@ contract Bridge_Initializer is Messenger_Initializer { vm.stopPrank(); L1Bridge = L1StandardBridge(payable(address(proxy))); - L1Bridge.initialize(payable(address(L1Messenger))); vm.label(address(proxy), "L1StandardBridge_Proxy"); vm.label(address(L1Bridge_Impl), "L1StandardBridge_Impl"); // Deploy the L2StandardBridge, move it to the correct predeploy // address and then initialize it - L2StandardBridge l2B = new L2StandardBridge(payable(Predeploys.L2_STANDARD_BRIDGE)); + L2StandardBridge l2B = new L2StandardBridge(payable(proxy)); vm.etch(Predeploys.L2_STANDARD_BRIDGE, address(l2B).code); L2Bridge = L2StandardBridge(payable(Predeploys.L2_STANDARD_BRIDGE)); - L2Bridge.initialize(payable(address(L1Bridge))); // Set up the L2 mintable token factory OptimismMintableERC20Factory factory = new OptimismMintableERC20Factory( diff --git a/packages/contracts-bedrock/contracts/universal/StandardBridge.sol b/packages/contracts-bedrock/contracts/universal/StandardBridge.sol index b77cc64ceb92b..6b5cfc526aca7 100644 --- a/packages/contracts-bedrock/contracts/universal/StandardBridge.sol +++ b/packages/contracts-bedrock/contracts/universal/StandardBridge.sol @@ -6,7 +6,6 @@ import { ERC165Checker } from "@openzeppelin/contracts/utils/introspection/ERC16 import { Address } from "@openzeppelin/contracts/utils/Address.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import { SafeCall } from "../libraries/SafeCall.sol"; -import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import { IRemoteToken, IL1Token } from "./SupportedInterfaces.sol"; import { CrossDomainMessenger } from "./CrossDomainMessenger.sol"; import { OptimismMintableERC20 } from "./OptimismMintableERC20.sol"; @@ -15,7 +14,7 @@ import { OptimismMintableERC20 } from "./OptimismMintableERC20.sol"; * @title StandardBridge * @notice StandardBridge is a base contract for the L1 and L2 standard ERC20 bridges. */ -abstract contract StandardBridge is Initializable { +abstract contract StandardBridge { using SafeERC20 for IERC20; /** @@ -26,12 +25,24 @@ abstract contract StandardBridge is Initializable { /** * @notice Messenger contract on this domain. */ - CrossDomainMessenger public messenger; + CrossDomainMessenger public immutable messenger; /** * @notice Corresponding bridge on the other domain. */ - StandardBridge public otherBridge; + StandardBridge public immutable otherBridge; + + /** + * @custom:legacy + * @notice Spacer for backwards compatibility. + */ + uint256 internal spacer0; + + /** + * @custom:legacy + * @notice Spacer for backwards compatibility. + */ + uint256 internal spacer1; /** * @notice Mapping that stores deposits for a given pair of local and remote tokens. @@ -158,6 +169,15 @@ abstract contract StandardBridge is Initializable { _; } + /** + * @param _messenger Address of CrossDomainMessenger on this network. + * @param _otherBridge Address of the other StandardBridge contract. + */ + constructor(address payable _messenger, address payable _otherBridge) { + messenger = CrossDomainMessenger(_messenger); + otherBridge = StandardBridge(_otherBridge); + } + /** * @notice Allows EOAs to deposit ETH by sending directly to the bridge. */ @@ -367,21 +387,6 @@ abstract contract StandardBridge is Initializable { } } - /** - * @notice Initializer. - * - * @param _messenger Address of CrossDomainMessenger on this network. - * @param _otherBridge Address of the other StandardBridge contract. - */ - // solhint-disable-next-line func-name-mixedcase - function __StandardBridge_init(address payable _messenger, address payable _otherBridge) - internal - onlyInitializing - { - messenger = CrossDomainMessenger(_messenger); - otherBridge = StandardBridge(_otherBridge); - } - /** * @notice Initiates a bridge of ETH through the CrossDomainMessenger. * diff --git a/packages/contracts-bedrock/deploy/001-InitImplementations.deploy.ts b/packages/contracts-bedrock/deploy/001-InitImplementations.deploy.ts index 900b8331bf217..4da9bac284d07 100644 --- a/packages/contracts-bedrock/deploy/001-InitImplementations.deploy.ts +++ b/packages/contracts-bedrock/deploy/001-InitImplementations.deploy.ts @@ -17,10 +17,6 @@ const upgradeABIs = { ], OptimismPortalProxy: async () => ['initialize', []], L1CrossDomainMessengerProxy: async () => ['initialize', []], - L1StandardBridgeProxy: async (deployConfig, hre) => { - const messenger = await hre.deployments.get('L1CrossDomainMessengerProxy') - return ['initialize(address)', [messenger.address]] - }, } const deployFn: DeployFunction = async (hre) => { @@ -111,7 +107,7 @@ const deployFn: DeployFunction = async (hre) => { // Reset the nonce for the next set of transactions nonce = await l1.getTransactionCount(deployer) - const upgradeTxs = [] + const upgradeTxs: any[] = [] for (const [proxy, upgrader] of Object.entries(upgradeABIs)) { const upgraderOut = await upgrader(deployConfig, hre) const implName = proxy.replace('Proxy', '') @@ -139,6 +135,13 @@ const deployFn: DeployFunction = async (hre) => { ) } + const bridge = await get('L1StandardBridge') + const bridgeProxyContract = await hre.ethers.getContractAt( + 'Proxy', + bridgeProxy.address + ) + upgradeTxs.push(bridgeProxyContract.upgradeTo(bridge.address)) + const factory = await get('OptimismMintableERC20Factory') const factoryProxy = await get('OptimismMintableERC20FactoryProxy') const factoryProxyContract = await hre.ethers.getContractAt( diff --git a/packages/contracts-bedrock/tasks/genesis-l2.ts b/packages/contracts-bedrock/tasks/genesis-l2.ts index 35c5d6b0d2995..cd2ab78c3bc0e 100644 --- a/packages/contracts-bedrock/tasks/genesis-l2.ts +++ b/packages/contracts-bedrock/tasks/genesis-l2.ts @@ -258,10 +258,6 @@ task('genesis-l2', 'create a genesis config') scalar: deployConfig.gasPriceOracleScalar, decimals: deployConfig.gasPriceOracleDecimals, }, - L2StandardBridge: { - messenger: predeploys.L2CrossDomainMessenger, - otherBridge: ProxyL1StandardBridge.address, - }, SequencerFeeVault: { l1FeeWallet: ethers.constants.AddressZero, }, @@ -435,7 +431,9 @@ task('genesis-l2', 'create a genesis config') L2StandardBridge: { MAJOR_VERSION: toBytes32(0), MINOR_VERSION: toBytes32(0), - PATCH_VERSION: toBytes32(1), + PATCH_VERSION: toBytes32(2), + messenger: predeploys.L2CrossDomainMessenger, + otherBridge: ProxyL1StandardBridge.address, }, L2ToL1MessagePasser: { MAJOR_VERSION: toBytes32(0), From 63ef19491a5b0ad5f5189bddeec7430bedee1f9c Mon Sep 17 00:00:00 2001 From: Mark Tyneway Date: Sat, 10 Sep 2022 06:02:28 -0700 Subject: [PATCH 11/32] contracts-bedrock: delete hardhat genesis tasks These are no longer used, in favor of the `op-node` commands that generate the genesis files instead. contracts-bedrock: delete imports --- .changeset/serious-deers-end.md | 5 + .../contracts-bedrock/tasks/genesis-l1.ts | 112 ---- .../contracts-bedrock/tasks/genesis-l2.ts | 517 ------------------ packages/contracts-bedrock/tasks/index.ts | 2 - 4 files changed, 5 insertions(+), 631 deletions(-) create mode 100644 .changeset/serious-deers-end.md delete mode 100644 packages/contracts-bedrock/tasks/genesis-l1.ts delete mode 100644 packages/contracts-bedrock/tasks/genesis-l2.ts diff --git a/.changeset/serious-deers-end.md b/.changeset/serious-deers-end.md new file mode 100644 index 0000000000000..0c1be2d55c135 --- /dev/null +++ b/.changeset/serious-deers-end.md @@ -0,0 +1,5 @@ +--- +'@eth-optimism/contracts-bedrock': patch +--- + +Delete hardhat genesis tasks diff --git a/packages/contracts-bedrock/tasks/genesis-l1.ts b/packages/contracts-bedrock/tasks/genesis-l1.ts deleted file mode 100644 index a7f1800bba5ae..0000000000000 --- a/packages/contracts-bedrock/tasks/genesis-l1.ts +++ /dev/null @@ -1,112 +0,0 @@ -import fs from 'fs' - -import { ethers } from 'ethers' -import { task, types } from 'hardhat/config' -import { Genesis, State } from '@eth-optimism/core-utils' -import '@eth-optimism/hardhat-deploy-config' - -task('genesis-l1', 'create a genesis config') - .addOptionalParam( - 'outfile', - 'The file to write the output JSON to', - 'genesis.json' - ) - .addOptionalParam( - 'l1GenesisBlockTimestamp', - 'Timestamp to embed in L1 genesis block, current time will be used if the timestamp is zero', - 0, - types.int - ) - .setAction(async (args, hre) => { - const { deployConfig } = hre - const alloc: State = {} - - const l1GenesisBlockTimestamp = - args.l1GenesisBlockTimestamp === 0 - ? Math.floor(Date.now() / 1000) - : args.l1GenesisBlockTimestamp - - // Give each predeploy a single wei - for (let i = 0; i <= 0xff; i++) { - const buf = Buffer.alloc(2) - buf.writeUInt16BE(i, 0) - const addr = ethers.utils.hexConcat([ - '0x000000000000000000000000000000000000', - ethers.utils.hexZeroPad(buf, 2), - ]) - alloc[addr] = { - balance: '0x1', - } - } - - const accounts = [ - '0x14dC79964da2C08b23698B3D3cc7Ca32193d9955', - '0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65', - '0x1CBd3b2770909D4e10f157cABC84C7264073C9Ec', - '0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f', - '0x2546BcD3c84621e976D8185a91A922aE77ECEc30', - '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC', - '0x70997970C51812dc3A010C7d01b50e0d17dc79C8', - '0x71bE63f3384f5fb98995898A86B02Fb2426c5788', - '0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199', - '0x90F79bf6EB2c4f870365E785982E1f101E93b906', - '0x976EA74026E726554dB657fA54763abd0C3a0aa9', - '0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc', - '0xBcd4042DE499D14e55001CcbB24a551F3b954096', - '0xFABB0ac9d68B0B445fB7357272Ff202C5651694a', - '0xa0Ee7A142d267C1f36714E4a8F75612F20a79720', - '0xbDA5747bFD65F08deb54cb465eB87D40e51B197E', - '0xcd3B766CCDd6AE721141F452C550Ca635964ce71', - '0xdD2FD4581271e230360230F9337D5c0430Bf44C0', - '0xdF3e18d64BC6A983f673Ab319CCaE4f1a57C7097', - '0xde3829a23df1479438622a08a116e8eb3f620bb5', - '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', - ] - - for (const account of accounts) { - alloc[ethers.utils.getAddress(account)] = { - balance: - '0x200000000000000000000000000000000000000000000000000000000000000', - } - } - - const genesis: Genesis = { - config: { - chainId: deployConfig.l1ChainID, - homesteadBlock: 0, - eip150Block: 0, - eip150Hash: ethers.constants.HashZero, - eip155Block: 0, - eip158Block: 0, - byzantiumBlock: 0, - constantinopleBlock: 0, - petersburgBlock: 0, - istanbulBlock: 0, - muirGlacierBlock: 0, - berlinBlock: 0, - londonBlock: 0, - clique: { - period: deployConfig.l1BlockTime, - epoch: 30000, - }, - }, - nonce: deployConfig.l1GenesisBlockNonce, - timestamp: ethers.BigNumber.from(l1GenesisBlockTimestamp).toHexString(), - extraData: ethers.utils.hexConcat([ - ethers.constants.HashZero, - deployConfig.cliqueSignerAddress, - ethers.utils.hexZeroPad('0x', 65), - ]), - gasLimit: deployConfig.l1GenesisBlockGasLimit, - difficulty: deployConfig.l1GenesisBlockDifficulty, - mixHash: deployConfig.l1GenesisBlockMixHash, - coinbase: deployConfig.l1GenesisBlockCoinbase, - alloc, - number: deployConfig.l1GenesisBlockNumber, - gasUsed: deployConfig.l1GenesisBlockGasUsed, - parentHash: deployConfig.l1GenesisBlockParentHash, - baseFeePerGas: deployConfig.l1GenesisBlockBaseFeePerGas, - } - - fs.writeFileSync(args.outfile, JSON.stringify(genesis, null, 2)) - }) diff --git a/packages/contracts-bedrock/tasks/genesis-l2.ts b/packages/contracts-bedrock/tasks/genesis-l2.ts deleted file mode 100644 index cd2ab78c3bc0e..0000000000000 --- a/packages/contracts-bedrock/tasks/genesis-l2.ts +++ /dev/null @@ -1,517 +0,0 @@ -import fs from 'fs' -import path from 'path' -import assert from 'assert' - -import { OptimismGenesis, State } from '@eth-optimism/core-utils' -import 'hardhat-deploy' -import '@eth-optimism/hardhat-deploy-config' -import { ethers, utils, BigNumber } from 'ethers' -import { task } from 'hardhat/config' -import { HardhatRuntimeEnvironment } from 'hardhat/types' -import { - CompilerOutputSource, - CompilerOutputContract, - BuildInfo, -} from 'hardhat/types/artifacts' - -import { predeploys } from '../src' - -const { hexZeroPad, hexConcat, hexDataSlice, getAddress } = utils - -const prefix = '0x420000000000000000000000000000000000' -const implementationSlot = - '0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc' -const adminSlot = - '0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103' - -const toCodeAddr = (addr: string) => { - const address = hexConcat([ - '0xc0d3c0d3c0d3c0d3c0d3c0d3c0d3c0d3c0d3', - '0x' + addr.slice(prefix.length), - ]) - return getAddress(address) -} - -const toBytes32 = (num: number): string => { - const big = BigNumber.from(num) - return hexZeroPad(big.toHexString(), 32) -} - -const assertEvenLength = (str: string) => { - assert(str.length % 2 === 0, str) -} - -// TODO: fix this to be compatible with smock's version -const getStorageLayout = async ( - hre: HardhatRuntimeEnvironment, - name: string -) => { - const buildInfo = await hre.artifacts.getBuildInfo(name) - const keys = Object.keys(buildInfo.output.contracts) - for (const key of keys) { - if (name === path.basename(key, '.sol')) { - const contract = buildInfo.output.contracts[key] - const storageLayout = (contract[name] as any).storageLayout - return storageLayout || { storage: [], types: {} } - } - } - throw new Error(`Cannot locate storageLayout for ${name}`) -} - -// Find the contract and source from the build info -const findContractAndSource = (name: string, buildInfo: BuildInfo) => { - const sources = buildInfo.output.sources - const contracts = buildInfo.output.contracts - - const compilerOutputContracts: CompilerOutputContract[] = [] - for (const [contractName, contract] of Object.entries(contracts)) { - if (path.basename(contractName, '.sol') === name) { - compilerOutputContracts.push(contract[name]) - } - } - if (compilerOutputContracts.length === 0) { - throw new Error(`Cannot find compiler output contract for ${name}`) - } - if (compilerOutputContracts.length !== 1) { - console.log(`Unexpected number of contracts for ${name}`) - } - const outputContract = compilerOutputContracts[0] - - const compilerOutputSources: CompilerOutputSource[] = [] - for (const [contractName, source] of Object.entries(sources)) { - if (path.basename(contractName, '.sol') === name) { - compilerOutputSources.push(source as CompilerOutputSource) - } - } - if (compilerOutputSources.length === 0) { - throw new Error(`Cannot find compiler output source for ${name}`) - } - if (compilerOutputSources.length !== 1) { - console.log(`Unexpected number of sources for ${name}`) - } - const outputSource = compilerOutputSources[0] - - return { outputContract, outputSource } -} - -const replaceImmutables = async ( - hre: HardhatRuntimeEnvironment, - name: string, - immutables: object -): Promise => { - const artifact = await hre.artifacts.readArtifact(name) - const buildInfo = await hre.artifacts.getBuildInfo(name) - - const { outputContract, outputSource } = findContractAndSource( - name, - buildInfo - ) - - // Get the immutable references. They look like this: - // { ast-id: [ {start, length} ] } - const immutableReferences = - outputContract.evm.deployedBytecode.immutableReferences - - const names = {} - // Recursively find all of the immutables by traversing the solc output ast - const findNames = (ast: any) => { - // Add the name of the variable if it is an immutable - const isImmutable = ast.mutability === 'immutable' - const isASTNode = typeof ast.name === 'string' && typeof ast.id === 'number' - if (isASTNode && isImmutable) { - names[ast.name] = ast.id - } - // Iterate over each node - if (Array.isArray(ast.nodes)) { - for (const node of ast.nodes) { - findNames(node) - } - } - // Handle contracts that are inherited from - if (Array.isArray(ast.baseContracts)) { - for (const baseContract of ast.baseContracts) { - if (baseContract.baseName) { - const base = findContractAndSource( - baseContract.baseName.name, - buildInfo - ) - findNames(base.outputSource.ast) - } - } - } - } - - findNames(outputSource.ast) - - let deployedBytecode = artifact.deployedBytecode - const presize = deployedBytecode.length - - // For each of the immutables, put the value into the bytecode - for (const [key, value] of Object.entries(immutables)) { - const astId = names[key] - if (!astId) { - throw new Error(`Unknown immutable ${key} in contract ${name}`) - } - const offsets = immutableReferences[astId] - if (!offsets) { - throw new Error(`Unknown AST id ${astId} in contract ${name}`) - } - - // Insert the value at each one - for (const offset of offsets) { - if (offset.length !== 32) { - throw new Error( - `Immutable slicing must be updated to handle arbitrary size immutables` - ) - } - - // Ensure that the value being sliced out is 0 - const val = hexDataSlice( - deployedBytecode, - offset.start, - offset.start + offset.length - ) - if (!BigNumber.from(val).eq(0)) { - throw new Error(`Unexpected value in immutable bytecode ${val}`) - } - - deployedBytecode = ethers.utils.hexConcat([ - hexDataSlice(deployedBytecode, 0, offset.start), - hexZeroPad(value, 32), - hexDataSlice(deployedBytecode, offset.start + offset.length), - ]) - } - } - - // Ensure that the bytecode is the same size - if (presize !== deployedBytecode.length) { - throw new Error( - `Size mismatch! Before ${presize}, after ${deployedBytecode.length}` - ) - } - - return deployedBytecode -} - -task('genesis-l2', 'create a genesis config') - .addOptionalParam( - 'outfile', - 'The file to write the output JSON to', - 'genesis.json' - ) - .addOptionalParam('l1RpcUrl', 'The L1 RPC URL', 'http://127.0.0.1:8545') - .setAction(async (args, hre) => { - const { - computeStorageSlots, - // eslint-disable-next-line @typescript-eslint/no-var-requires - } = require('@defi-wonderland/smock/dist/src/utils') - - const { deployConfig } = hre - - const l1 = new ethers.providers.StaticJsonRpcProvider(args.l1RpcUrl) - - const l1StartingBlock = await l1.getBlock(deployConfig.l1StartingBlockTag) - if (l1StartingBlock === null) { - throw new Error( - `Cannot fetch block tag ${deployConfig.l1StartingBlockTag}` - ) - } - - if (l1StartingBlock === null) { - console.log(`Unable to fetch L1 block that rollup starts at`) - } - - // Use the addresses of the proxies here instead of the implementations - // Be backwards compatible - let ProxyL1CrossDomainMessenger = await hre.deployments.getOrNull( - 'Proxy__OVM_L1CrossDomainMessenger' - ) - if (ProxyL1CrossDomainMessenger === undefined) { - ProxyL1CrossDomainMessenger = await hre.deployments.get( - 'L1CrossDomainMessengerProxy' - ) - } - // Be backwards compatible - let ProxyL1StandardBridge = await hre.deployments.getOrNull( - 'Proxy__OVM_L1StandardBridge' - ) - if (ProxyL1StandardBridge === undefined) { - ProxyL1StandardBridge = await hre.deployments.get('L1StandardBridgeProxy') - } - - const variables = { - L2ToL1MessagePasser: { - nonce: 0, - }, - L2CrossDomainMessenger: { - _initialized: 1, - _owner: deployConfig.l2CrossDomainMessengerOwner, - xDomainMsgSender: '0x000000000000000000000000000000000000dEaD', - msgNonce: 0, - otherMessenger: ProxyL1CrossDomainMessenger.address, - // TODO: handle blockedSystemAddresses mapping - // blockedSystemAddresses: [{key: '', value: ''}], - }, - GasPriceOracle: { - _owner: deployConfig.gasPriceOracleOwner, - overhead: deployConfig.gasPriceOracleOverhead, - scalar: deployConfig.gasPriceOracleScalar, - decimals: deployConfig.gasPriceOracleDecimals, - }, - SequencerFeeVault: { - l1FeeWallet: ethers.constants.AddressZero, - }, - L1Block: { - number: l1StartingBlock.number, - timestamp: l1StartingBlock.timestamp, - basefee: l1StartingBlock.baseFeePerGas, - hash: l1StartingBlock.hash, - sequenceNumber: 0, - }, - LegacyERC20ETH: { - bridge: predeploys.L2StandardBridge, - remoteToken: ethers.constants.AddressZero, - _name: 'Ether', - _symbol: 'ETH', - }, - WETH9: { - name: 'Wrapped Ether', - symbol: 'WETH', - decimals: 18, - }, - GovernanceToken: { - name: 'Optimism', - symbol: 'OP', - // TODO: this should be the mint manager - // in practice. Just use a hardhat account - // because this is only used for devnets - _owner: '0x829BD824B016326A401d083B33D092293333A830', - }, - } - - assertEvenLength(implementationSlot) - assertEvenLength(adminSlot) - - const predeployAddrs = new Set() - for (const addr of Object.values(predeploys)) { - predeployAddrs.add(getAddress(addr)) - } - - const alloc: State = {} - - // Use the address of the deployed ProxyAdmin as the admin for - // each Proxy - const Deployment__ProxyAdmin = await hre.deployments.get('ProxyAdmin') - - // Set a proxy at each predeploy address - const proxy = await hre.artifacts.readArtifact('Proxy') - for (let i = 0; i <= 2048; i++) { - const num = hexZeroPad('0x' + i.toString(16), 2) - const addr = getAddress(ethers.utils.hexConcat([prefix, num])) - - // There is no proxy at LegacyERC20ETH or the GovernanceToken - if ( - addr === getAddress(predeploys.LegacyERC20ETH) || - addr === getAddress(predeploys.GovernanceToken) - ) { - continue - } - - alloc[addr] = { - nonce: '0x0', - balance: '0x0', - code: proxy.deployedBytecode, - storage: { - [adminSlot]: Deployment__ProxyAdmin.address, - }, - } - - if (predeployAddrs.has(getAddress(addr))) { - const predeploy = Object.entries(predeploys).find(([, address]) => { - return getAddress(address) === addr - }) - - // Really shouldn't happen, since predeployAddrs is a set generated from predeploys. - if (predeploy === undefined) { - throw new Error('could not find address') - } - - const name = predeploy[0] - if (variables[name]) { - const storageLayout = await getStorageLayout(hre, name) - if (storageLayout === undefined) { - throw new Error(`cannot find storage layout for ${name}`) - } - const slots = computeStorageSlots(storageLayout, variables[name]) - - for (const slot of slots) { - alloc[addr].storage[slot.key] = slot.val - } - } - - alloc[addr].storage[implementationSlot] = toCodeAddr(addr) - } - } - - // Set the GovernanceToken in the state - // Cannot easily set storage due to no easy access to compiler - // output - const governanceToken = await hre.deployments.getArtifact('GovernanceToken') - alloc[predeploys.GovernanceToken] = { - nonce: '0x0', - balance: '0x0', - code: governanceToken.deployedBytecode, - } - - // Give each predeploy a single wei - for (let i = 0; i <= 0xff; i++) { - const buf = Buffer.alloc(2) - buf.writeUInt16BE(i, 0) - const addr = ethers.utils.hexConcat([ - '0x000000000000000000000000000000000000', - hexZeroPad(buf, 2), - ]) - alloc[addr] = { - balance: '0x1', - } - } - - const accounts = [ - '0x14dC79964da2C08b23698B3D3cc7Ca32193d9955', - '0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65', - '0x1CBd3b2770909D4e10f157cABC84C7264073C9Ec', - '0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f', - '0x2546BcD3c84621e976D8185a91A922aE77ECEc30', - '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC', - '0x70997970C51812dc3A010C7d01b50e0d17dc79C8', - '0x71bE63f3384f5fb98995898A86B02Fb2426c5788', - '0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199', - '0x90F79bf6EB2c4f870365E785982E1f101E93b906', - '0x976EA74026E726554dB657fA54763abd0C3a0aa9', - '0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc', - '0xBcd4042DE499D14e55001CcbB24a551F3b954096', - '0xFABB0ac9d68B0B445fB7357272Ff202C5651694a', - '0xa0Ee7A142d267C1f36714E4a8F75612F20a79720', - '0xbDA5747bFD65F08deb54cb465eB87D40e51B197E', - '0xcd3B766CCDd6AE721141F452C550Ca635964ce71', - '0xdD2FD4581271e230360230F9337D5c0430Bf44C0', - '0xdF3e18d64BC6A983f673Ab319CCaE4f1a57C7097', - '0xde3829a23df1479438622a08a116e8eb3f620bb5', - '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', - ] - - for (const account of accounts) { - alloc[account] = { - balance: - '0x200000000000000000000000000000000000000000000000000000000000000', - } - } - - // Note: this currently only supports up to 32 byte values. - // Things less than 32 bytes will be left padded with 0 bytes - const immutables = { - OptimismMintableERC20Factory: { - bridge: predeploys.L2StandardBridge, - }, - GasPriceOracle: { - MAJOR_VERSION: toBytes32(0), - MINOR_VERSION: toBytes32(0), - PATCH_VERSION: toBytes32(1), - }, - L1Block: { - MAJOR_VERSION: toBytes32(0), - MINOR_VERSION: toBytes32(0), - PATCH_VERSION: toBytes32(1), - }, - L2CrossDomainMessenger: { - MAJOR_VERSION: toBytes32(0), - MINOR_VERSION: toBytes32(0), - PATCH_VERSION: toBytes32(1), - }, - L2StandardBridge: { - MAJOR_VERSION: toBytes32(0), - MINOR_VERSION: toBytes32(0), - PATCH_VERSION: toBytes32(2), - messenger: predeploys.L2CrossDomainMessenger, - otherBridge: ProxyL1StandardBridge.address, - }, - L2ToL1MessagePasser: { - MAJOR_VERSION: toBytes32(0), - MINOR_VERSION: toBytes32(0), - PATCH_VERSION: toBytes32(1), - }, - SequencerFeeVault: { - MAJOR_VERSION: toBytes32(0), - MINOR_VERSION: toBytes32(0), - PATCH_VERSION: toBytes32(1), - }, - } - - // Set the predeploys in the state - for (const [name, addr] of Object.entries(predeploys)) { - if (name === 'GovernanceToken') { - continue - } - const artifact = await hre.artifacts.readArtifact(name) - assertEvenLength(artifact.deployedBytecode) - - const allocAddr = name === 'LegacyERC20ETH' ? addr : toCodeAddr(addr) - assertEvenLength(allocAddr) - - const immutableConfig = immutables[name] - const deployedBytecode = immutableConfig - ? await replaceImmutables(hre, name, immutableConfig) - : artifact.deployedBytecode - - assertEvenLength(deployedBytecode) - - // TODO(tynes): initialize contracts that should be initialized - // in the implementations here - alloc[allocAddr] = { - nonce: '0x00', - balance: '0x00', - code: deployedBytecode, - storage: {}, - } - } - - const startingTimestamp = l1StartingBlock?.timestamp || 0 - - const genesis: OptimismGenesis = { - config: { - chainId: deployConfig.l2ChainID, - homesteadBlock: 0, - eip150Block: 0, - eip150Hash: ethers.constants.HashZero, - eip155Block: 0, - eip158Block: 0, - byzantiumBlock: 0, - constantinopleBlock: 0, - petersburgBlock: 0, - istanbulBlock: 0, - muirGlacierBlock: 0, - berlinBlock: 0, - londonBlock: 0, - mergeNetsplitBlock: 0, - terminalTotalDifficulty: 0, - optimism: { - baseFeeRecipient: deployConfig.optimismBaseFeeRecipient, - l1FeeRecipient: deployConfig.optimismL1FeeRecipient, - }, - }, - nonce: deployConfig.l2GenesisBlockNonce, - timestamp: ethers.BigNumber.from(startingTimestamp).toHexString(), - extraData: deployConfig.l2GenesisBlockExtraData, - gasLimit: deployConfig.l2GenesisBlockGasLimit, - difficulty: deployConfig.l2GenesisBlockDifficulty, - mixHash: deployConfig.l2GenesisBlockMixHash, - coinbase: deployConfig.l2GenesisBlockCoinbase, - number: deployConfig.l2GenesisBlockNumber, - gasUsed: deployConfig.l2GenesisBlockGasUsed, - parentHash: deployConfig.l2GenesisBlockParentHash, - baseFeePerGas: deployConfig.l2GenesisBlockBaseFeePerGas, - alloc, - } - - fs.writeFileSync(args.outfile, JSON.stringify(genesis, null, 2)) - }) diff --git a/packages/contracts-bedrock/tasks/index.ts b/packages/contracts-bedrock/tasks/index.ts index 5d8bf450bc836..dbe8b3213cdf9 100644 --- a/packages/contracts-bedrock/tasks/index.ts +++ b/packages/contracts-bedrock/tasks/index.ts @@ -1,5 +1,3 @@ -import './genesis-l1' -import './genesis-l2' import './deposits' import './rekey' import './rollup-config' From 3d228a0eb533cc180b69febd7d4746ec7c009c18 Mon Sep 17 00:00:00 2001 From: Kelvin Fichter Date: Sat, 10 Sep 2022 16:38:06 +0200 Subject: [PATCH 12/32] feat(ctb): tweak XDM storage layout Tweaks the storage layout of the CrossDomainMessenger base contract to reduce the number of changes with the existing system. The L1CrossDomainMessenger has no storage diff after this PR. --- .changeset/green-stingrays-nail.md | 5 +++ op-bindings/bindings/gaspriceoracle_more.go | 2 +- op-bindings/bindings/governancetoken_more.go | 2 +- .../bindings/l1crossdomainmessenger.go | 2 +- .../bindings/l2crossdomainmessenger.go | 2 +- .../bindings/l2crossdomainmessenger_more.go | 4 +-- op-bindings/bindings/l2standardbridge_more.go | 2 +- op-bindings/bindings/legacyerc20eth_more.go | 2 +- op-bindings/bindings/optimismportal_more.go | 2 +- .../universal/CrossDomainMessenger.sol | 31 +++++++++++++++++++ packages/contracts-bedrock/package.json | 2 +- 11 files changed, 46 insertions(+), 10 deletions(-) create mode 100644 .changeset/green-stingrays-nail.md diff --git a/.changeset/green-stingrays-nail.md b/.changeset/green-stingrays-nail.md new file mode 100644 index 0000000000000..93f469a7d2737 --- /dev/null +++ b/.changeset/green-stingrays-nail.md @@ -0,0 +1,5 @@ +--- +'@eth-optimism/contracts-bedrock': minor +--- + +Updates the storage layout for the CrossDomainMessenger base contract to reduce diff with the existing system. diff --git a/op-bindings/bindings/gaspriceoracle_more.go b/op-bindings/bindings/gaspriceoracle_more.go index e947bcfbc7bd1..b3c5bb00c6963 100755 --- a/op-bindings/bindings/gaspriceoracle_more.go +++ b/op-bindings/bindings/gaspriceoracle_more.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum-optimism/optimism/op-bindings/solc" ) -const GasPriceOracleStorageLayoutJSON = "{\"storage\":[{\"astId\":26637,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":1649,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer0\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"},{\"astId\":1652,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer1\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":1655,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"overhead\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_uint256\"},{\"astId\":1658,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"scalar\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_uint256\"},{\"astId\":1661,\"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\":26650,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":1649,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer0\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"},{\"astId\":1652,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer1\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":1655,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"overhead\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_uint256\"},{\"astId\":1658,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"scalar\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_uint256\"},{\"astId\":1661,\"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) diff --git a/op-bindings/bindings/governancetoken_more.go b/op-bindings/bindings/governancetoken_more.go index 39aecc6dfa6c7..cc436f10e16ec 100755 --- a/op-bindings/bindings/governancetoken_more.go +++ b/op-bindings/bindings/governancetoken_more.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum-optimism/optimism/op-bindings/solc" ) -const GovernanceTokenStorageLayoutJSON = "{\"storage\":[{\"astId\":307,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_balances\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":313,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_allowances\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"},{\"astId\":315,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_totalSupply\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":317,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_name\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_string_storage\"},{\"astId\":319,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_symbol\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_string_storage\"},{\"astId\":1684,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_nonces\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_mapping(t_address,t_struct(Counter)1897_storage)\"},{\"astId\":1692,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_PERMIT_TYPEHASH_DEPRECATED_SLOT\",\"offset\":0,\"slot\":\"6\",\"type\":\"t_bytes32\"},{\"astId\":1025,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_delegates\",\"offset\":0,\"slot\":\"7\",\"type\":\"t_mapping(t_address,t_address)\"},{\"astId\":1031,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_checkpoints\",\"offset\":0,\"slot\":\"8\",\"type\":\"t_mapping(t_address,t_array(t_struct(Checkpoint)1016_storage)dyn_storage)\"},{\"astId\":1035,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_totalSupplyCheckpoints\",\"offset\":0,\"slot\":\"9\",\"type\":\"t_array(t_struct(Checkpoint)1016_storage)dyn_storage\"},{\"astId\":108,\"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)1016_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)1016_storage)dyn_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct ERC20Votes.Checkpoint[])\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_array(t_struct(Checkpoint)1016_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)1897_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct Counters.Counter)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_struct(Counter)1897_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)1016_storage\":{\"encoding\":\"inplace\",\"label\":\"struct ERC20Votes.Checkpoint\",\"numberOfBytes\":\"32\"},\"t_struct(Counter)1897_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\":3627,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_balances\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":3633,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_allowances\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"},{\"astId\":3635,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_totalSupply\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":3637,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_name\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_string_storage\"},{\"astId\":3639,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_symbol\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_string_storage\"},{\"astId\":882,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_nonces\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_mapping(t_address,t_struct(Counter)1037_storage)\"},{\"astId\":890,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_PERMIT_TYPEHASH_DEPRECATED_SLOT\",\"offset\":0,\"slot\":\"6\",\"type\":\"t_bytes32\"},{\"astId\":248,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_delegates\",\"offset\":0,\"slot\":\"7\",\"type\":\"t_mapping(t_address,t_address)\"},{\"astId\":254,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_checkpoints\",\"offset\":0,\"slot\":\"8\",\"type\":\"t_mapping(t_address,t_array(t_struct(Checkpoint)239_storage)dyn_storage)\"},{\"astId\":258,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_totalSupplyCheckpoints\",\"offset\":0,\"slot\":\"9\",\"type\":\"t_array(t_struct(Checkpoint)239_storage)dyn_storage\"},{\"astId\":3506,\"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)239_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)239_storage)dyn_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct ERC20Votes.Checkpoint[])\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_array(t_struct(Checkpoint)239_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)1037_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct Counters.Counter)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_struct(Counter)1037_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)239_storage\":{\"encoding\":\"inplace\",\"label\":\"struct ERC20Votes.Checkpoint\",\"numberOfBytes\":\"32\"},\"t_struct(Counter)1037_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) diff --git a/op-bindings/bindings/l1crossdomainmessenger.go b/op-bindings/bindings/l1crossdomainmessenger.go index 07fa00b54de51..20df4aea7d253 100644 --- a/op-bindings/bindings/l1crossdomainmessenger.go +++ b/op-bindings/bindings/l1crossdomainmessenger.go @@ -31,7 +31,7 @@ var ( // L1CrossDomainMessengerMetaData contains all meta data concerning the L1CrossDomainMessenger contract. 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\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"blockedSystemAddresses\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"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: "0x6101006040523480156200001257600080fd5b5060405162002bb738038062002bb7833981016040819052620000359162000510565b6000608081905260a052600160c0526001600160a01b03811660e0526200005b62000062565b5062000580565b600054610100900460ff1615808015620000835750600054600160ff909116105b80620000b35750620000a030620001fc60201b6200128e1760201c565b158015620000b3575060005460ff166001145b6200011c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801562000140576000805461ff0019166101001790555b60408051600180825281830190925260009160208083019080368337019050509050308160008151811062000179576200017962000542565b6001600160a01b0390921660209283029190910190910152620001b1734200000000000000000000000000000000000007826200020b565b508015620001f9576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6001600160a01b03163b151590565b600054610100900460ff16620002675760405162461bcd60e51b815260206004820152602b602482015260008051602062002b9783398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000113565b60ca805461dead6001600160a01b03199182161790915560cc80549091166001600160a01b03841617905560005b81518110156200030157600160ce6000848481518110620002ba57620002ba62000542565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580620002f88162000558565b91505062000295565b506200030c6200032e565b620003166200038c565b62000320620003f3565b6200032a6200045b565b5050565b600054610100900460ff166200038a5760405162461bcd60e51b815260206004820152602b602482015260008051602062002b9783398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000113565b565b600054610100900460ff16620003e85760405162461bcd60e51b815260206004820152602b602482015260008051602062002b9783398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000113565b6200038a33620004be565b600054610100900460ff166200044f5760405162461bcd60e51b815260206004820152602b602482015260008051602062002b9783398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000113565b6065805460ff19169055565b600054610100900460ff16620004b75760405162461bcd60e51b815260206004820152602b602482015260008051602062002b9783398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000113565b6001609755565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000602082840312156200052357600080fd5b81516001600160a01b03811681146200053b57600080fd5b9392505050565b634e487b7160e01b600052603260045260246000fd5b6000600182016200057957634e487b7160e01b600052601160045260246000fd5b5060010190565b60805160a05160c05160e0516125c8620005cf600039600081816102be015281816112e70152818161195801526119c7015260006107ae015260006107850152600061075c01526125c86000f3fe6080604052600436106101805760003560e01c8063715018a6116100d6578063b28ade251161007f578063ecc7042811610059578063ecc704281461042b578063f2fde38b14610490578063f69f8151146104b057600080fd5b8063b28ade25146103cb578063d764ad0b146103eb578063db505d80146103fe57600080fd5b80638456cb59116100b05780638456cb591461035b5780638da5cb5b14610370578063b1b1b2091461039b57600080fd5b8063715018a61461031a5780637dea7cc31461032f5780638129fc1c1461034657600080fd5b80633f827a5a116101385780635c975abb116101125780635c975abb146102945780636425666b146102ac5780636e296e451461030557600080fd5b80633f827a5a1461020a5780634b134ce71461023257806354fd4d501461027257600080fd5b80632828d7e8116101695780632828d7e8146101ca5780633dbb202b146101e05780633f4ba83a146101f557600080fd5b8063028f85f7146101855780630c568498146101b4575b600080fd5b34801561019157600080fd5b5061019a601081565b60405163ffffffff90911681526020015b60405180910390f35b3480156101c057600080fd5b5061019a6103e881565b3480156101d657600080fd5b5061019a6103f881565b6101f36101ee366004611f6c565b6104e0565b005b34801561020157600080fd5b506101f3610743565b34801561021657600080fd5b5061021f600181565b60405161ffff90911681526020016101ab565b34801561023e57600080fd5b5061026261024d366004611fd3565b60ce6020526000908152604090205460ff1681565b60405190151581526020016101ab565b34801561027e57600080fd5b50610287610755565b6040516101ab9190612071565b3480156102a057600080fd5b5060655460ff16610262565b3480156102b857600080fd5b506102e07f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101ab565b34801561031157600080fd5b506102e06107f8565b34801561032657600080fd5b506101f36108e4565b34801561033b57600080fd5b5061019a62030d4081565b34801561035257600080fd5b506101f36108f6565b34801561036757600080fd5b506101f3610b0f565b34801561037c57600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff166102e0565b3480156103a757600080fd5b506102626103b6366004612084565b60c96020526000908152604090205460ff1681565b3480156103d757600080fd5b5061019a6103e636600461209d565b610b1f565b6101f36103f93660046120f1565b610b65565b34801561040a57600080fd5b5060cc546102e09073ffffffffffffffffffffffffffffffffffffffff1681565b34801561043757600080fd5b5061048260cb547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b6040519081526020016101ab565b34801561049c57600080fd5b506101f36104ab366004611fd3565b6111da565b3480156104bc57600080fd5b506102626104cb366004612084565b60cd6020526000908152604090205460ff1681565b60cc546106189073ffffffffffffffffffffffffffffffffffffffff16610508858585610b1f565b63ffffffff16347fd764ad0b0000000000000000000000000000000000000000000000000000000061057a60cb547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b338a34898c8c60405160240161059697969594939291906121c0565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526112aa565b8373ffffffffffffffffffffffffffffffffffffffff167fcb0f7ffd78f9aee47a248fae8db181db6eee833039123e026dcbff529522e52a33858561069d60cb547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b866040516106af95949392919061221f565b60405180910390a260405134815233907f8ebb2ec2465bdb2a06a66fc37a0963af8a2a6a1479d81d56fdb8cbb98096d5469060200160405180910390a2505060cb80547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808216600101167fffff0000000000000000000000000000000000000000000000000000000000009091161790555050565b61074b61135f565b6107536113e0565b565b60606107807f000000000000000000000000000000000000000000000000000000000000000061145d565b6107a97f000000000000000000000000000000000000000000000000000000000000000061145d565b6107d27f000000000000000000000000000000000000000000000000000000000000000061145d565b6040516020016107e49392919061226d565b604051602081830303815290604052905090565b60ca5460009073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2153016108c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f43726f7373446f6d61696e4d657373656e6765723a2078446f6d61696e4d657360448201527f7361676553656e646572206973206e6f7420736574000000000000000000000060648201526084015b60405180910390fd5b5060ca5473ffffffffffffffffffffffffffffffffffffffff1690565b6108ec61135f565b6107536000611592565b600054610100900460ff16158080156109165750600054600160ff909116105b806109305750303b158015610930575060005460ff166001145b6109bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016108be565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610a1a57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b604080516001808252818301909252600091602080830190803683370190505090503081600081518110610a5057610a50612312565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050610aa873420000000000000000000000000000000000000782611609565b508015610b0c57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b610b1761135f565b6107536117a8565b600062030d40610b30601085612370565b6103e8610b3f6103f886612370565b610b4991906123cb565b610b5391906123ee565b610b5d91906123ee565b949350505050565b600260975403610bd1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108be565b6002609755610bde611803565b6000610c24888888888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061187092505050565b9050610c2e61193e565b15610cc757843414610cc2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f43726f7373446f6d61696e4d657373656e6765723a206d69736d61746368656460448201527f206d6573736167652076616c756500000000000000000000000000000000000060648201526084016108be565b610e19565b3415610d7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605060248201527f43726f7373446f6d61696e4d657373656e6765723a2076616c7565206d75737460448201527f206265207a65726f20756e6c657373206d6573736167652069732066726f6d2060648201527f612073797374656d206164647265737300000000000000000000000000000000608482015260a4016108be565b600081815260cd602052604090205460ff16610e19576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520636160448201527f6e6e6f74206265207265706c617965640000000000000000000000000000000060648201526084016108be565b73ffffffffffffffffffffffffffffffffffffffff8616600090815260ce602052604090205460ff1615610ef5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f43726f7373446f6d61696e4d657373656e6765723a2063616e6e6f742073656e60448201527f64206d65737361676520746f20626c6f636b65642073797374656d206164647260648201527f6573730000000000000000000000000000000000000000000000000000000000608482015260a4016108be565b600081815260c9602052604090205460ff1615610f94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520686160448201527f7320616c7265616479206265656e2072656c617965640000000000000000000060648201526084016108be565b610fa061afc885612416565b5a101561102f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f43726f7373446f6d61696e4d657373656e6765723a20696e737566666963696560448201527f6e742067617320746f2072656c6179206d65737361676500000000000000000060648201526084016108be565b60ca80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff891617905560006110cb8761108361138861afc861242e565b5a61108e919061242e565b8887878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611a5292505050565b60ca80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055905080151560010361116657600082815260c9602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c91a26111c5565b600082815260cd602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f91a25b5050600160975550505050505050565b905090565b6111e261135f565b73ffffffffffffffffffffffffffffffffffffffff8116611285576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016108be565b610b0c81611592565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6040517fe9e05c4200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e9e05c42908490611327908890839089906000908990600401612445565b6000604051808303818588803b15801561134057600080fd5b505af1158015611354573d6000803e3d6000fd5b505050505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108be565b6113e8611a6c565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b6060816000036114a057505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156114ca57806114b48161249d565b91506114c39050600a836124d5565b91506114a4565b60008167ffffffffffffffff8111156114e5576114e56122e3565b6040519080825280601f01601f19166020018201604052801561150f576020820181803683370190505b5090505b8415610b5d5761152460018361242e565b9150611531600a866124e9565b61153c906030612416565b60f81b81838151811061155157611551612312565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061158b600a866124d5565b9450611513565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166116a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b60ca805461dead7fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560cc805490911673ffffffffffffffffffffffffffffffffffffffff841617905560005b815181101561178357600160ce600084848151811061171457611714612312565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790558061177b8161249d565b9150506116f3565b5061178c611ad8565b611794611b6f565b61179c611c0f565b6117a4611cd0565b5050565b6117b0611803565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586114333390565b60655460ff1615610753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016108be565b600060f087901c8082036118925761188a8688858b611d6e565b915050611934565b8061ffff166001036118ac5761188a888888888888611d8d565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f48617368696e673a20756e6b6e6f776e2063726f737320646f6d61696e206d6560448201527f73736167652076657273696f6e0000000000000000000000000000000000000060648201526084016108be565b9695505050505050565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161480156111d5575060cc54604080517f9bf62d82000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff928316927f00000000000000000000000000000000000000000000000000000000000000001691639bf62d829160048083019260209291908290030181865afa158015611a12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3691906124fd565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b600080600080845160208601878a8af19695505050505050565b60655460ff16610753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016108be565b600054610100900460ff16610753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b600054610100900460ff16611c06576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b61075333611592565b600054610100900460ff16611ca6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b600054610100900460ff16611d67576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b6001609755565b6000611d7c85858585611db0565b805190602001209050949350505050565b6000611d9d878787878787611e49565b8051906020012090509695505050505050565b606084848484604051602401611dc9949392919061251a565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fcbd4ece9000000000000000000000000000000000000000000000000000000001790529050949350505050565b6060868686868686604051602401611e6696959493929190612564565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd764ad0b0000000000000000000000000000000000000000000000000000000017905290509695505050505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610b0c57600080fd5b60008083601f840112611f1c57600080fd5b50813567ffffffffffffffff811115611f3457600080fd5b602083019150836020828501011115611f4c57600080fd5b9250929050565b803563ffffffff81168114611f6757600080fd5b919050565b60008060008060608587031215611f8257600080fd5b8435611f8d81611ee8565b9350602085013567ffffffffffffffff811115611fa957600080fd5b611fb587828801611f0a565b9094509250611fc8905060408601611f53565b905092959194509250565b600060208284031215611fe557600080fd5b8135611ff081611ee8565b9392505050565b60005b83811015612012578181015183820152602001611ffa565b83811115612021576000848401525b50505050565b6000815180845261203f816020860160208601611ff7565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611ff06020830184612027565b60006020828403121561209657600080fd5b5035919050565b6000806000604084860312156120b257600080fd5b833567ffffffffffffffff8111156120c957600080fd5b6120d586828701611f0a565b90945092506120e8905060208501611f53565b90509250925092565b600080600080600080600060c0888a03121561210c57600080fd5b87359650602088013561211e81611ee8565b9550604088013561212e81611ee8565b9450606088013593506080880135925060a088013567ffffffffffffffff81111561215857600080fd5b6121648a828b01611f0a565b989b979a50959850939692959293505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b878152600073ffffffffffffffffffffffffffffffffffffffff808916602084015280881660408401525085606083015263ffffffff8516608083015260c060a083015261221260c083018486612177565b9998505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8616815260806020820152600061224f608083018688612177565b905083604083015263ffffffff831660608301529695505050505050565b6000845161227f818460208901611ff7565b80830190507f2e0000000000000000000000000000000000000000000000000000000000000080825285516122bb816001850160208a01611ff7565b600192019182015283516122d6816002840160208801611ff7565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff8083168185168183048111821515161561239357612393612341565b02949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600063ffffffff808416806123e2576123e261239c565b92169190910492915050565b600063ffffffff80831681851680830382111561240d5761240d612341565b01949350505050565b6000821982111561242957612429612341565b500190565b60008282101561244057612440612341565b500390565b73ffffffffffffffffffffffffffffffffffffffff8616815284602082015267ffffffffffffffff84166040820152821515606082015260a06080820152600061249260a0830184612027565b979650505050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036124ce576124ce612341565b5060010190565b6000826124e4576124e461239c565b500490565b6000826124f8576124f861239c565b500690565b60006020828403121561250f57600080fd5b8151611ff081611ee8565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250608060408301526125536080830185612027565b905082606083015295945050505050565b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a08301526125af60c0830184612027565b9897505050505050505056fea164736f6c634300080f000a496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", + Bin: "0x6101006040523480156200001257600080fd5b5060405162002cab38038062002cab833981016040819052620000359162000535565b6000608081905260a052600160c0526001600160a01b03811660e0526200005b62000062565b50620005a5565b600054600160a81b900460ff16158080156200008b57506000546001600160a01b90910460ff16105b80620000c25750620000a8306200021760201b620012f91760201c565b158015620000c25750600054600160a01b900460ff166001145b6200012b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff60a01b1916600160a01b179055801562000159576000805460ff60a81b1916600160a81b1790555b60408051600180825281830190925260009160208083019080368337019050509050308160008151811062000192576200019262000567565b6001600160a01b0390921660209283029190910190910152620001ca7342000000000000000000000000000000000000078262000226565b50801562000214576000805460ff60a81b19169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6001600160a01b03163b151590565b600054600160a81b900460ff16620002845760405162461bcd60e51b815260206004820152602b602482015260008051602062002c8b83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000122565b60cc805461dead6001600160a01b03199182161790915560ce80549091166001600160a01b03841617905560005b81518110156200031e57600160d06000848481518110620002d757620002d762000567565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558062000315816200057d565b915050620002b2565b50620003296200034b565b62000333620003ab565b6200033d62000414565b620003476200047e565b5050565b600054600160a81b900460ff16620003a95760405162461bcd60e51b815260206004820152602b602482015260008051602062002c8b83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000122565b565b600054600160a81b900460ff16620004095760405162461bcd60e51b815260206004820152602b602482015260008051602062002c8b83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000122565b620003a933620004e3565b600054600160a81b900460ff16620004725760405162461bcd60e51b815260206004820152602b602482015260008051602062002c8b83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000122565b6065805460ff19169055565b600054600160a81b900460ff16620004dc5760405162461bcd60e51b815260206004820152602b602482015260008051602062002c8b83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000122565b6001609755565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000602082840312156200054857600080fd5b81516001600160a01b03811681146200056057600080fd5b9392505050565b634e487b7160e01b600052603260045260246000fd5b6000600182016200059e57634e487b7160e01b600052601160045260246000fd5b5060010190565b60805160a05160c05160e051612697620005f4600039600081816102be01528181611352015281816119d70152611a46015260006107ae015260006107850152600061075c01526126976000f3fe6080604052600436106101805760003560e01c8063715018a6116100d6578063b28ade251161007f578063ecc7042811610059578063ecc704281461042b578063f2fde38b14610490578063f69f8151146104b057600080fd5b8063b28ade25146103cb578063d764ad0b146103eb578063db505d80146103fe57600080fd5b80638456cb59116100b05780638456cb591461035b5780638da5cb5b14610370578063b1b1b2091461039b57600080fd5b8063715018a61461031a5780637dea7cc31461032f5780638129fc1c1461034657600080fd5b80633f827a5a116101385780635c975abb116101125780635c975abb146102945780636425666b146102ac5780636e296e451461030557600080fd5b80633f827a5a1461020a5780634b134ce71461023257806354fd4d501461027257600080fd5b80632828d7e8116101695780632828d7e8146101ca5780633dbb202b146101e05780633f4ba83a146101f557600080fd5b8063028f85f7146101855780630c568498146101b4575b600080fd5b34801561019157600080fd5b5061019a601081565b60405163ffffffff90911681526020015b60405180910390f35b3480156101c057600080fd5b5061019a6103e881565b3480156101d657600080fd5b5061019a6103f881565b6101f36101ee36600461203b565b6104e0565b005b34801561020157600080fd5b506101f3610743565b34801561021657600080fd5b5061021f600181565b60405161ffff90911681526020016101ab565b34801561023e57600080fd5b5061026261024d3660046120a2565b60d06020526000908152604090205460ff1681565b60405190151581526020016101ab565b34801561027e57600080fd5b50610287610755565b6040516101ab9190612140565b3480156102a057600080fd5b5060655460ff16610262565b3480156102b857600080fd5b506102e07f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101ab565b34801561031157600080fd5b506102e06107f8565b34801561032657600080fd5b506101f36108e4565b34801561033b57600080fd5b5061019a62030d4081565b34801561035257600080fd5b506101f36108f6565b34801561036757600080fd5b506101f3610b7a565b34801561037c57600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff166102e0565b3480156103a757600080fd5b506102626103b6366004612153565b60cb6020526000908152604090205460ff1681565b3480156103d757600080fd5b5061019a6103e636600461216c565b610b8a565b6101f36103f93660046121c0565b610bd0565b34801561040a57600080fd5b5060ce546102e09073ffffffffffffffffffffffffffffffffffffffff1681565b34801561043757600080fd5b5061048260cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b6040519081526020016101ab565b34801561049c57600080fd5b506101f36104ab3660046120a2565b611245565b3480156104bc57600080fd5b506102626104cb366004612153565b60cf6020526000908152604090205460ff1681565b60ce546106189073ffffffffffffffffffffffffffffffffffffffff16610508858585610b8a565b63ffffffff16347fd764ad0b0000000000000000000000000000000000000000000000000000000061057a60cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b338a34898c8c604051602401610596979695949392919061228f565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611315565b8373ffffffffffffffffffffffffffffffffffffffff167fcb0f7ffd78f9aee47a248fae8db181db6eee833039123e026dcbff529522e52a33858561069d60cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b866040516106af9594939291906122ee565b60405180910390a260405134815233907f8ebb2ec2465bdb2a06a66fc37a0963af8a2a6a1479d81d56fdb8cbb98096d5469060200160405180910390a2505060cd80547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808216600101167fffff0000000000000000000000000000000000000000000000000000000000009091161790555050565b61074b6113ca565b61075361144b565b565b60606107807f00000000000000000000000000000000000000000000000000000000000000006114c8565b6107a97f00000000000000000000000000000000000000000000000000000000000000006114c8565b6107d27f00000000000000000000000000000000000000000000000000000000000000006114c8565b6040516020016107e49392919061233c565b604051602081830303815290604052905090565b60cc5460009073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2153016108c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f43726f7373446f6d61696e4d657373656e6765723a2078446f6d61696e4d657360448201527f7361676553656e646572206973206e6f7420736574000000000000000000000060648201526084015b60405180910390fd5b5060cc5473ffffffffffffffffffffffffffffffffffffffff1690565b6108ec6113ca565b61075360006115fd565b6000547501000000000000000000000000000000000000000000900460ff1615808015610941575060005460017401000000000000000000000000000000000000000090910460ff16105b806109735750303b158015610973575060005474010000000000000000000000000000000000000000900460ff166001145b6109ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016108be565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790558015610a8557600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790555b604080516001808252818301909252600091602080830190803683370190505090503081600081518110610abb57610abb6123e1565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050610b1373420000000000000000000000000000000000000782611674565b508015610b7757600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b610b826113ca565b610753611827565b600062030d40610b9b60108561243f565b6103e8610baa6103f88661243f565b610bb4919061249a565b610bbe91906124bd565b610bc891906124bd565b949350505050565b600260975403610c3c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108be565b6002609755610c49611882565b6000610c8f888888888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506118ef92505050565b9050610c996119bd565b15610d3257843414610d2d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f43726f7373446f6d61696e4d657373656e6765723a206d69736d61746368656460448201527f206d6573736167652076616c756500000000000000000000000000000000000060648201526084016108be565b610e84565b3415610de6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605060248201527f43726f7373446f6d61696e4d657373656e6765723a2076616c7565206d75737460448201527f206265207a65726f20756e6c657373206d6573736167652069732066726f6d2060648201527f612073797374656d206164647265737300000000000000000000000000000000608482015260a4016108be565b600081815260cf602052604090205460ff16610e84576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520636160448201527f6e6e6f74206265207265706c617965640000000000000000000000000000000060648201526084016108be565b73ffffffffffffffffffffffffffffffffffffffff8616600090815260d0602052604090205460ff1615610f60576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f43726f7373446f6d61696e4d657373656e6765723a2063616e6e6f742073656e60448201527f64206d65737361676520746f20626c6f636b65642073797374656d206164647260648201527f6573730000000000000000000000000000000000000000000000000000000000608482015260a4016108be565b600081815260cb602052604090205460ff1615610fff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520686160448201527f7320616c7265616479206265656e2072656c617965640000000000000000000060648201526084016108be565b61100b61afc8856124e5565b5a101561109a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f43726f7373446f6d61696e4d657373656e6765723a20696e737566666963696560448201527f6e742067617320746f2072656c6179206d65737361676500000000000000000060648201526084016108be565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff89161790556000611136876110ee61138861afc86124fd565b5a6110f991906124fd565b8887878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611ad192505050565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead17905590508015156001036111d157600082815260cb602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c91a2611230565b600082815260cf602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f91a25b5050600160975550505050505050565b905090565b61124d6113ca565b73ffffffffffffffffffffffffffffffffffffffff81166112f0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016108be565b610b77816115fd565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6040517fe9e05c4200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e9e05c42908490611392908890839089906000908990600401612514565b6000604051808303818588803b1580156113ab57600080fd5b505af11580156113bf573d6000803e3d6000fd5b505050505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108be565b611453611aeb565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60608160000361150b57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611535578061151f8161256c565b915061152e9050600a836125a4565b915061150f565b60008167ffffffffffffffff811115611550576115506123b2565b6040519080825280601f01601f19166020018201604052801561157a576020820181803683370190505b5090505b8415610bc85761158f6001836124fd565b915061159c600a866125b8565b6115a79060306124e5565b60f81b8183815181106115bc576115bc6123e1565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506115f6600a866125a4565b945061157e565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000547501000000000000000000000000000000000000000000900460ff1661171f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b60cc805461dead7fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560ce805490911673ffffffffffffffffffffffffffffffffffffffff841617905560005b815181101561180257600160d06000848481518110611793576117936123e1565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055806117fa8161256c565b915050611772565b5061180b611b57565b611813611c02565b61181b611cb6565b611823611d8b565b5050565b61182f611882565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861149e3390565b60655460ff1615610753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016108be565b600060f087901c808203611911576119098688858b611e3d565b9150506119b3565b8061ffff1660010361192b57611909888888888888611e5c565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f48617368696e673a20756e6b6e6f776e2063726f737320646f6d61696e206d6560448201527f73736167652076657273696f6e0000000000000000000000000000000000000060648201526084016108be565b9695505050505050565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015611240575060ce54604080517f9bf62d82000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff928316927f00000000000000000000000000000000000000000000000000000000000000001691639bf62d829160048083019260209291908290030181865afa158015611a91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab591906125cc565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b600080600080845160208601878a8af19695505050505050565b60655460ff16610753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016108be565b6000547501000000000000000000000000000000000000000000900460ff16610753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b6000547501000000000000000000000000000000000000000000900460ff16611cad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b610753336115fd565b6000547501000000000000000000000000000000000000000000900460ff16611d61576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b6000547501000000000000000000000000000000000000000000900460ff16611e36576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b6001609755565b6000611e4b85858585611e7f565b805190602001209050949350505050565b6000611e6c878787878787611f18565b8051906020012090509695505050505050565b606084848484604051602401611e9894939291906125e9565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fcbd4ece9000000000000000000000000000000000000000000000000000000001790529050949350505050565b6060868686868686604051602401611f3596959493929190612633565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd764ad0b0000000000000000000000000000000000000000000000000000000017905290509695505050505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610b7757600080fd5b60008083601f840112611feb57600080fd5b50813567ffffffffffffffff81111561200357600080fd5b60208301915083602082850101111561201b57600080fd5b9250929050565b803563ffffffff8116811461203657600080fd5b919050565b6000806000806060858703121561205157600080fd5b843561205c81611fb7565b9350602085013567ffffffffffffffff81111561207857600080fd5b61208487828801611fd9565b9094509250612097905060408601612022565b905092959194509250565b6000602082840312156120b457600080fd5b81356120bf81611fb7565b9392505050565b60005b838110156120e15781810151838201526020016120c9565b838111156120f0576000848401525b50505050565b6000815180845261210e8160208601602086016120c6565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006120bf60208301846120f6565b60006020828403121561216557600080fd5b5035919050565b60008060006040848603121561218157600080fd5b833567ffffffffffffffff81111561219857600080fd5b6121a486828701611fd9565b90945092506121b7905060208501612022565b90509250925092565b600080600080600080600060c0888a0312156121db57600080fd5b8735965060208801356121ed81611fb7565b955060408801356121fd81611fb7565b9450606088013593506080880135925060a088013567ffffffffffffffff81111561222757600080fd5b6122338a828b01611fd9565b989b979a50959850939692959293505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b878152600073ffffffffffffffffffffffffffffffffffffffff808916602084015280881660408401525085606083015263ffffffff8516608083015260c060a08301526122e160c083018486612246565b9998505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8616815260806020820152600061231e608083018688612246565b905083604083015263ffffffff831660608301529695505050505050565b6000845161234e8184602089016120c6565b80830190507f2e00000000000000000000000000000000000000000000000000000000000000808252855161238a816001850160208a016120c6565b600192019182015283516123a58160028401602088016120c6565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff8083168185168183048111821515161561246257612462612410565b02949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600063ffffffff808416806124b1576124b161246b565b92169190910492915050565b600063ffffffff8083168185168083038211156124dc576124dc612410565b01949350505050565b600082198211156124f8576124f8612410565b500190565b60008282101561250f5761250f612410565b500390565b73ffffffffffffffffffffffffffffffffffffffff8616815284602082015267ffffffffffffffff84166040820152821515606082015260a06080820152600061256160a08301846120f6565b979650505050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361259d5761259d612410565b5060010190565b6000826125b3576125b361246b565b500490565b6000826125c7576125c761246b565b500690565b6000602082840312156125de57600080fd5b81516120bf81611fb7565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152506080604083015261262260808301856120f6565b905082606083015295945050505050565b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a083015261267e60c08301846120f6565b9897505050505050505056fea164736f6c634300080f000a496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", } // L1CrossDomainMessengerABI is the input ABI used to generate the binding from. diff --git a/op-bindings/bindings/l2crossdomainmessenger.go b/op-bindings/bindings/l2crossdomainmessenger.go index affcdeacabf85..c2b076a028452 100644 --- a/op-bindings/bindings/l2crossdomainmessenger.go +++ b/op-bindings/bindings/l2crossdomainmessenger.go @@ -31,7 +31,7 @@ var ( // L2CrossDomainMessengerMetaData contains all meta data concerning the L2CrossDomainMessenger contract. 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\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"blockedSystemAddresses\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1CrossDomainMessenger\",\"type\":\"address\"}],\"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: "0x60e06040523480156200001157600080fd5b5060405162002af138038062002af183398101604081905262000034916200053a565b6000608081905260a052600160c0526200004e8162000055565b50620005aa565b600054610100900460ff1615808015620000765750600054600160ff909116105b80620000a6575062000093306200022a60201b6200132f1760201c565b158015620000a6575060005460ff166001145b6200010f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801562000133576000805461ff0019166101001790555b604080516002808252606082018352600092602083019080368337019050509050734200000000000000000000000000000000000007816000815181106200017f576200017f6200056c565b60200260200101906001600160a01b031690816001600160a01b031681525050602160991b81600181518110620001ba57620001ba6200056c565b6001600160a01b0390921660209283029190910190910152620001de838262000239565b50801562000226576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b6001600160a01b03163b151590565b600054610100900460ff16620002955760405162461bcd60e51b815260206004820152602b602482015260008051602062002ad183398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000106565b60ca805461dead6001600160a01b03199182161790915560cc80549091166001600160a01b03841617905560005b81518110156200032f57600160ce6000848481518110620002e857620002e86200056c565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580620003268162000582565b915050620002c3565b506200033a62000358565b62000344620003b6565b6200034e6200041d565b6200022662000485565b600054610100900460ff16620003b45760405162461bcd60e51b815260206004820152602b602482015260008051602062002ad183398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000106565b565b600054610100900460ff16620004125760405162461bcd60e51b815260206004820152602b602482015260008051602062002ad183398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000106565b620003b433620004e8565b600054610100900460ff16620004795760405162461bcd60e51b815260206004820152602b602482015260008051602062002ad183398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000106565b6065805460ff19169055565b600054610100900460ff16620004e15760405162461bcd60e51b815260206004820152602b602482015260008051602062002ad183398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000106565b6001609755565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000602082840312156200054d57600080fd5b81516001600160a01b03811681146200056557600080fd5b9392505050565b634e487b7160e01b600052603260045260246000fd5b600060018201620005a357634e487b7160e01b600052601160045260246000fd5b5060010190565b60805160a05160c0516124f7620005da60003960006107b0015260006107870152600061075e01526124f76000f3fe6080604052600436106101805760003560e01c80637dea7cc3116100d6578063c4d66de81161007f578063ecc7042811610059578063ecc704281461042d578063f2fde38b14610492578063f69f8151146104b257600080fd5b8063c4d66de8146103cd578063d764ad0b146103ed578063db505d801461040057600080fd5b8063a7119869116100b0578063a711986914610352578063b1b1b2091461037d578063b28ade25146103ad57600080fd5b80637dea7cc3146102fb5780638456cb59146103125780638da5cb5b1461032757600080fd5b80633f827a5a116101385780635c975abb116101125780635c975abb146102945780636e296e45146102ac578063715018a6146102e657600080fd5b80633f827a5a1461020a5780634b134ce71461023257806354fd4d501461027257600080fd5b80632828d7e8116101695780632828d7e8146101ca5780633dbb202b146101e05780633f4ba83a146101f557600080fd5b8063028f85f7146101855780630c568498146101b4575b600080fd5b34801561019157600080fd5b5061019a601081565b60405163ffffffff90911681526020015b60405180910390f35b3480156101c057600080fd5b5061019a6103e881565b3480156101d657600080fd5b5061019a6103f881565b6101f36101ee366004611ed0565b6104e2565b005b34801561020157600080fd5b506101f3610745565b34801561021657600080fd5b5061021f600181565b60405161ffff90911681526020016101ab565b34801561023e57600080fd5b5061026261024d366004611f35565b60ce6020526000908152604090205460ff1681565b60405190151581526020016101ab565b34801561027e57600080fd5b50610287610757565b6040516101ab9190611fd1565b3480156102a057600080fd5b5060655460ff16610262565b3480156102b857600080fd5b506102c16107fa565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101ab565b3480156102f257600080fd5b506101f36108e6565b34801561030757600080fd5b5061019a62030d4081565b34801561031e57600080fd5b506101f36108f8565b34801561033357600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff166102c1565b34801561035e57600080fd5b5060cc5473ffffffffffffffffffffffffffffffffffffffff166102c1565b34801561038957600080fd5b50610262610398366004611fe4565b60c96020526000908152604090205460ff1681565b3480156103b957600080fd5b5061019a6103c8366004611ffd565b610908565b3480156103d957600080fd5b506101f36103e8366004611f35565b61094e565b6101f36103fb366004612051565b610bc9565b34801561040c57600080fd5b5060cc546102c19073ffffffffffffffffffffffffffffffffffffffff1681565b34801561043957600080fd5b5061048460cb547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b6040519081526020016101ab565b34801561049e57600080fd5b506101f36104ad366004611f35565b611278565b3480156104be57600080fd5b506102626104cd366004611fe4565b60cd6020526000908152604090205460ff1681565b60cc5461061a9073ffffffffffffffffffffffffffffffffffffffff1661050a858585610908565b63ffffffff16347fd764ad0b0000000000000000000000000000000000000000000000000000000061057c60cb547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b338a34898c8c604051602401610598979695949392919061211c565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261134b565b8373ffffffffffffffffffffffffffffffffffffffff167fcb0f7ffd78f9aee47a248fae8db181db6eee833039123e026dcbff529522e52a33858561069f60cb547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b866040516106b195949392919061217b565b60405180910390a260405134815233907f8ebb2ec2465bdb2a06a66fc37a0963af8a2a6a1479d81d56fdb8cbb98096d5469060200160405180910390a2505060cb80547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808216600101167fffff0000000000000000000000000000000000000000000000000000000000009091161790555050565b61074d6113d9565b61075561145a565b565b60606107827f00000000000000000000000000000000000000000000000000000000000000006114d7565b6107ab7f00000000000000000000000000000000000000000000000000000000000000006114d7565b6107d47f00000000000000000000000000000000000000000000000000000000000000006114d7565b6040516020016107e6939291906121c9565b604051602081830303815290604052905090565b60ca5460009073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2153016108c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f43726f7373446f6d61696e4d657373656e6765723a2078446f6d61696e4d657360448201527f7361676553656e646572206973206e6f7420736574000000000000000000000060648201526084015b60405180910390fd5b5060ca5473ffffffffffffffffffffffffffffffffffffffff1690565b6108ee6113d9565b610755600061160c565b6109006113d9565b610755611683565b600062030d4061091960108561226e565b6103e86109286103f88661226e565b61093291906122c9565b61093c91906122ec565b61094691906122ec565b949350505050565b600054610100900460ff161580801561096e5750600054600160ff909116105b806109885750303b158015610988575060005460ff166001145b610a14576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016108c0565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610a7257600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b60408051600280825260608201835260009260208301908036833701905050905073420000000000000000000000000000000000000781600081518110610abb57610abb612343565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505073420000000000000000000000000000000000000081600181518110610b1d57610b1d612343565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050610b6183826116de565b508015610bc557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b600260975403610c35576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108c0565b6002609755610c42611879565b6000610c88888888888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506118e692505050565b9050610cd160cc54337fffffffffffffffffffffffffeeeeffffffffffffffffffffffffffffffffeeef0173ffffffffffffffffffffffffffffffffffffffff90811691161490565b15610d6a57843414610d65576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f43726f7373446f6d61696e4d657373656e6765723a206d69736d61746368656460448201527f206d6573736167652076616c756500000000000000000000000000000000000060648201526084016108c0565b610ebc565b3415610e1e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605060248201527f43726f7373446f6d61696e4d657373656e6765723a2076616c7565206d75737460448201527f206265207a65726f20756e6c657373206d6573736167652069732066726f6d2060648201527f612073797374656d206164647265737300000000000000000000000000000000608482015260a4016108c0565b600081815260cd602052604090205460ff16610ebc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520636160448201527f6e6e6f74206265207265706c617965640000000000000000000000000000000060648201526084016108c0565b73ffffffffffffffffffffffffffffffffffffffff8616600090815260ce602052604090205460ff1615610f98576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f43726f7373446f6d61696e4d657373656e6765723a2063616e6e6f742073656e60448201527f64206d65737361676520746f20626c6f636b65642073797374656d206164647260648201527f6573730000000000000000000000000000000000000000000000000000000000608482015260a4016108c0565b600081815260c9602052604090205460ff1615611037576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520686160448201527f7320616c7265616479206265656e2072656c617965640000000000000000000060648201526084016108c0565b61104361afc885612372565b5a10156110d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f43726f7373446f6d61696e4d657373656e6765723a20696e737566666963696560448201527f6e742067617320746f2072656c6179206d65737361676500000000000000000060648201526084016108c0565b60ca80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8916179055600061116e8761112661138861afc861238a565b5a611131919061238a565b8887878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506119b492505050565b60ca80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055905080151560010361120957600082815260c9602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c91a2611268565b600082815260cd602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f91a25b5050600160975550505050505050565b6112806113d9565b73ffffffffffffffffffffffffffffffffffffffff8116611323576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016108c0565b61132c8161160c565b50565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6040517fc2b3e5ac0000000000000000000000000000000000000000000000000000000081527342000000000000000000000000000000000000009063c2b3e5ac9084906113a1908890889087906004016123a1565b6000604051808303818588803b1580156113ba57600080fd5b505af11580156113ce573d6000803e3d6000fd5b505050505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610755576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108c0565b6114626119ce565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60608160000361151a57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611544578061152e816123e9565b915061153d9050600a83612421565b915061151e565b60008167ffffffffffffffff81111561155f5761155f612314565b6040519080825280601f01601f191660200182016040528015611589576020820181803683370190505b5090505b84156109465761159e60018361238a565b91506115ab600a86612435565b6115b6906030612372565b60f81b8183815181106115cb576115cb612343565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611605600a86612421565b945061158d565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61168b611879565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586114ad3390565b600054610100900460ff16611775576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108c0565b60ca805461dead7fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560cc805490911673ffffffffffffffffffffffffffffffffffffffff841617905560005b815181101561185857600160ce60008484815181106117e9576117e9612343565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905580611850816123e9565b9150506117c8565b50611861611a3a565b611869611ad1565b611871611b71565b610bc5611c32565b60655460ff1615610755576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016108c0565b600060f087901c808203611908576119008688858b611cd0565b9150506119aa565b8061ffff1660010361192257611900888888888888611cef565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f48617368696e673a20756e6b6e6f776e2063726f737320646f6d61696e206d6560448201527f73736167652076657273696f6e0000000000000000000000000000000000000060648201526084016108c0565b9695505050505050565b600080600080845160208601878a8af19695505050505050565b60655460ff16610755576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016108c0565b600054610100900460ff16610755576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108c0565b600054610100900460ff16611b68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108c0565b6107553361160c565b600054610100900460ff16611c08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108c0565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b600054610100900460ff16611cc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108c0565b6001609755565b6000611cde85858585611d12565b805190602001209050949350505050565b6000611cff878787878787611dab565b8051906020012090509695505050505050565b606084848484604051602401611d2b9493929190612449565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fcbd4ece9000000000000000000000000000000000000000000000000000000001790529050949350505050565b6060868686868686604051602401611dc896959493929190612493565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd764ad0b0000000000000000000000000000000000000000000000000000000017905290509695505050505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611e6e57600080fd5b919050565b60008083601f840112611e8557600080fd5b50813567ffffffffffffffff811115611e9d57600080fd5b602083019150836020828501011115611eb557600080fd5b9250929050565b803563ffffffff81168114611e6e57600080fd5b60008060008060608587031215611ee657600080fd5b611eef85611e4a565b9350602085013567ffffffffffffffff811115611f0b57600080fd5b611f1787828801611e73565b9094509250611f2a905060408601611ebc565b905092959194509250565b600060208284031215611f4757600080fd5b611f5082611e4a565b9392505050565b60005b83811015611f72578181015183820152602001611f5a565b83811115611f81576000848401525b50505050565b60008151808452611f9f816020860160208601611f57565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611f506020830184611f87565b600060208284031215611ff657600080fd5b5035919050565b60008060006040848603121561201257600080fd5b833567ffffffffffffffff81111561202957600080fd5b61203586828701611e73565b9094509250612048905060208501611ebc565b90509250925092565b600080600080600080600060c0888a03121561206c57600080fd5b8735965061207c60208901611e4a565b955061208a60408901611e4a565b9450606088013593506080880135925060a088013567ffffffffffffffff8111156120b457600080fd5b6120c08a828b01611e73565b989b979a50959850939692959293505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b878152600073ffffffffffffffffffffffffffffffffffffffff808916602084015280881660408401525085606083015263ffffffff8516608083015260c060a083015261216e60c0830184866120d3565b9998505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff861681526080602082015260006121ab6080830186886120d3565b905083604083015263ffffffff831660608301529695505050505050565b600084516121db818460208901611f57565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551612217816001850160208a01611f57565b60019201918201528351612232816002840160208801611f57565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff808316818516818304811182151516156122915761229161223f565b02949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600063ffffffff808416806122e0576122e061229a565b92169190910492915050565b600063ffffffff80831681851680830382111561230b5761230b61223f565b01949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082198211156123855761238561223f565b500190565b60008282101561239c5761239c61223f565b500390565b73ffffffffffffffffffffffffffffffffffffffff8416815267ffffffffffffffff831660208201526060604082015260006123e06060830184611f87565b95945050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361241a5761241a61223f565b5060010190565b6000826124305761243061229a565b500490565b6000826124445761244461229a565b500690565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250608060408301526124826080830185611f87565b905082606083015295945050505050565b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a08301526124de60c0830184611f87565b9897505050505050505056fea164736f6c634300080f000a496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", + Bin: "0x60e06040523480156200001157600080fd5b5060405162002be538038062002be583398101604081905262000034916200055f565b6000608081905260a052600160c0526200004e8162000055565b50620005cf565b600054600160a81b900460ff16158080156200007e57506000546001600160a01b90910460ff16105b80620000b557506200009b306200024560201b6200139a1760201c565b158015620000b55750600054600160a01b900460ff166001145b6200011e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff60a01b1916600160a01b17905580156200014c576000805460ff60a81b1916600160a81b1790555b6040805160028082526060820183526000926020830190803683370190505090507342000000000000000000000000000000000000078160008151811062000198576200019862000591565b60200260200101906001600160a01b031690816001600160a01b031681525050602160991b81600181518110620001d357620001d362000591565b6001600160a01b0390921660209283029190910190910152620001f7838262000254565b50801562000241576000805460ff60a81b19169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b6001600160a01b03163b151590565b600054600160a81b900460ff16620002b25760405162461bcd60e51b815260206004820152602b602482015260008051602062002bc583398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000115565b60cc805461dead6001600160a01b03199182161790915560ce80549091166001600160a01b03841617905560005b81518110156200034c57600160d0600084848151811062000305576200030562000591565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806200034381620005a7565b915050620002e0565b506200035762000375565b62000361620003d5565b6200036b6200043e565b62000241620004a8565b600054600160a81b900460ff16620003d35760405162461bcd60e51b815260206004820152602b602482015260008051602062002bc583398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000115565b565b600054600160a81b900460ff16620004335760405162461bcd60e51b815260206004820152602b602482015260008051602062002bc583398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000115565b620003d3336200050d565b600054600160a81b900460ff166200049c5760405162461bcd60e51b815260206004820152602b602482015260008051602062002bc583398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000115565b6065805460ff19169055565b600054600160a81b900460ff16620005065760405162461bcd60e51b815260206004820152602b602482015260008051602062002bc583398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000115565b6001609755565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000602082840312156200057257600080fd5b81516001600160a01b03811681146200058a57600080fd5b9392505050565b634e487b7160e01b600052603260045260246000fd5b600060018201620005c857634e487b7160e01b600052601160045260246000fd5b5060010190565b60805160a05160c0516125c6620005ff60003960006107b0015260006107870152600061075e01526125c66000f3fe6080604052600436106101805760003560e01c80637dea7cc3116100d6578063c4d66de81161007f578063ecc7042811610059578063ecc704281461042d578063f2fde38b14610492578063f69f8151146104b257600080fd5b8063c4d66de8146103cd578063d764ad0b146103ed578063db505d801461040057600080fd5b8063a7119869116100b0578063a711986914610352578063b1b1b2091461037d578063b28ade25146103ad57600080fd5b80637dea7cc3146102fb5780638456cb59146103125780638da5cb5b1461032757600080fd5b80633f827a5a116101385780635c975abb116101125780635c975abb146102945780636e296e45146102ac578063715018a6146102e657600080fd5b80633f827a5a1461020a5780634b134ce71461023257806354fd4d501461027257600080fd5b80632828d7e8116101695780632828d7e8146101ca5780633dbb202b146101e05780633f4ba83a146101f557600080fd5b8063028f85f7146101855780630c568498146101b4575b600080fd5b34801561019157600080fd5b5061019a601081565b60405163ffffffff90911681526020015b60405180910390f35b3480156101c057600080fd5b5061019a6103e881565b3480156101d657600080fd5b5061019a6103f881565b6101f36101ee366004611f9f565b6104e2565b005b34801561020157600080fd5b506101f3610745565b34801561021657600080fd5b5061021f600181565b60405161ffff90911681526020016101ab565b34801561023e57600080fd5b5061026261024d366004612004565b60d06020526000908152604090205460ff1681565b60405190151581526020016101ab565b34801561027e57600080fd5b50610287610757565b6040516101ab91906120a0565b3480156102a057600080fd5b5060655460ff16610262565b3480156102b857600080fd5b506102c16107fa565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101ab565b3480156102f257600080fd5b506101f36108e6565b34801561030757600080fd5b5061019a62030d4081565b34801561031e57600080fd5b506101f36108f8565b34801561033357600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff166102c1565b34801561035e57600080fd5b5060ce5473ffffffffffffffffffffffffffffffffffffffff166102c1565b34801561038957600080fd5b506102626103983660046120b3565b60cb6020526000908152604090205460ff1681565b3480156103b957600080fd5b5061019a6103c83660046120cc565b610908565b3480156103d957600080fd5b506101f36103e8366004612004565b61094e565b6101f36103fb366004612120565b610c34565b34801561040c57600080fd5b5060ce546102c19073ffffffffffffffffffffffffffffffffffffffff1681565b34801561043957600080fd5b5061048460cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b6040519081526020016101ab565b34801561049e57600080fd5b506101f36104ad366004612004565b6112e3565b3480156104be57600080fd5b506102626104cd3660046120b3565b60cf6020526000908152604090205460ff1681565b60ce5461061a9073ffffffffffffffffffffffffffffffffffffffff1661050a858585610908565b63ffffffff16347fd764ad0b0000000000000000000000000000000000000000000000000000000061057c60cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b338a34898c8c60405160240161059897969594939291906121eb565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526113b6565b8373ffffffffffffffffffffffffffffffffffffffff167fcb0f7ffd78f9aee47a248fae8db181db6eee833039123e026dcbff529522e52a33858561069f60cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b866040516106b195949392919061224a565b60405180910390a260405134815233907f8ebb2ec2465bdb2a06a66fc37a0963af8a2a6a1479d81d56fdb8cbb98096d5469060200160405180910390a2505060cd80547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808216600101167fffff0000000000000000000000000000000000000000000000000000000000009091161790555050565b61074d611444565b6107556114c5565b565b60606107827f0000000000000000000000000000000000000000000000000000000000000000611542565b6107ab7f0000000000000000000000000000000000000000000000000000000000000000611542565b6107d47f0000000000000000000000000000000000000000000000000000000000000000611542565b6040516020016107e693929190612298565b604051602081830303815290604052905090565b60cc5460009073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2153016108c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f43726f7373446f6d61696e4d657373656e6765723a2078446f6d61696e4d657360448201527f7361676553656e646572206973206e6f7420736574000000000000000000000060648201526084015b60405180910390fd5b5060cc5473ffffffffffffffffffffffffffffffffffffffff1690565b6108ee611444565b6107556000611677565b610900611444565b6107556116ee565b600062030d4061091960108561233d565b6103e86109286103f88661233d565b6109329190612398565b61093c91906123bb565b61094691906123bb565b949350505050565b6000547501000000000000000000000000000000000000000000900460ff1615808015610999575060005460017401000000000000000000000000000000000000000090910460ff16105b806109cb5750303b1580156109cb575060005474010000000000000000000000000000000000000000900460ff166001145b610a57576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016108c0565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790558015610add57600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790555b60408051600280825260608201835260009260208301908036833701905050905073420000000000000000000000000000000000000781600081518110610b2657610b26612412565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505073420000000000000000000000000000000000000081600181518110610b8857610b88612412565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050610bcc8382611749565b508015610c3057600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b600260975403610ca0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108c0565b6002609755610cad6118f8565b6000610cf3888888888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061196592505050565b9050610d3c60ce54337fffffffffffffffffffffffffeeeeffffffffffffffffffffffffffffffffeeef0173ffffffffffffffffffffffffffffffffffffffff90811691161490565b15610dd557843414610dd0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f43726f7373446f6d61696e4d657373656e6765723a206d69736d61746368656460448201527f206d6573736167652076616c756500000000000000000000000000000000000060648201526084016108c0565b610f27565b3415610e89576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605060248201527f43726f7373446f6d61696e4d657373656e6765723a2076616c7565206d75737460448201527f206265207a65726f20756e6c657373206d6573736167652069732066726f6d2060648201527f612073797374656d206164647265737300000000000000000000000000000000608482015260a4016108c0565b600081815260cf602052604090205460ff16610f27576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520636160448201527f6e6e6f74206265207265706c617965640000000000000000000000000000000060648201526084016108c0565b73ffffffffffffffffffffffffffffffffffffffff8616600090815260d0602052604090205460ff1615611003576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f43726f7373446f6d61696e4d657373656e6765723a2063616e6e6f742073656e60448201527f64206d65737361676520746f20626c6f636b65642073797374656d206164647260648201527f6573730000000000000000000000000000000000000000000000000000000000608482015260a4016108c0565b600081815260cb602052604090205460ff16156110a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520686160448201527f7320616c7265616479206265656e2072656c617965640000000000000000000060648201526084016108c0565b6110ae61afc885612441565b5a101561113d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f43726f7373446f6d61696e4d657373656e6765723a20696e737566666963696560448201527f6e742067617320746f2072656c6179206d65737361676500000000000000000060648201526084016108c0565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff891617905560006111d98761119161138861afc8612459565b5a61119c9190612459565b8887878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611a3392505050565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055905080151560010361127457600082815260cb602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c91a26112d3565b600082815260cf602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f91a25b5050600160975550505050505050565b6112eb611444565b73ffffffffffffffffffffffffffffffffffffffff811661138e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016108c0565b61139781611677565b50565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6040517fc2b3e5ac0000000000000000000000000000000000000000000000000000000081527342000000000000000000000000000000000000009063c2b3e5ac90849061140c90889088908790600401612470565b6000604051808303818588803b15801561142557600080fd5b505af1158015611439573d6000803e3d6000fd5b505050505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610755576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108c0565b6114cd611a4d565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60608160000361158557505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156115af5780611599816124b8565b91506115a89050600a836124f0565b9150611589565b60008167ffffffffffffffff8111156115ca576115ca6123e3565b6040519080825280601f01601f1916602001820160405280156115f4576020820181803683370190505b5090505b841561094657611609600183612459565b9150611616600a86612504565b611621906030612441565b60f81b81838151811061163657611636612412565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611670600a866124f0565b94506115f8565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6116f66118f8565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586115183390565b6000547501000000000000000000000000000000000000000000900460ff166117f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108c0565b60cc805461dead7fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560ce805490911673ffffffffffffffffffffffffffffffffffffffff841617905560005b81518110156118d757600160d0600084848151811061186857611868612412565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055806118cf816124b8565b915050611847565b506118e0611ab9565b6118e8611b64565b6118f0611c18565b610c30611ced565b60655460ff1615610755576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016108c0565b600060f087901c8082036119875761197f8688858b611d9f565b915050611a29565b8061ffff166001036119a15761197f888888888888611dbe565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f48617368696e673a20756e6b6e6f776e2063726f737320646f6d61696e206d6560448201527f73736167652076657273696f6e0000000000000000000000000000000000000060648201526084016108c0565b9695505050505050565b600080600080845160208601878a8af19695505050505050565b60655460ff16610755576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016108c0565b6000547501000000000000000000000000000000000000000000900460ff16610755576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108c0565b6000547501000000000000000000000000000000000000000000900460ff16611c0f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108c0565b61075533611677565b6000547501000000000000000000000000000000000000000000900460ff16611cc3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108c0565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b6000547501000000000000000000000000000000000000000000900460ff16611d98576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108c0565b6001609755565b6000611dad85858585611de1565b805190602001209050949350505050565b6000611dce878787878787611e7a565b8051906020012090509695505050505050565b606084848484604051602401611dfa9493929190612518565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fcbd4ece9000000000000000000000000000000000000000000000000000000001790529050949350505050565b6060868686868686604051602401611e9796959493929190612562565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd764ad0b0000000000000000000000000000000000000000000000000000000017905290509695505050505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611f3d57600080fd5b919050565b60008083601f840112611f5457600080fd5b50813567ffffffffffffffff811115611f6c57600080fd5b602083019150836020828501011115611f8457600080fd5b9250929050565b803563ffffffff81168114611f3d57600080fd5b60008060008060608587031215611fb557600080fd5b611fbe85611f19565b9350602085013567ffffffffffffffff811115611fda57600080fd5b611fe687828801611f42565b9094509250611ff9905060408601611f8b565b905092959194509250565b60006020828403121561201657600080fd5b61201f82611f19565b9392505050565b60005b83811015612041578181015183820152602001612029565b83811115612050576000848401525b50505050565b6000815180845261206e816020860160208601612026565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061201f6020830184612056565b6000602082840312156120c557600080fd5b5035919050565b6000806000604084860312156120e157600080fd5b833567ffffffffffffffff8111156120f857600080fd5b61210486828701611f42565b9094509250612117905060208501611f8b565b90509250925092565b600080600080600080600060c0888a03121561213b57600080fd5b8735965061214b60208901611f19565b955061215960408901611f19565b9450606088013593506080880135925060a088013567ffffffffffffffff81111561218357600080fd5b61218f8a828b01611f42565b989b979a50959850939692959293505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b878152600073ffffffffffffffffffffffffffffffffffffffff808916602084015280881660408401525085606083015263ffffffff8516608083015260c060a083015261223d60c0830184866121a2565b9998505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8616815260806020820152600061227a6080830186886121a2565b905083604083015263ffffffff831660608301529695505050505050565b600084516122aa818460208901612026565b80830190507f2e0000000000000000000000000000000000000000000000000000000000000080825285516122e6816001850160208a01612026565b60019201918201528351612301816002840160208801612026565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff808316818516818304811182151516156123605761236061230e565b02949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600063ffffffff808416806123af576123af612369565b92169190910492915050565b600063ffffffff8083168185168083038211156123da576123da61230e565b01949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082198211156124545761245461230e565b500190565b60008282101561246b5761246b61230e565b500390565b73ffffffffffffffffffffffffffffffffffffffff8416815267ffffffffffffffff831660208201526060604082015260006124af6060830184612056565b95945050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036124e9576124e961230e565b5060010190565b6000826124ff576124ff612369565b500490565b60008261251357612513612369565b500690565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250608060408301526125516080830185612056565b905082606083015295945050505050565b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a08301526125ad60c0830184612056565b9897505050505050505056fea164736f6c634300080f000a496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", } // L2CrossDomainMessengerABI is the input ABI used to generate the binding from. diff --git a/op-bindings/bindings/l2crossdomainmessenger_more.go b/op-bindings/bindings/l2crossdomainmessenger_more.go index fdc7094175a51..ed23be3ee9cf3 100755 --- a/op-bindings/bindings/l2crossdomainmessenger_more.go +++ b/op-bindings/bindings/l2crossdomainmessenger_more.go @@ -9,11 +9,11 @@ import ( "github.com/ethereum-optimism/optimism/op-bindings/solc" ) -const L2CrossDomainMessengerStorageLayoutJSON = "{\"storage\":[{\"astId\":26014,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":26017,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":26628,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_uint256)50_storage\"},{\"astId\":25886,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":26006,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":26179,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_paused\",\"offset\":0,\"slot\":\"101\",\"type\":\"t_bool\"},{\"astId\":26284,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"102\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":26299,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_status\",\"offset\":0,\"slot\":\"151\",\"type\":\"t_uint256\"},{\"astId\":26343,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"152\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":23621,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"successfulMessages\",\"offset\":0,\"slot\":\"201\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":23624,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"xDomainMsgSender\",\"offset\":0,\"slot\":\"202\",\"type\":\"t_address\"},{\"astId\":23627,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"msgNonce\",\"offset\":0,\"slot\":\"203\",\"type\":\"t_uint240\"},{\"astId\":23630,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"otherMessenger\",\"offset\":0,\"slot\":\"204\",\"type\":\"t_address\"},{\"astId\":23635,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"receivedMessages\",\"offset\":0,\"slot\":\"205\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":23640,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"blockedSystemAddresses\",\"offset\":0,\"slot\":\"206\",\"type\":\"t_mapping(t_address,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_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_address,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_bool\"},\"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\":23579,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"spacer0\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":26027,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_initialized\",\"offset\":20,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":26030,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_initializing\",\"offset\":21,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":26641,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_uint256)50_storage\"},{\"astId\":25899,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":26019,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":26192,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_paused\",\"offset\":0,\"slot\":\"101\",\"type\":\"t_bool\"},{\"astId\":26297,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"102\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":26312,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"_status\",\"offset\":0,\"slot\":\"151\",\"type\":\"t_uint256\"},{\"astId\":26356,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"152\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":23626,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"spacer1\",\"offset\":0,\"slot\":\"201\",\"type\":\"t_uint256\"},{\"astId\":23629,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"spacer2\",\"offset\":0,\"slot\":\"202\",\"type\":\"t_uint256\"},{\"astId\":23634,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"successfulMessages\",\"offset\":0,\"slot\":\"203\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":23637,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"xDomainMsgSender\",\"offset\":0,\"slot\":\"204\",\"type\":\"t_address\"},{\"astId\":23640,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"msgNonce\",\"offset\":0,\"slot\":\"205\",\"type\":\"t_uint240\"},{\"astId\":23643,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"otherMessenger\",\"offset\":0,\"slot\":\"206\",\"type\":\"t_address\"},{\"astId\":23648,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"receivedMessages\",\"offset\":0,\"slot\":\"207\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":23653,\"contract\":\"contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger\",\"label\":\"blockedSystemAddresses\",\"offset\":0,\"slot\":\"208\",\"type\":\"t_mapping(t_address,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_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_address,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_bool\"},\"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 L2CrossDomainMessengerDeployedBin = "0x6080604052600436106101805760003560e01c80637dea7cc3116100d6578063c4d66de81161007f578063ecc7042811610059578063ecc704281461042d578063f2fde38b14610492578063f69f8151146104b257600080fd5b8063c4d66de8146103cd578063d764ad0b146103ed578063db505d801461040057600080fd5b8063a7119869116100b0578063a711986914610352578063b1b1b2091461037d578063b28ade25146103ad57600080fd5b80637dea7cc3146102fb5780638456cb59146103125780638da5cb5b1461032757600080fd5b80633f827a5a116101385780635c975abb116101125780635c975abb146102945780636e296e45146102ac578063715018a6146102e657600080fd5b80633f827a5a1461020a5780634b134ce71461023257806354fd4d501461027257600080fd5b80632828d7e8116101695780632828d7e8146101ca5780633dbb202b146101e05780633f4ba83a146101f557600080fd5b8063028f85f7146101855780630c568498146101b4575b600080fd5b34801561019157600080fd5b5061019a601081565b60405163ffffffff90911681526020015b60405180910390f35b3480156101c057600080fd5b5061019a6103e881565b3480156101d657600080fd5b5061019a6103f881565b6101f36101ee366004611ed0565b6104e2565b005b34801561020157600080fd5b506101f3610745565b34801561021657600080fd5b5061021f600181565b60405161ffff90911681526020016101ab565b34801561023e57600080fd5b5061026261024d366004611f35565b60ce6020526000908152604090205460ff1681565b60405190151581526020016101ab565b34801561027e57600080fd5b50610287610757565b6040516101ab9190611fd1565b3480156102a057600080fd5b5060655460ff16610262565b3480156102b857600080fd5b506102c16107fa565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101ab565b3480156102f257600080fd5b506101f36108e6565b34801561030757600080fd5b5061019a62030d4081565b34801561031e57600080fd5b506101f36108f8565b34801561033357600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff166102c1565b34801561035e57600080fd5b5060cc5473ffffffffffffffffffffffffffffffffffffffff166102c1565b34801561038957600080fd5b50610262610398366004611fe4565b60c96020526000908152604090205460ff1681565b3480156103b957600080fd5b5061019a6103c8366004611ffd565b610908565b3480156103d957600080fd5b506101f36103e8366004611f35565b61094e565b6101f36103fb366004612051565b610bc9565b34801561040c57600080fd5b5060cc546102c19073ffffffffffffffffffffffffffffffffffffffff1681565b34801561043957600080fd5b5061048460cb547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b6040519081526020016101ab565b34801561049e57600080fd5b506101f36104ad366004611f35565b611278565b3480156104be57600080fd5b506102626104cd366004611fe4565b60cd6020526000908152604090205460ff1681565b60cc5461061a9073ffffffffffffffffffffffffffffffffffffffff1661050a858585610908565b63ffffffff16347fd764ad0b0000000000000000000000000000000000000000000000000000000061057c60cb547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b338a34898c8c604051602401610598979695949392919061211c565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261134b565b8373ffffffffffffffffffffffffffffffffffffffff167fcb0f7ffd78f9aee47a248fae8db181db6eee833039123e026dcbff529522e52a33858561069f60cb547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b866040516106b195949392919061217b565b60405180910390a260405134815233907f8ebb2ec2465bdb2a06a66fc37a0963af8a2a6a1479d81d56fdb8cbb98096d5469060200160405180910390a2505060cb80547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808216600101167fffff0000000000000000000000000000000000000000000000000000000000009091161790555050565b61074d6113d9565b61075561145a565b565b60606107827f00000000000000000000000000000000000000000000000000000000000000006114d7565b6107ab7f00000000000000000000000000000000000000000000000000000000000000006114d7565b6107d47f00000000000000000000000000000000000000000000000000000000000000006114d7565b6040516020016107e6939291906121c9565b604051602081830303815290604052905090565b60ca5460009073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2153016108c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f43726f7373446f6d61696e4d657373656e6765723a2078446f6d61696e4d657360448201527f7361676553656e646572206973206e6f7420736574000000000000000000000060648201526084015b60405180910390fd5b5060ca5473ffffffffffffffffffffffffffffffffffffffff1690565b6108ee6113d9565b610755600061160c565b6109006113d9565b610755611683565b600062030d4061091960108561226e565b6103e86109286103f88661226e565b61093291906122c9565b61093c91906122ec565b61094691906122ec565b949350505050565b600054610100900460ff161580801561096e5750600054600160ff909116105b806109885750303b158015610988575060005460ff166001145b610a14576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016108c0565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610a7257600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b60408051600280825260608201835260009260208301908036833701905050905073420000000000000000000000000000000000000781600081518110610abb57610abb612343565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505073420000000000000000000000000000000000000081600181518110610b1d57610b1d612343565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050610b6183826116de565b508015610bc557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b600260975403610c35576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108c0565b6002609755610c42611879565b6000610c88888888888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506118e692505050565b9050610cd160cc54337fffffffffffffffffffffffffeeeeffffffffffffffffffffffffffffffffeeef0173ffffffffffffffffffffffffffffffffffffffff90811691161490565b15610d6a57843414610d65576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f43726f7373446f6d61696e4d657373656e6765723a206d69736d61746368656460448201527f206d6573736167652076616c756500000000000000000000000000000000000060648201526084016108c0565b610ebc565b3415610e1e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605060248201527f43726f7373446f6d61696e4d657373656e6765723a2076616c7565206d75737460448201527f206265207a65726f20756e6c657373206d6573736167652069732066726f6d2060648201527f612073797374656d206164647265737300000000000000000000000000000000608482015260a4016108c0565b600081815260cd602052604090205460ff16610ebc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520636160448201527f6e6e6f74206265207265706c617965640000000000000000000000000000000060648201526084016108c0565b73ffffffffffffffffffffffffffffffffffffffff8616600090815260ce602052604090205460ff1615610f98576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f43726f7373446f6d61696e4d657373656e6765723a2063616e6e6f742073656e60448201527f64206d65737361676520746f20626c6f636b65642073797374656d206164647260648201527f6573730000000000000000000000000000000000000000000000000000000000608482015260a4016108c0565b600081815260c9602052604090205460ff1615611037576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520686160448201527f7320616c7265616479206265656e2072656c617965640000000000000000000060648201526084016108c0565b61104361afc885612372565b5a10156110d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f43726f7373446f6d61696e4d657373656e6765723a20696e737566666963696560448201527f6e742067617320746f2072656c6179206d65737361676500000000000000000060648201526084016108c0565b60ca80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8916179055600061116e8761112661138861afc861238a565b5a611131919061238a565b8887878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506119b492505050565b60ca80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055905080151560010361120957600082815260c9602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c91a2611268565b600082815260cd602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f91a25b5050600160975550505050505050565b6112806113d9565b73ffffffffffffffffffffffffffffffffffffffff8116611323576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016108c0565b61132c8161160c565b50565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6040517fc2b3e5ac0000000000000000000000000000000000000000000000000000000081527342000000000000000000000000000000000000009063c2b3e5ac9084906113a1908890889087906004016123a1565b6000604051808303818588803b1580156113ba57600080fd5b505af11580156113ce573d6000803e3d6000fd5b505050505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610755576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108c0565b6114626119ce565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60608160000361151a57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611544578061152e816123e9565b915061153d9050600a83612421565b915061151e565b60008167ffffffffffffffff81111561155f5761155f612314565b6040519080825280601f01601f191660200182016040528015611589576020820181803683370190505b5090505b84156109465761159e60018361238a565b91506115ab600a86612435565b6115b6906030612372565b60f81b8183815181106115cb576115cb612343565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611605600a86612421565b945061158d565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61168b611879565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586114ad3390565b600054610100900460ff16611775576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108c0565b60ca805461dead7fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560cc805490911673ffffffffffffffffffffffffffffffffffffffff841617905560005b815181101561185857600160ce60008484815181106117e9576117e9612343565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905580611850816123e9565b9150506117c8565b50611861611a3a565b611869611ad1565b611871611b71565b610bc5611c32565b60655460ff1615610755576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016108c0565b600060f087901c808203611908576119008688858b611cd0565b9150506119aa565b8061ffff1660010361192257611900888888888888611cef565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f48617368696e673a20756e6b6e6f776e2063726f737320646f6d61696e206d6560448201527f73736167652076657273696f6e0000000000000000000000000000000000000060648201526084016108c0565b9695505050505050565b600080600080845160208601878a8af19695505050505050565b60655460ff16610755576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016108c0565b600054610100900460ff16610755576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108c0565b600054610100900460ff16611b68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108c0565b6107553361160c565b600054610100900460ff16611c08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108c0565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b600054610100900460ff16611cc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108c0565b6001609755565b6000611cde85858585611d12565b805190602001209050949350505050565b6000611cff878787878787611dab565b8051906020012090509695505050505050565b606084848484604051602401611d2b9493929190612449565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fcbd4ece9000000000000000000000000000000000000000000000000000000001790529050949350505050565b6060868686868686604051602401611dc896959493929190612493565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd764ad0b0000000000000000000000000000000000000000000000000000000017905290509695505050505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611e6e57600080fd5b919050565b60008083601f840112611e8557600080fd5b50813567ffffffffffffffff811115611e9d57600080fd5b602083019150836020828501011115611eb557600080fd5b9250929050565b803563ffffffff81168114611e6e57600080fd5b60008060008060608587031215611ee657600080fd5b611eef85611e4a565b9350602085013567ffffffffffffffff811115611f0b57600080fd5b611f1787828801611e73565b9094509250611f2a905060408601611ebc565b905092959194509250565b600060208284031215611f4757600080fd5b611f5082611e4a565b9392505050565b60005b83811015611f72578181015183820152602001611f5a565b83811115611f81576000848401525b50505050565b60008151808452611f9f816020860160208601611f57565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611f506020830184611f87565b600060208284031215611ff657600080fd5b5035919050565b60008060006040848603121561201257600080fd5b833567ffffffffffffffff81111561202957600080fd5b61203586828701611e73565b9094509250612048905060208501611ebc565b90509250925092565b600080600080600080600060c0888a03121561206c57600080fd5b8735965061207c60208901611e4a565b955061208a60408901611e4a565b9450606088013593506080880135925060a088013567ffffffffffffffff8111156120b457600080fd5b6120c08a828b01611e73565b989b979a50959850939692959293505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b878152600073ffffffffffffffffffffffffffffffffffffffff808916602084015280881660408401525085606083015263ffffffff8516608083015260c060a083015261216e60c0830184866120d3565b9998505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff861681526080602082015260006121ab6080830186886120d3565b905083604083015263ffffffff831660608301529695505050505050565b600084516121db818460208901611f57565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551612217816001850160208a01611f57565b60019201918201528351612232816002840160208801611f57565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff808316818516818304811182151516156122915761229161223f565b02949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600063ffffffff808416806122e0576122e061229a565b92169190910492915050565b600063ffffffff80831681851680830382111561230b5761230b61223f565b01949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082198211156123855761238561223f565b500190565b60008282101561239c5761239c61223f565b500390565b73ffffffffffffffffffffffffffffffffffffffff8416815267ffffffffffffffff831660208201526060604082015260006123e06060830184611f87565b95945050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361241a5761241a61223f565b5060010190565b6000826124305761243061229a565b500490565b6000826124445761244461229a565b500690565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250608060408301526124826080830185611f87565b905082606083015295945050505050565b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a08301526124de60c0830184611f87565b9897505050505050505056fea164736f6c634300080f000a" +var L2CrossDomainMessengerDeployedBin = "0x6080604052600436106101805760003560e01c80637dea7cc3116100d6578063c4d66de81161007f578063ecc7042811610059578063ecc704281461042d578063f2fde38b14610492578063f69f8151146104b257600080fd5b8063c4d66de8146103cd578063d764ad0b146103ed578063db505d801461040057600080fd5b8063a7119869116100b0578063a711986914610352578063b1b1b2091461037d578063b28ade25146103ad57600080fd5b80637dea7cc3146102fb5780638456cb59146103125780638da5cb5b1461032757600080fd5b80633f827a5a116101385780635c975abb116101125780635c975abb146102945780636e296e45146102ac578063715018a6146102e657600080fd5b80633f827a5a1461020a5780634b134ce71461023257806354fd4d501461027257600080fd5b80632828d7e8116101695780632828d7e8146101ca5780633dbb202b146101e05780633f4ba83a146101f557600080fd5b8063028f85f7146101855780630c568498146101b4575b600080fd5b34801561019157600080fd5b5061019a601081565b60405163ffffffff90911681526020015b60405180910390f35b3480156101c057600080fd5b5061019a6103e881565b3480156101d657600080fd5b5061019a6103f881565b6101f36101ee366004611f9f565b6104e2565b005b34801561020157600080fd5b506101f3610745565b34801561021657600080fd5b5061021f600181565b60405161ffff90911681526020016101ab565b34801561023e57600080fd5b5061026261024d366004612004565b60d06020526000908152604090205460ff1681565b60405190151581526020016101ab565b34801561027e57600080fd5b50610287610757565b6040516101ab91906120a0565b3480156102a057600080fd5b5060655460ff16610262565b3480156102b857600080fd5b506102c16107fa565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101ab565b3480156102f257600080fd5b506101f36108e6565b34801561030757600080fd5b5061019a62030d4081565b34801561031e57600080fd5b506101f36108f8565b34801561033357600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff166102c1565b34801561035e57600080fd5b5060ce5473ffffffffffffffffffffffffffffffffffffffff166102c1565b34801561038957600080fd5b506102626103983660046120b3565b60cb6020526000908152604090205460ff1681565b3480156103b957600080fd5b5061019a6103c83660046120cc565b610908565b3480156103d957600080fd5b506101f36103e8366004612004565b61094e565b6101f36103fb366004612120565b610c34565b34801561040c57600080fd5b5060ce546102c19073ffffffffffffffffffffffffffffffffffffffff1681565b34801561043957600080fd5b5061048460cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b6040519081526020016101ab565b34801561049e57600080fd5b506101f36104ad366004612004565b6112e3565b3480156104be57600080fd5b506102626104cd3660046120b3565b60cf6020526000908152604090205460ff1681565b60ce5461061a9073ffffffffffffffffffffffffffffffffffffffff1661050a858585610908565b63ffffffff16347fd764ad0b0000000000000000000000000000000000000000000000000000000061057c60cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b338a34898c8c60405160240161059897969594939291906121eb565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526113b6565b8373ffffffffffffffffffffffffffffffffffffffff167fcb0f7ffd78f9aee47a248fae8db181db6eee833039123e026dcbff529522e52a33858561069f60cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b866040516106b195949392919061224a565b60405180910390a260405134815233907f8ebb2ec2465bdb2a06a66fc37a0963af8a2a6a1479d81d56fdb8cbb98096d5469060200160405180910390a2505060cd80547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808216600101167fffff0000000000000000000000000000000000000000000000000000000000009091161790555050565b61074d611444565b6107556114c5565b565b60606107827f0000000000000000000000000000000000000000000000000000000000000000611542565b6107ab7f0000000000000000000000000000000000000000000000000000000000000000611542565b6107d47f0000000000000000000000000000000000000000000000000000000000000000611542565b6040516020016107e693929190612298565b604051602081830303815290604052905090565b60cc5460009073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2153016108c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f43726f7373446f6d61696e4d657373656e6765723a2078446f6d61696e4d657360448201527f7361676553656e646572206973206e6f7420736574000000000000000000000060648201526084015b60405180910390fd5b5060cc5473ffffffffffffffffffffffffffffffffffffffff1690565b6108ee611444565b6107556000611677565b610900611444565b6107556116ee565b600062030d4061091960108561233d565b6103e86109286103f88661233d565b6109329190612398565b61093c91906123bb565b61094691906123bb565b949350505050565b6000547501000000000000000000000000000000000000000000900460ff1615808015610999575060005460017401000000000000000000000000000000000000000090910460ff16105b806109cb5750303b1580156109cb575060005474010000000000000000000000000000000000000000900460ff166001145b610a57576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016108c0565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790558015610add57600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790555b60408051600280825260608201835260009260208301908036833701905050905073420000000000000000000000000000000000000781600081518110610b2657610b26612412565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505073420000000000000000000000000000000000000081600181518110610b8857610b88612412565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050610bcc8382611749565b508015610c3057600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b600260975403610ca0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108c0565b6002609755610cad6118f8565b6000610cf3888888888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061196592505050565b9050610d3c60ce54337fffffffffffffffffffffffffeeeeffffffffffffffffffffffffffffffffeeef0173ffffffffffffffffffffffffffffffffffffffff90811691161490565b15610dd557843414610dd0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f43726f7373446f6d61696e4d657373656e6765723a206d69736d61746368656460448201527f206d6573736167652076616c756500000000000000000000000000000000000060648201526084016108c0565b610f27565b3415610e89576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605060248201527f43726f7373446f6d61696e4d657373656e6765723a2076616c7565206d75737460448201527f206265207a65726f20756e6c657373206d6573736167652069732066726f6d2060648201527f612073797374656d206164647265737300000000000000000000000000000000608482015260a4016108c0565b600081815260cf602052604090205460ff16610f27576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520636160448201527f6e6e6f74206265207265706c617965640000000000000000000000000000000060648201526084016108c0565b73ffffffffffffffffffffffffffffffffffffffff8616600090815260d0602052604090205460ff1615611003576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f43726f7373446f6d61696e4d657373656e6765723a2063616e6e6f742073656e60448201527f64206d65737361676520746f20626c6f636b65642073797374656d206164647260648201527f6573730000000000000000000000000000000000000000000000000000000000608482015260a4016108c0565b600081815260cb602052604090205460ff16156110a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520686160448201527f7320616c7265616479206265656e2072656c617965640000000000000000000060648201526084016108c0565b6110ae61afc885612441565b5a101561113d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f43726f7373446f6d61696e4d657373656e6765723a20696e737566666963696560448201527f6e742067617320746f2072656c6179206d65737361676500000000000000000060648201526084016108c0565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff891617905560006111d98761119161138861afc8612459565b5a61119c9190612459565b8887878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611a3392505050565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055905080151560010361127457600082815260cb602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c91a26112d3565b600082815260cf602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f91a25b5050600160975550505050505050565b6112eb611444565b73ffffffffffffffffffffffffffffffffffffffff811661138e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016108c0565b61139781611677565b50565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6040517fc2b3e5ac0000000000000000000000000000000000000000000000000000000081527342000000000000000000000000000000000000009063c2b3e5ac90849061140c90889088908790600401612470565b6000604051808303818588803b15801561142557600080fd5b505af1158015611439573d6000803e3d6000fd5b505050505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610755576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108c0565b6114cd611a4d565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60608160000361158557505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156115af5780611599816124b8565b91506115a89050600a836124f0565b9150611589565b60008167ffffffffffffffff8111156115ca576115ca6123e3565b6040519080825280601f01601f1916602001820160405280156115f4576020820181803683370190505b5090505b841561094657611609600183612459565b9150611616600a86612504565b611621906030612441565b60f81b81838151811061163657611636612412565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611670600a866124f0565b94506115f8565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6116f66118f8565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586115183390565b6000547501000000000000000000000000000000000000000000900460ff166117f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108c0565b60cc805461dead7fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560ce805490911673ffffffffffffffffffffffffffffffffffffffff841617905560005b81518110156118d757600160d0600084848151811061186857611868612412565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055806118cf816124b8565b915050611847565b506118e0611ab9565b6118e8611b64565b6118f0611c18565b610c30611ced565b60655460ff1615610755576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016108c0565b600060f087901c8082036119875761197f8688858b611d9f565b915050611a29565b8061ffff166001036119a15761197f888888888888611dbe565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f48617368696e673a20756e6b6e6f776e2063726f737320646f6d61696e206d6560448201527f73736167652076657273696f6e0000000000000000000000000000000000000060648201526084016108c0565b9695505050505050565b600080600080845160208601878a8af19695505050505050565b60655460ff16610755576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016108c0565b6000547501000000000000000000000000000000000000000000900460ff16610755576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108c0565b6000547501000000000000000000000000000000000000000000900460ff16611c0f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108c0565b61075533611677565b6000547501000000000000000000000000000000000000000000900460ff16611cc3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108c0565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b6000547501000000000000000000000000000000000000000000900460ff16611d98576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108c0565b6001609755565b6000611dad85858585611de1565b805190602001209050949350505050565b6000611dce878787878787611e7a565b8051906020012090509695505050505050565b606084848484604051602401611dfa9493929190612518565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fcbd4ece9000000000000000000000000000000000000000000000000000000001790529050949350505050565b6060868686868686604051602401611e9796959493929190612562565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd764ad0b0000000000000000000000000000000000000000000000000000000017905290509695505050505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611f3d57600080fd5b919050565b60008083601f840112611f5457600080fd5b50813567ffffffffffffffff811115611f6c57600080fd5b602083019150836020828501011115611f8457600080fd5b9250929050565b803563ffffffff81168114611f3d57600080fd5b60008060008060608587031215611fb557600080fd5b611fbe85611f19565b9350602085013567ffffffffffffffff811115611fda57600080fd5b611fe687828801611f42565b9094509250611ff9905060408601611f8b565b905092959194509250565b60006020828403121561201657600080fd5b61201f82611f19565b9392505050565b60005b83811015612041578181015183820152602001612029565b83811115612050576000848401525b50505050565b6000815180845261206e816020860160208601612026565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061201f6020830184612056565b6000602082840312156120c557600080fd5b5035919050565b6000806000604084860312156120e157600080fd5b833567ffffffffffffffff8111156120f857600080fd5b61210486828701611f42565b9094509250612117905060208501611f8b565b90509250925092565b600080600080600080600060c0888a03121561213b57600080fd5b8735965061214b60208901611f19565b955061215960408901611f19565b9450606088013593506080880135925060a088013567ffffffffffffffff81111561218357600080fd5b61218f8a828b01611f42565b989b979a50959850939692959293505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b878152600073ffffffffffffffffffffffffffffffffffffffff808916602084015280881660408401525085606083015263ffffffff8516608083015260c060a083015261223d60c0830184866121a2565b9998505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8616815260806020820152600061227a6080830186886121a2565b905083604083015263ffffffff831660608301529695505050505050565b600084516122aa818460208901612026565b80830190507f2e0000000000000000000000000000000000000000000000000000000000000080825285516122e6816001850160208a01612026565b60019201918201528351612301816002840160208801612026565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff808316818516818304811182151516156123605761236061230e565b02949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600063ffffffff808416806123af576123af612369565b92169190910492915050565b600063ffffffff8083168185168083038211156123da576123da61230e565b01949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082198211156124545761245461230e565b500190565b60008282101561246b5761246b61230e565b500390565b73ffffffffffffffffffffffffffffffffffffffff8416815267ffffffffffffffff831660208201526060604082015260006124af6060830184612056565b95945050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036124e9576124e961230e565b5060010190565b6000826124ff576124ff612369565b500490565b60008261251357612513612369565b500690565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250608060408301526125516080830185612056565b905082606083015295945050505050565b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a08301526125ad60c0830184612056565b9897505050505050505056fea164736f6c634300080f000a" func init() { if err := json.Unmarshal([]byte(L2CrossDomainMessengerStorageLayoutJSON), L2CrossDomainMessengerStorageLayout); err != nil { diff --git a/op-bindings/bindings/l2standardbridge_more.go b/op-bindings/bindings/l2standardbridge_more.go index 51f2398e117cb..5b80bd8b949d7 100755 --- a/op-bindings/bindings/l2standardbridge_more.go +++ b/op-bindings/bindings/l2standardbridge_more.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum-optimism/optimism/op-bindings/solc" ) -const L2StandardBridgeStorageLayoutJSON = "{\"storage\":[{\"astId\":25104,\"contract\":\"contracts/L2/L2StandardBridge.sol:L2StandardBridge\",\"label\":\"spacer0\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint256\"},{\"astId\":25107,\"contract\":\"contracts/L2/L2StandardBridge.sol:L2StandardBridge\",\"label\":\"spacer1\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"},{\"astId\":25114,\"contract\":\"contracts/L2/L2StandardBridge.sol:L2StandardBridge\",\"label\":\"deposits\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"}],\"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_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"}}}" +const L2StandardBridgeStorageLayoutJSON = "{\"storage\":[{\"astId\":25117,\"contract\":\"contracts/L2/L2StandardBridge.sol:L2StandardBridge\",\"label\":\"spacer0\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint256\"},{\"astId\":25120,\"contract\":\"contracts/L2/L2StandardBridge.sol:L2StandardBridge\",\"label\":\"spacer1\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"},{\"astId\":25127,\"contract\":\"contracts/L2/L2StandardBridge.sol:L2StandardBridge\",\"label\":\"deposits\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"}],\"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_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"}}}" var L2StandardBridgeStorageLayout = new(solc.StorageLayout) diff --git a/op-bindings/bindings/legacyerc20eth_more.go b/op-bindings/bindings/legacyerc20eth_more.go index 260fcde6be199..62a3b1d78972f 100755 --- a/op-bindings/bindings/legacyerc20eth_more.go +++ b/op-bindings/bindings/legacyerc20eth_more.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum-optimism/optimism/op-bindings/solc" ) -const LegacyERC20ETHStorageLayoutJSON = "{\"storage\":[{\"astId\":26758,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_balances\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":26764,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_allowances\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"},{\"astId\":26766,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_totalSupply\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":26768,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_name\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_string_storage\"},{\"astId\":26770,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_symbol\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_string_storage\"},{\"astId\":24025,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"remoteToken\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_address\"},{\"astId\":24028,\"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\":26771,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_balances\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":26777,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_allowances\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"},{\"astId\":26779,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_totalSupply\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":26781,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_name\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_string_storage\"},{\"astId\":26783,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_symbol\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_string_storage\"},{\"astId\":24038,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"remoteToken\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_address\"},{\"astId\":24041,\"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) diff --git a/op-bindings/bindings/optimismportal_more.go b/op-bindings/bindings/optimismportal_more.go index d1e9bfbcc2139..765577e759a47 100755 --- a/op-bindings/bindings/optimismportal_more.go +++ b/op-bindings/bindings/optimismportal_more.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum-optimism/optimism/op-bindings/solc" ) -const OptimismPortalStorageLayoutJSON = "{\"storage\":[{\"astId\":26014,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":26017,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1374,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"params\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_struct(ResourceParams)1344_storage\"},{\"astId\":1379,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":947,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"l2Sender\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":960,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"finalizedWithdrawals\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":965,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"53\",\"type\":\"t_array(t_uint256)48_storage\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)48_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[48]\",\"numberOfBytes\":\"1536\"},\"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)1344_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\":26027,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":26030,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1374,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"params\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_struct(ResourceParams)1344_storage\"},{\"astId\":1379,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":947,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"l2Sender\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":960,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"finalizedWithdrawals\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":965,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"53\",\"type\":\"t_array(t_uint256)48_storage\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)48_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[48]\",\"numberOfBytes\":\"1536\"},\"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)1344_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) diff --git a/packages/contracts-bedrock/contracts/universal/CrossDomainMessenger.sol b/packages/contracts-bedrock/contracts/universal/CrossDomainMessenger.sol index a578c04e61b34..f4c8a2b3e0759 100644 --- a/packages/contracts-bedrock/contracts/universal/CrossDomainMessenger.sol +++ b/packages/contracts-bedrock/contracts/universal/CrossDomainMessenger.sol @@ -14,6 +14,22 @@ import { SafeCall } from "../libraries/SafeCall.sol"; import { Hashing } from "../libraries/Hashing.sol"; import { Encoding } from "../libraries/Encoding.sol"; +/** + * @custom:legacy + * @title CrossDomainMessengerLegacySpacer + * @notice Contract only exists to add a spacer to the CrossDomainMessenger where the + * libAddressManager variable used to exist. Must be the first contract in the inheritance + * tree of the CrossDomainMessenger + */ +contract CrossDomainMessengerLegacySpacer { + /** + * @custom:legacy + * @custom:spacer libAddressManager + * @notice Spacer for backwards compatibility. + */ + address internal spacer0; +} + /** * @title CrossDomainMessenger * @notice CrossDomainMessenger is a base contract that provides the core logic for the L1 and L2 @@ -23,6 +39,7 @@ import { Encoding } from "../libraries/Encoding.sol"; * chains and does not support one-to-many interactions. */ abstract contract CrossDomainMessenger is + CrossDomainMessengerLegacySpacer, OwnableUpgradeable, PausableUpgradeable, ReentrancyGuardUpgradeable @@ -69,6 +86,20 @@ abstract contract CrossDomainMessenger is */ address internal constant DEFAULT_XDOMAIN_SENDER = 0x000000000000000000000000000000000000dEaD; + /** + * @custom:legacy + * @custom:spacer blockedMessages + * @notice Spacer for backwards compatibility. + */ + uint256 internal spacer1; + + /** + * @custom:legacy + * @custom:spacer relayedMessages + * @notice Spacer for backwards compatibility. + */ + uint256 internal spacer2; + /** * @notice Mapping of message hashes to boolean receipt values. Note that a message will only * be present in this mapping if it failed to be relayed on this chain at least once. diff --git a/packages/contracts-bedrock/package.json b/packages/contracts-bedrock/package.json index a3a1f6aa45a06..06dea1c6cbdfa 100644 --- a/packages/contracts-bedrock/package.json +++ b/packages/contracts-bedrock/package.json @@ -23,7 +23,7 @@ "deploy": "hardhat deploy", "test": "yarn build:differential && forge test", "coverage": "yarn build:differential && forge coverage", - "gas-snapshot": "forge snapshot", + "gas-snapshot": "yarn build:differential && forge snapshot", "storage-snapshot": "./scripts/storage-snapshot.sh", "slither": "./scripts/slither.sh", "clean": "rm -rf ./dist ./artifacts ./forge-artifacts ./cache ./tsconfig.tsbuildinfo", From e819c30f2ebf8e89d6a364ec687fbe04ff9f8e93 Mon Sep 17 00:00:00 2001 From: Mark Tyneway Date: Sat, 10 Sep 2022 11:14:04 -0700 Subject: [PATCH 13/32] op-chain-ops: better error message Improve the error message during genesis generation --- op-chain-ops/genesis/setters.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op-chain-ops/genesis/setters.go b/op-chain-ops/genesis/setters.go index 05237e51d9e35..a032a754a8ee9 100644 --- a/op-chain-ops/genesis/setters.go +++ b/op-chain-ops/genesis/setters.go @@ -108,7 +108,7 @@ func SetImplementations(db vm.StateDB, storage StorageConfig, immutable immutabl } slots, err := state.ComputeStorageSlots(layout, storageConfig) if err != nil { - return err + return fmt.Errorf("%s: %w", name, err) } // The storage values must go in the proxy address for _, slot := range slots { From e38c5f43b93277d16c8d38cbc3c656ec1ff6d6e5 Mon Sep 17 00:00:00 2001 From: protolambda Date: Sat, 10 Sep 2022 20:21:10 +0200 Subject: [PATCH 14/32] Safe head fix 2 (#3382) * op-node: sync start update func signature, port over tests from safe-head-fix pr * op-node: sync start now starts with current heads by label * op-node: single loop find-heads * op-node: sync - clean up go doc * op-node: use sync fn in engine queue * op-node: fix engine queue finalization test * op-node: sync off-by-one fix * op-node: fix highest l2 block with canon origin, need to reset when l1 reorg * op-node: handle non-standard safe/finalized not found errors * op-node: sync start review fixes / comment typos * op-node: seq window size check with l1 origin, update engine queue test with extra l1 origin, now that off by 1 fix applies properly to chains with multiple L2 blocks per L1 block * op-node: start from parent block before seq nr 0 * Update op-node/rollup/sync/start.go Co-authored-by: Joshua Gutow * review fixes * fix lint Co-authored-by: Joshua Gutow Co-authored-by: Matthew Slipper --- op-node/rollup/derive/engine_queue.go | 17 +- op-node/rollup/derive/engine_queue_test.go | 166 +++++++--- op-node/rollup/sync/start.go | 259 ++++++++------- op-node/rollup/sync/start_test.go | 350 ++++++++++++--------- op-node/sources/l1_client.go | 7 + op-node/sources/l2_client.go | 7 + op-node/testutils/fake_chain.go | 75 +++-- 7 files changed, 541 insertions(+), 340 deletions(-) diff --git a/op-node/rollup/derive/engine_queue.go b/op-node/rollup/derive/engine_queue.go index 71bbc6914c8a9..fe3aeb3522848 100644 --- a/op-node/rollup/derive/engine_queue.go +++ b/op-node/rollup/derive/engine_queue.go @@ -10,7 +10,6 @@ import ( "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-node/rollup/sync" - "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/types" @@ -384,23 +383,11 @@ 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. // 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 { - finalized, err := eq.engine.L2BlockRefByLabel(ctx, eth.Finalized) - if errors.Is(err, ethereum.NotFound) { - // default to genesis if we have not finalized anything before. - finalized, err = eq.engine.L2BlockRefByHash(ctx, eq.cfg.Genesis.L2.Hash) - } - if err != nil { - return NewTemporaryError(fmt.Errorf("failed to find the finalized L2 block: %w", err)) - } - // TODO: this should be resetting using the safe head instead. Out of scope for L2 client bindings PR. - prevUnsafe, err := eq.engine.L2BlockRefByLabel(ctx, eth.Unsafe) - if err != nil { - return NewTemporaryError(fmt.Errorf("failed to find the L2 Head block: %w", err)) - } - unsafe, safe, err := sync.FindL2Heads(ctx, prevUnsafe, eq.cfg.SeqWindowSize, l1Fetcher, eq.engine, &eq.cfg.Genesis) + result, err := sync.FindL2Heads(ctx, eq.cfg, l1Fetcher, eq.engine) if err != nil { return NewTemporaryError(fmt.Errorf("failed to find the L2 Heads to start from: %w", err)) } + finalized, safe, unsafe := result.Finalized, result.Safe, result.Unsafe l1Origin, err := l1Fetcher.L1BlockRefByHash(ctx, safe.L1Origin.Hash) if err != nil { return NewTemporaryError(fmt.Errorf("failed to fetch the new L1 progress: origin: %v; err: %w", safe.L1Origin, err)) diff --git a/op-node/rollup/derive/engine_queue_test.go b/op-node/rollup/derive/engine_queue_test.go index 103d44d4f663c..6b59c99619d6f 100644 --- a/op-node/rollup/derive/engine_queue_test.go +++ b/op-node/rollup/derive/engine_queue_test.go @@ -17,20 +17,6 @@ func TestEngineQueue_Finalize(t *testing.T) { logger := testlog.Logger(t, log.LvlInfo) rng := rand.New(rand.NewSource(1234)) - // create a short test L2 chain: - // - // L2: - // A0: genesis - // A1: finalized, incl in B - // B0: safe, incl in C - // B1: not yet included in L1 - // C0: head, not included in L1 yet - // - // L1: - // A: genesis - // B: finalized, incl A1 - // C: safe, incl B0 - // D: unsafe, not yet referenced by L2 l1Time := uint64(2) refA := testutils.RandomBlockRef(rng) @@ -53,6 +39,18 @@ func TestEngineQueue_Finalize(t *testing.T) { ParentHash: refC.Hash, Time: refC.Time + l1Time, } + refE := eth.L1BlockRef{ + Hash: testutils.RandomHash(rng), + Number: refD.Number + 1, + ParentHash: refD.Hash, + Time: refD.Time + l1Time, + } + refF := eth.L1BlockRef{ + Hash: testutils.RandomHash(rng), + Number: refE.Number + 1, + ParentHash: refE.Hash, + Time: refE.Time + l1Time, + } refA0 := eth.L2BlockRef{ Hash: testutils.RandomHash(rng), @@ -103,42 +101,138 @@ func TestEngineQueue_Finalize(t *testing.T) { L1Origin: refC.ID(), SequenceNumber: 0, } + refC1 := eth.L2BlockRef{ + Hash: testutils.RandomHash(rng), + Number: refC0.Number + 1, + ParentHash: refC0.Hash, + Time: refC0.Time + cfg.BlockTime, + L1Origin: refC.ID(), + SequenceNumber: 1, + } + refD0 := eth.L2BlockRef{ + Hash: testutils.RandomHash(rng), + Number: refC1.Number + 1, + ParentHash: refC1.Hash, + Time: refC1.Time + cfg.BlockTime, + L1Origin: refD.ID(), + SequenceNumber: 0, + } + refD1 := eth.L2BlockRef{ + Hash: testutils.RandomHash(rng), + Number: refD0.Number + 1, + ParentHash: refD0.Hash, + Time: refD0.Time + cfg.BlockTime, + L1Origin: refD.ID(), + SequenceNumber: 1, + } + refE0 := eth.L2BlockRef{ + Hash: testutils.RandomHash(rng), + Number: refD1.Number + 1, + ParentHash: refD1.Hash, + Time: refD1.Time + cfg.BlockTime, + L1Origin: refE.ID(), + SequenceNumber: 0, + } + refE1 := eth.L2BlockRef{ + Hash: testutils.RandomHash(rng), + Number: refE0.Number + 1, + ParentHash: refE0.Hash, + Time: refE0.Time + cfg.BlockTime, + L1Origin: refE.ID(), + SequenceNumber: 1, + } + refF0 := eth.L2BlockRef{ + Hash: testutils.RandomHash(rng), + Number: refE1.Number + 1, + ParentHash: refE1.Hash, + Time: refE1.Time + cfg.BlockTime, + L1Origin: refF.ID(), + SequenceNumber: 0, + } + refF1 := eth.L2BlockRef{ + Hash: testutils.RandomHash(rng), + Number: refF0.Number + 1, + ParentHash: refF0.Hash, + Time: refF0.Time + cfg.BlockTime, + L1Origin: refF.ID(), + SequenceNumber: 1, + } + t.Log("refA", refA.Hash) + t.Log("refB", refB.Hash) + t.Log("refC", refC.Hash) + t.Log("refD", refD.Hash) + t.Log("refE", refE.Hash) + t.Log("refF", refF.Hash) + t.Log("refA0", refA0.Hash) + t.Log("refA1", refA1.Hash) + t.Log("refB0", refB0.Hash) + t.Log("refB1", refB1.Hash) + t.Log("refC0", refC0.Hash) + t.Log("refC1", refC1.Hash) + t.Log("refD0", refD0.Hash) + t.Log("refD1", refD1.Hash) + t.Log("refE0", refE0.Hash) + t.Log("refE1", refE1.Hash) + t.Log("refF0", refF0.Hash) + t.Log("refF1", refF1.Hash) metrics := &TestMetrics{} eng := &testutils.MockEngine{} - eng.ExpectL2BlockRefByLabel(eth.Finalized, refA1, nil) - // TODO(Proto): update expectation once we're using safe block label properly for sync starting point - eng.ExpectL2BlockRefByLabel(eth.Unsafe, refC0, nil) - // we find the common point to initialize to by comparing the L1 origins in the L2 chain with the L1 chain l1F := &testutils.MockL1Source{} - l1F.ExpectL1BlockRefByLabel(eth.Unsafe, refD, nil) - l1F.ExpectL1BlockRefByNumber(refC0.L1Origin.Number, refC, nil) - eng.ExpectL2BlockRefByHash(refC0.ParentHash, refB1, nil) // good L1 origin - eng.ExpectL2BlockRefByHash(refB1.ParentHash, refB0, nil) // need a block with seqnr == 0, don't stop at above - l1F.ExpectL1BlockRefByHash(refB0.L1Origin.Hash, refB, nil) // the origin of the safe L2 head will be the L1 starting point for derivation. - eq := NewEngineQueue(logger, cfg, eng, metrics) - require.NoError(t, RepeatResetStep(t, eq.ResetStep, l1F, 3)) + eng.ExpectL2BlockRefByLabel(eth.Finalized, refA1, nil) + eng.ExpectL2BlockRefByLabel(eth.Safe, refE0, nil) + eng.ExpectL2BlockRefByLabel(eth.Unsafe, refF1, nil) - // TODO(proto): this is changing, needs to be a sequence window ago, but starting traversal back from safe block, - // safe blocks with canon origin are good, but we go back a full window to ensure they are all included in L1, - // by forcing them to be consolidated with L1 again. - require.Equal(t, eq.SafeL2Head(), refB0, "L2 reset should go back to sequence window ago") + // unsafe + l1F.ExpectL1BlockRefByNumber(refF.Number, refF, nil) + eng.ExpectL2BlockRefByHash(refF1.ParentHash, refF0, nil) + eng.ExpectL2BlockRefByHash(refF0.ParentHash, refE1, nil) + // meet previous safe, counts 1/2 + l1F.ExpectL1BlockRefByNumber(refE.Number, refE, nil) + eng.ExpectL2BlockRefByHash(refE1.ParentHash, refE0, nil) + eng.ExpectL2BlockRefByHash(refE0.ParentHash, refD1, nil) + + // now full seq window, inclusive + l1F.ExpectL1BlockRefByNumber(refD.Number, refD, nil) + eng.ExpectL2BlockRefByHash(refD1.ParentHash, refD0, nil) + eng.ExpectL2BlockRefByHash(refD0.ParentHash, refC1, nil) + + // now one more L1 origin + l1F.ExpectL1BlockRefByNumber(refC.Number, refC, nil) + eng.ExpectL2BlockRefByHash(refC1.ParentHash, refC0, nil) + // parent of that origin will be considered safe + eng.ExpectL2BlockRefByHash(refC0.ParentHash, refB1, nil) + + // and we fetch the L1 origin of that as starting point for engine queue + l1F.ExpectL1BlockRefByHash(refB.Hash, refB, nil) + + eq := NewEngineQueue(logger, cfg, eng, metrics) + require.NoError(t, RepeatResetStep(t, eq.ResetStep, l1F, 20)) + + 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, refA1, eq.Finalized(), "A1 is recognized as finalized before we run any steps") - // we are not adding blocks in this test, - // but we can still trigger post-processing for the already existing safe head, - // so the engine can prepare to finalize that. + // now say C1 was included in D and became the new safe head + eq.progress.Origin = refD + eq.safeHead = refC1 + eq.postProcessSafeL2() + + // now say D0 was included in E and became the new safe head + eq.progress.Origin = refE + eq.safeHead = refD0 eq.postProcessSafeL2() - // let's finalize C, which included B0, but not B1 - eq.Finalize(refC.ID()) + + // let's finalize D (current L1), from which we fully derived C1 (it was safe head), but not D0 (included in E) + eq.Finalize(refD.ID()) // Now a few steps later, without consuming any additional L1 inputs, - // we should be able to resolve that B0 is now finalized + // we should be able to resolve that B1 is now finalized, since it was included in finalized L1 block C require.NoError(t, RepeatStep(t, eq.Step, eq.progress, 10)) - require.Equal(t, refB0, eq.Finalized(), "B0 was included in finalized C, and should now be finalized") + require.Equal(t, refC1, eq.Finalized(), "C1 was included in finalized D, and should now be finalized") l1F.AssertExpectations(t) eng.AssertExpectations(t) diff --git a/op-node/rollup/sync/start.go b/op-node/rollup/sync/start.go index 155442945d3e1..15cc824feb095 100644 --- a/op-node/rollup/sync/start.go +++ b/op-node/rollup/sync/start.go @@ -1,4 +1,4 @@ -// The sync package is responsible for reconciling L1 and L2. +// Package sync is responsible for reconciling L1 and L2. // // The Ethereum chain is a DAG of blocks with the root block being the genesis block. At any given // time, the head (or tip) of the chain can change if an offshoot/branch of the chain has a higher @@ -19,19 +19,6 @@ // During normal operation, both the L1 and L2 canonical chains can change, due to a re-organisation // or due to an extension (new L1 or L2 block). // -// When one of these changes occurs, the rollup node needs to determine what the new L2 head blocks -// should be. We track two L2 head blocks: -// -// - The *unsafe L2 block*: This is the highest L2 block whose L1 origin is a plausible (1) -// extension of the canonical L1 chain (as known to the op-node). -// - The *safe L2 block*: This is the highest L2 block whose epoch's sequencing window is -// complete within the canonical L1 chain (as known to the op-node). -// -// (1) Plausible meaning that the blockhash of the L2 block's L1 origin (as reported in the L1 -// -// Attributes deposit within the L2 block) is not canonical at another height in the L1 chain, -// and the same holds for all its ancestors. -// // In particular, in the case of L1 extension, the L2 unsafe head will generally remain the same, // but in the case of an L1 re-org, we need to search for the new safe and unsafe L2 block. package sync @@ -41,163 +28,203 @@ import ( "errors" "fmt" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/rollup" + "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/common" ) type L1Chain interface { L1BlockRefByLabel(ctx context.Context, label eth.BlockLabel) (eth.L1BlockRef, error) L1BlockRefByNumber(ctx context.Context, number uint64) (eth.L1BlockRef, error) + L1BlockRefByHash(ctx context.Context, hash common.Hash) (eth.L1BlockRef, error) } type L2Chain interface { L2BlockRefByHash(ctx context.Context, l2Hash common.Hash) (eth.L2BlockRef, error) + L2BlockRefByLabel(ctx context.Context, label eth.BlockLabel) (eth.L2BlockRef, error) } +var ReorgFinalizedErr = errors.New("cannot reorg finalized block") var WrongChainErr = errors.New("wrong chain") var TooDeepReorgErr = errors.New("reorg is too deep") const MaxReorgDepth = 500 -// isCanonical returns the following values: -// - `aheadOrCanonical: true if the supplied block is ahead of the known head of the L1 chain, -// or canonical in the L1 chain. -// - `canonical`: true if the block is canonical in the L1 chain. -func isAheadOrCanonical(ctx context.Context, l1 L1Chain, block eth.BlockID) (aheadOrCanonical bool, canonical bool, err error) { - if l1Head, err := l1.L1BlockRefByLabel(ctx, eth.Unsafe); err != nil { - return false, false, err - } else if block.Number > l1Head.Number { - return true, false, nil - } else if canonical, err := l1.L1BlockRefByNumber(ctx, block.Number); err != nil { - return false, false, err - } else { - canonical := canonical.Hash == block.Hash - return canonical, canonical, nil +type FindHeadsResult struct { + Unsafe eth.L2BlockRef + Safe eth.L2BlockRef + Finalized eth.L2BlockRef +} + +// currentHeads returns the current finalized, safe and unsafe heads of the execution engine. +// If nothing has been marked finalized yet, the finalized head defaults to the genesis block. +// If nothing has been marked safe yet, the safe head defaults to the finalized block. +func currentHeads(ctx context.Context, cfg *rollup.Config, l2 L2Chain) (*FindHeadsResult, error) { + finalized, err := l2.L2BlockRefByLabel(ctx, eth.Finalized) + if errors.Is(err, ethereum.NotFound) { + // default to genesis if we have not finalized anything before. + finalized, err = l2.L2BlockRefByHash(ctx, cfg.Genesis.L2.Hash) + } + if err != nil { + return nil, fmt.Errorf("failed to find the finalized L2 block: %w", err) + } + + safe, err := l2.L2BlockRefByLabel(ctx, eth.Safe) + if errors.Is(err, ethereum.NotFound) { + safe = finalized + } else if err != nil { + return nil, fmt.Errorf("failed to find the safe L2 block: %w", err) } + + unsafe, err := l2.L2BlockRefByLabel(ctx, eth.Unsafe) + if err != nil { + return nil, fmt.Errorf("failed to find the L2 head block: %w", err) + } + return &FindHeadsResult{ + Unsafe: unsafe, + Safe: safe, + Finalized: finalized, + }, nil } -// FindL2Heads walks back from `start` (the previous unsafe L2 block) and finds the unsafe and safe -// L2 blocks. +// FindL2Heads walks back from `start` (the previous unsafe L2 block) and finds +// the finalized, unsafe and safe L2 blocks. // -// - The *unsafe L2 block*: This is the highest L2 block whose L1 origin is a plausible (1) +// - The *unsafe L2 block*: This is the highest L2 block whose L1 origin is a *plausible* // extension of the canonical L1 chain (as known to the op-node). // - The *safe L2 block*: This is the highest L2 block whose epoch's sequencing window is // complete within the canonical L1 chain (as known to the op-node). +// - The *finalized L2 block*: This is the L2 block which is known to be fully derived from +// finalized L1 block data. // -// (1) Plausible meaning that the blockhash of the L2 block's L1 origin (as reported in the L1 -// -// Attributes deposit within the L2 block) is not canonical at another height in the L1 chain, -// and the same holds for all its ancestors. -func FindL2Heads(ctx context.Context, start eth.L2BlockRef, seqWindowSize uint64, - l1 L1Chain, l2 L2Chain, genesis *rollup.Genesis) (unsafe eth.L2BlockRef, safe eth.L2BlockRef, err error) { +// Plausible: meaning that the blockhash of the L2 block's L1 origin +// (as reported in the L1 Attributes deposit within the L2 block) is not canonical at another height in the L1 chain, +// and the same holds for all its ancestors. +func FindL2Heads(ctx context.Context, cfg *rollup.Config, l1 L1Chain, l2 L2Chain) (result *FindHeadsResult, err error) { + // Fetch current L2 forkchoice state + result, err = currentHeads(ctx, cfg, l2) + if err != nil { + return nil, fmt.Errorf("failed to fetch current L2 forkchoice state: %w", err) + } - // Loop 1. Walk the L2 chain backwards until we find an L2 block whose L1 origin is canonical. + // Remember original unsafe block to determine reorg depth + prevUnsafe := result.Unsafe // Current L2 block. - n := start - - // Number of blocks between n and start. - reorgDepth := 0 + n := result.Unsafe - // Blockhash of L1 origin hash for the L2 block during the previous iteration, 0 for first - // iteration. When this changes as we walk the L2 chain backwards, it means we're seeing a different - // (earlier) epoch. - var prevL1OriginHash common.Hash + var highestL2WithCanonicalL1Origin eth.L2BlockRef // the highest L2 block with confirmed canonical L1 origin + var l1Block eth.L1BlockRef // the L1 block at the height of the L1 origin of the current L2 block n. + var ahead bool // when "n", the L2 block, has a L1 origin that is not visible in our L1 chain source yet - // The highest L2 ancestor of `start` (or `start` itself) whose ancestors are not (yet) known - // to have a non-canonical L1 origin. Empty if no such candidate is known yet. Guaranteed to be - // set after exiting from Loop 1. - var highestPlausibleCanonicalOrigin eth.L2BlockRef + ready := false // when we found the block after the safe head, and we just need to return the parent block. + // Each loop iteration we traverse further from the unsafe head towards the finalized head. + // Once we pass the previous safe head and we have seen enough canonical L1 origins to fill a sequence window worth of data, + // then we return the last L2 block of the epoch before that as safe head. + // Each loop iteration we traverse a single L2 block, and we check if the L1 origins are consistent. for { - // Check if l1Origin is canonical when we get to a new epoch. - if prevL1OriginHash != n.L1Origin.Hash { - prevL1OriginHash = n.L1Origin.Hash - - if plausible, canonical, err := isAheadOrCanonical(ctx, l1, n.L1Origin); err != nil { - return eth.L2BlockRef{}, eth.L2BlockRef{}, err - } else if !plausible { - // L1 origin nor ahead of L1 head nor canonical, discard previous candidate and - // keep looking. - highestPlausibleCanonicalOrigin = eth.L2BlockRef{} - } else { - if highestPlausibleCanonicalOrigin == (eth.L2BlockRef{}) { - // No highest plausible candidate, make L2 block new candidate. - highestPlausibleCanonicalOrigin = n - } - if canonical { - break - } + // Fetch L1 information if we never had it, or if we do not have it for the current origin + if l1Block == (eth.L1BlockRef{}) || n.L1Origin.Hash != l1Block.Hash { + b, err := l1.L1BlockRefByNumber(ctx, n.L1Origin.Number) + // if L2 is ahead of L1 view, then consider it a "plausible" head + notFound := errors.Is(err, ethereum.NotFound) + if err != nil && !notFound { + return nil, fmt.Errorf("failed to retrieve block %d from L1 for comparison against %s: %w", n.L1Origin.Number, n.L1Origin.Hash, err) } + l1Block = b + ahead = notFound } // Don't walk past genesis. If we were at the L2 genesis, but could not find its L1 origin, // the L2 chain is building on the wrong L1 branch. - if n.Hash == genesis.L2.Hash || n.Number == genesis.L2.Number { - return eth.L2BlockRef{}, eth.L2BlockRef{}, WrongChainErr + if n.Number == cfg.Genesis.L2.Number { + // Check L2 traversal against L2 Genesis data, to make sure the engine is on the correct chain, instead of attempting sync with different L2 destination. + if n.Hash != cfg.Genesis.L2.Hash { + return nil, fmt.Errorf("%w L2: genesis: %s, got %s", WrongChainErr, cfg.Genesis.L2, n) + } + // Check L1 comparison against L1 Genesis data, to make sure the L1 data is from the correct chain, instead of attempting sync with different L1 source. + if !ahead && l1Block.Hash != cfg.Genesis.L1.Hash { + return nil, fmt.Errorf("%w L1: genesis: %s, got %s", WrongChainErr, cfg.Genesis.L1, l1Block) + } } - - // Pull L2 parent for next iteration - n, err = l2.L2BlockRefByHash(ctx, n.ParentHash) - if err != nil { - return eth.L2BlockRef{}, eth.L2BlockRef{}, - fmt.Errorf("failed to fetch L2 block by hash %v: %w", n.ParentHash, err) + // Check L2 traversal against finalized data + if (n.Number == result.Finalized.Number) && (n.Hash != result.Finalized.Hash) { + return nil, fmt.Errorf("%w: finalized %s, got: %s", ReorgFinalizedErr, result.Finalized, n) } - - reorgDepth++ - if reorgDepth >= MaxReorgDepth { + // Check we are not reorging L2 incredibly deep + if n.Number+MaxReorgDepth < prevUnsafe.Number { // If the reorg depth is too large, something is fishy. // This can legitimately happen if L1 goes down for a while. But in that case, // restarting the L2 node with a bigger configured MaxReorgDepth is an acceptable // stopgap solution. - // Currently this can also happen if the L2 node is down for a while, but in the future - // state sync should prevent this issue. - return eth.L2BlockRef{}, eth.L2BlockRef{}, TooDeepReorgErr + return nil, fmt.Errorf("%w: traversed back to L2 block %s, but too deep compared to previous unsafe block %s", TooDeepReorgErr, n, prevUnsafe) } - } - // Loop 2. Walk from the L1 origin of the `n` block (*) back to the L1 block that starts the - // sequencing window ending at that block. Instead of iterating on L1 blocks, we actually - // iterate on L2 blocks, because we want to find the safe L2 head, i.e. the highest L2 block - // whose L1 origin is the start of the sequencing window. + // If we don't have a usable unsafe head, then set it + if result.Unsafe == (eth.L2BlockRef{}) { + result.Unsafe = n + } - // (*) `n` being at this stage the highest L2 block whose L1 origin is canonical. + if ahead { + // keep the unsafe head if we can't tell if its L1 origin is canonical or not yet. + } else if l1Block.Hash == n.L1Origin.Hash { + // if L2 matches canonical chain, even if unsafe, + // then we can start finding a span of L1 blocks to cover the sequence window, + // which may help avoid rewinding the existing safe head unnecessarily. + if highestL2WithCanonicalL1Origin == (eth.L2BlockRef{}) { + highestL2WithCanonicalL1Origin = n + } + } else { + // L1 origin not ahead of L1 head nor canonical, discard previous candidate and keep looking. + result.Unsafe = eth.L2BlockRef{} + highestL2WithCanonicalL1Origin = eth.L2BlockRef{} + } - // Depth counter: we need to walk back `seqWindowSize` L1 blocks in order to find the start - // of the sequencing window. - depth := uint64(1) + // If the L2 block is at least as old as the previous safe head, and we have seen at least a full sequence window worth of L1 blocks to confirm + if n.Number <= result.Safe.Number && n.L1Origin.Number+cfg.SeqWindowSize < highestL2WithCanonicalL1Origin.L1Origin.Number && n.SequenceNumber == 0 { + ready = true + } - // Before entering the loop: `prevL1OriginHash == n.L1Origin.Hash` - // The original definitions of `n` and `prevL1OriginHash` still hold. - for { - // Advance depth if we change to a different (earlier) epoch. - if n.L1Origin.Hash != prevL1OriginHash { - depth++ - prevL1OriginHash = n.L1Origin.Hash + // Don't traverse further than the finalized head to find a safe head + if n.Number == result.Finalized.Number { + result.Safe = n + return result, nil } - // Found an L2 block whose L1 origin is the start of the sequencing window. - // Note: We also ensure that we are on the block number with the 0 seq number. - // This is a little hacky, but kinda works. The issue is about where the - // batch queue should start building. - if depth == seqWindowSize && n.SequenceNumber == 0 { - return highestPlausibleCanonicalOrigin, n, nil + // Pull L2 parent for next iteration + parent, err := l2.L2BlockRefByHash(ctx, n.ParentHash) + if err != nil { + return nil, fmt.Errorf("failed to fetch L2 block by hash %v: %w", n.ParentHash, err) } - // Genesis is always safe. - if n.Hash == genesis.L2.Hash || n.Number == genesis.L2.Number { - safe = eth.L2BlockRef{Hash: genesis.L2.Hash, Number: genesis.L2.Number, - Time: genesis.L2Time, L1Origin: genesis.L1, SequenceNumber: 0} - return highestPlausibleCanonicalOrigin, safe, nil + // Check the L1 origin relation + if parent.L1Origin != n.L1Origin { + // sanity check that the L1 origin block number is coherent + if parent.L1Origin.Number+1 != n.L1Origin.Number { + return nil, fmt.Errorf("l2 parent %s of %s has L1 origin %s that is not before %s", parent, n, parent.L1Origin, n.L1Origin) + } + // sanity check that the later sequence number is 0, if it changed between the L2 blocks + if n.SequenceNumber != 0 { + return nil, fmt.Errorf("l2 block %s has parent %s with different L1 origin %s, but non-zero sequence number %d", n, parent, parent.L1Origin, n.SequenceNumber) + } + // if the L1 origin is known to be canonical, then the parent must be too + if l1Block.Hash == n.L1Origin.Hash && l1Block.ParentHash != parent.L1Origin.Hash { + return nil, fmt.Errorf("parent L2 block %s has origin %s but expected %s", parent, parent.L1Origin, l1Block.ParentHash) + } + } else { + if parent.SequenceNumber+1 != n.SequenceNumber { + return nil, fmt.Errorf("sequence number inconsistency %d <> %d between l2 blocks %s and %s", parent.SequenceNumber, n.SequenceNumber, parent, n) + } } - // Pull L2 parent for next iteration. - n, err = l2.L2BlockRefByHash(ctx, n.ParentHash) - if err != nil { - return eth.L2BlockRef{}, eth.L2BlockRef{}, - fmt.Errorf("failed to fetch L2 block by hash %v: %w", n.ParentHash, err) + n = parent + + // once we found the block at seq nr 0 that is more than a full seq window behind the common chain post-reorg, then use the parent block as safe head. + if ready { + result.Safe = n + return result, nil } } } diff --git a/op-node/rollup/sync/start_test.go b/op-node/rollup/sync/start_test.go index 3946ccec2724c..eb83760e3194d 100644 --- a/op-node/rollup/sync/start_test.go +++ b/op-node/rollup/sync/start_test.go @@ -4,11 +4,11 @@ import ( "context" "testing" - "github.com/ethereum-optimism/optimism/op-node/testlog" - "github.com/ethereum-optimism/optimism/op-node/testutils" - "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/rollup" + "github.com/ethereum-optimism/optimism/op-node/testlog" + "github.com/ethereum-optimism/optimism/op-node/testutils" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" "github.com/stretchr/testify/require" ) @@ -20,19 +20,23 @@ var _ L2Chain = (*testutils.FakeChainSource)(nil) // - The L2 chain is based off of the L1 chain // - The actual L1 chain is the New L1 chain // - Both heads are at the tip of their respective chains -func (c *syncStartTestCase) generateFakeL2(t *testing.T) (*testutils.FakeChainSource, eth.L2BlockRef, rollup.Genesis) { +func (c *syncStartTestCase) generateFakeL2(t *testing.T) (*testutils.FakeChainSource, rollup.Genesis) { log := testlog.Logger(t, log.LvlError) chain := testutils.NewFakeChainSource([]string{c.L1, c.NewL1}, []string{c.L2}, int(c.GenesisL1Num), log) chain.SetL2Head(len(c.L2) - 1) genesis := testutils.FakeGenesis(c.GenesisL1, c.GenesisL2, int(c.GenesisL1Num)) - head, err := chain.L2BlockRefByNumber(context.Background(), nil) - require.Nil(t, err) chain.ReorgL1() for i := 0; i < len(c.NewL1)-1; i++ { chain.AdvanceL1() } - return chain, head, genesis + return chain, genesis + +} +func runeToHash(id rune) common.Hash { + var h common.Hash + copy(h[:], string(id)) + return h } type syncStartTestCase struct { @@ -42,6 +46,9 @@ type syncStartTestCase struct { L2 string // L2 Chain that follows from L1Chain NewL1 string // New L1 chain + PreFinalizedL2 rune + PreSafeL2 rune + GenesisL1 rune GenesisL1Num uint64 GenesisL2 rune @@ -57,188 +64,221 @@ func refToRune(r eth.BlockID) rune { } func (c *syncStartTestCase) Run(t *testing.T) { - chain, l2Head, genesis := c.generateFakeL2(t) - - unsafeL2Head, safeHead, err := FindL2Heads(context.Background(), l2Head, c.SeqWindowSize, chain, chain, &genesis) + chain, genesis := c.generateFakeL2(t) + chain.SetL2Finalized(runeToHash(c.PreFinalizedL2)) + chain.SetL2Safe(runeToHash(c.PreSafeL2)) + cfg := &rollup.Config{ + Genesis: genesis, + SeqWindowSize: c.SeqWindowSize, + } + result, err := FindL2Heads(context.Background(), cfg, chain, chain) if c.ExpectedErr != nil { - require.Error(t, err, "Expecting an error in this test case") - require.ErrorIs(t, c.ExpectedErr, err, "Unexpected error") + require.ErrorIs(t, err, c.ExpectedErr, "expected error") + return } else { + require.NoError(t, err, "expected no error") + } - require.NoError(t, err) - expectedUnsafeHead := refToRune(unsafeL2Head.ID()) - require.Equal(t, string(c.UnsafeL2Head), string(expectedUnsafeHead), "Unsafe L2 Head not equal") + gotUnsafeHead := refToRune(result.Unsafe.ID()) + require.Equal(t, string(c.UnsafeL2Head), string(gotUnsafeHead), "Unsafe L2 Head not equal") - expectedSafeHead := refToRune(safeHead.ID()) - require.Equal(t, string(c.SafeL2Head), string(expectedSafeHead), "Safe L2 Head not equal") - } + gotSafeHead := refToRune(result.Safe.ID()) + require.Equal(t, string(c.SafeL2Head), string(gotSafeHead), "Safe L2 Head not equal") } func TestFindSyncStart(t *testing.T) { testCases := []syncStartTestCase{ { - Name: "already synced", - GenesisL1Num: 0, - L1: "ab", - L2: "AB", - NewL1: "ab", - GenesisL1: 'a', - GenesisL2: 'A', - UnsafeL2Head: 'B', - SeqWindowSize: 2, - SafeL2Head: 'A', - ExpectedErr: nil, + Name: "already synced", + GenesisL1Num: 0, + L1: "ab", + L2: "AB", + NewL1: "ab", + PreFinalizedL2: 'A', + PreSafeL2: 'A', + GenesisL1: 'a', + GenesisL2: 'A', + UnsafeL2Head: 'B', + SeqWindowSize: 2, + SafeL2Head: 'A', + ExpectedErr: nil, }, { - Name: "small reorg long chain", - GenesisL1Num: 0, - L1: "abcdefgh", - L2: "ABCDEFGH", - NewL1: "abcdefgx", - GenesisL1: 'a', - GenesisL2: 'A', - UnsafeL2Head: 'G', - SeqWindowSize: 2, - SafeL2Head: 'F', - ExpectedErr: nil, + Name: "small reorg long chain", + GenesisL1Num: 0, + L1: "abcdefgh", + L2: "ABCDEFGH", + NewL1: "abcdefgx", + PreFinalizedL2: 'B', + PreSafeL2: 'H', + GenesisL1: 'a', + GenesisL2: 'A', + UnsafeL2Head: 'G', + SeqWindowSize: 2, + SafeL2Head: 'C', + ExpectedErr: nil, }, { - Name: "L1 Chain ahead", - GenesisL1Num: 0, - L1: "abcde", - L2: "ABCD", - NewL1: "abcde", - GenesisL1: 'a', - GenesisL2: 'A', - UnsafeL2Head: 'D', - SeqWindowSize: 3, - SafeL2Head: 'B', - ExpectedErr: nil, + Name: "L1 Chain ahead", + GenesisL1Num: 0, + L1: "abcdef", + L2: "ABCDE", + NewL1: "abcdef", + PreFinalizedL2: 'A', + PreSafeL2: 'D', + GenesisL1: 'a', + GenesisL2: 'A', + UnsafeL2Head: 'E', + SeqWindowSize: 2, + SafeL2Head: 'A', + ExpectedErr: nil, }, { - Name: "L2 Chain ahead after reorg", - GenesisL1Num: 0, - L1: "abxyz", - L2: "ABXYZ", - NewL1: "abx", - GenesisL1: 'a', - GenesisL2: 'A', - UnsafeL2Head: 'Z', - SeqWindowSize: 2, - SafeL2Head: 'B', - ExpectedErr: nil, + Name: "L2 Chain ahead after reorg", + GenesisL1Num: 0, + L1: "abcxyz", + L2: "ABCXYZ", + NewL1: "abcx", + PreFinalizedL2: 'B', + PreSafeL2: 'X', + GenesisL1: 'a', + GenesisL2: 'A', + UnsafeL2Head: 'Z', + SeqWindowSize: 2, + SafeL2Head: 'B', + ExpectedErr: nil, }, { - Name: "genesis", - GenesisL1Num: 0, - L1: "a", - L2: "A", - NewL1: "a", - GenesisL1: 'a', - GenesisL2: 'A', - UnsafeL2Head: 'A', - SeqWindowSize: 2, - SafeL2Head: 'A', - ExpectedErr: nil, + Name: "genesis", + GenesisL1Num: 0, + L1: "a", + L2: "A", + NewL1: "a", + PreFinalizedL2: 'A', + PreSafeL2: 'A', + GenesisL1: 'a', + GenesisL2: 'A', + UnsafeL2Head: 'A', + SeqWindowSize: 2, + SafeL2Head: 'A', + ExpectedErr: nil, }, { - Name: "reorg one step back", - GenesisL1Num: 0, - L1: "abcd", - L2: "ABCD", - NewL1: "abcx", - GenesisL1: 'a', - GenesisL2: 'A', - UnsafeL2Head: 'C', - SeqWindowSize: 3, - SafeL2Head: 'A', - ExpectedErr: nil, + Name: "reorg one step back", + GenesisL1Num: 0, + L1: "abcdefg", + L2: "ABCDEFG", + NewL1: "abcdefx", + PreFinalizedL2: 'A', + PreSafeL2: 'E', + GenesisL1: 'a', + GenesisL2: 'A', + UnsafeL2Head: 'F', + SeqWindowSize: 3, + SafeL2Head: 'A', + ExpectedErr: nil, }, { - Name: "reorg two steps back", - GenesisL1Num: 0, - L1: "abc", - L2: "ABC", - NewL1: "axy", - GenesisL1: 'a', - GenesisL2: 'A', - UnsafeL2Head: 'A', - SeqWindowSize: 2, - SafeL2Head: 'A', - ExpectedErr: nil, + Name: "reorg two steps back, clip genesis and finalized", + GenesisL1Num: 0, + L1: "abc", + L2: "ABC", + PreFinalizedL2: 'A', + PreSafeL2: 'B', + NewL1: "axy", + GenesisL1: 'a', + GenesisL2: 'A', + UnsafeL2Head: 'A', + SeqWindowSize: 2, + SafeL2Head: 'A', + ExpectedErr: nil, }, { - Name: "reorg three steps back", - GenesisL1Num: 0, - L1: "abcdef", - L2: "ABCDEF", - NewL1: "abcxyz", - GenesisL1: 'a', - GenesisL2: 'A', - UnsafeL2Head: 'C', - SeqWindowSize: 2, - SafeL2Head: 'B', - ExpectedErr: nil, + Name: "reorg three steps back", + GenesisL1Num: 0, + L1: "abcdefgh", + L2: "ABCDEFGH", + NewL1: "abcdexyz", + PreFinalizedL2: 'A', + PreSafeL2: 'D', + GenesisL1: 'a', + GenesisL2: 'A', + UnsafeL2Head: 'E', + SeqWindowSize: 2, + SafeL2Head: 'A', + ExpectedErr: nil, }, { - Name: "unexpected L1 chain", - GenesisL1Num: 0, - L1: "abcdef", - L2: "ABCDEF", - NewL1: "xyzwio", - GenesisL1: 'a', - GenesisL2: 'A', - UnsafeL2Head: 0, - ExpectedErr: WrongChainErr, + Name: "unexpected L1 chain", + GenesisL1Num: 0, + L1: "abcdef", + L2: "ABCDEF", + NewL1: "xyzwio", + PreFinalizedL2: 'A', + PreSafeL2: 'B', + GenesisL1: 'a', + GenesisL2: 'A', + UnsafeL2Head: 0, + ExpectedErr: WrongChainErr, }, { - Name: "unexpected L2 chain", - GenesisL1Num: 0, - L1: "abcdef", - L2: "ABCDEF", - NewL1: "xyzwio", - GenesisL1: 'a', - GenesisL2: 'X', - UnsafeL2Head: 0, - ExpectedErr: WrongChainErr, + Name: "unexpected L2 chain", + GenesisL1Num: 0, + L1: "abcdef", + L2: "ABCDEF", + NewL1: "xyzwio", + PreFinalizedL2: 'A', + PreSafeL2: 'B', + GenesisL1: 'a', + GenesisL2: 'X', + UnsafeL2Head: 0, + ExpectedErr: WrongChainErr, }, { - Name: "offset L2 genesis", - GenesisL1Num: 3, - L1: "abcdef", - L2: "DEF", - NewL1: "abcdef", - GenesisL1: 'd', - GenesisL2: 'D', - UnsafeL2Head: 'F', - SeqWindowSize: 2, - SafeL2Head: 'E', - ExpectedErr: nil, + Name: "offset L2 genesis", + GenesisL1Num: 3, + L1: "abcdefghi", + L2: "DEFGHI", + NewL1: "abcdefghi", + PreFinalizedL2: 'E', + PreSafeL2: 'H', + GenesisL1: 'd', + GenesisL2: 'D', + UnsafeL2Head: 'I', + SeqWindowSize: 2, + SafeL2Head: 'E', + ExpectedErr: nil, }, { - Name: "offset L2 genesis reorg", - GenesisL1Num: 3, - L1: "abcdefgh", - L2: "DEFGH", - NewL1: "abcdxyzw", - GenesisL1: 'd', - GenesisL2: 'D', - UnsafeL2Head: 'D', - SeqWindowSize: 2, - SafeL2Head: 'D', - ExpectedErr: nil, + Name: "offset L2 genesis reorg", + GenesisL1Num: 3, + L1: "abcdefgh", + L2: "DEFGH", + NewL1: "abcdxyzw", + PreFinalizedL2: 'D', + PreSafeL2: 'D', + GenesisL1: 'd', + GenesisL2: 'D', + UnsafeL2Head: 'D', + SeqWindowSize: 2, + SafeL2Head: 'D', + ExpectedErr: nil, }, { - Name: "reorg past offset genesis", - GenesisL1Num: 3, - L1: "abcdefgh", - L2: "DEFGH", - NewL1: "abxyzwio", - GenesisL1: 'd', - GenesisL2: 'D', - UnsafeL2Head: 0, - ExpectedErr: WrongChainErr, + Name: "reorg past offset genesis", + GenesisL1Num: 3, + L1: "abcdefgh", + L2: "DEFGH", + NewL1: "abxyzwio", + PreFinalizedL2: 'D', + PreSafeL2: 'D', + GenesisL1: 'd', + GenesisL2: 'D', + UnsafeL2Head: 0, + SeqWindowSize: 2, + SafeL2Head: 'D', + ExpectedErr: WrongChainErr, }, } diff --git a/op-node/sources/l1_client.go b/op-node/sources/l1_client.go index 6a4d63d3fd497..63755f903a537 100644 --- a/op-node/sources/l1_client.go +++ b/op-node/sources/l1_client.go @@ -3,11 +3,13 @@ package sources import ( "context" "fmt" + "strings" "github.com/ethereum-optimism/optimism/op-node/client" "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-node/sources/caching" + "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" ) @@ -67,6 +69,11 @@ func NewL1Client(client client.RPC, log log.Logger, metrics caching.Metrics, con func (s *L1Client) L1BlockRefByLabel(ctx context.Context, label eth.BlockLabel) (eth.L1BlockRef, error) { info, err := s.InfoByLabel(ctx, label) if err != nil { + // Both geth and erigon like to serve non-standard errors for the safe and finalized heads, correct that. + // This happens when the chain just started and nothing is marked as safe/finalized yet. + if strings.Contains(err.Error(), "block not found") || strings.Contains(err.Error(), "Unknown block") { + err = ethereum.NotFound + } return eth.L1BlockRef{}, fmt.Errorf("failed to fetch head header: %w", err) } ref := eth.InfoToL1BlockRef(info) diff --git a/op-node/sources/l2_client.go b/op-node/sources/l2_client.go index 747db84669888..ca0fcb23d6165 100644 --- a/op-node/sources/l2_client.go +++ b/op-node/sources/l2_client.go @@ -3,12 +3,14 @@ package sources import ( "context" "fmt" + "strings" "github.com/ethereum-optimism/optimism/op-node/client" "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-optimism/optimism/op-node/sources/caching" + "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" ) @@ -77,6 +79,11 @@ func NewL2Client(client client.RPC, log log.Logger, metrics caching.Metrics, con func (s *L2Client) L2BlockRefByLabel(ctx context.Context, label eth.BlockLabel) (eth.L2BlockRef, error) { payload, err := s.PayloadByLabel(ctx, label) if err != nil { + // Both geth and erigon like to serve non-standard errors for the safe and finalized heads, correct that. + // This happens when the chain just started and nothing is marked as safe/finalized yet. + if strings.Contains(err.Error(), "block not found") || strings.Contains(err.Error(), "Unknown block") { + err = ethereum.NotFound + } // w%: wrap to preserve ethereum.NotFound case return eth.L2BlockRef{}, fmt.Errorf("failed to determine L2BlockRef of %s, could not get payload: %w", label, err) } diff --git a/op-node/testutils/fake_chain.go b/op-node/testutils/fake_chain.go index 4a46cb3dde469..da2d5f643cc78 100644 --- a/op-node/testutils/fake_chain.go +++ b/op-node/testutils/fake_chain.go @@ -85,13 +85,17 @@ func NewFakeChainSource(l1 []string, l2 []string, l1GenesisNumber int, log log.L // what the head block is of the L1 and L2 chains. In addition, it enables re-orgs // to easily be implemented type FakeChainSource struct { - l1reorg int // Index of the L1 chain to be operating on - l2reorg int // Index of the L2 chain to be operating on - l1head int // Head block of the L1 chain - l2head int // Head block of the L2 chain - l1s [][]eth.L1BlockRef // l1s[reorg] is the L1 chain in that specific re-org configuration - l2s [][]eth.L2BlockRef // l2s[reorg] is the L2 chain in that specific re-org configuration - log log.Logger + l1reorg int // Index of the L1 chain to be operating on + l2reorg int // Index of the L2 chain to be operating on + l1head int // Head block of the L1 chain + l2head int // Head block of the L2 chain + l1safe int + l2safe int + l1finalized int + l2finalized int + l1s [][]eth.L1BlockRef // l1s[reorg] is the L1 chain in that specific re-org configuration + l2s [][]eth.L2BlockRef // l2s[reorg] is the L2 chain in that specific re-org configuration + log log.Logger } func (m *FakeChainSource) L1Range(ctx context.Context, base eth.BlockID, max uint64) ([]eth.BlockID, error) { @@ -134,26 +138,39 @@ func (m *FakeChainSource) L1BlockRefByHash(ctx context.Context, l1Hash common.Ha } func (m *FakeChainSource) L1BlockRefByLabel(ctx context.Context, label eth.BlockLabel) (eth.L1BlockRef, error) { - if label != eth.Unsafe { - return eth.L1BlockRef{}, fmt.Errorf("testutil FakeChainSource does not support L1BlockRefByLabel(%s)", label) - } - m.log.Trace("L1HeadBlockRef", "l1Head", m.l1head, "reorg", m.l1reorg) + m.log.Trace("L1BlockRefByLabel", "l1Head", m.l1head, "l1Safe", m.l1safe, "l1Finalized", m.l1finalized, "reorg", m.l1reorg) l := len(m.l1s[m.l1reorg]) if l == 0 { return eth.L1BlockRef{}, ethereum.NotFound } - return m.l1s[m.l1reorg][m.l1head], nil + switch label { + case eth.Unsafe: + return m.l1s[m.l1reorg][m.l1head], nil + case eth.Safe: + return m.l1s[m.l1reorg][m.l1safe], nil + case eth.Finalized: + return m.l1s[m.l1reorg][m.l1finalized], nil + default: + return eth.L1BlockRef{}, fmt.Errorf("testutil FakeChainSource does not support L1BlockRefByLabel(%s)", label) + } } func (m *FakeChainSource) L2BlockRefByLabel(ctx context.Context, label eth.BlockLabel) (eth.L2BlockRef, error) { - if label != eth.Unsafe { - return eth.L2BlockRef{}, fmt.Errorf("testutil FakeChainSource does not support L2BlockRefByLabel(%s)", label) + m.log.Trace("L2BlockRefByLabel", "l2Head", m.l2head, "l2Safe", m.l2safe, "l2Finalized", m.l2finalized, "reorg", m.l2reorg) + l := len(m.l2s[m.l2reorg]) + if l == 0 { + return eth.L2BlockRef{}, ethereum.NotFound } - m.log.Trace("L2BlockRefHead", "l2Head", m.l2head, "reorg", m.l2reorg) - if len(m.l2s[m.l2reorg]) == 0 { - panic("bad test, no l2 chain") + switch label { + case eth.Unsafe: + return m.l2s[m.l2reorg][m.l2head], nil + case eth.Safe: + return m.l2s[m.l2reorg][m.l2safe], nil + case eth.Finalized: + return m.l2s[m.l2reorg][m.l2finalized], nil + default: + return eth.L2BlockRef{}, fmt.Errorf("testutil FakeChainSource does not support L2BlockRefByLabel(%s)", label) } - return m.l2s[m.l2reorg][m.l2head], nil } func (m *FakeChainSource) L2BlockRefByNumber(ctx context.Context, l2Num *big.Int) (eth.L2BlockRef, error) { @@ -204,6 +221,28 @@ func (m *FakeChainSource) ReorgL1() { } } +func (m *FakeChainSource) SetL2Safe(safe common.Hash) { + m.log.Trace("Set L2 safe head", "new_safe", safe, "old_safe", m.l2safe) + for i, v := range m.l2s[m.l2reorg] { + if v.Hash == safe { + m.l2safe = i + return + } + } + panic(fmt.Errorf("unknown safe block: %s", safe)) +} + +func (m *FakeChainSource) SetL2Finalized(finalized common.Hash) { + m.log.Trace("Set L2 finalized head", "new_finalized", finalized, "old_finalized", m.l2finalized) + for i, v := range m.l2s[m.l2reorg] { + if v.Hash == finalized { + m.l2finalized = i + return + } + } + panic(fmt.Errorf("unknown finalized block: %s", finalized)) +} + func (m *FakeChainSource) SetL2Head(head int) eth.L2BlockRef { m.log.Trace("Set L2 head", "new_head", head, "old_head", m.l2head) m.l2head = head From 90b758681a83cbd74b4f8dda2102c9fbc6f99a9f Mon Sep 17 00:00:00 2001 From: Mark Tyneway Date: Sat, 10 Sep 2022 11:34:28 -0700 Subject: [PATCH 15/32] contracts-bedrock: regenerate storage layout --- packages/contracts-bedrock/.storage-layout | 88 +++++++++++----------- 1 file changed, 46 insertions(+), 42 deletions(-) diff --git a/packages/contracts-bedrock/.storage-layout b/packages/contracts-bedrock/.storage-layout index 5afe9c2c436a5..0bf7d7d5ccaaa 100644 --- a/packages/contracts-bedrock/.storage-layout +++ b/packages/contracts-bedrock/.storage-layout @@ -9,9 +9,11 @@ +------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------+ | Name | Type | Slot | Offset | Bytes | Contract | +============================================================================================================================================+ -| _initialized | uint8 | 0 | 0 | 1 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger | +| spacer0 | address | 0 | 0 | 20 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger | |------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| -| _initializing | bool | 0 | 1 | 1 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger | +| _initialized | uint8 | 0 | 20 | 1 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger | +|------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| +| _initializing | bool | 0 | 21 | 1 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger | |------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| | __gap | uint256[50] | 1 | 0 | 1600 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger | |------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| @@ -27,36 +29,36 @@ |------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| | __gap | uint256[49] | 152 | 0 | 1568 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger | |------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| -| successfulMessages | mapping(bytes32 => bool) | 201 | 0 | 32 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger | +| spacer1 | uint256 | 201 | 0 | 32 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger | +|------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| +| spacer2 | uint256 | 202 | 0 | 32 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger | |------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| -| xDomainMsgSender | address | 202 | 0 | 20 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger | +| successfulMessages | mapping(bytes32 => bool) | 203 | 0 | 32 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger | |------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| -| msgNonce | uint240 | 203 | 0 | 30 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger | +| xDomainMsgSender | address | 204 | 0 | 20 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger | |------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| -| otherMessenger | address | 204 | 0 | 20 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger | +| msgNonce | uint240 | 205 | 0 | 30 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger | |------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| -| receivedMessages | mapping(bytes32 => bool) | 205 | 0 | 32 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger | +| otherMessenger | address | 206 | 0 | 20 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger | |------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| -| blockedSystemAddresses | mapping(address => bool) | 206 | 0 | 32 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger | +| receivedMessages | mapping(bytes32 => bool) | 207 | 0 | 32 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger | +|------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| +| blockedSystemAddresses | mapping(address => bool) | 208 | 0 | 32 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger | +------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------+ ======================= âž¡ L1StandardBridge ======================= -+---------------+-------------------------------------------------+------+--------+-------+----------------------------------------------------+ -| Name | Type | Slot | Offset | Bytes | Contract | -+==============================================================================================================================================+ -| _initialized | uint8 | 0 | 0 | 1 | contracts/L1/L1StandardBridge.sol:L1StandardBridge | -|---------------+-------------------------------------------------+------+--------+-------+----------------------------------------------------| -| _initializing | bool | 0 | 1 | 1 | contracts/L1/L1StandardBridge.sol:L1StandardBridge | -|---------------+-------------------------------------------------+------+--------+-------+----------------------------------------------------| -| messenger | contract CrossDomainMessenger | 0 | 2 | 20 | contracts/L1/L1StandardBridge.sol:L1StandardBridge | -|---------------+-------------------------------------------------+------+--------+-------+----------------------------------------------------| -| otherBridge | contract StandardBridge | 1 | 0 | 20 | contracts/L1/L1StandardBridge.sol:L1StandardBridge | -|---------------+-------------------------------------------------+------+--------+-------+----------------------------------------------------| -| deposits | mapping(address => mapping(address => uint256)) | 2 | 0 | 32 | contracts/L1/L1StandardBridge.sol:L1StandardBridge | -+---------------+-------------------------------------------------+------+--------+-------+----------------------------------------------------+ ++----------+-------------------------------------------------+------+--------+-------+----------------------------------------------------+ +| Name | Type | Slot | Offset | Bytes | Contract | ++=========================================================================================================================================+ +| spacer0 | uint256 | 0 | 0 | 32 | contracts/L1/L1StandardBridge.sol:L1StandardBridge | +|----------+-------------------------------------------------+------+--------+-------+----------------------------------------------------| +| spacer1 | uint256 | 1 | 0 | 32 | contracts/L1/L1StandardBridge.sol:L1StandardBridge | +|----------+-------------------------------------------------+------+--------+-------+----------------------------------------------------| +| deposits | mapping(address => mapping(address => uint256)) | 2 | 0 | 32 | contracts/L1/L1StandardBridge.sol:L1StandardBridge | ++----------+-------------------------------------------------+------+--------+-------+----------------------------------------------------+ ======================= âž¡ L2OutputOracle @@ -170,9 +172,11 @@ +------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------+ | Name | Type | Slot | Offset | Bytes | Contract | +============================================================================================================================================+ -| _initialized | uint8 | 0 | 0 | 1 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger | +| spacer0 | address | 0 | 0 | 20 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger | |------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| -| _initializing | bool | 0 | 1 | 1 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger | +| _initialized | uint8 | 0 | 20 | 1 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger | +|------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| +| _initializing | bool | 0 | 21 | 1 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger | |------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| | __gap | uint256[50] | 1 | 0 | 1600 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger | |------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| @@ -188,36 +192,36 @@ |------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| | __gap | uint256[49] | 152 | 0 | 1568 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger | |------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| -| successfulMessages | mapping(bytes32 => bool) | 201 | 0 | 32 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger | +| spacer1 | uint256 | 201 | 0 | 32 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger | +|------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| +| spacer2 | uint256 | 202 | 0 | 32 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger | |------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| -| xDomainMsgSender | address | 202 | 0 | 20 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger | +| successfulMessages | mapping(bytes32 => bool) | 203 | 0 | 32 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger | |------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| -| msgNonce | uint240 | 203 | 0 | 30 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger | +| xDomainMsgSender | address | 204 | 0 | 20 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger | |------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| -| otherMessenger | address | 204 | 0 | 20 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger | +| msgNonce | uint240 | 205 | 0 | 30 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger | |------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| -| receivedMessages | mapping(bytes32 => bool) | 205 | 0 | 32 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger | +| otherMessenger | address | 206 | 0 | 20 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger | |------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| -| blockedSystemAddresses | mapping(address => bool) | 206 | 0 | 32 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger | +| receivedMessages | mapping(bytes32 => bool) | 207 | 0 | 32 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger | +|------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------| +| blockedSystemAddresses | mapping(address => bool) | 208 | 0 | 32 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger | +------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------+ ======================= âž¡ L2StandardBridge ======================= -+---------------+-------------------------------------------------+------+--------+-------+----------------------------------------------------+ -| Name | Type | Slot | Offset | Bytes | Contract | -+==============================================================================================================================================+ -| _initialized | uint8 | 0 | 0 | 1 | contracts/L2/L2StandardBridge.sol:L2StandardBridge | -|---------------+-------------------------------------------------+------+--------+-------+----------------------------------------------------| -| _initializing | bool | 0 | 1 | 1 | contracts/L2/L2StandardBridge.sol:L2StandardBridge | -|---------------+-------------------------------------------------+------+--------+-------+----------------------------------------------------| -| messenger | contract CrossDomainMessenger | 0 | 2 | 20 | contracts/L2/L2StandardBridge.sol:L2StandardBridge | -|---------------+-------------------------------------------------+------+--------+-------+----------------------------------------------------| -| otherBridge | contract StandardBridge | 1 | 0 | 20 | contracts/L2/L2StandardBridge.sol:L2StandardBridge | -|---------------+-------------------------------------------------+------+--------+-------+----------------------------------------------------| -| deposits | mapping(address => mapping(address => uint256)) | 2 | 0 | 32 | contracts/L2/L2StandardBridge.sol:L2StandardBridge | -+---------------+-------------------------------------------------+------+--------+-------+----------------------------------------------------+ ++----------+-------------------------------------------------+------+--------+-------+----------------------------------------------------+ +| Name | Type | Slot | Offset | Bytes | Contract | ++=========================================================================================================================================+ +| spacer0 | uint256 | 0 | 0 | 32 | contracts/L2/L2StandardBridge.sol:L2StandardBridge | +|----------+-------------------------------------------------+------+--------+-------+----------------------------------------------------| +| spacer1 | uint256 | 1 | 0 | 32 | contracts/L2/L2StandardBridge.sol:L2StandardBridge | +|----------+-------------------------------------------------+------+--------+-------+----------------------------------------------------| +| deposits | mapping(address => mapping(address => uint256)) | 2 | 0 | 32 | contracts/L2/L2StandardBridge.sol:L2StandardBridge | ++----------+-------------------------------------------------+------+--------+-------+----------------------------------------------------+ ======================= âž¡ L2ToL1MessagePasser From 0418088570f44fc0a4519554e81fa9cf7d840117 Mon Sep 17 00:00:00 2001 From: protolambda Date: Sat, 10 Sep 2022 20:57:23 +0200 Subject: [PATCH 16/32] op-node: fix missing import (#3407) --- op-node/rollup/derive/engine_queue.go | 1 + 1 file changed, 1 insertion(+) diff --git a/op-node/rollup/derive/engine_queue.go b/op-node/rollup/derive/engine_queue.go index fe3aeb3522848..887b0f66ade86 100644 --- a/op-node/rollup/derive/engine_queue.go +++ b/op-node/rollup/derive/engine_queue.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-node/rollup/sync" + "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/types" From b27d0fa75bb9a32d95d744dac7c22d69d1acc20d Mon Sep 17 00:00:00 2001 From: Will Cory Date: Sat, 10 Sep 2022 12:20:13 -0700 Subject: [PATCH 17/32] feat(sdk): Add wsteth to sdk for mainnet (#3374) * add wsteth to indexer * changeset Co-authored-by: Will Cory Co-authored-by: Mark Tyneway --- .changeset/gorgeous-waves-allow.md | 5 +++++ packages/sdk/src/utils/chain-constants.ts | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 .changeset/gorgeous-waves-allow.md diff --git a/.changeset/gorgeous-waves-allow.md b/.changeset/gorgeous-waves-allow.md new file mode 100644 index 0000000000000..89f4a27cd1969 --- /dev/null +++ b/.changeset/gorgeous-waves-allow.md @@ -0,0 +1,5 @@ +--- +'@eth-optimism/sdk': patch +--- + +Add wsteth support for DAI bridge to sdk diff --git a/packages/sdk/src/utils/chain-constants.ts b/packages/sdk/src/utils/chain-constants.ts index 8f5cae97ed9f3..2cdd9b923bde3 100644 --- a/packages/sdk/src/utils/chain-constants.ts +++ b/packages/sdk/src/utils/chain-constants.ts @@ -153,6 +153,11 @@ export const BRIDGE_ADAPTER_DATA: { [ChainID in L2ChainID]?: BridgeAdapterData } = { [L2ChainID.OPTIMISM]: { + wstETH: { + Adapter: DAIBridgeAdapter, + l1Bridge: '0x76943C0D61395d8F2edF9060e1533529cAe05dE6' as const, + l2Bridge: '0x8E01013243a96601a86eb3153F0d9Fa4fbFb6957' as const, + }, BitBTC: { Adapter: StandardBridgeAdapter, l1Bridge: '0xaBA2c5F108F7E820C049D5Af70B16ac266c8f128' as const, From cf613a35885679d40882535f341cd4969737a128 Mon Sep 17 00:00:00 2001 From: Mark Tyneway Date: Sat, 10 Sep 2022 12:54:54 -0700 Subject: [PATCH 18/32] op-bindings: remove executable flag on files --- op-bindings/bindings/deployerwhitelist_more.go | 0 op-bindings/bindings/gaspriceoracle_more.go | 0 op-bindings/bindings/governancetoken_more.go | 0 op-bindings/bindings/l1block_more.go | 0 op-bindings/bindings/l1blocknumber_more.go | 0 op-bindings/bindings/l2crossdomainmessenger_more.go | 0 op-bindings/bindings/l2standardbridge_more.go | 0 op-bindings/bindings/l2tol1messagepasser_more.go | 0 op-bindings/bindings/legacyerc20eth_more.go | 0 op-bindings/bindings/optimismmintableerc20factory_more.go | 0 op-bindings/bindings/optimismportal_more.go | 0 op-bindings/bindings/proxy_more.go | 0 op-bindings/bindings/sequencerfeevault_more.go | 0 op-bindings/bindings/weth9_more.go | 0 14 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 op-bindings/bindings/deployerwhitelist_more.go mode change 100755 => 100644 op-bindings/bindings/gaspriceoracle_more.go mode change 100755 => 100644 op-bindings/bindings/governancetoken_more.go mode change 100755 => 100644 op-bindings/bindings/l1block_more.go mode change 100755 => 100644 op-bindings/bindings/l1blocknumber_more.go mode change 100755 => 100644 op-bindings/bindings/l2crossdomainmessenger_more.go mode change 100755 => 100644 op-bindings/bindings/l2standardbridge_more.go mode change 100755 => 100644 op-bindings/bindings/l2tol1messagepasser_more.go mode change 100755 => 100644 op-bindings/bindings/legacyerc20eth_more.go mode change 100755 => 100644 op-bindings/bindings/optimismmintableerc20factory_more.go mode change 100755 => 100644 op-bindings/bindings/optimismportal_more.go mode change 100755 => 100644 op-bindings/bindings/proxy_more.go mode change 100755 => 100644 op-bindings/bindings/sequencerfeevault_more.go mode change 100755 => 100644 op-bindings/bindings/weth9_more.go diff --git a/op-bindings/bindings/deployerwhitelist_more.go b/op-bindings/bindings/deployerwhitelist_more.go old mode 100755 new mode 100644 diff --git a/op-bindings/bindings/gaspriceoracle_more.go b/op-bindings/bindings/gaspriceoracle_more.go old mode 100755 new mode 100644 diff --git a/op-bindings/bindings/governancetoken_more.go b/op-bindings/bindings/governancetoken_more.go old mode 100755 new mode 100644 diff --git a/op-bindings/bindings/l1block_more.go b/op-bindings/bindings/l1block_more.go old mode 100755 new mode 100644 diff --git a/op-bindings/bindings/l1blocknumber_more.go b/op-bindings/bindings/l1blocknumber_more.go old mode 100755 new mode 100644 diff --git a/op-bindings/bindings/l2crossdomainmessenger_more.go b/op-bindings/bindings/l2crossdomainmessenger_more.go old mode 100755 new mode 100644 diff --git a/op-bindings/bindings/l2standardbridge_more.go b/op-bindings/bindings/l2standardbridge_more.go old mode 100755 new mode 100644 diff --git a/op-bindings/bindings/l2tol1messagepasser_more.go b/op-bindings/bindings/l2tol1messagepasser_more.go old mode 100755 new mode 100644 diff --git a/op-bindings/bindings/legacyerc20eth_more.go b/op-bindings/bindings/legacyerc20eth_more.go old mode 100755 new mode 100644 diff --git a/op-bindings/bindings/optimismmintableerc20factory_more.go b/op-bindings/bindings/optimismmintableerc20factory_more.go old mode 100755 new mode 100644 diff --git a/op-bindings/bindings/optimismportal_more.go b/op-bindings/bindings/optimismportal_more.go old mode 100755 new mode 100644 diff --git a/op-bindings/bindings/proxy_more.go b/op-bindings/bindings/proxy_more.go old mode 100755 new mode 100644 diff --git a/op-bindings/bindings/sequencerfeevault_more.go b/op-bindings/bindings/sequencerfeevault_more.go old mode 100755 new mode 100644 diff --git a/op-bindings/bindings/weth9_more.go b/op-bindings/bindings/weth9_more.go old mode 100755 new mode 100644 From 25b088f96483efbaf6bd0de626b1ef6caadf36c7 Mon Sep 17 00:00:00 2001 From: Joshua Gutow Date: Sat, 10 Sep 2022 21:56:37 +0200 Subject: [PATCH 19/32] op-node/batcher/proposer: Standardize goimports (#3403) * op-node: goimports * op-batcher: goimports * op-proposer: goimports * Fix deleted line due to overeager sed * fix imports Co-authored-by: protolambda --- op-batcher/batch_submitter.go | 6 ++--- op-batcher/cmd/main.go | 5 ++-- op-batcher/config.go | 11 ++++----- op-batcher/flags/flags.go | 3 ++- op-node/client/rpc.go | 3 ++- op-node/cmd/genesis/cmd.go | 14 +++++------ op-node/cmd/main.go | 15 ++++-------- op-node/eth/ssz_test.go | 2 +- op-node/eth/types.go | 4 ++-- op-node/heartbeat/service_test.go | 3 ++- op-node/metrics/metrics.go | 11 ++++----- op-node/node/comms.go | 3 ++- op-node/node/log.go | 3 ++- op-node/node/node.go | 4 +--- op-node/node/server.go | 6 +---- op-node/node/server_test.go | 23 +++++++------------ op-node/p2p/config.go | 11 +++++---- op-node/p2p/discovery.go | 9 ++++---- op-node/p2p/gossip.go | 15 ++++++------ op-node/p2p/host.go | 4 ++-- op-node/p2p/host_test.go | 17 +++++++------- op-node/p2p/node.go | 10 ++++---- op-node/p2p/notifications.go | 3 ++- op-node/p2p/prepared.go | 5 ++-- op-node/p2p/rpc_api.go | 3 ++- op-node/p2p/rpc_client.go | 3 ++- op-node/p2p/rpc_server.go | 12 +++++----- op-node/p2p/signer.go | 3 ++- .../rollup/derive/attributes_queue_test.go | 3 ++- op-node/rollup/derive/attributes_test.go | 3 ++- op-node/rollup/derive/batch.go | 1 - op-node/rollup/derive/batch_queue_test.go | 4 ++-- op-node/rollup/derive/batch_test.go | 4 ++-- op-node/rollup/derive/batches_test.go | 10 ++++---- op-node/rollup/derive/calldata_source_test.go | 3 ++- op-node/rollup/derive/channel_bank_test.go | 3 ++- op-node/rollup/derive/deposit_log.go | 3 ++- op-node/rollup/derive/deposit_log_test.go | 5 ++-- op-node/rollup/derive/engine_queue_test.go | 3 ++- op-node/rollup/derive/fuzz_parsers_test.go | 5 ++-- op-node/rollup/derive/l1_block_info.go | 3 +-- op-node/rollup/derive/l1_block_info_test.go | 5 ++-- op-node/rollup/derive/l1_retrieval_test.go | 5 ++-- op-node/rollup/derive/l1_traversal_test.go | 3 ++- op-node/rollup/derive/payloads_queue_test.go | 3 ++- op-node/rollup/derive/pipeline_test.go | 3 ++- op-node/rollup/driver/conf_depth_test.go | 3 ++- op-node/rollup/driver/step.go | 1 - op-node/rollup/sync/start_test.go | 3 ++- op-node/rollup/types_test.go | 3 ++- op-node/service.go | 12 ++++------ op-node/sources/batching.go | 3 ++- op-node/sources/batching_test.go | 2 +- op-node/sources/eth_client_test.go | 5 ++-- op-node/sources/limit.go | 1 - op-node/sources/receipts.go | 4 +--- op-node/sources/types.go | 5 ++-- op-node/testutils/fake_chain.go | 6 ++--- op-node/testutils/mock_eth_client.go | 3 ++- op-node/testutils/random.go | 3 +-- op-proposer/cmd/main.go | 8 +++---- op-proposer/config.go | 7 +++--- op-proposer/flags/flags.go | 3 ++- op-proposer/l2_output_submitter.go | 14 +++++------ op-proposer/txmgr/send_state_test.go | 3 ++- op-proposer/txmgr/txmgr_test.go | 3 ++- 66 files changed, 180 insertions(+), 192 deletions(-) diff --git a/op-batcher/batch_submitter.go b/op-batcher/batch_submitter.go index fcd0aa148b08e..fd935b86ab1a3 100644 --- a/op-batcher/batch_submitter.go +++ b/op-batcher/batch_submitter.go @@ -21,7 +21,8 @@ import ( opmetrics "github.com/ethereum-optimism/optimism/op-service/metrics" oppprof "github.com/ethereum-optimism/optimism/op-service/pprof" oprpc "github.com/ethereum-optimism/optimism/op-service/rpc" - "github.com/ethereum/go-ethereum/rpc" + hdwallet "github.com/miguelmota/go-ethereum-hdwallet" + "github.com/urfave/cli" "github.com/ethereum-optimism/optimism/op-batcher/sequencer" "github.com/ethereum-optimism/optimism/op-node/eth" @@ -34,8 +35,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/log" - hdwallet "github.com/miguelmota/go-ethereum-hdwallet" - "github.com/urfave/cli" + "github.com/ethereum/go-ethereum/rpc" ) const ( diff --git a/op-batcher/cmd/main.go b/op-batcher/cmd/main.go index 79d2d02cfe2f5..864dec935a79f 100644 --- a/op-batcher/cmd/main.go +++ b/op-batcher/cmd/main.go @@ -4,13 +4,12 @@ import ( "fmt" "os" - oplog "github.com/ethereum-optimism/optimism/op-service/log" - - "github.com/ethereum/go-ethereum/log" "github.com/urfave/cli" batcher "github.com/ethereum-optimism/optimism/op-batcher" "github.com/ethereum-optimism/optimism/op-batcher/flags" + oplog "github.com/ethereum-optimism/optimism/op-service/log" + "github.com/ethereum/go-ethereum/log" ) var ( diff --git a/op-batcher/config.go b/op-batcher/config.go index a96372e681b82..3ac149a93e8fb 100644 --- a/op-batcher/config.go +++ b/op-batcher/config.go @@ -3,16 +3,13 @@ package op_batcher import ( "time" - oprpc "github.com/ethereum-optimism/optimism/op-service/rpc" - - opmetrics "github.com/ethereum-optimism/optimism/op-service/metrics" - - oplog "github.com/ethereum-optimism/optimism/op-service/log" - oppprof "github.com/ethereum-optimism/optimism/op-service/pprof" - "github.com/urfave/cli" "github.com/ethereum-optimism/optimism/op-batcher/flags" + oplog "github.com/ethereum-optimism/optimism/op-service/log" + opmetrics "github.com/ethereum-optimism/optimism/op-service/metrics" + oppprof "github.com/ethereum-optimism/optimism/op-service/pprof" + oprpc "github.com/ethereum-optimism/optimism/op-service/rpc" ) type Config struct { diff --git a/op-batcher/flags/flags.go b/op-batcher/flags/flags.go index 08852937f5f3d..defbe9728398d 100644 --- a/op-batcher/flags/flags.go +++ b/op-batcher/flags/flags.go @@ -1,12 +1,13 @@ package flags import ( + "github.com/urfave/cli" + opservice "github.com/ethereum-optimism/optimism/op-service" oplog "github.com/ethereum-optimism/optimism/op-service/log" opmetrics "github.com/ethereum-optimism/optimism/op-service/metrics" oppprof "github.com/ethereum-optimism/optimism/op-service/pprof" oprpc "github.com/ethereum-optimism/optimism/op-service/rpc" - "github.com/urfave/cli" ) const envVarPrefix = "OP_BATCHER" diff --git a/op-node/client/rpc.go b/op-node/client/rpc.go index 6bd7a1fe3c49f..755ef34446c73 100644 --- a/op-node/client/rpc.go +++ b/op-node/client/rpc.go @@ -3,9 +3,10 @@ package client import ( "context" + "github.com/prometheus/client_golang/prometheus" + "github.com/ethereum-optimism/optimism/op-node/metrics" "github.com/ethereum/go-ethereum/rpc" - "github.com/prometheus/client_golang/prometheus" ) type RPC interface { diff --git a/op-node/cmd/genesis/cmd.go b/op-node/cmd/genesis/cmd.go index b228ac9b00a1b..aa94bb3d71904 100644 --- a/op-node/cmd/genesis/cmd.go +++ b/op-node/cmd/genesis/cmd.go @@ -8,19 +8,17 @@ import ( "os" "path/filepath" + "github.com/urfave/cli" + "github.com/ethereum-optimism/optimism/op-bindings/hardhat" + "github.com/ethereum-optimism/optimism/op-bindings/predeploys" + "github.com/ethereum-optimism/optimism/op-chain-ops/genesis" + "github.com/ethereum-optimism/optimism/op-node/eth" + "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" - - "github.com/ethereum-optimism/optimism/op-bindings/predeploys" - "github.com/ethereum-optimism/optimism/op-node/eth" - "github.com/ethereum-optimism/optimism/op-node/rollup" - - "github.com/urfave/cli" - - "github.com/ethereum-optimism/optimism/op-chain-ops/genesis" ) var Subcommands = cli.Commands{ diff --git a/op-node/cmd/main.go b/op-node/cmd/main.go index 3985e0a265ebc..f51556ebb5f50 100644 --- a/op-node/cmd/main.go +++ b/op-node/cmd/main.go @@ -9,22 +9,17 @@ import ( "syscall" "time" - "github.com/ethereum-optimism/optimism/op-node/heartbeat" + "github.com/urfave/cli" + opnode "github.com/ethereum-optimism/optimism/op-node" "github.com/ethereum-optimism/optimism/op-node/cmd/genesis" "github.com/ethereum-optimism/optimism/op-node/cmd/p2p" - - "github.com/ethereum-optimism/optimism/op-node/metrics" - - opnode "github.com/ethereum-optimism/optimism/op-node" - - "github.com/ethereum-optimism/optimism/op-node/version" - "github.com/ethereum-optimism/optimism/op-node/flags" - + "github.com/ethereum-optimism/optimism/op-node/heartbeat" + "github.com/ethereum-optimism/optimism/op-node/metrics" "github.com/ethereum-optimism/optimism/op-node/node" + "github.com/ethereum-optimism/optimism/op-node/version" "github.com/ethereum/go-ethereum/log" - "github.com/urfave/cli" ) var ( diff --git a/op-node/eth/ssz_test.go b/op-node/eth/ssz_test.go index f6627b8ea8241..b4b6607ea1158 100644 --- a/op-node/eth/ssz_test.go +++ b/op-node/eth/ssz_test.go @@ -5,10 +5,10 @@ import ( "encoding/binary" "testing" + "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/require" "github.com/ethereum/go-ethereum/common" - "github.com/google/go-cmp/cmp" ) // FuzzExecutionPayloadUnmarshal checks that our SSZ decoding never panics diff --git a/op-node/eth/types.go b/op-node/eth/types.go index 17b9201f02e11..972a284777583 100644 --- a/op-node/eth/types.go +++ b/op-node/eth/types.go @@ -8,13 +8,13 @@ import ( "math/big" "reflect" - "github.com/ethereum/go-ethereum/trie" + "github.com/holiman/uint256" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/beacon" "github.com/ethereum/go-ethereum/core/types" - "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/trie" ) type ErrorCode int diff --git a/op-node/heartbeat/service_test.go b/op-node/heartbeat/service_test.go index 0ddf38d942d65..9aee553a55d60 100644 --- a/op-node/heartbeat/service_test.go +++ b/op-node/heartbeat/service_test.go @@ -8,8 +8,9 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/log" "github.com/stretchr/testify/require" + + "github.com/ethereum/go-ethereum/log" ) const expHeartbeat = `{ diff --git a/op-node/metrics/metrics.go b/op-node/metrics/metrics.go index 2051b03ff6fc5..13eacbbf64d32 100644 --- a/op-node/metrics/metrics.go +++ b/op-node/metrics/metrics.go @@ -10,16 +10,15 @@ import ( "strconv" "time" - "github.com/ethereum/go-ethereum/common" + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/collectors" + "github.com/prometheus/client_golang/prometheus/promauto" + "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum/go-ethereum" - "github.com/prometheus/client_golang/prometheus/collectors" - + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/rpc" - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/prometheus/client_golang/prometheus/promhttp" ) const ( diff --git a/op-node/node/comms.go b/op-node/node/comms.go index b84ada6bd9976..05a5c532167d7 100644 --- a/op-node/node/comms.go +++ b/op-node/node/comms.go @@ -3,8 +3,9 @@ package node import ( "context" - "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/libp2p/go-libp2p-core/peer" + + "github.com/ethereum-optimism/optimism/op-node/eth" ) // Tracer configures the OpNode to share events diff --git a/op-node/node/log.go b/op-node/node/log.go index 83030b11528fd..855fd4f06abe6 100644 --- a/op-node/node/log.go +++ b/op-node/node/log.go @@ -5,8 +5,9 @@ import ( "os" "strings" - "github.com/ethereum/go-ethereum/log" "golang.org/x/term" + + "github.com/ethereum/go-ethereum/log" ) type LogConfig struct { diff --git a/op-node/node/node.go b/op-node/node/node.go index e331ea1b84cc3..e1fbf98187a6a 100644 --- a/op-node/node/node.go +++ b/op-node/node/node.go @@ -5,9 +5,8 @@ import ( "fmt" "time" - "github.com/libp2p/go-libp2p-core/peer" - "github.com/hashicorp/go-multierror" + "github.com/libp2p/go-libp2p-core/peer" "github.com/ethereum-optimism/optimism/op-node/client" "github.com/ethereum-optimism/optimism/op-node/eth" @@ -15,7 +14,6 @@ import ( "github.com/ethereum-optimism/optimism/op-node/p2p" "github.com/ethereum-optimism/optimism/op-node/rollup/driver" "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" diff --git a/op-node/node/server.go b/op-node/node/server.go index 3782eec9e037f..c485747b795bc 100644 --- a/op-node/node/server.go +++ b/op-node/node/server.go @@ -7,14 +7,10 @@ import ( "net/http" "strconv" - "github.com/ethereum-optimism/optimism/op-node/sources" - "github.com/ethereum-optimism/optimism/op-node/metrics" - "github.com/ethereum-optimism/optimism/op-node/p2p" - "github.com/ethereum-optimism/optimism/op-node/rollup" - + "github.com/ethereum-optimism/optimism/op-node/sources" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/rpc" diff --git a/op-node/node/server_test.go b/op-node/node/server_test.go index 58ee2b6ba9053..bac92cf3c1b8a 100644 --- a/op-node/node/server_test.go +++ b/op-node/node/server_test.go @@ -4,28 +4,21 @@ import ( "context" "encoding/json" "math/rand" - - "github.com/ethereum/go-ethereum/rpc" - - "github.com/ethereum-optimism/optimism/op-node/testutils" - - "github.com/ethereum-optimism/optimism/op-node/metrics" - - "github.com/ethereum-optimism/optimism/op-node/version" - "testing" - "github.com/ethereum-optimism/optimism/op-node/testlog" - - "github.com/ethereum-optimism/optimism/op-node/eth" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" "github.com/ethereum-optimism/optimism/op-bindings/predeploys" + "github.com/ethereum-optimism/optimism/op-node/eth" + "github.com/ethereum-optimism/optimism/op-node/metrics" "github.com/ethereum-optimism/optimism/op-node/rollup" - "github.com/stretchr/testify/mock" - + "github.com/ethereum-optimism/optimism/op-node/testlog" + "github.com/ethereum-optimism/optimism/op-node/testutils" + "github.com/ethereum-optimism/optimism/op-node/version" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/log" - "github.com/stretchr/testify/assert" + "github.com/ethereum/go-ethereum/rpc" ) func TestOutputAtBlock(t *testing.T) { diff --git a/op-node/p2p/config.go b/op-node/p2p/config.go index e7905fdddbd24..b302869b2f771 100644 --- a/op-node/p2p/config.go +++ b/op-node/p2p/config.go @@ -11,11 +11,6 @@ import ( "strings" "time" - "github.com/ethereum-optimism/optimism/op-node/flags" - "github.com/ethereum-optimism/optimism/op-node/rollup" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/p2p/discover" - "github.com/ethereum/go-ethereum/p2p/enode" ds "github.com/ipfs/go-datastore" "github.com/ipfs/go-datastore/sync" leveldb "github.com/ipfs/go-ds-leveldb" @@ -34,6 +29,12 @@ import ( tls "github.com/libp2p/go-libp2p/p2p/security/tls" "github.com/multiformats/go-multiaddr" "github.com/urfave/cli" + + "github.com/ethereum-optimism/optimism/op-node/flags" + "github.com/ethereum-optimism/optimism/op-node/rollup" + "github.com/ethereum/go-ethereum/log" + "github.com/ethereum/go-ethereum/p2p/discover" + "github.com/ethereum/go-ethereum/p2p/enode" ) // SetupP2P provides a host and discovery service for usage in the rollup node. diff --git a/op-node/p2p/discovery.go b/op-node/p2p/discovery.go index c71e4e1f102fc..f82f2c4a6524e 100644 --- a/op-node/p2p/discovery.go +++ b/op-node/p2p/discovery.go @@ -13,6 +13,11 @@ import ( "github.com/btcsuite/btcd/btcec/v2" decredSecp "github.com/decred/dcrd/dcrec/secp256k1/v4" + "github.com/libp2p/go-libp2p-core/crypto" + "github.com/libp2p/go-libp2p-core/network" + "github.com/libp2p/go-libp2p-core/peer" + "github.com/multiformats/go-multiaddr" + "github.com/ethereum-optimism/optimism/op-node/rollup" gcrypto "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" @@ -20,10 +25,6 @@ import ( "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enr" "github.com/ethereum/go-ethereum/rlp" - "github.com/libp2p/go-libp2p-core/crypto" - "github.com/libp2p/go-libp2p-core/network" - "github.com/libp2p/go-libp2p-core/peer" - "github.com/multiformats/go-multiaddr" ) const ( diff --git a/op-node/p2p/gossip.go b/op-node/p2p/gossip.go index 61eb98e98bc9a..68746d2632a11 100644 --- a/op-node/p2p/gossip.go +++ b/op-node/p2p/gossip.go @@ -9,19 +9,18 @@ import ( "sync" "time" - "github.com/ethereum-optimism/optimism/op-node/eth" - - "github.com/ethereum/go-ethereum/common" - lru "github.com/hashicorp/golang-lru" - - "github.com/ethereum-optimism/optimism/op-node/rollup" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/log" "github.com/golang/snappy" + lru "github.com/hashicorp/golang-lru" "github.com/libp2p/go-libp2p-core/host" "github.com/libp2p/go-libp2p-core/peer" pubsub "github.com/libp2p/go-libp2p-pubsub" pb "github.com/libp2p/go-libp2p-pubsub/pb" + + "github.com/ethereum-optimism/optimism/op-node/eth" + "github.com/ethereum-optimism/optimism/op-node/rollup" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/log" ) func init() { diff --git a/op-node/p2p/host.go b/op-node/p2p/host.go index 52ecb5a8e6d53..4beba05f2a0d3 100644 --- a/op-node/p2p/host.go +++ b/op-node/p2p/host.go @@ -6,9 +6,7 @@ import ( "net" "time" - "github.com/ethereum/go-ethereum/log" "github.com/libp2p/go-libp2p-core/connmgr" - "github.com/libp2p/go-libp2p-core/host" "github.com/libp2p/go-libp2p-core/peer" "github.com/libp2p/go-libp2p-peerstore/pstoreds" @@ -17,6 +15,8 @@ import ( "github.com/libp2p/go-libp2p/p2p/transport/tcp" ma "github.com/multiformats/go-multiaddr" madns "github.com/multiformats/go-multiaddr-dns" + + "github.com/ethereum/go-ethereum/log" ) type ExtraHostFeatures interface { diff --git a/op-node/p2p/host_test.go b/op-node/p2p/host_test.go index 3cf9321bbb0a1..e5027f5ae1c06 100644 --- a/op-node/p2p/host_test.go +++ b/op-node/p2p/host_test.go @@ -8,15 +8,6 @@ import ( "testing" "time" - "github.com/ethereum-optimism/optimism/op-node/metrics" - - "github.com/ethereum-optimism/optimism/op-node/eth" - - "github.com/ethereum-optimism/optimism/op-node/rollup" - "github.com/ethereum-optimism/optimism/op-node/testlog" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/ethereum/go-ethereum/rpc" ds "github.com/ipfs/go-datastore" "github.com/ipfs/go-datastore/sync" "github.com/libp2p/go-libp2p-core/connmgr" @@ -28,6 +19,14 @@ import ( mocknet "github.com/libp2p/go-libp2p/p2p/net/mock" tswarm "github.com/libp2p/go-libp2p/p2p/net/swarm/testing" "github.com/stretchr/testify/require" + + "github.com/ethereum-optimism/optimism/op-node/eth" + "github.com/ethereum-optimism/optimism/op-node/metrics" + "github.com/ethereum-optimism/optimism/op-node/rollup" + "github.com/ethereum-optimism/optimism/op-node/testlog" + "github.com/ethereum/go-ethereum/log" + "github.com/ethereum/go-ethereum/p2p/enode" + "github.com/ethereum/go-ethereum/rpc" ) func TestingConfig(t *testing.T) *Config { diff --git a/op-node/p2p/node.go b/op-node/p2p/node.go index bcf7863baab17..e5741e01431ce 100644 --- a/op-node/p2p/node.go +++ b/op-node/p2p/node.go @@ -6,17 +6,17 @@ import ( "fmt" "strconv" + "github.com/hashicorp/go-multierror" + "github.com/libp2p/go-libp2p-core/connmgr" + "github.com/libp2p/go-libp2p-core/host" + pubsub "github.com/libp2p/go-libp2p-pubsub" + "github.com/libp2p/go-libp2p/p2p/protocol/identify" ma "github.com/multiformats/go-multiaddr" "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/p2p/discover" "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/hashicorp/go-multierror" - "github.com/libp2p/go-libp2p-core/connmgr" - "github.com/libp2p/go-libp2p-core/host" - pubsub "github.com/libp2p/go-libp2p-pubsub" - "github.com/libp2p/go-libp2p/p2p/protocol/identify" ) type NodeP2P struct { diff --git a/op-node/p2p/notifications.go b/op-node/p2p/notifications.go index f815626a4ae95..2a906bcf4512d 100644 --- a/op-node/p2p/notifications.go +++ b/op-node/p2p/notifications.go @@ -1,9 +1,10 @@ package p2p import ( - "github.com/ethereum/go-ethereum/log" "github.com/libp2p/go-libp2p-core/network" ma "github.com/multiformats/go-multiaddr" + + "github.com/ethereum/go-ethereum/log" ) // TODO: add metrics here as well diff --git a/op-node/p2p/prepared.go b/op-node/p2p/prepared.go index 9e269158a4f7d..70d6336c14c44 100644 --- a/op-node/p2p/prepared.go +++ b/op-node/p2p/prepared.go @@ -4,14 +4,13 @@ import ( "errors" "fmt" - "github.com/ethereum/go-ethereum/p2p/enr" + "github.com/libp2p/go-libp2p-core/host" "github.com/ethereum-optimism/optimism/op-node/rollup" - "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/p2p/discover" "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/libp2p/go-libp2p-core/host" + "github.com/ethereum/go-ethereum/p2p/enr" ) // Prepared provides a p2p host and discv5 service that is already set up. diff --git a/op-node/p2p/rpc_api.go b/op-node/p2p/rpc_api.go index 0e6a5831946f3..06bf0cba5758e 100644 --- a/op-node/p2p/rpc_api.go +++ b/op-node/p2p/rpc_api.go @@ -5,9 +5,10 @@ import ( "net" "time" - "github.com/ethereum/go-ethereum/p2p/enode" "github.com/libp2p/go-libp2p-core/network" "github.com/libp2p/go-libp2p-core/peer" + + "github.com/ethereum/go-ethereum/p2p/enode" ) type PeerInfo struct { diff --git a/op-node/p2p/rpc_client.go b/op-node/p2p/rpc_client.go index 375bd48a413c9..4aea75441a006 100644 --- a/op-node/p2p/rpc_client.go +++ b/op-node/p2p/rpc_client.go @@ -4,9 +4,10 @@ import ( "context" "net" + "github.com/libp2p/go-libp2p-core/peer" + "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/rpc" - "github.com/libp2p/go-libp2p-core/peer" ) var NamespaceRPC = "opp2p" diff --git a/op-node/p2p/rpc_server.go b/op-node/p2p/rpc_server.go index 8fd51efbeaa02..41e40e985873f 100644 --- a/op-node/p2p/rpc_server.go +++ b/op-node/p2p/rpc_server.go @@ -7,13 +7,7 @@ import ( "net" "time" - "github.com/ethereum-optimism/optimism/op-node/metrics" - decredSecp "github.com/decred/dcrd/dcrec/secp256k1/v4" - gcrypto "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/p2p/discover" - "github.com/ethereum/go-ethereum/p2p/enode" "github.com/libp2p/go-libp2p-core/connmgr" "github.com/libp2p/go-libp2p-core/crypto" "github.com/libp2p/go-libp2p-core/host" @@ -22,6 +16,12 @@ import ( "github.com/libp2p/go-libp2p-core/peerstore" pubsub "github.com/libp2p/go-libp2p-pubsub" "github.com/libp2p/go-libp2p-testing/netutil" + + "github.com/ethereum-optimism/optimism/op-node/metrics" + gcrypto "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/log" + "github.com/ethereum/go-ethereum/p2p/discover" + "github.com/ethereum/go-ethereum/p2p/enode" ) // TODO: dynamic peering diff --git a/op-node/p2p/signer.go b/op-node/p2p/signer.go index 5ac6d241aaf54..185117cc43b61 100644 --- a/op-node/p2p/signer.go +++ b/op-node/p2p/signer.go @@ -8,11 +8,12 @@ import ( "io" "math/big" + "github.com/urfave/cli" + "github.com/ethereum-optimism/optimism/op-node/flags" "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/urfave/cli" ) var SigningDomainBlocksV1 = [32]byte{} diff --git a/op-node/rollup/derive/attributes_queue_test.go b/op-node/rollup/derive/attributes_queue_test.go index 202af18d54ce1..226cfa82fd701 100644 --- a/op-node/rollup/derive/attributes_queue_test.go +++ b/op-node/rollup/derive/attributes_queue_test.go @@ -7,13 +7,14 @@ import ( "math/rand" "testing" + "github.com/stretchr/testify/require" + "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-node/testlog" "github.com/ethereum-optimism/optimism/op-node/testutils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" - "github.com/stretchr/testify/require" ) type MockAttributesQueueOutput struct { diff --git a/op-node/rollup/derive/attributes_test.go b/op-node/rollup/derive/attributes_test.go index ba0d2f73f6896..58d5662331807 100644 --- a/op-node/rollup/derive/attributes_test.go +++ b/op-node/rollup/derive/attributes_test.go @@ -8,12 +8,13 @@ import ( "math/rand" "testing" + "github.com/stretchr/testify/require" + "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-node/testutils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/stretchr/testify/require" ) func TestPreparePayloadAttributes(t *testing.T) { diff --git a/op-node/rollup/derive/batch.go b/op-node/rollup/derive/batch.go index bf35abf6cb758..65ac9c50757da 100644 --- a/op-node/rollup/derive/batch.go +++ b/op-node/rollup/derive/batch.go @@ -8,7 +8,6 @@ import ( "sync" "github.com/ethereum-optimism/optimism/op-node/eth" - "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" diff --git a/op-node/rollup/derive/batch_queue_test.go b/op-node/rollup/derive/batch_queue_test.go index e72fa155c92ae..9c001d5af5cd6 100644 --- a/op-node/rollup/derive/batch_queue_test.go +++ b/op-node/rollup/derive/batch_queue_test.go @@ -7,15 +7,15 @@ import ( "math/rand" "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/require" "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-node/testlog" "github.com/ethereum-optimism/optimism/op-node/testutils" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/log" - "github.com/stretchr/testify/require" ) // fakeBatchQueueOutput fakes the next stage (receive only) for the batch queue diff --git a/op-node/rollup/derive/batch_test.go b/op-node/rollup/derive/batch_test.go index d32af588e07b6..bcc990d65bbad 100644 --- a/op-node/rollup/derive/batch_test.go +++ b/op-node/rollup/derive/batch_test.go @@ -3,10 +3,10 @@ package derive import ( "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/assert" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/stretchr/testify/assert" ) func TestBatchRoundTrip(t *testing.T) { diff --git a/op-node/rollup/derive/batches_test.go b/op-node/rollup/derive/batches_test.go index d51aaba2df1a6..1bedbb47ebdbf 100644 --- a/op-node/rollup/derive/batches_test.go +++ b/op-node/rollup/derive/batches_test.go @@ -4,16 +4,16 @@ import ( "math/rand" "testing" - "github.com/ethereum-optimism/optimism/op-node/testlog" - "github.com/ethereum-optimism/optimism/op-node/testutils" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/log" "github.com/stretchr/testify/require" "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/rollup" + "github.com/ethereum-optimism/optimism/op-node/testlog" + "github.com/ethereum-optimism/optimism/op-node/testutils" "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/log" ) type ValidBatchTestCase struct { diff --git a/op-node/rollup/derive/calldata_source_test.go b/op-node/rollup/derive/calldata_source_test.go index f4cac29934003..a7b598b87e418 100644 --- a/op-node/rollup/derive/calldata_source_test.go +++ b/op-node/rollup/derive/calldata_source_test.go @@ -9,6 +9,8 @@ import ( "math/rand" "testing" + "github.com/stretchr/testify/require" + "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-node/testlog" @@ -18,7 +20,6 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" - "github.com/stretchr/testify/require" ) type testTx struct { diff --git a/op-node/rollup/derive/channel_bank_test.go b/op-node/rollup/derive/channel_bank_test.go index f8b294ffbe6e1..9f642591a9f5f 100644 --- a/op-node/rollup/derive/channel_bank_test.go +++ b/op-node/rollup/derive/channel_bank_test.go @@ -8,12 +8,13 @@ import ( "strings" "testing" + "github.com/stretchr/testify/require" + "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-node/testlog" "github.com/ethereum-optimism/optimism/op-node/testutils" "github.com/ethereum/go-ethereum/log" - "github.com/stretchr/testify/require" ) type MockChannelBankOutput struct { diff --git a/op-node/rollup/derive/deposit_log.go b/op-node/rollup/derive/deposit_log.go index d18fdcefb854b..1a217a8c84feb 100644 --- a/op-node/rollup/derive/deposit_log.go +++ b/op-node/rollup/derive/deposit_log.go @@ -5,10 +5,11 @@ import ( "fmt" "math/big" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" - "github.com/holiman/uint256" ) var ( diff --git a/op-node/rollup/derive/deposit_log_test.go b/op-node/rollup/derive/deposit_log_test.go index 0d43e7488dba1..948b041521229 100644 --- a/op-node/rollup/derive/deposit_log_test.go +++ b/op-node/rollup/derive/deposit_log_test.go @@ -5,11 +5,12 @@ import ( "math/rand" "testing" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/ethereum-optimism/optimism/op-node/testutils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) func TestUnmarshalLogEvent(t *testing.T) { diff --git a/op-node/rollup/derive/engine_queue_test.go b/op-node/rollup/derive/engine_queue_test.go index 6b59c99619d6f..9506bc0733214 100644 --- a/op-node/rollup/derive/engine_queue_test.go +++ b/op-node/rollup/derive/engine_queue_test.go @@ -4,13 +4,14 @@ import ( "math/rand" "testing" + "github.com/stretchr/testify/require" + "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-node/testlog" "github.com/ethereum-optimism/optimism/op-node/testutils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" - "github.com/stretchr/testify/require" ) func TestEngineQueue_Finalize(t *testing.T) { diff --git a/op-node/rollup/derive/fuzz_parsers_test.go b/op-node/rollup/derive/fuzz_parsers_test.go index 2f47fce679328..9fd047feca50c 100644 --- a/op-node/rollup/derive/fuzz_parsers_test.go +++ b/op-node/rollup/derive/fuzz_parsers_test.go @@ -5,6 +5,9 @@ import ( "math/big" "testing" + "github.com/google/go-cmp/cmp" + "github.com/stretchr/testify/require" + "github.com/ethereum-optimism/optimism/op-bindings/bindings" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" @@ -14,8 +17,6 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm/runtime" "github.com/ethereum/go-ethereum/crypto" - "github.com/google/go-cmp/cmp" - "github.com/stretchr/testify/require" ) var ( diff --git a/op-node/rollup/derive/l1_block_info.go b/op-node/rollup/derive/l1_block_info.go index 49fa4c43fc136..a53387c54d00b 100644 --- a/op-node/rollup/derive/l1_block_info.go +++ b/op-node/rollup/derive/l1_block_info.go @@ -6,9 +6,8 @@ import ( "fmt" "math/big" - "github.com/ethereum-optimism/optimism/op-node/eth" - "github.com/ethereum-optimism/optimism/op-bindings/predeploys" + "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" diff --git a/op-node/rollup/derive/l1_block_info_test.go b/op-node/rollup/derive/l1_block_info_test.go index 9466c41c9ce73..134bab4e50846 100644 --- a/op-node/rollup/derive/l1_block_info_test.go +++ b/op-node/rollup/derive/l1_block_info_test.go @@ -5,11 +5,12 @@ import ( "math/rand" "testing" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/testutils" "github.com/ethereum/go-ethereum/common" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) var _ eth.BlockInfo = (*testutils.MockBlockInfo)(nil) diff --git a/op-node/rollup/derive/l1_retrieval_test.go b/op-node/rollup/derive/l1_retrieval_test.go index efd592f77fd2b..32f60e5b9a551 100644 --- a/op-node/rollup/derive/l1_retrieval_test.go +++ b/op-node/rollup/derive/l1_retrieval_test.go @@ -5,12 +5,13 @@ import ( "math/rand" "testing" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/testlog" "github.com/ethereum-optimism/optimism/op-node/testutils" "github.com/ethereum/go-ethereum/log" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" ) type MockDataSource struct { diff --git a/op-node/rollup/derive/l1_traversal_test.go b/op-node/rollup/derive/l1_traversal_test.go index c88a2d5bec728..66f0e459cafb1 100644 --- a/op-node/rollup/derive/l1_traversal_test.go +++ b/op-node/rollup/derive/l1_traversal_test.go @@ -5,11 +5,12 @@ import ( "math/rand" "testing" + "github.com/stretchr/testify/require" + "github.com/ethereum-optimism/optimism/op-node/testlog" "github.com/ethereum-optimism/optimism/op-node/testutils" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/log" - "github.com/stretchr/testify/require" ) func TestL1Traversal_Step(t *testing.T) { diff --git a/op-node/rollup/derive/payloads_queue_test.go b/op-node/rollup/derive/payloads_queue_test.go index 8b4deb21888f4..49890228fe794 100644 --- a/op-node/rollup/derive/payloads_queue_test.go +++ b/op-node/rollup/derive/payloads_queue_test.go @@ -4,8 +4,9 @@ import ( "container/heap" "testing" - "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/stretchr/testify/require" + + "github.com/ethereum-optimism/optimism/op-node/eth" ) func TestPayloadsByNumber(t *testing.T) { diff --git a/op-node/rollup/derive/pipeline_test.go b/op-node/rollup/derive/pipeline_test.go index 958de481f6b86..427fb16760051 100644 --- a/op-node/rollup/derive/pipeline_test.go +++ b/op-node/rollup/derive/pipeline_test.go @@ -5,9 +5,10 @@ import ( "io" "testing" + "github.com/stretchr/testify/mock" + "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/testutils" - "github.com/stretchr/testify/mock" ) var _ Engine = (*testutils.MockEngine)(nil) diff --git a/op-node/rollup/driver/conf_depth_test.go b/op-node/rollup/driver/conf_depth_test.go index 291da4f9b71c8..b8e3755c6a2b9 100644 --- a/op-node/rollup/driver/conf_depth_test.go +++ b/op-node/rollup/driver/conf_depth_test.go @@ -4,10 +4,11 @@ import ( "context" "testing" + "github.com/stretchr/testify/require" + "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/testutils" "github.com/ethereum/go-ethereum" - "github.com/stretchr/testify/require" ) type confTest struct { diff --git a/op-node/rollup/driver/step.go b/op-node/rollup/driver/step.go index c27d93d425868..983ad2218ce86 100644 --- a/op-node/rollup/driver/step.go +++ b/op-node/rollup/driver/step.go @@ -8,7 +8,6 @@ import ( "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" ) diff --git a/op-node/rollup/sync/start_test.go b/op-node/rollup/sync/start_test.go index eb83760e3194d..93606dc0c3593 100644 --- a/op-node/rollup/sync/start_test.go +++ b/op-node/rollup/sync/start_test.go @@ -4,13 +4,14 @@ import ( "context" "testing" + "github.com/stretchr/testify/require" + "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-node/testlog" "github.com/ethereum-optimism/optimism/op-node/testutils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" - "github.com/stretchr/testify/require" ) var _ L1Chain = (*testutils.FakeChainSource)(nil) diff --git a/op-node/rollup/types_test.go b/op-node/rollup/types_test.go index 19895522cba4d..6baf10f463d05 100644 --- a/op-node/rollup/types_test.go +++ b/op-node/rollup/types_test.go @@ -7,9 +7,10 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" + "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum/go-ethereum/common" - "github.com/stretchr/testify/assert" ) func randConfig() *Config { diff --git a/op-node/service.go b/op-node/service.go index 86e1767266295..099fb0ebd3acb 100644 --- a/op-node/service.go +++ b/op-node/service.go @@ -8,18 +8,16 @@ import ( "os" "strings" - "github.com/ethereum-optimism/optimism/op-node/rollup/driver" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - - "github.com/ethereum/go-ethereum/log" + "github.com/urfave/cli" "github.com/ethereum-optimism/optimism/op-node/flags" "github.com/ethereum-optimism/optimism/op-node/node" "github.com/ethereum-optimism/optimism/op-node/p2p" "github.com/ethereum-optimism/optimism/op-node/rollup" - "github.com/urfave/cli" + "github.com/ethereum-optimism/optimism/op-node/rollup/driver" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/log" ) // NewConfig creates a Config from the provided flags or environment variables. diff --git a/op-node/sources/batching.go b/op-node/sources/batching.go index ebaa9e5fd5088..e5bc5c3b7013d 100644 --- a/op-node/sources/batching.go +++ b/op-node/sources/batching.go @@ -7,8 +7,9 @@ import ( "sync" "sync/atomic" - "github.com/ethereum/go-ethereum/rpc" "github.com/hashicorp/go-multierror" + + "github.com/ethereum/go-ethereum/rpc" ) // IterativeBatchCall is an util to create a job to fetch many RPC requests in batches, diff --git a/op-node/sources/batching_test.go b/op-node/sources/batching_test.go index 1e75f69d74f31..1e555ddc5b8e3 100644 --- a/op-node/sources/batching_test.go +++ b/op-node/sources/batching_test.go @@ -8,10 +8,10 @@ import ( "testing" "time" + "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "github.com/ethereum/go-ethereum/rpc" - "github.com/stretchr/testify/mock" ) type elemCall struct { diff --git a/op-node/sources/eth_client_test.go b/op-node/sources/eth_client_test.go index d4dbabfca887f..16535f3888584 100644 --- a/op-node/sources/eth_client_test.go +++ b/op-node/sources/eth_client_test.go @@ -6,6 +6,9 @@ import ( "math/rand" "testing" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + "github.com/ethereum-optimism/optimism/op-node/client" "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/rollup" @@ -13,8 +16,6 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rpc" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" ) type mockRPC struct { diff --git a/op-node/sources/limit.go b/op-node/sources/limit.go index 4e5affda531c3..9de8933ffe596 100644 --- a/op-node/sources/limit.go +++ b/op-node/sources/limit.go @@ -5,7 +5,6 @@ import ( "sync" "github.com/ethereum-optimism/optimism/op-node/client" - "github.com/ethereum/go-ethereum/rpc" ) diff --git a/op-node/sources/receipts.go b/op-node/sources/receipts.go index 38d7c60f707bf..1b917dac4e58a 100644 --- a/op-node/sources/receipts.go +++ b/op-node/sources/receipts.go @@ -4,12 +4,10 @@ import ( "fmt" "github.com/ethereum-optimism/optimism/op-node/eth" - "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/trie" - - "github.com/ethereum/go-ethereum/core/types" ) func makeReceiptsFn(block eth.BlockID, receiptHash common.Hash) func(txHashes []common.Hash, receipts []*types.Receipt) (types.Receipts, error) { diff --git a/op-node/sources/types.go b/op-node/sources/types.go index 6cf592cc7549f..7ed84cc48138a 100644 --- a/op-node/sources/types.go +++ b/op-node/sources/types.go @@ -5,14 +5,13 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/common/hexutil" "github.com/holiman/uint256" - "github.com/ethereum/go-ethereum/rpc" - "github.com/ethereum-optimism/optimism/op-node/eth" "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/rpc" "github.com/ethereum/go-ethereum/trie" ) diff --git a/op-node/testutils/fake_chain.go b/op-node/testutils/fake_chain.go index da2d5f643cc78..543023d6dca5b 100644 --- a/op-node/testutils/fake_chain.go +++ b/op-node/testutils/fake_chain.go @@ -6,13 +6,11 @@ import ( "fmt" "math/big" + "github.com/ethereum-optimism/optimism/op-node/eth" + "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum/go-ethereum" - "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/rollup" ) func FakeGenesis(l1 rune, l2 rune, l1GenesisNumber int) rollup.Genesis { diff --git a/op-node/testutils/mock_eth_client.go b/op-node/testutils/mock_eth_client.go index fc3b9398fb8ee..31dfe04bc1a87 100644 --- a/op-node/testutils/mock_eth_client.go +++ b/op-node/testutils/mock_eth_client.go @@ -3,11 +3,12 @@ package testutils import ( "context" + "github.com/stretchr/testify/mock" + "github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rpc" - "github.com/stretchr/testify/mock" ) type MockEthClient struct { diff --git a/op-node/testutils/random.go b/op-node/testutils/random.go index 3f417bdf9ca2b..34c5743fee139 100644 --- a/op-node/testutils/random.go +++ b/op-node/testutils/random.go @@ -6,9 +6,8 @@ import ( "math/rand" "github.com/ethereum-optimism/optimism/op-node/eth" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" ) func RandomHash(rng *rand.Rand) (out common.Hash) { diff --git a/op-proposer/cmd/main.go b/op-proposer/cmd/main.go index b546b061326b7..e58dd2ef680cb 100644 --- a/op-proposer/cmd/main.go +++ b/op-proposer/cmd/main.go @@ -4,14 +4,12 @@ import ( "fmt" "os" - oplog "github.com/ethereum-optimism/optimism/op-service/log" - - proposer "github.com/ethereum-optimism/optimism/op-proposer" - - "github.com/ethereum/go-ethereum/log" "github.com/urfave/cli" + proposer "github.com/ethereum-optimism/optimism/op-proposer" "github.com/ethereum-optimism/optimism/op-proposer/flags" + oplog "github.com/ethereum-optimism/optimism/op-service/log" + "github.com/ethereum/go-ethereum/log" ) var ( diff --git a/op-proposer/config.go b/op-proposer/config.go index c51e1c6806bf3..95b25ec99621d 100644 --- a/op-proposer/config.go +++ b/op-proposer/config.go @@ -3,14 +3,13 @@ package op_proposer import ( "time" + "github.com/urfave/cli" + + "github.com/ethereum-optimism/optimism/op-proposer/flags" oplog "github.com/ethereum-optimism/optimism/op-service/log" opmetrics "github.com/ethereum-optimism/optimism/op-service/metrics" oppprof "github.com/ethereum-optimism/optimism/op-service/pprof" oprpc "github.com/ethereum-optimism/optimism/op-service/rpc" - - "github.com/urfave/cli" - - "github.com/ethereum-optimism/optimism/op-proposer/flags" ) type Config struct { diff --git a/op-proposer/flags/flags.go b/op-proposer/flags/flags.go index 18def7eb6917d..4550c14b42a8d 100644 --- a/op-proposer/flags/flags.go +++ b/op-proposer/flags/flags.go @@ -1,12 +1,13 @@ package flags import ( + "github.com/urfave/cli" + opservice "github.com/ethereum-optimism/optimism/op-service" oplog "github.com/ethereum-optimism/optimism/op-service/log" opmetrics "github.com/ethereum-optimism/optimism/op-service/metrics" oppprof "github.com/ethereum-optimism/optimism/op-service/pprof" oprpc "github.com/ethereum-optimism/optimism/op-service/rpc" - "github.com/urfave/cli" ) const envVarPrefix = "OP_PROPOSER" diff --git a/op-proposer/l2_output_submitter.go b/op-proposer/l2_output_submitter.go index 373f23a7f4617..064d08ba21ea8 100644 --- a/op-proposer/l2_output_submitter.go +++ b/op-proposer/l2_output_submitter.go @@ -12,24 +12,22 @@ import ( "syscall" "time" - "github.com/ethereum-optimism/optimism/op-node/sources" - - "github.com/ethereum/go-ethereum/crypto" + hdwallet "github.com/miguelmota/go-ethereum-hdwallet" + "github.com/urfave/cli" + "github.com/ethereum-optimism/optimism/op-node/sources" + "github.com/ethereum-optimism/optimism/op-proposer/drivers/l2output" + "github.com/ethereum-optimism/optimism/op-proposer/txmgr" oplog "github.com/ethereum-optimism/optimism/op-service/log" opmetrics "github.com/ethereum-optimism/optimism/op-service/metrics" oppprof "github.com/ethereum-optimism/optimism/op-service/pprof" oprpc "github.com/ethereum-optimism/optimism/op-service/rpc" - - "github.com/ethereum-optimism/optimism/op-proposer/drivers/l2output" - "github.com/ethereum-optimism/optimism/op-proposer/txmgr" "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/rpc" - hdwallet "github.com/miguelmota/go-ethereum-hdwallet" - "github.com/urfave/cli" ) const ( diff --git a/op-proposer/txmgr/send_state_test.go b/op-proposer/txmgr/send_state_test.go index d0c5a1c960cf0..9c43dcbae1de2 100644 --- a/op-proposer/txmgr/send_state_test.go +++ b/op-proposer/txmgr/send_state_test.go @@ -4,10 +4,11 @@ import ( "errors" "testing" + "github.com/stretchr/testify/require" + "github.com/ethereum-optimism/optimism/op-proposer/txmgr" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" - "github.com/stretchr/testify/require" ) const testSafeAbortNonceTooLowCount = 3 diff --git a/op-proposer/txmgr/txmgr_test.go b/op-proposer/txmgr/txmgr_test.go index ad47beaa9fb8b..9016ae6f692fa 100644 --- a/op-proposer/txmgr/txmgr_test.go +++ b/op-proposer/txmgr/txmgr_test.go @@ -8,12 +8,13 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/ethereum-optimism/optimism/op-proposer/txmgr" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/log" - "github.com/stretchr/testify/require" ) // testHarness houses the necessary resources to test the SimpleTxManager. From f012ada41da5f457853e03a443c7e013df4e15ad Mon Sep 17 00:00:00 2001 From: Matthew Slipper Date: Sat, 10 Sep 2022 14:55:56 -0600 Subject: [PATCH 20/32] contracts-bedrock: Fix deployment script (#3410) * contracts-bedrock: Fix deployment script * Don't lint more files --- .circleci/config.yml | 2 +- .../contracts-bedrock/deploy/001-InitImplementations.deploy.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 301aa3d890fb3..3ae46e08cf45a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -175,7 +175,7 @@ jobs: fi - run: name: check go bindings - command: make && git diff --exit-code + command: make && git diff --exit-code -- ':!*_more.go' working_directory: op-bindings js-lint-test: diff --git a/packages/contracts-bedrock/deploy/001-InitImplementations.deploy.ts b/packages/contracts-bedrock/deploy/001-InitImplementations.deploy.ts index 4da9bac284d07..933c92f8aee08 100644 --- a/packages/contracts-bedrock/deploy/001-InitImplementations.deploy.ts +++ b/packages/contracts-bedrock/deploy/001-InitImplementations.deploy.ts @@ -109,7 +109,7 @@ const deployFn: DeployFunction = async (hre) => { const upgradeTxs: any[] = [] for (const [proxy, upgrader] of Object.entries(upgradeABIs)) { - const upgraderOut = await upgrader(deployConfig, hre) + const upgraderOut = await upgrader(deployConfig) const implName = proxy.replace('Proxy', '') const implDeployment = await get(implName) const implContract = await hre.ethers.getContractAt( From 7d6cca224f651d2b93a06fdf33a6e7c2a210ed2a Mon Sep 17 00:00:00 2001 From: Mark Tyneway Date: Sat, 10 Sep 2022 14:31:27 -0700 Subject: [PATCH 21/32] op-bindings: regenerate (#3412) --- op-bindings/Makefile | 2 +- op-bindings/bindings/erc20.go | 2 +- op-bindings/bindings/gaspriceoracle_more.go | 2 +- op-bindings/bindings/governancetoken_more.go | 2 +- op-bindings/bindings/legacyerc20eth_more.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/op-bindings/Makefile b/op-bindings/Makefile index 8f2b6937f1de0..8fd83893deb6c 100644 --- a/op-bindings/Makefile +++ b/op-bindings/Makefile @@ -73,7 +73,7 @@ proxy-admin-bindings: compile ./gen_bindings.sh contracts/universal/ProxyAdmin.sol:ProxyAdmin $(pkg) erc20-bindings: compile - ./gen_bindings.sh ERC20 $(pkg) + ./gen_bindings.sh node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol:ERC20 $(pkg) weth9-bindings: compile ./gen_bindings.sh contracts/vendor/WETH9.sol:WETH9 $(pkg) diff --git a/op-bindings/bindings/erc20.go b/op-bindings/bindings/erc20.go index 67a5950ed1e01..766f6eb69b117 100644 --- a/op-bindings/bindings/erc20.go +++ b/op-bindings/bindings/erc20.go @@ -31,7 +31,7 @@ var ( // ERC20MetaData contains all meta data concerning the ERC20 contract. var ERC20MetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60806040523480156200001157600080fd5b5060405162000dd338038062000dd38339810160408190526200003491620001db565b81516200004990600390602085019062000068565b5080516200005f90600490602084019062000068565b50505062000282565b828054620000769062000245565b90600052602060002090601f0160209004810192826200009a5760008555620000e5565b82601f10620000b557805160ff1916838001178555620000e5565b82800160010185558215620000e5579182015b82811115620000e5578251825591602001919060010190620000c8565b50620000f3929150620000f7565b5090565b5b80821115620000f35760008155600101620000f8565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200013657600080fd5b81516001600160401b03808211156200015357620001536200010e565b604051601f8301601f19908116603f011681019082821181831017156200017e576200017e6200010e565b816040528381526020925086838588010111156200019b57600080fd5b600091505b83821015620001bf5785820183015181830184015290820190620001a0565b83821115620001d15760008385830101525b9695505050505050565b60008060408385031215620001ef57600080fd5b82516001600160401b03808211156200020757600080fd5b620002158683870162000124565b935060208501519150808211156200022c57600080fd5b506200023b8582860162000124565b9150509250929050565b600181811c908216806200025a57607f821691505b602082108114156200027c57634e487b7160e01b600052602260045260246000fd5b50919050565b610b4180620002926000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80633950935111610081578063a457c2d71161005b578063a457c2d714610194578063a9059cbb146101a7578063dd62ed3e146101ba57600080fd5b8063395093511461014357806370a082311461015657806395d89b411461018c57600080fd5b806318160ddd116100b257806318160ddd1461010f57806323b872dd14610121578063313ce5671461013457600080fd5b806306fdde03146100ce578063095ea7b3146100ec575b600080fd5b6100d6610200565b6040516100e3919061094a565b60405180910390f35b6100ff6100fa3660046109e6565b610292565b60405190151581526020016100e3565b6002545b6040519081526020016100e3565b6100ff61012f366004610a10565b6102aa565b604051601281526020016100e3565b6100ff6101513660046109e6565b6102ce565b610113610164366004610a4c565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6100d661031a565b6100ff6101a23660046109e6565b610329565b6100ff6101b53660046109e6565b6103ff565b6101136101c8366004610a6e565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b60606003805461020f90610aa1565b80601f016020809104026020016040519081016040528092919081815260200182805461023b90610aa1565b80156102885780601f1061025d57610100808354040283529160200191610288565b820191906000526020600020905b81548152906001019060200180831161026b57829003601f168201915b5050505050905090565b6000336102a081858561040d565b5060019392505050565b6000336102b88582856105c0565b6102c3858585610697565b506001949350505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091906102a09082908690610315908790610af5565b61040d565b60606004805461020f90610aa1565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168452909152812054909190838110156103f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6102c3828686840361040d565b6000336102a0818585610697565b73ffffffffffffffffffffffffffffffffffffffff83166104af576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016103e9565b73ffffffffffffffffffffffffffffffffffffffff8216610552576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016103e9565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146106915781811015610684576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016103e9565b610691848484840361040d565b50505050565b73ffffffffffffffffffffffffffffffffffffffff831661073a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016103e9565b73ffffffffffffffffffffffffffffffffffffffff82166107dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016103e9565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610893576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016103e9565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152602081905260408082208585039055918516815290812080548492906108d7908490610af5565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161093d91815260200190565b60405180910390a3610691565b600060208083528351808285015260005b818110156109775785810183015185820160400152820161095b565b81811115610989576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146109e157600080fd5b919050565b600080604083850312156109f957600080fd5b610a02836109bd565b946020939093013593505050565b600080600060608486031215610a2557600080fd5b610a2e846109bd565b9250610a3c602085016109bd565b9150604084013590509250925092565b600060208284031215610a5e57600080fd5b610a67826109bd565b9392505050565b60008060408385031215610a8157600080fd5b610a8a836109bd565b9150610a98602084016109bd565b90509250929050565b600181811c90821680610ab557607f821691505b60208210811415610aef577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60008219821115610b2f577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50019056fea164736f6c634300080c000a", + Bin: "0x60806040523480156200001157600080fd5b5060405162000e3c38038062000e3c833981016040819052620000349162000127565b600362000042838262000220565b50600462000051828262000220565b505050620002ec565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008257600080fd5b81516001600160401b03808211156200009f576200009f6200005a565b604051601f8301601f19908116603f01168101908282118183101715620000ca57620000ca6200005a565b81604052838152602092508683858801011115620000e757600080fd5b600091505b838210156200010b5785820183015181830184015290820190620000ec565b838211156200011d5760008385830101525b9695505050505050565b600080604083850312156200013b57600080fd5b82516001600160401b03808211156200015357600080fd5b620001618683870162000070565b935060208501519150808211156200017857600080fd5b50620001878582860162000070565b9150509250929050565b600181811c90821680620001a657607f821691505b602082108103620001c757634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021b57600081815260208120601f850160051c81016020861015620001f65750805b601f850160051c820191505b81811015620002175782815560010162000202565b5050505b505050565b81516001600160401b038111156200023c576200023c6200005a565b62000254816200024d845462000191565b84620001cd565b602080601f8311600181146200028c5760008415620002735750858301515b600019600386901b1c1916600185901b17855562000217565b600085815260208120601f198616915b82811015620002bd578886015182559484019460019091019084016200029c565b5085821015620002dc5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b610b4080620002fc6000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80633950935111610081578063a457c2d71161005b578063a457c2d714610194578063a9059cbb146101a7578063dd62ed3e146101ba57600080fd5b8063395093511461014357806370a082311461015657806395d89b411461018c57600080fd5b806318160ddd116100b257806318160ddd1461010f57806323b872dd14610121578063313ce5671461013457600080fd5b806306fdde03146100ce578063095ea7b3146100ec575b600080fd5b6100d6610200565b6040516100e3919061094a565b60405180910390f35b6100ff6100fa3660046109e6565b610292565b60405190151581526020016100e3565b6002545b6040519081526020016100e3565b6100ff61012f366004610a10565b6102aa565b604051601281526020016100e3565b6100ff6101513660046109e6565b6102ce565b610113610164366004610a4c565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6100d661031a565b6100ff6101a23660046109e6565b610329565b6100ff6101b53660046109e6565b6103ff565b6101136101c8366004610a6e565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b60606003805461020f90610aa1565b80601f016020809104026020016040519081016040528092919081815260200182805461023b90610aa1565b80156102885780601f1061025d57610100808354040283529160200191610288565b820191906000526020600020905b81548152906001019060200180831161026b57829003601f168201915b5050505050905090565b6000336102a081858561040d565b5060019392505050565b6000336102b88582856105c0565b6102c3858585610697565b506001949350505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091906102a09082908690610315908790610af4565b61040d565b60606004805461020f90610aa1565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168452909152812054909190838110156103f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6102c3828686840361040d565b6000336102a0818585610697565b73ffffffffffffffffffffffffffffffffffffffff83166104af576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016103e9565b73ffffffffffffffffffffffffffffffffffffffff8216610552576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016103e9565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146106915781811015610684576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016103e9565b610691848484840361040d565b50505050565b73ffffffffffffffffffffffffffffffffffffffff831661073a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016103e9565b73ffffffffffffffffffffffffffffffffffffffff82166107dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016103e9565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610893576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016103e9565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152602081905260408082208585039055918516815290812080548492906108d7908490610af4565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161093d91815260200190565b60405180910390a3610691565b600060208083528351808285015260005b818110156109775785810183015185820160400152820161095b565b81811115610989576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146109e157600080fd5b919050565b600080604083850312156109f957600080fd5b610a02836109bd565b946020939093013593505050565b600080600060608486031215610a2557600080fd5b610a2e846109bd565b9250610a3c602085016109bd565b9150604084013590509250925092565b600060208284031215610a5e57600080fd5b610a67826109bd565b9392505050565b60008060408385031215610a8157600080fd5b610a8a836109bd565b9150610a98602084016109bd565b90509250929050565b600181811c90821680610ab557607f821691505b602082108103610aee577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60008219821115610b2e577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50019056fea164736f6c634300080f000a", } // ERC20ABI is the input ABI used to generate the binding from. diff --git a/op-bindings/bindings/gaspriceoracle_more.go b/op-bindings/bindings/gaspriceoracle_more.go index b3c5bb00c6963..20d4c7b2560d4 100755 --- a/op-bindings/bindings/gaspriceoracle_more.go +++ b/op-bindings/bindings/gaspriceoracle_more.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum-optimism/optimism/op-bindings/solc" ) -const GasPriceOracleStorageLayoutJSON = "{\"storage\":[{\"astId\":26650,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":1649,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer0\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"},{\"astId\":1652,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer1\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":1655,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"overhead\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_uint256\"},{\"astId\":1658,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"scalar\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_uint256\"},{\"astId\":1661,\"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\":50016,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":1649,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer0\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"},{\"astId\":1652,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer1\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":1655,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"overhead\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_uint256\"},{\"astId\":1658,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"scalar\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_uint256\"},{\"astId\":1661,\"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) diff --git a/op-bindings/bindings/governancetoken_more.go b/op-bindings/bindings/governancetoken_more.go index cc436f10e16ec..39aecc6dfa6c7 100755 --- a/op-bindings/bindings/governancetoken_more.go +++ b/op-bindings/bindings/governancetoken_more.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum-optimism/optimism/op-bindings/solc" ) -const GovernanceTokenStorageLayoutJSON = "{\"storage\":[{\"astId\":3627,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_balances\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":3633,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_allowances\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"},{\"astId\":3635,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_totalSupply\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":3637,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_name\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_string_storage\"},{\"astId\":3639,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_symbol\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_string_storage\"},{\"astId\":882,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_nonces\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_mapping(t_address,t_struct(Counter)1037_storage)\"},{\"astId\":890,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_PERMIT_TYPEHASH_DEPRECATED_SLOT\",\"offset\":0,\"slot\":\"6\",\"type\":\"t_bytes32\"},{\"astId\":248,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_delegates\",\"offset\":0,\"slot\":\"7\",\"type\":\"t_mapping(t_address,t_address)\"},{\"astId\":254,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_checkpoints\",\"offset\":0,\"slot\":\"8\",\"type\":\"t_mapping(t_address,t_array(t_struct(Checkpoint)239_storage)dyn_storage)\"},{\"astId\":258,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_totalSupplyCheckpoints\",\"offset\":0,\"slot\":\"9\",\"type\":\"t_array(t_struct(Checkpoint)239_storage)dyn_storage\"},{\"astId\":3506,\"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)239_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)239_storage)dyn_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct ERC20Votes.Checkpoint[])\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_array(t_struct(Checkpoint)239_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)1037_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct Counters.Counter)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_struct(Counter)1037_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)239_storage\":{\"encoding\":\"inplace\",\"label\":\"struct ERC20Votes.Checkpoint\",\"numberOfBytes\":\"32\"},\"t_struct(Counter)1037_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\":307,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_balances\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":313,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_allowances\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"},{\"astId\":315,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_totalSupply\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":317,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_name\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_string_storage\"},{\"astId\":319,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_symbol\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_string_storage\"},{\"astId\":1684,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_nonces\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_mapping(t_address,t_struct(Counter)1897_storage)\"},{\"astId\":1692,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_PERMIT_TYPEHASH_DEPRECATED_SLOT\",\"offset\":0,\"slot\":\"6\",\"type\":\"t_bytes32\"},{\"astId\":1025,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_delegates\",\"offset\":0,\"slot\":\"7\",\"type\":\"t_mapping(t_address,t_address)\"},{\"astId\":1031,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_checkpoints\",\"offset\":0,\"slot\":\"8\",\"type\":\"t_mapping(t_address,t_array(t_struct(Checkpoint)1016_storage)dyn_storage)\"},{\"astId\":1035,\"contract\":\"contracts/L2/GovernanceToken.sol:GovernanceToken\",\"label\":\"_totalSupplyCheckpoints\",\"offset\":0,\"slot\":\"9\",\"type\":\"t_array(t_struct(Checkpoint)1016_storage)dyn_storage\"},{\"astId\":108,\"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)1016_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)1016_storage)dyn_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct ERC20Votes.Checkpoint[])\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_array(t_struct(Checkpoint)1016_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)1897_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct Counters.Counter)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_struct(Counter)1897_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)1016_storage\":{\"encoding\":\"inplace\",\"label\":\"struct ERC20Votes.Checkpoint\",\"numberOfBytes\":\"32\"},\"t_struct(Counter)1897_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) diff --git a/op-bindings/bindings/legacyerc20eth_more.go b/op-bindings/bindings/legacyerc20eth_more.go index 62a3b1d78972f..52e63fb4dfd81 100755 --- a/op-bindings/bindings/legacyerc20eth_more.go +++ b/op-bindings/bindings/legacyerc20eth_more.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum-optimism/optimism/op-bindings/solc" ) -const LegacyERC20ETHStorageLayoutJSON = "{\"storage\":[{\"astId\":26771,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_balances\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":26777,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_allowances\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"},{\"astId\":26779,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_totalSupply\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":26781,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_name\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_string_storage\"},{\"astId\":26783,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_symbol\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_string_storage\"},{\"astId\":24038,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"remoteToken\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_address\"},{\"astId\":24041,\"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\":50137,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_balances\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":50143,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_allowances\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"},{\"astId\":50145,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_totalSupply\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":50147,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_name\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_string_storage\"},{\"astId\":50149,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"_symbol\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_string_storage\"},{\"astId\":24038,\"contract\":\"contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH\",\"label\":\"remoteToken\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_address\"},{\"astId\":24041,\"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) From 5bbeb7afac061297ffb1084e472ed7df7295ec56 Mon Sep 17 00:00:00 2001 From: Matthew Slipper Date: Sat, 10 Sep 2022 16:15:03 -0600 Subject: [PATCH 22/32] contracts-bedrock: Fix deployment (#3414) * contracts-bedrock: Fix deployment * lint --- .../deploy/001-InitImplementations.deploy.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/contracts-bedrock/deploy/001-InitImplementations.deploy.ts b/packages/contracts-bedrock/deploy/001-InitImplementations.deploy.ts index 933c92f8aee08..6260e3f012263 100644 --- a/packages/contracts-bedrock/deploy/001-InitImplementations.deploy.ts +++ b/packages/contracts-bedrock/deploy/001-InitImplementations.deploy.ts @@ -140,7 +140,11 @@ const deployFn: DeployFunction = async (hre) => { 'Proxy', bridgeProxy.address ) - upgradeTxs.push(bridgeProxyContract.upgradeTo(bridge.address)) + upgradeTxs.push( + bridgeProxyContract.upgradeTo(bridge.address, { + nonce: ++nonce, + }) + ) const factory = await get('OptimismMintableERC20Factory') const factoryProxy = await get('OptimismMintableERC20FactoryProxy') @@ -148,7 +152,11 @@ const deployFn: DeployFunction = async (hre) => { 'Proxy', factoryProxy.address ) - upgradeTxs.push(factoryProxyContract.upgradeTo(factory.address)) + upgradeTxs.push( + factoryProxyContract.upgradeTo(factory.address, { + nonce: ++nonce, + }) + ) const rawTxs = await Promise.all(upgradeTxs) await Promise.all(rawTxs.map((tx) => tx.wait())) From 8c5a7ca7e0d51917ac99e7f4b4d93f8e3fa81179 Mon Sep 17 00:00:00 2001 From: Mark Tyneway Date: Sat, 10 Sep 2022 15:21:19 -0700 Subject: [PATCH 23/32] contracts-bedrock: speed up storage snapshot Speeds up the storage snapshot by using fully qualified paths to the contracts. This makes it such that foundry will not recompile the contracts each time. --- packages/contracts-bedrock/.storage-layout | 38 +++++++++---------- .../scripts/storage-snapshot.sh | 38 +++++++++---------- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/packages/contracts-bedrock/.storage-layout b/packages/contracts-bedrock/.storage-layout index 0bf7d7d5ccaaa..ad097c7dd0d8c 100644 --- a/packages/contracts-bedrock/.storage-layout +++ b/packages/contracts-bedrock/.storage-layout @@ -3,7 +3,7 @@ ======================= ======================= -âž¡ L1CrossDomainMessenger +âž¡ contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger ======================= +------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------+ @@ -47,7 +47,7 @@ +------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------+ ======================= -âž¡ L1StandardBridge +âž¡ contracts/L1/L1StandardBridge.sol:L1StandardBridge ======================= +----------+-------------------------------------------------+------+--------+-------+----------------------------------------------------+ @@ -61,7 +61,7 @@ +----------+-------------------------------------------------+------+--------+-------+----------------------------------------------------+ ======================= -âž¡ L2OutputOracle +âž¡ contracts/L1/L2OutputOracle.sol:L2OutputOracle ======================= +-------------------+-------------------------------------------------+------+--------+-------+------------------------------------------------+ @@ -85,7 +85,7 @@ +-------------------+-------------------------------------------------+------+--------+-------+------------------------------------------------+ ======================= -âž¡ OptimismPortal +âž¡ contracts/L1/OptimismPortal.sol:OptimismPortal ======================= +----------------------+----------------------------------------+------+--------+-------+------------------------------------------------+ @@ -107,7 +107,7 @@ +----------------------+----------------------------------------+------+--------+-------+------------------------------------------------+ ======================= -âž¡ DeployerWhitelist +âž¡ contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist ======================= +-----------+--------------------------+------+--------+-------+----------------------------------------------------------+ @@ -119,7 +119,7 @@ +-----------+--------------------------+------+--------+-------+----------------------------------------------------------+ ======================= -âž¡ GasPriceOracle +âž¡ contracts/L2/GasPriceOracle.sol:GasPriceOracle ======================= +----------+---------+------+--------+-------+------------------------------------------------+ @@ -139,7 +139,7 @@ +----------+---------+------+--------+-------+------------------------------------------------+ ======================= -âž¡ L1Block +âž¡ contracts/L2/L1Block.sol:L1Block ======================= +----------------+---------+------+--------+-------+----------------------------------+ @@ -157,7 +157,7 @@ +----------------+---------+------+--------+-------+----------------------------------+ ======================= -âž¡ L1BlockNumber +âž¡ contracts/legacy/L1BlockNumber.sol:L1BlockNumber ======================= +------+------+------+--------+-------+----------+ @@ -166,7 +166,7 @@ +------+------+------+--------+-------+----------+ ======================= -âž¡ L2CrossDomainMessenger +âž¡ contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger ======================= +------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------+ @@ -210,7 +210,7 @@ +------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------+ ======================= -âž¡ L2StandardBridge +âž¡ contracts/L2/L2StandardBridge.sol:L2StandardBridge ======================= +----------+-------------------------------------------------+------+--------+-------+----------------------------------------------------+ @@ -224,7 +224,7 @@ +----------+-------------------------------------------------+------+--------+-------+----------------------------------------------------+ ======================= -âž¡ L2ToL1MessagePasser +âž¡ contracts/L2/L2ToL1MessagePasser.sol:L2ToL1MessagePasser ======================= +--------------+--------------------------+------+--------+-------+----------------------------------------------------------+ @@ -236,7 +236,7 @@ +--------------+--------------------------+------+--------+-------+----------------------------------------------------------+ ======================= -âž¡ LegacyERC20ETH +âž¡ contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH ======================= +--------------+-------------------------------------------------+------+--------+-------+----------------------------------------------------+ @@ -258,7 +258,7 @@ +--------------+-------------------------------------------------+------+--------+-------+----------------------------------------------------+ ======================= -âž¡ SequencerFeeVault +âž¡ contracts/L2/SequencerFeeVault.sol:SequencerFeeVault ======================= +-------------+---------+------+--------+-------+------------------------------------------------------+ @@ -268,7 +268,7 @@ +-------------+---------+------+--------+-------+------------------------------------------------------+ ======================= -âž¡ WETH9 +âž¡ contracts/vendor/WETH9.sol:WETH9 ======================= +-----------+-------------------------------------------------+------+--------+-------+----------------------------------+ @@ -286,7 +286,7 @@ +-----------+-------------------------------------------------+------+--------+-------+----------------------------------+ ======================= -âž¡ ProxyAdmin +âž¡ contracts/universal/ProxyAdmin.sol:ProxyAdmin ======================= +--------------------+-----------------------------------------------+------+--------+-------+-----------------------------------------------+ @@ -304,7 +304,7 @@ +--------------------+-----------------------------------------------+------+--------+-------+-----------------------------------------------+ ======================= -âž¡ Proxy +âž¡ contracts/universal/Proxy.sol:Proxy ======================= +------+------+------+--------+-------+----------+ @@ -313,7 +313,7 @@ +------+------+------+--------+-------+----------+ ======================= -âž¡ L1ChugSplashProxy +âž¡ contracts/legacy/L1ChugSplashProxy.sol:L1ChugSplashProxy ======================= +------+------+------+--------+-------+----------+ @@ -322,7 +322,7 @@ +------+------+------+--------+-------+----------+ ======================= -âž¡ OptimismMintableERC20 +âž¡ contracts/universal/OptimismMintableERC20.sol:OptimismMintableERC20 ======================= +--------------+-------------------------------------------------+------+--------+-------+---------------------------------------------------------------------+ @@ -344,7 +344,7 @@ +--------------+-------------------------------------------------+------+--------+-------+---------------------------------------------------------------------+ ======================= -âž¡ OptimismMintableERC20Factory +âž¡ contracts/universal/OptimismMintableERC20Factory.sol:OptimismMintableERC20Factory ======================= +------+------+------+--------+-------+----------+ diff --git a/packages/contracts-bedrock/scripts/storage-snapshot.sh b/packages/contracts-bedrock/scripts/storage-snapshot.sh index 79f489d6abd38..6abab32f8ddb8 100755 --- a/packages/contracts-bedrock/scripts/storage-snapshot.sh +++ b/packages/contracts-bedrock/scripts/storage-snapshot.sh @@ -10,25 +10,25 @@ then fi contracts=( - L1CrossDomainMessenger - L1StandardBridge - L2OutputOracle - OptimismPortal - DeployerWhitelist - GasPriceOracle - L1Block - L1BlockNumber - L2CrossDomainMessenger - L2StandardBridge - L2ToL1MessagePasser - LegacyERC20ETH - SequencerFeeVault - WETH9 - ProxyAdmin - Proxy - L1ChugSplashProxy - OptimismMintableERC20 - OptimismMintableERC20Factory + contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger + contracts/L1/L1StandardBridge.sol:L1StandardBridge + contracts/L1/L2OutputOracle.sol:L2OutputOracle + contracts/L1/OptimismPortal.sol:OptimismPortal + contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist + contracts/L2/GasPriceOracle.sol:GasPriceOracle + contracts/L2/L1Block.sol:L1Block + contracts/legacy/L1BlockNumber.sol:L1BlockNumber + contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger + contracts/L2/L2StandardBridge.sol:L2StandardBridge + contracts/L2/L2ToL1MessagePasser.sol:L2ToL1MessagePasser + contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH + contracts/L2/SequencerFeeVault.sol:SequencerFeeVault + contracts/vendor/WETH9.sol:WETH9 + contracts/universal/ProxyAdmin.sol:ProxyAdmin + contracts/universal/Proxy.sol:Proxy + contracts/legacy/L1ChugSplashProxy.sol:L1ChugSplashProxy + contracts/universal/OptimismMintableERC20.sol:OptimismMintableERC20 + contracts/universal/OptimismMintableERC20Factory.sol:OptimismMintableERC20Factory ) dir=$(dirname "$0") From 0e6af08e4509f70a2c6c18aa02324fdb13cf3750 Mon Sep 17 00:00:00 2001 From: smartcontracts Date: Sun, 11 Sep 2022 00:49:06 +0200 Subject: [PATCH 24/32] feat(ctb): minor README update (#3368) Co-authored-by: Mark Tyneway --- packages/contracts-bedrock/.env.example | 5 ++ packages/contracts-bedrock/README.md | 87 ++++++++++++++++++------- 2 files changed, 69 insertions(+), 23 deletions(-) create mode 100644 packages/contracts-bedrock/.env.example diff --git a/packages/contracts-bedrock/.env.example b/packages/contracts-bedrock/.env.example new file mode 100644 index 0000000000000..41746a4c8e12d --- /dev/null +++ b/packages/contracts-bedrock/.env.example @@ -0,0 +1,5 @@ +# RPC for the L1 network to deploy to +L1_RPC= + +# Private key for the deployer account +PRIVATE_KEY_DEPLOYER= diff --git a/packages/contracts-bedrock/README.md b/packages/contracts-bedrock/README.md index 200a0fd1dc3df..e836ccbb1df05 100644 --- a/packages/contracts-bedrock/README.md +++ b/packages/contracts-bedrock/README.md @@ -1,48 +1,89 @@ -# Optimism: Bedrock Edition - Contracts +# Optimism Smart Contracts (Bedrock) -## Install +This package contains the smart contracts that compose the on-chain component of Optimism's upcoming Bedrock upgrade. +We've tried to maintain 100% backwards compatibility with the existing system while also introducing new useful features. +You can find detailed specifications for the contracts contained within this package [here](../../specs). -The repo currently uses solidity tests (run with Forge). The project uses the default hardhat directory structure, and all build/test steps should be run using the yarn scripts to ensure -the correct options are set. +## Contracts Overview -Install node modules with yarn (v1), and Node.js (16+). +### Contracts deployed to L1 + +| Name | Proxy Type | Description | +| ---- | ---------- | ----------- | +| [`L1CrossDomainMessenger`](../../specs/messengers.md) | [`ResolvedDelegateProxy`](./contracts/legacy/ResolvedDelegateProxy.sol) | High-level interface for sending messages to and receiving messages from Optimism | +| [`L1StandardBridge`](../../specs/bridges.md) | [`L1ChugSplashProxy`](./contracts/legacy/L1ChugSplashProxy.sol) | Standardized system for transfering ERC20 tokens to/from Optimism | +| [`L2OutputOracle`](../../specs/proposals.md#l2-output-oracle-smart-contract) | [`Proxy`](./contracts/universal/Proxy.sol) | Stores commitments to the state of Optimism which can be used by contracts on L1 to access L2 state | +| [`OptimismPortal`](../../specs/deposits.md#deposit-contract) | [`Proxy`](./contracts/universal/Proxy.sol) | Low-level message passing interface | +| [`OptimismMintableERC20Factory`](../../specs/predeploys.md#optimismmintableerc20factory) | [`Proxy`](./contracts/universal/Proxy.sol) | Deploys standard `OptimismMintableERC20` tokens that are compatible with either `StandardBridge` | +| [`ProxyAdmin`](../../specs/TODO) | - | Contract that can upgrade L1 contracts | + +### Contracts deployed to L2 + +| Name | Proxy Type | Description | +| ---- | ---------- | ----------- | +| [`GasPriceOracle`](../../specs/predeploys.md#ovm_gaspriceoracle) | [`Proxy`](./contracts/universal/Proxy.sol) | Stores L2 gas price configuration values | +| [`L1Block`](../../specs/predeploys.md#l1block) | [`Proxy`](./contracts/universal/Proxy.sol) | Stores L1 block context information (e.g., latest known L1 block hash) | +| [`L2CrossDomainMessenger`](../../specs/predeploys.md#l2crossdomainmessenger) | [`Proxy`](./contracts/universal/Proxy.sol) | High-level interface for sending messages to and receiving messages from L1 | +| [`L2StandardBridge`](../../specs/predeploys.md#l2standardbridge) | [`Proxy`](./contracts/universal/Proxy.sol) | Standardized system for transferring ERC20 tokens to/from L1 | +| [`L2ToL1MessagePasser`](../../specs/predeploys.md#ovm_l2tol1messagepasser) | [`Proxy`](./contracts/universal/Proxy.sol) | Low-level message passing interface | +| [`SequencerFeeVault`](../../specs/predeploys.md#sequencerfeevault) | [`Proxy`](./contracts/universal/Proxy.sol) | Vault for L2 transaction fees | +| [`OptimismMintableERC20Factory`](../../specs/predeploys.md#optimismmintableerc20factory) | [`Proxy`](./contracts/universal/Proxy.sol) | Deploys standard `OptimismMintableERC20` tokens that are compatible with either `StandardBridge` | +| [`L2ProxyAdmin`](../../specs/TODO) | - | Contract that can upgrade L2 contracts when sent a transaction from L1 | + +### Legacy and deprecated contracts + +| Name | Location | Proxy Type | Description | +| ---- | -------- | ---------- | ----------- | +| [`AddressManager`](./contracts/legacy/AddressManager.sol) | L1 | - | Legacy upgrade mechanism (unused in Bedrock) | +| [`DeployerWhitelist`](./contracts/legacy/DeployerWhitelist.sol) | L2 | [`Proxy`](./contracts/universal/Proxy.sol) | Legacy contract for managing allowed deployers (unused since EVM Equivalence upgrade) +| [`L1BlockNumber`](./contracts/legacy/L1BlockNumber.sol) | L2 | [`Proxy`](./contracts/universal/Proxy.sol) | Legacy contract for accessing latest known L1 block number, replaced by `L1Block` | + +## Installation + +We export contract ABIs, contract source code, and contract deployment information for this package via `npm`: ```shell -yarn +npm install @eth-optimism/contracts-bedrock ``` -See installation instructions for forge [here](https://github.com/gakonst/foundry). +## Development -## Build +### Dependencies + +We work on this repository with a combination of [Hardhat](https://hardhat.org) and [Foundry](https://getfoundry.sh/). + +1. Install Foundry by following [the instructions located here](https://getfoundry.sh/). +2. Install node modules with yarn (v1) and Node.js (16+): + + ```shell + yarn install + ``` + +### Build ```shell yarn build ``` -## Running Tests - -Then the full test suite can be executed via `yarn`: +### Tests ```shell yarn test ``` -The differential tests require typescript to be compiled to javascript. +### Deployment -## Deployment +#### Configuration -Create a file that corresponds to the network name in the `deploy-config` -directory and then run the command: +1. Create or modify a file `.json` inside of the [`deploy-config`](./deploy-config/) folder. +2. Fill out this file according to the `deployConfigSpec` located inside of the [`hardhat.config.ts](./hardhat.config.ts) -```shell -L1_RPC= \ -PRIVATE_KEY_DEPLOYER= \ - npx hardhat deploy --network -``` +#### Execution -In the `hardhat.config.ts`, there is a `deployConfigSpec` field that validates that the types -are correct, be sure to export an object in the `deploy-config/.ts` file that -has a key for each property in the `deployConfigSpec`. +1. Copy `.env.example` into `.env` +2. Fill out the `L1_RPC` and `PRIVATE_KEY_DEPLOYER` environment variables in `.env` +3. Run `npx hardhat deploy --network ` to deploy the L1 contracts +4. Run `npx hardhat etherscan-verify --network --sleep` to verify contracts on Etherscan ## Standards and Conventions From 5b6bd794561db0f021bd98339c1ce8fb120819b0 Mon Sep 17 00:00:00 2001 From: Joshua Gutow Date: Sun, 11 Sep 2022 11:42:08 +0200 Subject: [PATCH 25/32] op-node: Call FCU on new unsafe payload (#3418) This calls a FCU to set the unsafe head of the L2 execution client immediately after NewPayload is called on the execution client. This means that the unsafe head in the node state matches the unsafe head on the execution client. This commit removes the FCU prior to the NewPayload call because we assert that the unsafe block that we are inserting extends the current unsafe head. As such, the L2 execution client is in a state to accept the new block. --- op-node/rollup/derive/engine_queue.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/op-node/rollup/derive/engine_queue.go b/op-node/rollup/derive/engine_queue.go index 887b0f66ade86..eccdb72fc412e 100644 --- a/op-node/rollup/derive/engine_queue.go +++ b/op-node/rollup/derive/engine_queue.go @@ -217,6 +217,7 @@ func (eq *EngineQueue) tryNextUnsafePayload(ctx context.Context) error { return nil } + // Ensure that the unsafe payload builds upon the current unsafe head // TODO: once we support snap-sync we can remove this condition, and handle the "SYNCING" status of the execution engine. if first.ParentHash != eq.unsafeHead.Hash { if uint64(first.BlockNumber) == eq.unsafeHead.Number+1 { @@ -233,12 +234,19 @@ func (eq *EngineQueue) tryNextUnsafePayload(ctx context.Context) error { return nil } - // Note: the parent hash does not have to equal the existing unsafe head, - // the unsafe part of the chain may reorg freely without resetting the derivation pipeline. + status, err := eq.engine.NewPayload(ctx, first) + if err != nil { + return NewTemporaryError(fmt.Errorf("failed to update insert payload: %w", err)) + } + if status.Status != eth.ExecutionValid { + eq.unsafePayloads.Pop() + return NewTemporaryError(fmt.Errorf("cannot process unsafe payload: new - %v; parent: %v; err: %w", + first.ID(), first.ParentID(), eth.NewPayloadErr(first, status))) + } - // prepare for processing the unsafe payload + // Mark the new payload as valid fc := eth.ForkchoiceState{ - HeadBlockHash: first.ParentHash, + HeadBlockHash: first.BlockHash, SafeBlockHash: eq.safeHead.Hash, // this should guarantee we do not reorg past the safe head FinalizedBlockHash: eq.finalized.Hash, } @@ -261,15 +269,7 @@ func (eq *EngineQueue) tryNextUnsafePayload(ctx context.Context) error { return NewTemporaryError(fmt.Errorf("cannot prepare unsafe chain for new payload: new - %v; parent: %v; err: %w", first.ID(), first.ParentID(), eth.ForkchoiceUpdateErr(fcRes.PayloadStatus))) } - status, err := eq.engine.NewPayload(ctx, first) - if err != nil { - return NewTemporaryError(fmt.Errorf("failed to update insert payload: %w", err)) - } - if status.Status != eth.ExecutionValid { - eq.unsafePayloads.Pop() - return NewTemporaryError(fmt.Errorf("cannot process unsafe payload: new - %v; parent: %v; err: %w", - first.ID(), first.ParentID(), eth.ForkchoiceUpdateErr(fcRes.PayloadStatus))) - } + eq.unsafeHead = ref eq.unsafePayloads.Pop() eq.metrics.RecordL2Ref("l2_unsafe", ref) From 31099c937b3e60d377905971f9d2aa2b11d5327d Mon Sep 17 00:00:00 2001 From: protolambda Date: Sun, 11 Sep 2022 12:01:57 +0200 Subject: [PATCH 26/32] op-node: pass L1 finalization for L2 finalization to kick in (#3419) --- op-e2e/system_test.go | 28 ++++++++++++++++++++++++++++ op-node/rollup/driver/driver.go | 1 + op-node/rollup/driver/state.go | 2 +- 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/op-e2e/system_test.go b/op-e2e/system_test.go index d7a0ccc41fc65..07569143de0aa 100644 --- a/op-e2e/system_test.go +++ b/op-e2e/system_test.go @@ -388,6 +388,34 @@ func TestConfirmationDepth(t *testing.T) { 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") } +// TestFinalize tests if L2 finalizes after sufficient time after L1 finalizes +func TestFinalize(t *testing.T) { + if !verboseGethNodes { + log.Root().SetHandler(log.DiscardHandler()) + } + + cfg := defaultSystemConfig(t) + + sys, err := cfg.start() + require.Nil(t, err, "Error starting up system") + defer sys.Close() + + l2Seq := sys.Clients["sequencer"] + + // as configured in the extra geth lifecycle in testing setup + finalizedDistance := uint64(8) + // 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) + + // fetch the finalizes head of geth + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) + defer cancel() + l2Finalized, err := l2Seq.BlockByNumber(ctx, big.NewInt(int64(rpc.FinalizedBlockNumber))) + require.NoError(t, err) + + require.NotZerof(t, l2Finalized.NumberU64(), "must have finalized L2 block") +} + func TestMintOnRevertedDeposit(t *testing.T) { if !verboseGethNodes { log.Root().SetHandler(log.DiscardHandler()) diff --git a/op-node/rollup/driver/driver.go b/op-node/rollup/driver/driver.go index c082e73050465..ad21915d3e9e7 100644 --- a/op-node/rollup/driver/driver.go +++ b/op-node/rollup/driver/driver.go @@ -55,6 +55,7 @@ type DerivationPipeline interface { Step(ctx context.Context) error SetUnsafeHead(head eth.L2BlockRef) AddUnsafePayload(payload *eth.ExecutionPayload) + Finalize(ref eth.BlockID) Finalized() eth.L2BlockRef SafeL2Head() eth.L2BlockRef UnsafeL2Head() eth.L2BlockRef diff --git a/op-node/rollup/driver/state.go b/op-node/rollup/driver/state.go index 2452f864981c3..cd2bdd2fe5abf 100644 --- a/op-node/rollup/driver/state.go +++ b/op-node/rollup/driver/state.go @@ -187,7 +187,7 @@ 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 - // TODO(proto): forward signal to derivation to finalize L2 chain as well + s.derivation.Finalize(finalized.ID()) } // findL1Origin determines what the next L1 Origin should be. From 26a8b23904522d3aa8a8b9950bf96e931cc5b895 Mon Sep 17 00:00:00 2001 From: Matthew Slipper Date: Sun, 11 Sep 2022 04:06:42 -0600 Subject: [PATCH 27/32] ci: Fix check-changed (#3420) check-changed was breaking when develop -> master PRs were open. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- ops/docker/ci-builder/check-changed.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ops/docker/ci-builder/check-changed.sh b/ops/docker/ci-builder/check-changed.sh index c613e291b0e4a..93378bd2da1c3 100644 --- a/ops/docker/ci-builder/check-changed.sh +++ b/ops/docker/ci-builder/check-changed.sh @@ -27,6 +27,12 @@ else echoerr "$PR" REF=$(echo "$PR" | jq -r ".base.ref") + if [ "$REF" = "master" ]; then + echoerr "Base ref is master, requiring a total rebuild." + echo "TRUE" + exit 0 + fi + echoerr "Base Ref: $REF" echoerr "Base Ref SHA: $(git show-branch --sha1-name "$REF")" echoerr "Curr Ref: $(git rev-parse --short HEAD)" From 27aa017f2e8e919a1d69e429df29b643fd751b25 Mon Sep 17 00:00:00 2001 From: Matthew Slipper Date: Sun, 11 Sep 2022 04:07:34 -0600 Subject: [PATCH 28/32] contracts-bedrock: Make initialization serial, add logging (#3416) * contracts-bedrock: Make initialization serial, add logging * lint --- .../deploy/001-InitImplementations.deploy.ts | 45 +++++++++---------- .../deploy/002-ConfigureProxyAdmin.ts | 13 ++---- 2 files changed, 23 insertions(+), 35 deletions(-) diff --git a/packages/contracts-bedrock/deploy/001-InitImplementations.deploy.ts b/packages/contracts-bedrock/deploy/001-InitImplementations.deploy.ts index 6260e3f012263..9d339f103e924 100644 --- a/packages/contracts-bedrock/deploy/001-InitImplementations.deploy.ts +++ b/packages/contracts-bedrock/deploy/001-InitImplementations.deploy.ts @@ -104,10 +104,8 @@ const deployFn: DeployFunction = async (hre) => { ] await Promise.all(implTxs) + let tx // Reset the nonce for the next set of transactions - nonce = await l1.getTransactionCount(deployer) - - const upgradeTxs: any[] = [] for (const [proxy, upgrader] of Object.entries(upgradeABIs)) { const upgraderOut = await upgrader(deployConfig) const implName = proxy.replace('Proxy', '') @@ -121,18 +119,17 @@ const deployFn: DeployFunction = async (hre) => { 'Proxy', proxyDeployment.address ) - upgradeTxs.push( - proxyContract.upgradeToAndCall( - implContract.address, - implContract.interface.encodeFunctionData( - upgraderOut[0] as string, - upgraderOut[1] as any[] - ), - { - nonce: ++nonce, - } + console.log(`Upgrading contract impl ${implName}.`) + tx = await proxyContract.upgradeToAndCall( + implContract.address, + implContract.interface.encodeFunctionData( + upgraderOut[0] as string, + upgraderOut[1] as any[] ) ) + console.log(`Awaiting TX hash ${tx.hash}.`) + await tx.wait() + console.log('Done.') } const bridge = await get('L1StandardBridge') @@ -140,11 +137,11 @@ const deployFn: DeployFunction = async (hre) => { 'Proxy', bridgeProxy.address ) - upgradeTxs.push( - bridgeProxyContract.upgradeTo(bridge.address, { - nonce: ++nonce, - }) - ) + console.log(`Upgrading L1StandardBridge at ${bridge.address}.`) + tx = await bridgeProxyContract.upgradeTo(bridge.address) + console.log(`Awaiting TX hash ${tx.hash}.`) + await tx.wait() + console.log('Done') const factory = await get('OptimismMintableERC20Factory') const factoryProxy = await get('OptimismMintableERC20FactoryProxy') @@ -152,13 +149,11 @@ const deployFn: DeployFunction = async (hre) => { 'Proxy', factoryProxy.address ) - upgradeTxs.push( - factoryProxyContract.upgradeTo(factory.address, { - nonce: ++nonce, - }) - ) - const rawTxs = await Promise.all(upgradeTxs) - await Promise.all(rawTxs.map((tx) => tx.wait())) + console.log(`Upgrading OptimismMintableERC20Factory at ${factory.address}.`) + tx = await factoryProxyContract.upgradeTo(factory.address) + console.log(`Awaiting TX hash ${tx.hash}.`) + await tx.wait() + console.log('Done') await validateOracle(hre, deployConfig, deployL2StartingTimestamp) await validatePortal(hre) diff --git a/packages/contracts-bedrock/deploy/002-ConfigureProxyAdmin.ts b/packages/contracts-bedrock/deploy/002-ConfigureProxyAdmin.ts index d7bc9e690cdaa..f6c0eb2446225 100644 --- a/packages/contracts-bedrock/deploy/002-ConfigureProxyAdmin.ts +++ b/packages/contracts-bedrock/deploy/002-ConfigureProxyAdmin.ts @@ -16,17 +16,12 @@ const deployFn: DeployFunction = async (hre) => { 'OptimismMintableERC20FactoryProxy', ] - const { deployer } = await hre.getNamedAccounts() - let nonce = await hre.ethers.provider.getTransactionCount(deployer) - // Subtract 1 from the nonce to simplify the loop below - nonce = nonce - 1 - // Wait on all the txs in parallel so that the deployment goes faster const txs = [] for (const proxy of proxies) { const deployment = await hre.deployments.get(proxy) const Proxy = await hre.ethers.getContractAt('Proxy', deployment.address) - const tx = await Proxy.changeAdmin(admin.address, { nonce: ++nonce }) + const tx = await Proxy.changeAdmin(admin.address) txs.push(tx) } await Promise.all(txs.map((tx) => tx.wait())) @@ -38,10 +33,8 @@ const deployFn: DeployFunction = async (hre) => { ) const postConfig = [ - await AddressManager.transferOwnership(admin.address, { nonce: ++nonce }), - await ProxyAdmin.setAddressManager(addressManager.address, { - nonce: ++nonce, - }), + await AddressManager.transferOwnership(admin.address), + await ProxyAdmin.setAddressManager(addressManager.address), ] await Promise.all(postConfig.map((tx) => tx.wait())) } From 5ad549a3875a33554ae2d2467c601d946d4af5ef Mon Sep 17 00:00:00 2001 From: protolambda Date: Sun, 11 Sep 2022 13:00:04 +0200 Subject: [PATCH 29/32] op-node: limit reorg depth with sanity check (#3422) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- op-node/rollup/sync/start.go | 4 ++-- op-node/rollup/sync/start_test.go | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/op-node/rollup/sync/start.go b/op-node/rollup/sync/start.go index 15cc824feb095..02f5513c4f438 100644 --- a/op-node/rollup/sync/start.go +++ b/op-node/rollup/sync/start.go @@ -49,7 +49,7 @@ var ReorgFinalizedErr = errors.New("cannot reorg finalized block") var WrongChainErr = errors.New("wrong chain") var TooDeepReorgErr = errors.New("reorg is too deep") -const MaxReorgDepth = 500 +const MaxReorgSeqWindows = 5 type FindHeadsResult struct { Unsafe eth.L2BlockRef @@ -154,7 +154,7 @@ func FindL2Heads(ctx context.Context, cfg *rollup.Config, l1 L1Chain, l2 L2Chain return nil, fmt.Errorf("%w: finalized %s, got: %s", ReorgFinalizedErr, result.Finalized, n) } // Check we are not reorging L2 incredibly deep - if n.Number+MaxReorgDepth < prevUnsafe.Number { + if n.L1Origin.Number+(MaxReorgSeqWindows*cfg.SeqWindowSize) < prevUnsafe.L1Origin.Number { // If the reorg depth is too large, something is fishy. // This can legitimately happen if L1 goes down for a while. But in that case, // restarting the L2 node with a bigger configured MaxReorgDepth is an acceptable diff --git a/op-node/rollup/sync/start_test.go b/op-node/rollup/sync/start_test.go index 93606dc0c3593..addaccfdd9502 100644 --- a/op-node/rollup/sync/start_test.go +++ b/op-node/rollup/sync/start_test.go @@ -221,6 +221,7 @@ func TestFindSyncStart(t *testing.T) { GenesisL1: 'a', GenesisL2: 'A', UnsafeL2Head: 0, + SeqWindowSize: 2, ExpectedErr: WrongChainErr, }, { @@ -234,6 +235,7 @@ func TestFindSyncStart(t *testing.T) { GenesisL1: 'a', GenesisL2: 'X', UnsafeL2Head: 0, + SeqWindowSize: 2, ExpectedErr: WrongChainErr, }, { From cbca9c8e64bf181cc27001f70e4af2976ce28290 Mon Sep 17 00:00:00 2001 From: protolambda Date: Sun, 11 Sep 2022 15:01:24 +0200 Subject: [PATCH 30/32] op-node: emit l2_finalized block (#3423) --- op-node/rollup/derive/engine_queue.go | 1 + 1 file changed, 1 insertion(+) diff --git a/op-node/rollup/derive/engine_queue.go b/op-node/rollup/derive/engine_queue.go index eccdb72fc412e..dbdffec809cc1 100644 --- a/op-node/rollup/derive/engine_queue.go +++ b/op-node/rollup/derive/engine_queue.go @@ -175,6 +175,7 @@ func (eq *EngineQueue) tryFinalizeL2() { } } eq.finalized = finalizedL2 + eq.metrics.RecordL2Ref("l2_finalized", finalizedL2) } // postProcessSafeL2 buffers the L1 block the safe head was fully derived from, From 262f5fd8deda5f6035eefaa46ea394c5f086122d Mon Sep 17 00:00:00 2001 From: Matthew Slipper Date: Mon, 12 Sep 2022 02:17:28 +0200 Subject: [PATCH 31/32] contracts-bedrock: Remove Goerli deployment, replace with alpha testnet --- .../deployments/{goerli => alpha-1}/.chainId | 0 .../deployments/alpha-1/AddressManager.json | 251 ++++ .../L1CrossDomainMessenger.json | 142 +- .../L1CrossDomainMessengerProxy.json | 40 +- .../deployments/alpha-1/L1StandardBridge.json | 1121 +++++++++++++++ .../L1StandardBridgeProxy.json | 40 +- .../{goerli => alpha-1}/L2OutputOracle.json | 126 +- .../L2OutputOracleProxy.json | 32 +- .../OptimismMintableERC20Factory.json | 24 +- .../OptimismMintableERC20FactoryProxy.json | 40 +- .../deployments/alpha-1/OptimismPortal.json | 704 ++++++++++ .../OptimismPortalProxy.json | 40 +- .../{goerli => alpha-1}/ProxyAdmin.json | 62 +- .../ada691c3f5ff59bd3e60fdb28388fb6d.json} | 57 +- .../deployments/goerli/L1StandardBridge.json | 1200 ----------------- .../deployments/goerli/OptimismPortal.json | 674 --------- 16 files changed, 2394 insertions(+), 2159 deletions(-) rename packages/contracts-bedrock/deployments/{goerli => alpha-1}/.chainId (100%) create mode 100644 packages/contracts-bedrock/deployments/alpha-1/AddressManager.json rename packages/contracts-bedrock/deployments/{goerli => alpha-1}/L1CrossDomainMessenger.json (50%) rename packages/contracts-bedrock/deployments/{goerli => alpha-1}/L1CrossDomainMessengerProxy.json (93%) create mode 100644 packages/contracts-bedrock/deployments/alpha-1/L1StandardBridge.json rename packages/contracts-bedrock/deployments/{goerli => alpha-1}/L1StandardBridgeProxy.json (93%) rename packages/contracts-bedrock/deployments/{goerli => alpha-1}/L2OutputOracle.json (82%) rename packages/contracts-bedrock/deployments/{goerli => alpha-1}/L2OutputOracleProxy.json (94%) rename packages/contracts-bedrock/deployments/{goerli => alpha-1}/OptimismMintableERC20Factory.json (97%) rename packages/contracts-bedrock/deployments/{goerli => alpha-1}/OptimismMintableERC20FactoryProxy.json (93%) create mode 100644 packages/contracts-bedrock/deployments/alpha-1/OptimismPortal.json rename packages/contracts-bedrock/deployments/{goerli => alpha-1}/OptimismPortalProxy.json (93%) rename packages/contracts-bedrock/deployments/{goerli => alpha-1}/ProxyAdmin.json (92%) rename packages/contracts-bedrock/deployments/{goerli/solcInputs/cd42cb04f3b6a78e5824c9f427d0a55d.json => alpha-1/solcInputs/ada691c3f5ff59bd3e60fdb28388fb6d.json} (83%) delete mode 100644 packages/contracts-bedrock/deployments/goerli/L1StandardBridge.json delete mode 100644 packages/contracts-bedrock/deployments/goerli/OptimismPortal.json diff --git a/packages/contracts-bedrock/deployments/goerli/.chainId b/packages/contracts-bedrock/deployments/alpha-1/.chainId similarity index 100% rename from packages/contracts-bedrock/deployments/goerli/.chainId rename to packages/contracts-bedrock/deployments/alpha-1/.chainId diff --git a/packages/contracts-bedrock/deployments/alpha-1/AddressManager.json b/packages/contracts-bedrock/deployments/alpha-1/AddressManager.json new file mode 100644 index 0000000000000..b8b52ab3d30ee --- /dev/null +++ b/packages/contracts-bedrock/deployments/alpha-1/AddressManager.json @@ -0,0 +1,251 @@ +{ + "address": "0xb4e08DcE1F323608229265c9d4125E22a4B9dbAF", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "oldAddress", + "type": "address" + } + ], + "name": "AddressSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + } + ], + "name": "getAddress", + "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": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "setAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x8dd8a493c17a07f77bf0d225ca003d43d05906b9e766a3578c3a2234274ee2e4", + "receipt": { + "to": null, + "from": "0x1D066Ef7AA90ae85Bb017e85968A9e1851DA95Db", + "contractAddress": "0xb4e08DcE1F323608229265c9d4125E22a4B9dbAF", + "transactionIndex": 5, + "gasUsed": "404672", + "logsBloom": "0x00000008400000000000000000000000000000000000000000800000000000000000000000002000000000000000000000000000000000000200000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000001000000000000000000008000000000000000000000000000000000000", + "blockHash": "0x5bd8ca98c113de21b83bf8ab5394a0136979164858c25cc0864317a9bc69ef76", + "transactionHash": "0x8dd8a493c17a07f77bf0d225ca003d43d05906b9e766a3578c3a2234274ee2e4", + "logs": [ + { + "transactionIndex": 5, + "blockNumber": 7568963, + "transactionHash": "0x8dd8a493c17a07f77bf0d225ca003d43d05906b9e766a3578c3a2234274ee2e4", + "address": "0xb4e08DcE1F323608229265c9d4125E22a4B9dbAF", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000001d066ef7aa90ae85bb017e85968a9e1851da95db" + ], + "data": "0x", + "logIndex": 7, + "blockHash": "0x5bd8ca98c113de21b83bf8ab5394a0136979164858c25cc0864317a9bc69ef76" + } + ], + "blockNumber": 7568963, + "cumulativeGasUsed": "11950929", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "ada691c3f5ff59bd3e60fdb28388fb6d", + "metadata": "{\"compiler\":{\"version\":\"0.8.15+commit.e14f2714\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAddress\",\"type\":\"address\"}],\"name\":\"AddressSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"getAddress\",\"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\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"setAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"custom:legacy\":\"@title AddressManager\",\"events\":{\"AddressSet(string,address,address)\":{\"params\":{\"name\":\"String name being set in the registry.\",\"newAddress\":\"Address set for the given name.\",\"oldAddress\":\"Address that was previously set for the given name.\"}}},\"kind\":\"dev\",\"methods\":{\"getAddress(string)\":{\"params\":{\"_name\":\"Name to retrieve an address for.\"},\"returns\":{\"_0\":\"Address associated with the given name.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setAddress(string,address)\":{\"params\":{\"_address\":\"Address to associate with the name.\",\"_name\":\"String name to associate an address with.\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"events\":{\"AddressSet(string,address,address)\":{\"notice\":\"Emitted when an address is modified in the registry.\"}},\"kind\":\"user\",\"methods\":{\"getAddress(string)\":{\"notice\":\"Retrieves the address associated with a given name.\"},\"setAddress(string,address)\":{\"notice\":\"Changes the address associated with a particular name.\"}},\"notice\":\"AddressManager is a legacy contract that was used in the old version of the Optimism system to manage a registry of string names to addresses. We now use a more standard proxy system instead, but this contract is still necessary for backwards compatibility with several older contracts.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/legacy/AddressManager.sol\":\"AddressManager\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@eth-optimism/contracts-periphery/=node_modules/@eth-optimism/contracts-periphery/contracts/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/\",\":@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/\",\":@rari-capital/=node_modules/@rari-capital/\",\":@rari-capital/solmate/=node_modules/@rari-capital/solmate/\",\":contracts/=contracts/\",\":ds-test/=node_modules/ds-test/src/\",\":forge-std/=node_modules/forge-std/src/\"]},\"sources\":{\"contracts/legacy/AddressManager.sol\":{\"keccak256\":\"0x7a353d4c92eed32665fd2f0023c55054901293cf7a6e14ca108229d87c047b10\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b92ba23601d1951271729a20db931a45639d9376b7c8e2705c23dc360833715a\",\"dweb:/ipfs/QmTKwYLNYYBKZpd31VNBANmguVUwFZifSg7joHSgLZjZCj\"]},\"node_modules/@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xa94b34880e3c1b0b931662cb1c09e5dfa6662f31cba80e07c5ee71cd135c9673\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://40fb1b5102468f783961d0af743f91b9980cf66b50d1d12009f6bb1869cea4d2\",\"dweb:/ipfs/QmYqEbJML4jB1GHbzD4cUZDtJg5wVwNm3vDJq1GbyDus8y\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6105ef8061007e6000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c80639b2ea4bd116100505780639b2ea4bd146100b9578063bf40fac1146100cc578063f2fde38b146100df57600080fd5b8063715018a61461006c5780638da5cb5b14610076575b600080fd5b6100746100f2565b005b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6100746100c73660046104fa565b610106565b6100906100da366004610548565b6101d9565b6100746100ed366004610585565b610215565b6100fa6102d1565b6101046000610352565b565b61010e6102d1565b6000610119836103c7565b60008181526001602052604090819020805473ffffffffffffffffffffffffffffffffffffffff8681167fffffffffffffffffffffffff00000000000000000000000000000000000000008316179092559151929350169061017c9085906105a7565b6040805191829003822073ffffffffffffffffffffffffffffffffffffffff808716845284166020840152917f9416a153a346f93d95f94b064ae3f148b6460473c6e82b3f9fc2521b873fcd6c910160405180910390a250505050565b6000600160006101e8846103c7565b815260208101919091526040016000205473ffffffffffffffffffffffffffffffffffffffff1692915050565b61021d6102d1565b73ffffffffffffffffffffffffffffffffffffffff81166102c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6102ce81610352565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610104576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102bc565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000816040516020016103da91906105a7565b604051602081830303815290604052805190602001209050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261043757600080fd5b813567ffffffffffffffff80821115610452576104526103f7565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610498576104986103f7565b816040528381528660208588010111156104b157600080fd5b836020870160208301376000602085830101528094505050505092915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146104f557600080fd5b919050565b6000806040838503121561050d57600080fd5b823567ffffffffffffffff81111561052457600080fd5b61053085828601610426565b92505061053f602084016104d1565b90509250929050565b60006020828403121561055a57600080fd5b813567ffffffffffffffff81111561057157600080fd5b61057d84828501610426565b949350505050565b60006020828403121561059757600080fd5b6105a0826104d1565b9392505050565b6000825160005b818110156105c857602081860181015185830152016105ae565b818111156105d7576000828501525b50919091019291505056fea164736f6c634300080f000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100675760003560e01c80639b2ea4bd116100505780639b2ea4bd146100b9578063bf40fac1146100cc578063f2fde38b146100df57600080fd5b8063715018a61461006c5780638da5cb5b14610076575b600080fd5b6100746100f2565b005b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6100746100c73660046104fa565b610106565b6100906100da366004610548565b6101d9565b6100746100ed366004610585565b610215565b6100fa6102d1565b6101046000610352565b565b61010e6102d1565b6000610119836103c7565b60008181526001602052604090819020805473ffffffffffffffffffffffffffffffffffffffff8681167fffffffffffffffffffffffff00000000000000000000000000000000000000008316179092559151929350169061017c9085906105a7565b6040805191829003822073ffffffffffffffffffffffffffffffffffffffff808716845284166020840152917f9416a153a346f93d95f94b064ae3f148b6460473c6e82b3f9fc2521b873fcd6c910160405180910390a250505050565b6000600160006101e8846103c7565b815260208101919091526040016000205473ffffffffffffffffffffffffffffffffffffffff1692915050565b61021d6102d1565b73ffffffffffffffffffffffffffffffffffffffff81166102c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6102ce81610352565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610104576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102bc565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000816040516020016103da91906105a7565b604051602081830303815290604052805190602001209050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261043757600080fd5b813567ffffffffffffffff80821115610452576104526103f7565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610498576104986103f7565b816040528381528660208588010111156104b157600080fd5b836020870160208301376000602085830101528094505050505092915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146104f557600080fd5b919050565b6000806040838503121561050d57600080fd5b823567ffffffffffffffff81111561052457600080fd5b61053085828601610426565b92505061053f602084016104d1565b90509250929050565b60006020828403121561055a57600080fd5b813567ffffffffffffffff81111561057157600080fd5b61057d84828501610426565b949350505050565b60006020828403121561059757600080fd5b6105a0826104d1565b9392505050565b6000825160005b818110156105c857602081860181015185830152016105ae565b818111156105d7576000828501525b50919091019291505056fea164736f6c634300080f000a", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "getAddress(string)": { + "params": { + "_name": "Name to retrieve an address for." + }, + "returns": { + "_0": "Address associated with the given name." + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "setAddress(string,address)": { + "params": { + "_address": "Address to associate with the name.", + "_name": "String name to associate an address with." + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "events": { + "AddressSet(string,address,address)": { + "params": { + "name": "String name being set in the registry.", + "newAddress": "Address set for the given name.", + "oldAddress": "Address that was previously set for the given name." + } + } + } + }, + "userdoc": { + "version": 1, + "kind": "user", + "methods": { + "getAddress(string)": { + "notice": "Retrieves the address associated with a given name." + }, + "setAddress(string,address)": { + "notice": "Changes the address associated with a particular name." + } + }, + "events": { + "AddressSet(string,address,address)": { + "notice": "Emitted when an address is modified in the registry." + } + }, + "notice": "AddressManager is a legacy contract that was used in the old version of the Optimism system to manage a registry of string names to addresses. We now use a more standard proxy system instead, but this contract is still necessary for backwards compatibility with several older contracts." + }, + "storageLayout": { + "storage": [ + { + "astId": 50016, + "contract": "contracts/legacy/AddressManager.sol:AddressManager", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 2586, + "contract": "contracts/legacy/AddressManager.sol:AddressManager", + "label": "addresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + } + } + } +} \ No newline at end of file diff --git a/packages/contracts-bedrock/deployments/goerli/L1CrossDomainMessenger.json b/packages/contracts-bedrock/deployments/alpha-1/L1CrossDomainMessenger.json similarity index 50% rename from packages/contracts-bedrock/deployments/goerli/L1CrossDomainMessenger.json rename to packages/contracts-bedrock/deployments/alpha-1/L1CrossDomainMessenger.json index f1421bb71043f..323b48175ce67 100644 --- a/packages/contracts-bedrock/deployments/goerli/L1CrossDomainMessenger.json +++ b/packages/contracts-bedrock/deployments/alpha-1/L1CrossDomainMessenger.json @@ -1,5 +1,5 @@ { - "address": "0x81F0a15d8980649d3f0032db5e88E42E52663054", + "address": "0x8AB9b7Aa77B8Eb4c9aed319957A408cEc550218c", "abi": [ { "inputs": [ @@ -492,57 +492,57 @@ "type": "function" } ], - "transactionHash": "0x8e7b08c4df57be023de440328498fe4479e89059176a1b505df8c6ea2f9b2025", + "transactionHash": "0xeb9aca36d9100606306eb398d743d467bbb849c65952611c5be0becb3444086e", "receipt": { "to": null, - "from": "0xCFf7a9856DB3C60AB546b8F43dC5D1A4336786A0", - "contractAddress": "0x81F0a15d8980649d3f0032db5e88E42E52663054", - "transactionIndex": 1, - "gasUsed": "2311092", - "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000200000000000000000000000000000000000080001000000000000000001000040000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000080000000000000000000000000000000001000000000000400000000000000000000000000000000000000000000000000000000000000040000001000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x03c9b873459f830d1dc813e7d513c9f60d36b61f3fae4534e838bcfc69f4fa9d", - "transactionHash": "0x8e7b08c4df57be023de440328498fe4479e89059176a1b505df8c6ea2f9b2025", + "from": "0x1D066Ef7AA90ae85Bb017e85968A9e1851DA95Db", + "contractAddress": "0x8AB9b7Aa77B8Eb4c9aed319957A408cEc550218c", + "transactionIndex": 2, + "gasUsed": "2329198", + "logsBloom": "0x00000008000000001000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000001002000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000080000000000000000000000000000000000000000008000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000020000000000000000000000000000008000000000000000000000000000000000000", + "blockHash": "0x5bd8ca98c113de21b83bf8ab5394a0136979164858c25cc0864317a9bc69ef76", + "transactionHash": "0xeb9aca36d9100606306eb398d743d467bbb849c65952611c5be0becb3444086e", "logs": [ { - "transactionIndex": 1, - "blockNumber": 7355249, - "transactionHash": "0x8e7b08c4df57be023de440328498fe4479e89059176a1b505df8c6ea2f9b2025", - "address": "0x81F0a15d8980649d3f0032db5e88E42E52663054", + "transactionIndex": 2, + "blockNumber": 7568963, + "transactionHash": "0xeb9aca36d9100606306eb398d743d467bbb849c65952611c5be0becb3444086e", + "address": "0x8AB9b7Aa77B8Eb4c9aed319957A408cEc550218c", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000cff7a9856db3c60ab546b8f43dc5d1a4336786a0" + "0x0000000000000000000000001d066ef7aa90ae85bb017e85968a9e1851da95db" ], "data": "0x", - "logIndex": 1, - "blockHash": "0x03c9b873459f830d1dc813e7d513c9f60d36b61f3fae4534e838bcfc69f4fa9d" + "logIndex": 5, + "blockHash": "0x5bd8ca98c113de21b83bf8ab5394a0136979164858c25cc0864317a9bc69ef76" }, { - "transactionIndex": 1, - "blockNumber": 7355249, - "transactionHash": "0x8e7b08c4df57be023de440328498fe4479e89059176a1b505df8c6ea2f9b2025", - "address": "0x81F0a15d8980649d3f0032db5e88E42E52663054", + "transactionIndex": 2, + "blockNumber": 7568963, + "transactionHash": "0xeb9aca36d9100606306eb398d743d467bbb849c65952611c5be0becb3444086e", + "address": "0x8AB9b7Aa77B8Eb4c9aed319957A408cEc550218c", "topics": [ "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 2, - "blockHash": "0x03c9b873459f830d1dc813e7d513c9f60d36b61f3fae4534e838bcfc69f4fa9d" + "logIndex": 6, + "blockHash": "0x5bd8ca98c113de21b83bf8ab5394a0136979164858c25cc0864317a9bc69ef76" } ], - "blockNumber": 7355249, - "cumulativeGasUsed": "2834904", + "blockNumber": 7568963, + "cumulativeGasUsed": "7414238", "status": 1, "byzantium": true }, "args": [ - "0xf39Acf72E84af85b191BF03f7B9BcAb102Bd9172" + "0xA581Ca3353DB73115C4625FFC7aDF5dB379434A8" ], "numDeployments": 1, - "solcInputHash": "cd42cb04f3b6a78e5824c9f427d0a55d", - "metadata": "{\"compiler\":{\"version\":\"0.8.15+commit.e14f2714\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract OptimismPortal\",\"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\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"blockedSystemAddresses\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"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\":\"contract OptimismPortal\",\"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\"}],\"devdoc\":{\"custom:proxied\":\"@title L1CrossDomainMessenger\",\"kind\":\"dev\",\"methods\":{\"baseGas(bytes,uint32)\":{\"params\":{\"_message\":\"Message to compute the amount of required gas for.\",\"_minGasLimit\":\"Minimum desired gas limit when message goes to target.\"},\"returns\":{\"_0\":\"Amount of gas required to guarantee message receipt.\"}},\"constructor\":{\"custom:semver\":\"0.0.1\",\"params\":{\"_portal\":\"Address of the OptimismPortal contract on this network.\"}},\"messageNonce()\":{\"returns\":{\"_0\":\"Nonce of the next message to be sent, with added message version.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"relayMessage(uint256,address,address,uint256,uint256,bytes)\":{\"params\":{\"_message\":\"Message to send to the target.\",\"_minGasLimit\":\"Minimum amount of gas that the message can be executed with.\",\"_nonce\":\"Nonce of the message being relayed.\",\"_sender\":\"Address of the user who sent the message.\",\"_target\":\"Address that the message is targeted at.\",\"_value\":\"ETH value to send with the message.\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"sendMessage(address,bytes,uint32)\":{\"params\":{\"_message\":\"Message to trigger the target address with.\",\"_minGasLimit\":\"Minimum gas limit that the message can be executed with.\",\"_target\":\"Target contract or wallet address.\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"version()\":{\"returns\":{\"_0\":\"Semver contract version as a string.\"}},\"xDomainMessageSender()\":{\"returns\":{\"_0\":\"Address of the sender of the currently executing message on the other chain.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"FailedRelayedMessage(bytes32)\":{\"notice\":\"Emitted whenever a message fails to be relayed on this chain.\"},\"RelayedMessage(bytes32)\":{\"notice\":\"Emitted whenever a message is successfully relayed on this chain.\"},\"SentMessage(address,address,bytes,uint256,uint256)\":{\"notice\":\"Emitted whenever a message is sent to the other chain.\"},\"SentMessageExtension1(address,uint256)\":{\"notice\":\"Additional event data to emit, required as of Bedrock. Cannot be merged with the SentMessage event without breaking the ABI of this contract, this is good enough.\"}},\"kind\":\"user\",\"methods\":{\"MESSAGE_VERSION()\":{\"notice\":\"Current message version identifier.\"},\"MIN_GAS_CALLDATA_OVERHEAD()\":{\"notice\":\"Extra gas added to base gas for each byte of calldata in a message.\"},\"MIN_GAS_CONSTANT_OVERHEAD()\":{\"notice\":\"Constant overhead added to the base gas for a message.\"},\"MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR()\":{\"notice\":\"Denominator for dynamic overhead added to the base gas for a message.\"},\"MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR()\":{\"notice\":\"Numerator for dynamic overhead added to the base gas for a message.\"},\"baseGas(bytes,uint32)\":{\"notice\":\"Computes the amount of gas required to guarantee that a given message will be received on the other chain without running out of gas. Guaranteeing that a message will not run out of gas is important because this ensures that a message can always be replayed on the other chain if it fails to execute completely.\"},\"blockedSystemAddresses(address)\":{\"notice\":\"Mapping of blocked system addresses. Note that this is NOT a mapping of blocked user addresses and cannot be used to prevent users from sending or receiving messages. This is ONLY used to prevent the execution of messages to specific system addresses that could cause security issues, e.g., having the CrossDomainMessenger send messages to itself.\"},\"initialize()\":{\"notice\":\"Initializer.\"},\"messageNonce()\":{\"notice\":\"Retrieves the next message nonce. Message version will be added to the upper two bytes of the message nonce. Message version allows us to treat messages as having different structures.\"},\"otherMessenger()\":{\"notice\":\"Address of the paired CrossDomainMessenger contract on the other chain.\"},\"pause()\":{\"notice\":\"Allows the owner of this contract to temporarily pause message relaying. Backup security mechanism just in case. Owner should be the same as the upgrade wallet to maintain the security model of the system as a whole.\"},\"portal()\":{\"notice\":\"Address of the OptimismPortal.\"},\"receivedMessages(bytes32)\":{\"notice\":\"Mapping of message hashes to boolean receipt values. Note that a message will only be present in this mapping if it failed to be relayed on this chain at least once. If a message is successfully relayed on the first attempt, then it will only be present within the successfulMessages mapping.\"},\"relayMessage(uint256,address,address,uint256,uint256,bytes)\":{\"notice\":\"Relays a message that was sent by the other CrossDomainMessenger contract. Can only be executed via cross-chain call from the other messenger OR if the message was already received once and is currently being replayed.\"},\"sendMessage(address,bytes,uint32)\":{\"notice\":\"Sends a message to some target address on the other chain.\"},\"successfulMessages(bytes32)\":{\"notice\":\"Mapping of message hashes to boolean receipt values. Note that a message will only be present in this mapping if it failed to be relayed on this chain at least once. If a message is successfully relayed on the first attempt, then it will only be present within the successfulMessages mapping.\"},\"unpause()\":{\"notice\":\"Allows the owner of this contract to resume message relaying once paused.\"},\"version()\":{\"notice\":\"Returns the full semver contract version.\"},\"xDomainMessageSender()\":{\"notice\":\"Retrieves the address of the contract or wallet that initiated the currently executing message on the other chain. Will throw an error if there is no message currently being executed. Allows the recipient of a call to see who triggered it.\"}},\"notice\":\"The L1CrossDomainMessenger is a message passing interface between L1 and L2 responsible for sending and receiving data on the L1 side. Users are encouraged to use this interface instead of interacting with lower-level contracts directly.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/L1/L1CrossDomainMessenger.sol\":\"L1CrossDomainMessenger\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@eth-optimism/contracts-periphery/=node_modules/@eth-optimism/contracts-periphery/contracts/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/\",\":@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/\",\":@rari-capital/=node_modules/@rari-capital/\",\":@rari-capital/solmate/=node_modules/@rari-capital/solmate/\",\":contracts/=contracts/\",\":ds-test/=node_modules/ds-test/src/\",\":excessively-safe-call/=node_modules/excessively-safe-call/\",\":forge-std/=node_modules/forge-std/src/\"]},\"sources\":{\"contracts/L1/L1CrossDomainMessenger.sol\":{\"keccak256\":\"0x85a4d45b3e80df64a8fac900201a9404367f91aa0c4e1a39216edefbbdb571f2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f44cff5beefd227af84c955584265a1d16e53cff1f03d68fa9fee52b6c387a17\",\"dweb:/ipfs/QmZDUu9hd9i6Gp88f4oExAW5LCM1WymjyLHCb5MU99g2Rr\"]},\"contracts/L1/L2OutputOracle.sol\":{\"keccak256\":\"0xe3242f566b5c1ae0e983e734e053552b7ef53d73f23575b5c6bbad4505aacc61\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://45451a37d695b27f1e8d80f50a75d54be55b406538b24d913cb210c021a77876\",\"dweb:/ipfs/QmUqgkGNkDBZhGJQJjKdHWwuFUhg7Cu1qPpYUcRFWSi3Pr\"]},\"contracts/L1/OptimismPortal.sol\":{\"keccak256\":\"0xbdfc47a8ef7a1665d8aa25dabcc0281860ef88c5c9646a230e53af0d27248456\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0cad521349efcdd4ca4a0a937ce126cf40417f53373bf3235182f7d9a97df358\",\"dweb:/ipfs/QmbydUJzEtjR4xaPicsjFk5MunHz41peVCRrNR7GPDBEq2\"]},\"contracts/L1/ResourceMetering.sol\":{\"keccak256\":\"0xcbb34b35a67da37c07bc9ddf900012b94605491e6845a8811fd5d6d9fff8aed6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://84f801cd1c3d30f13a9a537c550898ffb170a810d640e2138ff6efe16c76a6ca\",\"dweb:/ipfs/QmYR49Qv7nJey69r726QmkpAWwqukAN7CBXj3xn5KxHUcV\"]},\"contracts/libraries/Burn.sol\":{\"keccak256\":\"0x54233b226ba6919dc46d438bc790108d8f855001002a1b9c3c37aed7a83e5f3f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4051a4baca357a9191a6c9e3aa1593a17b69dd7915966e23e4cb269e9c1d9ed4\",\"dweb:/ipfs/QmadKjGKvxm53abVHQdsxrXBc8e9jXywu6vvhkAgjsx59J\"]},\"contracts/libraries/Bytes.sol\":{\"keccak256\":\"0x90538c876448b34513ece8e91dc3d541291f17263813f2baf7a0e93b09993f31\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://16bd9e3249cd8659fdfe03a4c77b4d72ff9d3abbde81054dcd37710d1e176e8f\",\"dweb:/ipfs/QmbQ9VBUJfzWUK2KneSFNjtiH4dmPKChsZSQVNFAXJrrrZ\"]},\"contracts/libraries/Encoding.sol\":{\"keccak256\":\"0xca8dce21b608bac08ae75d42879e90f5e7865fb29587df181a22a3b14ce21985\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://29b093d22061b4c499566cb35ce2755cce241ab9f02716cf9cdbdd81f9c47871\",\"dweb:/ipfs/QmdF4DHQUEeEeW67ugmEC3AHn6QrBBNYtwV7UaHaSTe2pa\"]},\"contracts/libraries/Hashing.sol\":{\"keccak256\":\"0xef5d0156a50f96bf32d34ef7a217872791b1b3c11baa9c13183a6388356a918d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b7790ae2e79906d26924f7b69e8a3610031db48cef4b6e306e923431def8ba86\",\"dweb:/ipfs/QmSGJEBv5XsDtsr2QTJnwGKXAXxqZafYGeZcRKKfw1yrUc\"]},\"contracts/libraries/Predeploys.sol\":{\"keccak256\":\"0xe1962e421ceb77afe52c225f43fbc1d9da832680a0c8f57c4e3ff6cf5a4b83bb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d97ce999d2d7aaa23e081d9a5bcbbb218648c2b40be51ff84138735608251f95\",\"dweb:/ipfs/QmSimBDcf7DCbLDefNnZ4xuzH1sA8t1RKZkSLCMMsh99TL\"]},\"contracts/libraries/Types.sol\":{\"keccak256\":\"0x93045c0c97287a12e1bdde0685e26f185411b81b93b9df15c8cce90bccdcf77c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0c90b59d09f92aba5ab0862264efe2beb0f77fba750867f8d686a1f39ee6af2c\",\"dweb:/ipfs/QmW7Zj5d7NgDi5Mdv6jptJgfsUj8LvGroud9p2Z7vhcKLC\"]},\"contracts/libraries/rlp/RLPReader.sol\":{\"keccak256\":\"0xef51cf7340f3e3f6ff9f651d6b284831a38f1631635c5d72121ad9498caf15b3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://034c29eee4bc5ed4f0d013162d20c17cbc0ba5d26fd0cd477bcac0235e8266f0\",\"dweb:/ipfs/QmQZ1eFbqkVKAkKc4mXUCbGrdD6rE4sgzbzbSzS8RC4SCX\"]},\"contracts/libraries/rlp/RLPWriter.sol\":{\"keccak256\":\"0x5aa9d21c5b41c9786f23153f819d561ae809a1d55c7b0d423dfeafdfbacedc78\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://921c44e6a0982b9a4011900fda1bda2c06b7a85894967de98b407a83fe9f90c0\",\"dweb:/ipfs/QmSsHLKDUQ82kpKdqB6VntVGKuPDb4W9VdotsubuqWBzio\"]},\"contracts/libraries/trie/MerkleTrie.sol\":{\"keccak256\":\"0xbbf5b9e6b2ea942038ca5ed5722352c499019b0a0026edbda9a70f777aa2600d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2222d31689b9a41747a0082c8c8689ca7560ca69528f3901c73ca0d2efc2985f\",\"dweb:/ipfs/QmXHEZtsUkrGLGT9R5kHETRNwPURCVnrKKvbbmHpDUUHVj\"]},\"contracts/libraries/trie/SecureMerkleTrie.sol\":{\"keccak256\":\"0xd27ad3665179493bab93a4316bcd2a780bfec524f774226420e931acf8043ebb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b3ec639edab8c22e020dd7a108f69d7dc99f2e9d0bb9075e9aa41d4bd1f5cc03\",\"dweb:/ipfs/QmR9fMgKEVLNm4LPbpSEX9AepmELxX6JXNm2o8tCXceBSF\"]},\"contracts/universal/CrossDomainMessenger.sol\":{\"keccak256\":\"0x099d1728f723c90d18fc488375e5816e487930cf337935657fe5bac7c7b5b3cc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c328855ffeeede5283fceedf6f1e9b58e18969b8e5b15289b2039e568d62e3f4\",\"dweb:/ipfs/QmbwJeXkrVKxX57Q5J1MDMBpAoonRmArKf2ZFya2gyVvLw\"]},\"contracts/universal/Semver.sol\":{\"keccak256\":\"0x8215e8fbaace5e06fdf0be26cd8ec224847cf03e89bd78dc8ba3ec2cb429d4fe\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cfe4869ad9a1a10aee499ed4ac74a19f9f95dd9173efa656f6b1728f6912a9ad\",\"dweb:/ipfs/QmbiKSxpNnKQv8jwEvGUJkksaLPp8UU8N1twbDimM3RhXr\"]},\"contracts/vendor/AddressAliasHelper.sol\":{\"keccak256\":\"0x6ecb83b4ec80fbe49c22f4f95d90482de64660ef5d422a19f4d4b04df31c1237\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://1d0885be6e473962f9a0622176a22300165ac0cc1a1d7f2e22b11c3d656ace88\",\"dweb:/ipfs/QmPRa3KmRpXW5P9ykveKRDgYN5zYo4cYLAYSnoqHX3KnXR\"]},\"node_modules/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d7fc8396619de513c96b6e00301b88dd790e83542aab918425633a5f7297a15a\",\"dweb:/ipfs/QmXbP4kiZyp7guuS7xe8KaybnwkRPGrBc2Kbi3vhcTfpxb\"]},\"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x0203dcadc5737d9ef2c211d6fa15d18ebc3b30dfa51903b64870b01a062b0b4e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6eb2fd1e9894dbe778f4b8131adecebe570689e63cf892f4e21257bfe1252497\",\"dweb:/ipfs/QmXgUGNfZvrn6N2miv3nooSs7Jm34A41qz94fu2GtDFcx8\"]},\"node_modules/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"keccak256\":\"0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9c7d1f5e15633ab912b74c2f57e24559e66b03232300d4b27ff0f25bc452ecad\",\"dweb:/ipfs/QmYTJkc1cntYkKQ1Tu11nBcJLakiy93Tjytc4XHELo4GmR\"]},\"node_modules/@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"keccak256\":\"0x8cc03c5ac17e8a7396e487cda41fc1f1dfdb91db7d528e6da84bee3b6dd7e167\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://607818f1b44548c2d8268176f73cdb290e1faed971b1061930d92698366e2a11\",\"dweb:/ipfs/QmQibMe3r5no95b6q7isGT5R75V8xSofWEDLXzp95b7LgZ\"]},\"node_modules/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"keccak256\":\"0x611aa3f23e59cfdd1863c536776407b3e33d695152a266fa7cfb34440a29a8a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9b4b2110b7f2b3eb32951bc08046fa90feccffa594e1176cb91cdfb0e94726b4\",\"dweb:/ipfs/QmSxLwYjicf9zWFuieRc8WQwE4FisA1Um5jp1iSa731TGt\"]},\"node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c\",\"dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a\"]},\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x32c202bd28995dd20c4347b7c6467a6d3241c74c8ad3edcbb610cd9205916c45\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8179c356adb19e70d6b31a1eedc8c5c7f0c00e669e2540f4099e3844c6074d30\",\"dweb:/ipfs/QmWFbivarEobbqhS1go64ootVuHfVohBseerYy9FTEd1W2\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0xc995bddbca1ae19788db9f8b61e63385edd3fddf89693b612d5abd1a275974d2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ab84f13e6e6e0823854a0cddd49e96df052092d5919f95587607f0ed28a64cb6\",\"dweb:/ipfs/QmbNtqAq23ZDjCzHukQaa7B3y6rcobscm6FZF5PMQXcnVr\"]},\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0xb3ebde1c8d27576db912d87c3560dab14adfb9cd001be95890ec4ba035e652e7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a709421c4f5d4677db8216055d2d4dac96a613efdb08178a9f7041f0c5cef689\",\"dweb:/ipfs/QmYs2rStvVLDnSJs8HgaMD1ABwoKKWdiVbQyNfLfFWTjTy\"]},\"node_modules/@rari-capital/solmate/src/utils/FixedPointMathLib.sol\":{\"keccak256\":\"0x622fcd8a49e132df5ec7651cc6ae3aaf0cf59bdcd67a9a804a1b9e2485113b7d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://af77088eb606427d4c55e578984a615779c86bc30646a20f7bb27299ba390f7c\",\"dweb:/ipfs/QmZGQdhdQDtHc7gZXWrKXgA3govc74X8U63BiWhPQK3mK8\"]},\"node_modules/excessively-safe-call/src/ExcessivelySafeCall.sol\":{\"keccak256\":\"0x7d9d432e8f02168bf3f790e3dabcf36402782acf7ffa476cabe86fc4d8962eb2\",\"license\":\"MIT OR Apache-2.0\",\"urls\":[\"bzz-raw://1adc13e7f399f500ea5f81480ad149a50408fde7990a2c6347e6377486f389dc\",\"dweb:/ipfs/QmSvm5TUBJqknsqNJLLHqNS4MLSH5k3vNrbquVg6ZKSfx9\"]}},\"version\":1}", - "bytecode": "0x6101006040523480156200001257600080fd5b5060405162002c2b38038062002c2b833981016040819052620000359162000510565b6000608081905260a052600160c0526001600160a01b03811660e0526200005b62000062565b5062000580565b600054610100900460ff1615808015620000835750600054600160ff909116105b80620000b35750620000a030620001fc60201b620012911760201c565b158015620000b3575060005460ff166001145b6200011c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801562000140576000805461ff0019166101001790555b60408051600180825281830190925260009160208083019080368337019050509050308160008151811062000179576200017962000542565b6001600160a01b0390921660209283029190910190910152620001b1734200000000000000000000000000000000000007826200020b565b508015620001f9576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6001600160a01b03163b151590565b600054610100900460ff16620002675760405162461bcd60e51b815260206004820152602b602482015260008051602062002c0b83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000113565b60ca805461dead6001600160a01b03199182161790915560cc80549091166001600160a01b03841617905560005b81518110156200030157600160ce6000848481518110620002ba57620002ba62000542565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580620002f88162000558565b91505062000295565b506200030c6200032e565b620003166200038c565b62000320620003f3565b6200032a6200045b565b5050565b600054610100900460ff166200038a5760405162461bcd60e51b815260206004820152602b602482015260008051602062002c0b83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000113565b565b600054610100900460ff16620003e85760405162461bcd60e51b815260206004820152602b602482015260008051602062002c0b83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000113565b6200038a33620004be565b600054610100900460ff166200044f5760405162461bcd60e51b815260206004820152602b602482015260008051602062002c0b83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000113565b6065805460ff19169055565b600054610100900460ff16620004b75760405162461bcd60e51b815260206004820152602b602482015260008051602062002c0b83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000113565b6001609755565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000602082840312156200052357600080fd5b81516001600160a01b03811681146200053b57600080fd5b9392505050565b634e487b7160e01b600052603260045260246000fd5b6000600182016200057957634e487b7160e01b600052601160045260246000fd5b5060010190565b60805160a05160c05160e05161263c620005cf600039600081816102be015281816112ea0152818161195b01526119ca015260006107ae015260006107850152600061075c015261263c6000f3fe6080604052600436106101805760003560e01c8063715018a6116100d6578063b28ade251161007f578063ecc7042811610059578063ecc704281461042b578063f2fde38b14610490578063f69f8151146104b057600080fd5b8063b28ade25146103cb578063d764ad0b146103eb578063db505d80146103fe57600080fd5b80638456cb59116100b05780638456cb591461035b5780638da5cb5b14610370578063b1b1b2091461039b57600080fd5b8063715018a61461031a5780637dea7cc31461032f5780638129fc1c1461034657600080fd5b80633f827a5a116101385780635c975abb116101125780635c975abb146102945780636425666b146102ac5780636e296e451461030557600080fd5b80633f827a5a1461020a5780634b134ce71461023257806354fd4d501461027257600080fd5b80632828d7e8116101695780632828d7e8146101ca5780633dbb202b146101e05780633f4ba83a146101f557600080fd5b8063028f85f7146101855780630c568498146101b4575b600080fd5b34801561019157600080fd5b5061019a601081565b60405163ffffffff90911681526020015b60405180910390f35b3480156101c057600080fd5b5061019a6103e881565b3480156101d657600080fd5b5061019a6103f881565b6101f36101ee366004611fe0565b6104e0565b005b34801561020157600080fd5b506101f3610743565b34801561021657600080fd5b5061021f600181565b60405161ffff90911681526020016101ab565b34801561023e57600080fd5b5061026261024d366004612047565b60ce6020526000908152604090205460ff1681565b60405190151581526020016101ab565b34801561027e57600080fd5b50610287610755565b6040516101ab91906120e5565b3480156102a057600080fd5b5060655460ff16610262565b3480156102b857600080fd5b506102e07f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101ab565b34801561031157600080fd5b506102e06107f8565b34801561032657600080fd5b506101f36108e4565b34801561033b57600080fd5b5061019a62030d4081565b34801561035257600080fd5b506101f36108f6565b34801561036757600080fd5b506101f3610b0f565b34801561037c57600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff166102e0565b3480156103a757600080fd5b506102626103b63660046120f8565b60c96020526000908152604090205460ff1681565b3480156103d757600080fd5b5061019a6103e6366004612111565b610b1f565b6101f36103f9366004612165565b610b65565b34801561040a57600080fd5b5060cc546102e09073ffffffffffffffffffffffffffffffffffffffff1681565b34801561043757600080fd5b5061048260cb547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b6040519081526020016101ab565b34801561049c57600080fd5b506101f36104ab366004612047565b6111dd565b3480156104bc57600080fd5b506102626104cb3660046120f8565b60cd6020526000908152604090205460ff1681565b60cc546106189073ffffffffffffffffffffffffffffffffffffffff16610508858585610b1f565b63ffffffff16347fd764ad0b0000000000000000000000000000000000000000000000000000000061057a60cb547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b338a34898c8c6040516024016105969796959493929190612234565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526112ad565b8373ffffffffffffffffffffffffffffffffffffffff167fcb0f7ffd78f9aee47a248fae8db181db6eee833039123e026dcbff529522e52a33858561069d60cb547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b866040516106af959493929190612293565b60405180910390a260405134815233907f8ebb2ec2465bdb2a06a66fc37a0963af8a2a6a1479d81d56fdb8cbb98096d5469060200160405180910390a2505060cb80547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808216600101167fffff0000000000000000000000000000000000000000000000000000000000009091161790555050565b61074b611362565b6107536113e3565b565b60606107807f0000000000000000000000000000000000000000000000000000000000000000611460565b6107a97f0000000000000000000000000000000000000000000000000000000000000000611460565b6107d27f0000000000000000000000000000000000000000000000000000000000000000611460565b6040516020016107e4939291906122e1565b604051602081830303815290604052905090565b60ca5460009073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2153016108c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f43726f7373446f6d61696e4d657373656e6765723a2078446f6d61696e4d657360448201527f7361676553656e646572206973206e6f7420736574000000000000000000000060648201526084015b60405180910390fd5b5060ca5473ffffffffffffffffffffffffffffffffffffffff1690565b6108ec611362565b6107536000611595565b600054610100900460ff16158080156109165750600054600160ff909116105b806109305750303b158015610930575060005460ff166001145b6109bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016108be565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610a1a57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b604080516001808252818301909252600091602080830190803683370190505090503081600081518110610a5057610a50612386565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050610aa87342000000000000000000000000000000000000078261160c565b508015610b0c57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b610b17611362565b6107536117ab565b600062030d40610b306010856123e4565b6103e8610b3f6103f8866123e4565b610b49919061243f565b610b539190612462565b610b5d9190612462565b949350505050565b600260975403610bd1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108be565b6002609755610bde611806565b6000610c24888888888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061187392505050565b9050610c2e611941565b15610cc757843414610cc2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f43726f7373446f6d61696e4d657373656e6765723a206d69736d61746368656460448201527f206d6573736167652076616c756500000000000000000000000000000000000060648201526084016108be565b610e19565b3415610d7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605060248201527f43726f7373446f6d61696e4d657373656e6765723a2076616c7565206d75737460448201527f206265207a65726f20756e6c657373206d6573736167652069732066726f6d2060648201527f612073797374656d206164647265737300000000000000000000000000000000608482015260a4016108be565b600081815260cd602052604090205460ff16610e19576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520636160448201527f6e6e6f74206265207265706c617965640000000000000000000000000000000060648201526084016108be565b73ffffffffffffffffffffffffffffffffffffffff8616600090815260ce602052604090205460ff1615610ef5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f43726f7373446f6d61696e4d657373656e6765723a2063616e6e6f742073656e60448201527f64206d65737361676520746f20626c6f636b65642073797374656d206164647260648201527f6573730000000000000000000000000000000000000000000000000000000000608482015260a4016108be565b600081815260c9602052604090205460ff1615610f94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520686160448201527f7320616c7265616479206265656e2072656c617965640000000000000000000060648201526084016108be565b610fa061afc88561248a565b5a101561102f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f43726f7373446f6d61696e4d657373656e6765723a20696e737566666963696560448201527f6e742067617320746f2072656c6179206d65737361676500000000000000000060648201526084016108be565b60ca80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff891617905560006110cd8761108361138861afc86124a2565b5a61108e91906124a2565b88600088888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611a5592505050565b5060ca80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055905080151560010361116957600082815260c9602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c91a26111c8565b600082815260cd602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f91a25b5050600160975550505050505050565b905090565b6111e5611362565b73ffffffffffffffffffffffffffffffffffffffff8116611288576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016108be565b610b0c81611595565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6040517fe9e05c4200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e9e05c4290849061132a9088908390899060009089906004016124b9565b6000604051808303818588803b15801561134357600080fd5b505af1158015611357573d6000803e3d6000fd5b505050505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108be565b6113eb611ae0565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b6060816000036114a357505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156114cd57806114b781612511565b91506114c69050600a83612549565b91506114a7565b60008167ffffffffffffffff8111156114e8576114e8612357565b6040519080825280601f01601f191660200182016040528015611512576020820181803683370190505b5090505b8415610b5d576115276001836124a2565b9150611534600a8661255d565b61153f90603061248a565b60f81b81838151811061155457611554612386565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061158e600a86612549565b9450611516565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166116a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b60ca805461dead7fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560cc805490911673ffffffffffffffffffffffffffffffffffffffff841617905560005b815181101561178657600160ce600084848151811061171757611717612386565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790558061177e81612511565b9150506116f6565b5061178f611b4c565b611797611be3565b61179f611c83565b6117a7611d44565b5050565b6117b3611806565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586114363390565b60655460ff1615610753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016108be565b600060f087901c8082036118955761188d8688858b611de2565b915050611937565b8061ffff166001036118af5761188d888888888888611e01565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f48617368696e673a20756e6b6e6f776e2063726f737320646f6d61696e206d6560448201527f73736167652076657273696f6e0000000000000000000000000000000000000060648201526084016108be565b9695505050505050565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161480156111d8575060cc54604080517f9bf62d82000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff928316927f00000000000000000000000000000000000000000000000000000000000000001691639bf62d829160048083019260209291908290030181865afa158015611a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a399190612571565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b6000606060008060008661ffff1667ffffffffffffffff811115611a7b57611a7b612357565b6040519080825280601f01601f191660200182016040528015611aa5576020820181803683370190505b5090506000808751602089018b8e8ef191503d925086831115611ac6578692505b828152826000602083013e90999098509650505050505050565b60655460ff16610753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016108be565b600054610100900460ff16610753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b600054610100900460ff16611c7a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b61075333611595565b600054610100900460ff16611d1a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b600054610100900460ff16611ddb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b6001609755565b6000611df085858585611e24565b805190602001209050949350505050565b6000611e11878787878787611ebd565b8051906020012090509695505050505050565b606084848484604051602401611e3d949392919061258e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fcbd4ece9000000000000000000000000000000000000000000000000000000001790529050949350505050565b6060868686868686604051602401611eda969594939291906125d8565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd764ad0b0000000000000000000000000000000000000000000000000000000017905290509695505050505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610b0c57600080fd5b60008083601f840112611f9057600080fd5b50813567ffffffffffffffff811115611fa857600080fd5b602083019150836020828501011115611fc057600080fd5b9250929050565b803563ffffffff81168114611fdb57600080fd5b919050565b60008060008060608587031215611ff657600080fd5b843561200181611f5c565b9350602085013567ffffffffffffffff81111561201d57600080fd5b61202987828801611f7e565b909450925061203c905060408601611fc7565b905092959194509250565b60006020828403121561205957600080fd5b813561206481611f5c565b9392505050565b60005b8381101561208657818101518382015260200161206e565b83811115612095576000848401525b50505050565b600081518084526120b381602086016020860161206b565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612064602083018461209b565b60006020828403121561210a57600080fd5b5035919050565b60008060006040848603121561212657600080fd5b833567ffffffffffffffff81111561213d57600080fd5b61214986828701611f7e565b909450925061215c905060208501611fc7565b90509250925092565b600080600080600080600060c0888a03121561218057600080fd5b87359650602088013561219281611f5c565b955060408801356121a281611f5c565b9450606088013593506080880135925060a088013567ffffffffffffffff8111156121cc57600080fd5b6121d88a828b01611f7e565b989b979a50959850939692959293505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b878152600073ffffffffffffffffffffffffffffffffffffffff808916602084015280881660408401525085606083015263ffffffff8516608083015260c060a083015261228660c0830184866121eb565b9998505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff861681526080602082015260006122c36080830186886121eb565b905083604083015263ffffffff831660608301529695505050505050565b600084516122f381846020890161206b565b80830190507f2e00000000000000000000000000000000000000000000000000000000000000808252855161232f816001850160208a0161206b565b6001920191820152835161234a81600284016020880161206b565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff80831681851681830481118215151615612407576124076123b5565b02949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600063ffffffff8084168061245657612456612410565b92169190910492915050565b600063ffffffff808316818516808303821115612481576124816123b5565b01949350505050565b6000821982111561249d5761249d6123b5565b500190565b6000828210156124b4576124b46123b5565b500390565b73ffffffffffffffffffffffffffffffffffffffff8616815284602082015267ffffffffffffffff84166040820152821515606082015260a06080820152600061250660a083018461209b565b979650505050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612542576125426123b5565b5060010190565b60008261255857612558612410565b500490565b60008261256c5761256c612410565b500690565b60006020828403121561258357600080fd5b815161206481611f5c565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250608060408301526125c7608083018561209b565b905082606083015295945050505050565b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a083015261262360c083018461209b565b9897505050505050505056fea164736f6c634300080f000a496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", - "deployedBytecode": "0x6080604052600436106101805760003560e01c8063715018a6116100d6578063b28ade251161007f578063ecc7042811610059578063ecc704281461042b578063f2fde38b14610490578063f69f8151146104b057600080fd5b8063b28ade25146103cb578063d764ad0b146103eb578063db505d80146103fe57600080fd5b80638456cb59116100b05780638456cb591461035b5780638da5cb5b14610370578063b1b1b2091461039b57600080fd5b8063715018a61461031a5780637dea7cc31461032f5780638129fc1c1461034657600080fd5b80633f827a5a116101385780635c975abb116101125780635c975abb146102945780636425666b146102ac5780636e296e451461030557600080fd5b80633f827a5a1461020a5780634b134ce71461023257806354fd4d501461027257600080fd5b80632828d7e8116101695780632828d7e8146101ca5780633dbb202b146101e05780633f4ba83a146101f557600080fd5b8063028f85f7146101855780630c568498146101b4575b600080fd5b34801561019157600080fd5b5061019a601081565b60405163ffffffff90911681526020015b60405180910390f35b3480156101c057600080fd5b5061019a6103e881565b3480156101d657600080fd5b5061019a6103f881565b6101f36101ee366004611fe0565b6104e0565b005b34801561020157600080fd5b506101f3610743565b34801561021657600080fd5b5061021f600181565b60405161ffff90911681526020016101ab565b34801561023e57600080fd5b5061026261024d366004612047565b60ce6020526000908152604090205460ff1681565b60405190151581526020016101ab565b34801561027e57600080fd5b50610287610755565b6040516101ab91906120e5565b3480156102a057600080fd5b5060655460ff16610262565b3480156102b857600080fd5b506102e07f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101ab565b34801561031157600080fd5b506102e06107f8565b34801561032657600080fd5b506101f36108e4565b34801561033b57600080fd5b5061019a62030d4081565b34801561035257600080fd5b506101f36108f6565b34801561036757600080fd5b506101f3610b0f565b34801561037c57600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff166102e0565b3480156103a757600080fd5b506102626103b63660046120f8565b60c96020526000908152604090205460ff1681565b3480156103d757600080fd5b5061019a6103e6366004612111565b610b1f565b6101f36103f9366004612165565b610b65565b34801561040a57600080fd5b5060cc546102e09073ffffffffffffffffffffffffffffffffffffffff1681565b34801561043757600080fd5b5061048260cb547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b6040519081526020016101ab565b34801561049c57600080fd5b506101f36104ab366004612047565b6111dd565b3480156104bc57600080fd5b506102626104cb3660046120f8565b60cd6020526000908152604090205460ff1681565b60cc546106189073ffffffffffffffffffffffffffffffffffffffff16610508858585610b1f565b63ffffffff16347fd764ad0b0000000000000000000000000000000000000000000000000000000061057a60cb547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b338a34898c8c6040516024016105969796959493929190612234565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526112ad565b8373ffffffffffffffffffffffffffffffffffffffff167fcb0f7ffd78f9aee47a248fae8db181db6eee833039123e026dcbff529522e52a33858561069d60cb547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b866040516106af959493929190612293565b60405180910390a260405134815233907f8ebb2ec2465bdb2a06a66fc37a0963af8a2a6a1479d81d56fdb8cbb98096d5469060200160405180910390a2505060cb80547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808216600101167fffff0000000000000000000000000000000000000000000000000000000000009091161790555050565b61074b611362565b6107536113e3565b565b60606107807f0000000000000000000000000000000000000000000000000000000000000000611460565b6107a97f0000000000000000000000000000000000000000000000000000000000000000611460565b6107d27f0000000000000000000000000000000000000000000000000000000000000000611460565b6040516020016107e4939291906122e1565b604051602081830303815290604052905090565b60ca5460009073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2153016108c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f43726f7373446f6d61696e4d657373656e6765723a2078446f6d61696e4d657360448201527f7361676553656e646572206973206e6f7420736574000000000000000000000060648201526084015b60405180910390fd5b5060ca5473ffffffffffffffffffffffffffffffffffffffff1690565b6108ec611362565b6107536000611595565b600054610100900460ff16158080156109165750600054600160ff909116105b806109305750303b158015610930575060005460ff166001145b6109bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016108be565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610a1a57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b604080516001808252818301909252600091602080830190803683370190505090503081600081518110610a5057610a50612386565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050610aa87342000000000000000000000000000000000000078261160c565b508015610b0c57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b610b17611362565b6107536117ab565b600062030d40610b306010856123e4565b6103e8610b3f6103f8866123e4565b610b49919061243f565b610b539190612462565b610b5d9190612462565b949350505050565b600260975403610bd1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108be565b6002609755610bde611806565b6000610c24888888888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061187392505050565b9050610c2e611941565b15610cc757843414610cc2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f43726f7373446f6d61696e4d657373656e6765723a206d69736d61746368656460448201527f206d6573736167652076616c756500000000000000000000000000000000000060648201526084016108be565b610e19565b3415610d7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605060248201527f43726f7373446f6d61696e4d657373656e6765723a2076616c7565206d75737460448201527f206265207a65726f20756e6c657373206d6573736167652069732066726f6d2060648201527f612073797374656d206164647265737300000000000000000000000000000000608482015260a4016108be565b600081815260cd602052604090205460ff16610e19576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520636160448201527f6e6e6f74206265207265706c617965640000000000000000000000000000000060648201526084016108be565b73ffffffffffffffffffffffffffffffffffffffff8616600090815260ce602052604090205460ff1615610ef5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f43726f7373446f6d61696e4d657373656e6765723a2063616e6e6f742073656e60448201527f64206d65737361676520746f20626c6f636b65642073797374656d206164647260648201527f6573730000000000000000000000000000000000000000000000000000000000608482015260a4016108be565b600081815260c9602052604090205460ff1615610f94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520686160448201527f7320616c7265616479206265656e2072656c617965640000000000000000000060648201526084016108be565b610fa061afc88561248a565b5a101561102f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f43726f7373446f6d61696e4d657373656e6765723a20696e737566666963696560448201527f6e742067617320746f2072656c6179206d65737361676500000000000000000060648201526084016108be565b60ca80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff891617905560006110cd8761108361138861afc86124a2565b5a61108e91906124a2565b88600088888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611a5592505050565b5060ca80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055905080151560010361116957600082815260c9602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c91a26111c8565b600082815260cd602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f91a25b5050600160975550505050505050565b905090565b6111e5611362565b73ffffffffffffffffffffffffffffffffffffffff8116611288576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016108be565b610b0c81611595565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6040517fe9e05c4200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e9e05c4290849061132a9088908390899060009089906004016124b9565b6000604051808303818588803b15801561134357600080fd5b505af1158015611357573d6000803e3d6000fd5b505050505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108be565b6113eb611ae0565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b6060816000036114a357505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156114cd57806114b781612511565b91506114c69050600a83612549565b91506114a7565b60008167ffffffffffffffff8111156114e8576114e8612357565b6040519080825280601f01601f191660200182016040528015611512576020820181803683370190505b5090505b8415610b5d576115276001836124a2565b9150611534600a8661255d565b61153f90603061248a565b60f81b81838151811061155457611554612386565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061158e600a86612549565b9450611516565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166116a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b60ca805461dead7fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560cc805490911673ffffffffffffffffffffffffffffffffffffffff841617905560005b815181101561178657600160ce600084848151811061171757611717612386565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790558061177e81612511565b9150506116f6565b5061178f611b4c565b611797611be3565b61179f611c83565b6117a7611d44565b5050565b6117b3611806565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586114363390565b60655460ff1615610753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016108be565b600060f087901c8082036118955761188d8688858b611de2565b915050611937565b8061ffff166001036118af5761188d888888888888611e01565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f48617368696e673a20756e6b6e6f776e2063726f737320646f6d61696e206d6560448201527f73736167652076657273696f6e0000000000000000000000000000000000000060648201526084016108be565b9695505050505050565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161480156111d8575060cc54604080517f9bf62d82000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff928316927f00000000000000000000000000000000000000000000000000000000000000001691639bf62d829160048083019260209291908290030181865afa158015611a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a399190612571565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b6000606060008060008661ffff1667ffffffffffffffff811115611a7b57611a7b612357565b6040519080825280601f01601f191660200182016040528015611aa5576020820181803683370190505b5090506000808751602089018b8e8ef191503d925086831115611ac6578692505b828152826000602083013e90999098509650505050505050565b60655460ff16610753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016108be565b600054610100900460ff16610753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b600054610100900460ff16611c7a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b61075333611595565b600054610100900460ff16611d1a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b600054610100900460ff16611ddb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b6001609755565b6000611df085858585611e24565b805190602001209050949350505050565b6000611e11878787878787611ebd565b8051906020012090509695505050505050565b606084848484604051602401611e3d949392919061258e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fcbd4ece9000000000000000000000000000000000000000000000000000000001790529050949350505050565b6060868686868686604051602401611eda969594939291906125d8565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd764ad0b0000000000000000000000000000000000000000000000000000000017905290509695505050505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610b0c57600080fd5b60008083601f840112611f9057600080fd5b50813567ffffffffffffffff811115611fa857600080fd5b602083019150836020828501011115611fc057600080fd5b9250929050565b803563ffffffff81168114611fdb57600080fd5b919050565b60008060008060608587031215611ff657600080fd5b843561200181611f5c565b9350602085013567ffffffffffffffff81111561201d57600080fd5b61202987828801611f7e565b909450925061203c905060408601611fc7565b905092959194509250565b60006020828403121561205957600080fd5b813561206481611f5c565b9392505050565b60005b8381101561208657818101518382015260200161206e565b83811115612095576000848401525b50505050565b600081518084526120b381602086016020860161206b565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612064602083018461209b565b60006020828403121561210a57600080fd5b5035919050565b60008060006040848603121561212657600080fd5b833567ffffffffffffffff81111561213d57600080fd5b61214986828701611f7e565b909450925061215c905060208501611fc7565b90509250925092565b600080600080600080600060c0888a03121561218057600080fd5b87359650602088013561219281611f5c565b955060408801356121a281611f5c565b9450606088013593506080880135925060a088013567ffffffffffffffff8111156121cc57600080fd5b6121d88a828b01611f7e565b989b979a50959850939692959293505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b878152600073ffffffffffffffffffffffffffffffffffffffff808916602084015280881660408401525085606083015263ffffffff8516608083015260c060a083015261228660c0830184866121eb565b9998505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff861681526080602082015260006122c36080830186886121eb565b905083604083015263ffffffff831660608301529695505050505050565b600084516122f381846020890161206b565b80830190507f2e00000000000000000000000000000000000000000000000000000000000000808252855161232f816001850160208a0161206b565b6001920191820152835161234a81600284016020880161206b565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff80831681851681830481118215151615612407576124076123b5565b02949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600063ffffffff8084168061245657612456612410565b92169190910492915050565b600063ffffffff808316818516808303821115612481576124816123b5565b01949350505050565b6000821982111561249d5761249d6123b5565b500190565b6000828210156124b4576124b46123b5565b500390565b73ffffffffffffffffffffffffffffffffffffffff8616815284602082015267ffffffffffffffff84166040820152821515606082015260a06080820152600061250660a083018461209b565b979650505050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612542576125426123b5565b5060010190565b60008261255857612558612410565b500490565b60008261256c5761256c612410565b500690565b60006020828403121561258357600080fd5b815161206481611f5c565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250608060408301526125c7608083018561209b565b905082606083015295945050505050565b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a083015261262360c083018461209b565b9897505050505050505056fea164736f6c634300080f000a", + "solcInputHash": "ada691c3f5ff59bd3e60fdb28388fb6d", + "metadata": "{\"compiler\":{\"version\":\"0.8.15+commit.e14f2714\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract OptimismPortal\",\"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\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"blockedSystemAddresses\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"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\":\"contract OptimismPortal\",\"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\"}],\"devdoc\":{\"custom:proxied\":\"@title L1CrossDomainMessenger\",\"kind\":\"dev\",\"methods\":{\"baseGas(bytes,uint32)\":{\"params\":{\"_message\":\"Message to compute the amount of required gas for.\",\"_minGasLimit\":\"Minimum desired gas limit when message goes to target.\"},\"returns\":{\"_0\":\"Amount of gas required to guarantee message receipt.\"}},\"constructor\":{\"custom:semver\":\"0.0.1\",\"params\":{\"_portal\":\"Address of the OptimismPortal contract on this network.\"}},\"messageNonce()\":{\"returns\":{\"_0\":\"Nonce of the next message to be sent, with added message version.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"relayMessage(uint256,address,address,uint256,uint256,bytes)\":{\"params\":{\"_message\":\"Message to send to the target.\",\"_minGasLimit\":\"Minimum amount of gas that the message can be executed with.\",\"_nonce\":\"Nonce of the message being relayed.\",\"_sender\":\"Address of the user who sent the message.\",\"_target\":\"Address that the message is targeted at.\",\"_value\":\"ETH value to send with the message.\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"sendMessage(address,bytes,uint32)\":{\"params\":{\"_message\":\"Message to trigger the target address with.\",\"_minGasLimit\":\"Minimum gas limit that the message can be executed with.\",\"_target\":\"Target contract or wallet address.\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"version()\":{\"returns\":{\"_0\":\"Semver contract version as a string.\"}},\"xDomainMessageSender()\":{\"returns\":{\"_0\":\"Address of the sender of the currently executing message on the other chain.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"FailedRelayedMessage(bytes32)\":{\"notice\":\"Emitted whenever a message fails to be relayed on this chain.\"},\"RelayedMessage(bytes32)\":{\"notice\":\"Emitted whenever a message is successfully relayed on this chain.\"},\"SentMessage(address,address,bytes,uint256,uint256)\":{\"notice\":\"Emitted whenever a message is sent to the other chain.\"},\"SentMessageExtension1(address,uint256)\":{\"notice\":\"Additional event data to emit, required as of Bedrock. Cannot be merged with the SentMessage event without breaking the ABI of this contract, this is good enough.\"}},\"kind\":\"user\",\"methods\":{\"MESSAGE_VERSION()\":{\"notice\":\"Current message version identifier.\"},\"MIN_GAS_CALLDATA_OVERHEAD()\":{\"notice\":\"Extra gas added to base gas for each byte of calldata in a message.\"},\"MIN_GAS_CONSTANT_OVERHEAD()\":{\"notice\":\"Constant overhead added to the base gas for a message.\"},\"MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR()\":{\"notice\":\"Denominator for dynamic overhead added to the base gas for a message.\"},\"MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR()\":{\"notice\":\"Numerator for dynamic overhead added to the base gas for a message.\"},\"baseGas(bytes,uint32)\":{\"notice\":\"Computes the amount of gas required to guarantee that a given message will be received on the other chain without running out of gas. Guaranteeing that a message will not run out of gas is important because this ensures that a message can always be replayed on the other chain if it fails to execute completely.\"},\"blockedSystemAddresses(address)\":{\"notice\":\"Mapping of blocked system addresses. Note that this is NOT a mapping of blocked user addresses and cannot be used to prevent users from sending or receiving messages. This is ONLY used to prevent the execution of messages to specific system addresses that could cause security issues, e.g., having the CrossDomainMessenger send messages to itself.\"},\"initialize()\":{\"notice\":\"Initializer.\"},\"messageNonce()\":{\"notice\":\"Retrieves the next message nonce. Message version will be added to the upper two bytes of the message nonce. Message version allows us to treat messages as having different structures.\"},\"otherMessenger()\":{\"notice\":\"Address of the paired CrossDomainMessenger contract on the other chain.\"},\"pause()\":{\"notice\":\"Allows the owner of this contract to temporarily pause message relaying. Backup security mechanism just in case. Owner should be the same as the upgrade wallet to maintain the security model of the system as a whole.\"},\"portal()\":{\"notice\":\"Address of the OptimismPortal.\"},\"receivedMessages(bytes32)\":{\"notice\":\"Mapping of message hashes to boolean receipt values. Note that a message will only be present in this mapping if it failed to be relayed on this chain at least once. If a message is successfully relayed on the first attempt, then it will only be present within the successfulMessages mapping.\"},\"relayMessage(uint256,address,address,uint256,uint256,bytes)\":{\"notice\":\"Relays a message that was sent by the other CrossDomainMessenger contract. Can only be executed via cross-chain call from the other messenger OR if the message was already received once and is currently being replayed.\"},\"sendMessage(address,bytes,uint32)\":{\"notice\":\"Sends a message to some target address on the other chain.\"},\"successfulMessages(bytes32)\":{\"notice\":\"Mapping of message hashes to boolean receipt values. Note that a message will only be present in this mapping if it failed to be relayed on this chain at least once. If a message is successfully relayed on the first attempt, then it will only be present within the successfulMessages mapping.\"},\"unpause()\":{\"notice\":\"Allows the owner of this contract to resume message relaying once paused.\"},\"version()\":{\"notice\":\"Returns the full semver contract version.\"},\"xDomainMessageSender()\":{\"notice\":\"Retrieves the address of the contract or wallet that initiated the currently executing message on the other chain. Will throw an error if there is no message currently being executed. Allows the recipient of a call to see who triggered it.\"}},\"notice\":\"The L1CrossDomainMessenger is a message passing interface between L1 and L2 responsible for sending and receiving data on the L1 side. Users are encouraged to use this interface instead of interacting with lower-level contracts directly.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/L1/L1CrossDomainMessenger.sol\":\"L1CrossDomainMessenger\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@eth-optimism/contracts-periphery/=node_modules/@eth-optimism/contracts-periphery/contracts/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/\",\":@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/\",\":@rari-capital/=node_modules/@rari-capital/\",\":@rari-capital/solmate/=node_modules/@rari-capital/solmate/\",\":contracts/=contracts/\",\":ds-test/=node_modules/ds-test/src/\",\":forge-std/=node_modules/forge-std/src/\"]},\"sources\":{\"contracts/L1/L1CrossDomainMessenger.sol\":{\"keccak256\":\"0x85a4d45b3e80df64a8fac900201a9404367f91aa0c4e1a39216edefbbdb571f2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f44cff5beefd227af84c955584265a1d16e53cff1f03d68fa9fee52b6c387a17\",\"dweb:/ipfs/QmZDUu9hd9i6Gp88f4oExAW5LCM1WymjyLHCb5MU99g2Rr\"]},\"contracts/L1/L2OutputOracle.sol\":{\"keccak256\":\"0xedbefffc244badc0a6ccaa4eb19112d5527a4a5366e335186a46605b7fcb1174\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2e9c96610ca1955d166368322b65065944f7de8cdd638e4921548c378819895b\",\"dweb:/ipfs/QmUmqta7EjQ5Wr6uhgmeuEh5hdRxNpKmXBjJrjBYWk23Yi\"]},\"contracts/L1/OptimismPortal.sol\":{\"keccak256\":\"0x4ef7b68c74ec41fc277a34440f81c7a0819543af5dd9bd6afa6ef58a60be5c71\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b7364929db9c69b51ec9e833ec1a439558897d4d068eaf8de63a29128f06ca5a\",\"dweb:/ipfs/QmdqGYu4F5Xzok6vbcoo1UnsxXZ5odJDMw1bLmWjgaM8Dd\"]},\"contracts/L1/ResourceMetering.sol\":{\"keccak256\":\"0xcbb34b35a67da37c07bc9ddf900012b94605491e6845a8811fd5d6d9fff8aed6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://84f801cd1c3d30f13a9a537c550898ffb170a810d640e2138ff6efe16c76a6ca\",\"dweb:/ipfs/QmYR49Qv7nJey69r726QmkpAWwqukAN7CBXj3xn5KxHUcV\"]},\"contracts/libraries/Burn.sol\":{\"keccak256\":\"0x54233b226ba6919dc46d438bc790108d8f855001002a1b9c3c37aed7a83e5f3f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4051a4baca357a9191a6c9e3aa1593a17b69dd7915966e23e4cb269e9c1d9ed4\",\"dweb:/ipfs/QmadKjGKvxm53abVHQdsxrXBc8e9jXywu6vvhkAgjsx59J\"]},\"contracts/libraries/Bytes.sol\":{\"keccak256\":\"0x90538c876448b34513ece8e91dc3d541291f17263813f2baf7a0e93b09993f31\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://16bd9e3249cd8659fdfe03a4c77b4d72ff9d3abbde81054dcd37710d1e176e8f\",\"dweb:/ipfs/QmbQ9VBUJfzWUK2KneSFNjtiH4dmPKChsZSQVNFAXJrrrZ\"]},\"contracts/libraries/Encoding.sol\":{\"keccak256\":\"0xca8dce21b608bac08ae75d42879e90f5e7865fb29587df181a22a3b14ce21985\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://29b093d22061b4c499566cb35ce2755cce241ab9f02716cf9cdbdd81f9c47871\",\"dweb:/ipfs/QmdF4DHQUEeEeW67ugmEC3AHn6QrBBNYtwV7UaHaSTe2pa\"]},\"contracts/libraries/Hashing.sol\":{\"keccak256\":\"0xef5d0156a50f96bf32d34ef7a217872791b1b3c11baa9c13183a6388356a918d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b7790ae2e79906d26924f7b69e8a3610031db48cef4b6e306e923431def8ba86\",\"dweb:/ipfs/QmSGJEBv5XsDtsr2QTJnwGKXAXxqZafYGeZcRKKfw1yrUc\"]},\"contracts/libraries/Predeploys.sol\":{\"keccak256\":\"0x49779635e2aff61b9c501cccfec885b34665b932706362ce6b86acd75d95b8b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5d03728a5a28ea1b89f59fb2107719ba475c65124ac5acc75af09cb4d2262866\",\"dweb:/ipfs/QmWiMhr8myTyYGdKHMZeaYNxGPNFAygmQCqsAX8SX4bFjE\"]},\"contracts/libraries/SafeCall.sol\":{\"keccak256\":\"0xbb0621c028c18e9d5a54cf1a8136cf2e77f161de48aeb8d911e230f6b280c9ed\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://924ecc629c7642bc19e2f8a390f1b946d22862c8889453da681b5bc1a45d7703\",\"dweb:/ipfs/QmbNknQ8pzssXDXGVjXxzZ8zh1YnNCWtRJVepiM1TnqoqQ\"]},\"contracts/libraries/Types.sol\":{\"keccak256\":\"0x93045c0c97287a12e1bdde0685e26f185411b81b93b9df15c8cce90bccdcf77c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0c90b59d09f92aba5ab0862264efe2beb0f77fba750867f8d686a1f39ee6af2c\",\"dweb:/ipfs/QmW7Zj5d7NgDi5Mdv6jptJgfsUj8LvGroud9p2Z7vhcKLC\"]},\"contracts/libraries/rlp/RLPReader.sol\":{\"keccak256\":\"0xef51cf7340f3e3f6ff9f651d6b284831a38f1631635c5d72121ad9498caf15b3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://034c29eee4bc5ed4f0d013162d20c17cbc0ba5d26fd0cd477bcac0235e8266f0\",\"dweb:/ipfs/QmQZ1eFbqkVKAkKc4mXUCbGrdD6rE4sgzbzbSzS8RC4SCX\"]},\"contracts/libraries/rlp/RLPWriter.sol\":{\"keccak256\":\"0x5aa9d21c5b41c9786f23153f819d561ae809a1d55c7b0d423dfeafdfbacedc78\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://921c44e6a0982b9a4011900fda1bda2c06b7a85894967de98b407a83fe9f90c0\",\"dweb:/ipfs/QmSsHLKDUQ82kpKdqB6VntVGKuPDb4W9VdotsubuqWBzio\"]},\"contracts/libraries/trie/MerkleTrie.sol\":{\"keccak256\":\"0xbbf5b9e6b2ea942038ca5ed5722352c499019b0a0026edbda9a70f777aa2600d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2222d31689b9a41747a0082c8c8689ca7560ca69528f3901c73ca0d2efc2985f\",\"dweb:/ipfs/QmXHEZtsUkrGLGT9R5kHETRNwPURCVnrKKvbbmHpDUUHVj\"]},\"contracts/libraries/trie/SecureMerkleTrie.sol\":{\"keccak256\":\"0xd27ad3665179493bab93a4316bcd2a780bfec524f774226420e931acf8043ebb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b3ec639edab8c22e020dd7a108f69d7dc99f2e9d0bb9075e9aa41d4bd1f5cc03\",\"dweb:/ipfs/QmR9fMgKEVLNm4LPbpSEX9AepmELxX6JXNm2o8tCXceBSF\"]},\"contracts/universal/CrossDomainMessenger.sol\":{\"keccak256\":\"0x9f8f2fdd38e0653848eb8497b0c02bb82525e5946d2d98e3f28547847f91ad42\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a078624a7ab90bd7fbc6bc6a0224d3eeb3bab4c3e701213989b9781ab3a8e785\",\"dweb:/ipfs/QmRFRLGt8QZQmrA5jM7wB1d5feEaDmkS1ppH7Jo7iYtHdg\"]},\"contracts/universal/Semver.sol\":{\"keccak256\":\"0x8215e8fbaace5e06fdf0be26cd8ec224847cf03e89bd78dc8ba3ec2cb429d4fe\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cfe4869ad9a1a10aee499ed4ac74a19f9f95dd9173efa656f6b1728f6912a9ad\",\"dweb:/ipfs/QmbiKSxpNnKQv8jwEvGUJkksaLPp8UU8N1twbDimM3RhXr\"]},\"contracts/vendor/AddressAliasHelper.sol\":{\"keccak256\":\"0x6ecb83b4ec80fbe49c22f4f95d90482de64660ef5d422a19f4d4b04df31c1237\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://1d0885be6e473962f9a0622176a22300165ac0cc1a1d7f2e22b11c3d656ace88\",\"dweb:/ipfs/QmPRa3KmRpXW5P9ykveKRDgYN5zYo4cYLAYSnoqHX3KnXR\"]},\"node_modules/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d7fc8396619de513c96b6e00301b88dd790e83542aab918425633a5f7297a15a\",\"dweb:/ipfs/QmXbP4kiZyp7guuS7xe8KaybnwkRPGrBc2Kbi3vhcTfpxb\"]},\"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x0203dcadc5737d9ef2c211d6fa15d18ebc3b30dfa51903b64870b01a062b0b4e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6eb2fd1e9894dbe778f4b8131adecebe570689e63cf892f4e21257bfe1252497\",\"dweb:/ipfs/QmXgUGNfZvrn6N2miv3nooSs7Jm34A41qz94fu2GtDFcx8\"]},\"node_modules/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"keccak256\":\"0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9c7d1f5e15633ab912b74c2f57e24559e66b03232300d4b27ff0f25bc452ecad\",\"dweb:/ipfs/QmYTJkc1cntYkKQ1Tu11nBcJLakiy93Tjytc4XHELo4GmR\"]},\"node_modules/@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"keccak256\":\"0x8cc03c5ac17e8a7396e487cda41fc1f1dfdb91db7d528e6da84bee3b6dd7e167\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://607818f1b44548c2d8268176f73cdb290e1faed971b1061930d92698366e2a11\",\"dweb:/ipfs/QmQibMe3r5no95b6q7isGT5R75V8xSofWEDLXzp95b7LgZ\"]},\"node_modules/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"keccak256\":\"0x611aa3f23e59cfdd1863c536776407b3e33d695152a266fa7cfb34440a29a8a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9b4b2110b7f2b3eb32951bc08046fa90feccffa594e1176cb91cdfb0e94726b4\",\"dweb:/ipfs/QmSxLwYjicf9zWFuieRc8WQwE4FisA1Um5jp1iSa731TGt\"]},\"node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c\",\"dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a\"]},\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6f2cf1c531122bc7ca96b8c8db6a60deae60441e5223065e792553d4849b5638\",\"dweb:/ipfs/QmPBdJmBBABMDCfyDjCbdxgiqRavgiSL88SYPGibgbPas9\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0xd15c3e400531f00203839159b2b8e7209c5158b35618f570c695b7e47f12e9f0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b600b852e0597aa69989cc263111f02097e2827edc1bdc70306303e3af5e9929\",\"dweb:/ipfs/QmU4WfM28A1nDqghuuGeFmN3CnVrk6opWtiF65K4vhFPeC\"]},\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0xb3ebde1c8d27576db912d87c3560dab14adfb9cd001be95890ec4ba035e652e7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a709421c4f5d4677db8216055d2d4dac96a613efdb08178a9f7041f0c5cef689\",\"dweb:/ipfs/QmYs2rStvVLDnSJs8HgaMD1ABwoKKWdiVbQyNfLfFWTjTy\"]},\"node_modules/@rari-capital/solmate/src/utils/FixedPointMathLib.sol\":{\"keccak256\":\"0x622fcd8a49e132df5ec7651cc6ae3aaf0cf59bdcd67a9a804a1b9e2485113b7d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://af77088eb606427d4c55e578984a615779c86bc30646a20f7bb27299ba390f7c\",\"dweb:/ipfs/QmZGQdhdQDtHc7gZXWrKXgA3govc74X8U63BiWhPQK3mK8\"]}},\"version\":1}", + "bytecode": "0x6101006040523480156200001257600080fd5b5060405162002cab38038062002cab833981016040819052620000359162000535565b6000608081905260a052600160c0526001600160a01b03811660e0526200005b62000062565b50620005a5565b600054600160a81b900460ff16158080156200008b57506000546001600160a01b90910460ff16105b80620000c25750620000a8306200021760201b620012f91760201c565b158015620000c25750600054600160a01b900460ff166001145b6200012b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff60a01b1916600160a01b179055801562000159576000805460ff60a81b1916600160a81b1790555b60408051600180825281830190925260009160208083019080368337019050509050308160008151811062000192576200019262000567565b6001600160a01b0390921660209283029190910190910152620001ca7342000000000000000000000000000000000000078262000226565b50801562000214576000805460ff60a81b19169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6001600160a01b03163b151590565b600054600160a81b900460ff16620002845760405162461bcd60e51b815260206004820152602b602482015260008051602062002c8b83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000122565b60cc805461dead6001600160a01b03199182161790915560ce80549091166001600160a01b03841617905560005b81518110156200031e57600160d06000848481518110620002d757620002d762000567565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558062000315816200057d565b915050620002b2565b50620003296200034b565b62000333620003ab565b6200033d62000414565b620003476200047e565b5050565b600054600160a81b900460ff16620003a95760405162461bcd60e51b815260206004820152602b602482015260008051602062002c8b83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000122565b565b600054600160a81b900460ff16620004095760405162461bcd60e51b815260206004820152602b602482015260008051602062002c8b83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000122565b620003a933620004e3565b600054600160a81b900460ff16620004725760405162461bcd60e51b815260206004820152602b602482015260008051602062002c8b83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000122565b6065805460ff19169055565b600054600160a81b900460ff16620004dc5760405162461bcd60e51b815260206004820152602b602482015260008051602062002c8b83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000122565b6001609755565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000602082840312156200054857600080fd5b81516001600160a01b03811681146200056057600080fd5b9392505050565b634e487b7160e01b600052603260045260246000fd5b6000600182016200059e57634e487b7160e01b600052601160045260246000fd5b5060010190565b60805160a05160c05160e051612697620005f4600039600081816102be01528181611352015281816119d70152611a46015260006107ae015260006107850152600061075c01526126976000f3fe6080604052600436106101805760003560e01c8063715018a6116100d6578063b28ade251161007f578063ecc7042811610059578063ecc704281461042b578063f2fde38b14610490578063f69f8151146104b057600080fd5b8063b28ade25146103cb578063d764ad0b146103eb578063db505d80146103fe57600080fd5b80638456cb59116100b05780638456cb591461035b5780638da5cb5b14610370578063b1b1b2091461039b57600080fd5b8063715018a61461031a5780637dea7cc31461032f5780638129fc1c1461034657600080fd5b80633f827a5a116101385780635c975abb116101125780635c975abb146102945780636425666b146102ac5780636e296e451461030557600080fd5b80633f827a5a1461020a5780634b134ce71461023257806354fd4d501461027257600080fd5b80632828d7e8116101695780632828d7e8146101ca5780633dbb202b146101e05780633f4ba83a146101f557600080fd5b8063028f85f7146101855780630c568498146101b4575b600080fd5b34801561019157600080fd5b5061019a601081565b60405163ffffffff90911681526020015b60405180910390f35b3480156101c057600080fd5b5061019a6103e881565b3480156101d657600080fd5b5061019a6103f881565b6101f36101ee36600461203b565b6104e0565b005b34801561020157600080fd5b506101f3610743565b34801561021657600080fd5b5061021f600181565b60405161ffff90911681526020016101ab565b34801561023e57600080fd5b5061026261024d3660046120a2565b60d06020526000908152604090205460ff1681565b60405190151581526020016101ab565b34801561027e57600080fd5b50610287610755565b6040516101ab9190612140565b3480156102a057600080fd5b5060655460ff16610262565b3480156102b857600080fd5b506102e07f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101ab565b34801561031157600080fd5b506102e06107f8565b34801561032657600080fd5b506101f36108e4565b34801561033b57600080fd5b5061019a62030d4081565b34801561035257600080fd5b506101f36108f6565b34801561036757600080fd5b506101f3610b7a565b34801561037c57600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff166102e0565b3480156103a757600080fd5b506102626103b6366004612153565b60cb6020526000908152604090205460ff1681565b3480156103d757600080fd5b5061019a6103e636600461216c565b610b8a565b6101f36103f93660046121c0565b610bd0565b34801561040a57600080fd5b5060ce546102e09073ffffffffffffffffffffffffffffffffffffffff1681565b34801561043757600080fd5b5061048260cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b6040519081526020016101ab565b34801561049c57600080fd5b506101f36104ab3660046120a2565b611245565b3480156104bc57600080fd5b506102626104cb366004612153565b60cf6020526000908152604090205460ff1681565b60ce546106189073ffffffffffffffffffffffffffffffffffffffff16610508858585610b8a565b63ffffffff16347fd764ad0b0000000000000000000000000000000000000000000000000000000061057a60cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b338a34898c8c604051602401610596979695949392919061228f565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611315565b8373ffffffffffffffffffffffffffffffffffffffff167fcb0f7ffd78f9aee47a248fae8db181db6eee833039123e026dcbff529522e52a33858561069d60cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b866040516106af9594939291906122ee565b60405180910390a260405134815233907f8ebb2ec2465bdb2a06a66fc37a0963af8a2a6a1479d81d56fdb8cbb98096d5469060200160405180910390a2505060cd80547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808216600101167fffff0000000000000000000000000000000000000000000000000000000000009091161790555050565b61074b6113ca565b61075361144b565b565b60606107807f00000000000000000000000000000000000000000000000000000000000000006114c8565b6107a97f00000000000000000000000000000000000000000000000000000000000000006114c8565b6107d27f00000000000000000000000000000000000000000000000000000000000000006114c8565b6040516020016107e49392919061233c565b604051602081830303815290604052905090565b60cc5460009073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2153016108c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f43726f7373446f6d61696e4d657373656e6765723a2078446f6d61696e4d657360448201527f7361676553656e646572206973206e6f7420736574000000000000000000000060648201526084015b60405180910390fd5b5060cc5473ffffffffffffffffffffffffffffffffffffffff1690565b6108ec6113ca565b61075360006115fd565b6000547501000000000000000000000000000000000000000000900460ff1615808015610941575060005460017401000000000000000000000000000000000000000090910460ff16105b806109735750303b158015610973575060005474010000000000000000000000000000000000000000900460ff166001145b6109ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016108be565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790558015610a8557600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790555b604080516001808252818301909252600091602080830190803683370190505090503081600081518110610abb57610abb6123e1565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050610b1373420000000000000000000000000000000000000782611674565b508015610b7757600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b610b826113ca565b610753611827565b600062030d40610b9b60108561243f565b6103e8610baa6103f88661243f565b610bb4919061249a565b610bbe91906124bd565b610bc891906124bd565b949350505050565b600260975403610c3c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108be565b6002609755610c49611882565b6000610c8f888888888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506118ef92505050565b9050610c996119bd565b15610d3257843414610d2d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f43726f7373446f6d61696e4d657373656e6765723a206d69736d61746368656460448201527f206d6573736167652076616c756500000000000000000000000000000000000060648201526084016108be565b610e84565b3415610de6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605060248201527f43726f7373446f6d61696e4d657373656e6765723a2076616c7565206d75737460448201527f206265207a65726f20756e6c657373206d6573736167652069732066726f6d2060648201527f612073797374656d206164647265737300000000000000000000000000000000608482015260a4016108be565b600081815260cf602052604090205460ff16610e84576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520636160448201527f6e6e6f74206265207265706c617965640000000000000000000000000000000060648201526084016108be565b73ffffffffffffffffffffffffffffffffffffffff8616600090815260d0602052604090205460ff1615610f60576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f43726f7373446f6d61696e4d657373656e6765723a2063616e6e6f742073656e60448201527f64206d65737361676520746f20626c6f636b65642073797374656d206164647260648201527f6573730000000000000000000000000000000000000000000000000000000000608482015260a4016108be565b600081815260cb602052604090205460ff1615610fff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520686160448201527f7320616c7265616479206265656e2072656c617965640000000000000000000060648201526084016108be565b61100b61afc8856124e5565b5a101561109a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f43726f7373446f6d61696e4d657373656e6765723a20696e737566666963696560448201527f6e742067617320746f2072656c6179206d65737361676500000000000000000060648201526084016108be565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff89161790556000611136876110ee61138861afc86124fd565b5a6110f991906124fd565b8887878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611ad192505050565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead17905590508015156001036111d157600082815260cb602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c91a2611230565b600082815260cf602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f91a25b5050600160975550505050505050565b905090565b61124d6113ca565b73ffffffffffffffffffffffffffffffffffffffff81166112f0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016108be565b610b77816115fd565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6040517fe9e05c4200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e9e05c42908490611392908890839089906000908990600401612514565b6000604051808303818588803b1580156113ab57600080fd5b505af11580156113bf573d6000803e3d6000fd5b505050505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108be565b611453611aeb565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60608160000361150b57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611535578061151f8161256c565b915061152e9050600a836125a4565b915061150f565b60008167ffffffffffffffff811115611550576115506123b2565b6040519080825280601f01601f19166020018201604052801561157a576020820181803683370190505b5090505b8415610bc85761158f6001836124fd565b915061159c600a866125b8565b6115a79060306124e5565b60f81b8183815181106115bc576115bc6123e1565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506115f6600a866125a4565b945061157e565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000547501000000000000000000000000000000000000000000900460ff1661171f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b60cc805461dead7fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560ce805490911673ffffffffffffffffffffffffffffffffffffffff841617905560005b815181101561180257600160d06000848481518110611793576117936123e1565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055806117fa8161256c565b915050611772565b5061180b611b57565b611813611c02565b61181b611cb6565b611823611d8b565b5050565b61182f611882565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861149e3390565b60655460ff1615610753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016108be565b600060f087901c808203611911576119098688858b611e3d565b9150506119b3565b8061ffff1660010361192b57611909888888888888611e5c565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f48617368696e673a20756e6b6e6f776e2063726f737320646f6d61696e206d6560448201527f73736167652076657273696f6e0000000000000000000000000000000000000060648201526084016108be565b9695505050505050565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015611240575060ce54604080517f9bf62d82000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff928316927f00000000000000000000000000000000000000000000000000000000000000001691639bf62d829160048083019260209291908290030181865afa158015611a91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab591906125cc565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b600080600080845160208601878a8af19695505050505050565b60655460ff16610753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016108be565b6000547501000000000000000000000000000000000000000000900460ff16610753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b6000547501000000000000000000000000000000000000000000900460ff16611cad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b610753336115fd565b6000547501000000000000000000000000000000000000000000900460ff16611d61576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b6000547501000000000000000000000000000000000000000000900460ff16611e36576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b6001609755565b6000611e4b85858585611e7f565b805190602001209050949350505050565b6000611e6c878787878787611f18565b8051906020012090509695505050505050565b606084848484604051602401611e9894939291906125e9565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fcbd4ece9000000000000000000000000000000000000000000000000000000001790529050949350505050565b6060868686868686604051602401611f3596959493929190612633565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd764ad0b0000000000000000000000000000000000000000000000000000000017905290509695505050505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610b7757600080fd5b60008083601f840112611feb57600080fd5b50813567ffffffffffffffff81111561200357600080fd5b60208301915083602082850101111561201b57600080fd5b9250929050565b803563ffffffff8116811461203657600080fd5b919050565b6000806000806060858703121561205157600080fd5b843561205c81611fb7565b9350602085013567ffffffffffffffff81111561207857600080fd5b61208487828801611fd9565b9094509250612097905060408601612022565b905092959194509250565b6000602082840312156120b457600080fd5b81356120bf81611fb7565b9392505050565b60005b838110156120e15781810151838201526020016120c9565b838111156120f0576000848401525b50505050565b6000815180845261210e8160208601602086016120c6565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006120bf60208301846120f6565b60006020828403121561216557600080fd5b5035919050565b60008060006040848603121561218157600080fd5b833567ffffffffffffffff81111561219857600080fd5b6121a486828701611fd9565b90945092506121b7905060208501612022565b90509250925092565b600080600080600080600060c0888a0312156121db57600080fd5b8735965060208801356121ed81611fb7565b955060408801356121fd81611fb7565b9450606088013593506080880135925060a088013567ffffffffffffffff81111561222757600080fd5b6122338a828b01611fd9565b989b979a50959850939692959293505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b878152600073ffffffffffffffffffffffffffffffffffffffff808916602084015280881660408401525085606083015263ffffffff8516608083015260c060a08301526122e160c083018486612246565b9998505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8616815260806020820152600061231e608083018688612246565b905083604083015263ffffffff831660608301529695505050505050565b6000845161234e8184602089016120c6565b80830190507f2e00000000000000000000000000000000000000000000000000000000000000808252855161238a816001850160208a016120c6565b600192019182015283516123a58160028401602088016120c6565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff8083168185168183048111821515161561246257612462612410565b02949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600063ffffffff808416806124b1576124b161246b565b92169190910492915050565b600063ffffffff8083168185168083038211156124dc576124dc612410565b01949350505050565b600082198211156124f8576124f8612410565b500190565b60008282101561250f5761250f612410565b500390565b73ffffffffffffffffffffffffffffffffffffffff8616815284602082015267ffffffffffffffff84166040820152821515606082015260a06080820152600061256160a08301846120f6565b979650505050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361259d5761259d612410565b5060010190565b6000826125b3576125b361246b565b500490565b6000826125c7576125c761246b565b500690565b6000602082840312156125de57600080fd5b81516120bf81611fb7565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152506080604083015261262260808301856120f6565b905082606083015295945050505050565b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a083015261267e60c08301846120f6565b9897505050505050505056fea164736f6c634300080f000a496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", + "deployedBytecode": "0x6080604052600436106101805760003560e01c8063715018a6116100d6578063b28ade251161007f578063ecc7042811610059578063ecc704281461042b578063f2fde38b14610490578063f69f8151146104b057600080fd5b8063b28ade25146103cb578063d764ad0b146103eb578063db505d80146103fe57600080fd5b80638456cb59116100b05780638456cb591461035b5780638da5cb5b14610370578063b1b1b2091461039b57600080fd5b8063715018a61461031a5780637dea7cc31461032f5780638129fc1c1461034657600080fd5b80633f827a5a116101385780635c975abb116101125780635c975abb146102945780636425666b146102ac5780636e296e451461030557600080fd5b80633f827a5a1461020a5780634b134ce71461023257806354fd4d501461027257600080fd5b80632828d7e8116101695780632828d7e8146101ca5780633dbb202b146101e05780633f4ba83a146101f557600080fd5b8063028f85f7146101855780630c568498146101b4575b600080fd5b34801561019157600080fd5b5061019a601081565b60405163ffffffff90911681526020015b60405180910390f35b3480156101c057600080fd5b5061019a6103e881565b3480156101d657600080fd5b5061019a6103f881565b6101f36101ee36600461203b565b6104e0565b005b34801561020157600080fd5b506101f3610743565b34801561021657600080fd5b5061021f600181565b60405161ffff90911681526020016101ab565b34801561023e57600080fd5b5061026261024d3660046120a2565b60d06020526000908152604090205460ff1681565b60405190151581526020016101ab565b34801561027e57600080fd5b50610287610755565b6040516101ab9190612140565b3480156102a057600080fd5b5060655460ff16610262565b3480156102b857600080fd5b506102e07f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101ab565b34801561031157600080fd5b506102e06107f8565b34801561032657600080fd5b506101f36108e4565b34801561033b57600080fd5b5061019a62030d4081565b34801561035257600080fd5b506101f36108f6565b34801561036757600080fd5b506101f3610b7a565b34801561037c57600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff166102e0565b3480156103a757600080fd5b506102626103b6366004612153565b60cb6020526000908152604090205460ff1681565b3480156103d757600080fd5b5061019a6103e636600461216c565b610b8a565b6101f36103f93660046121c0565b610bd0565b34801561040a57600080fd5b5060ce546102e09073ffffffffffffffffffffffffffffffffffffffff1681565b34801561043757600080fd5b5061048260cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b6040519081526020016101ab565b34801561049c57600080fd5b506101f36104ab3660046120a2565b611245565b3480156104bc57600080fd5b506102626104cb366004612153565b60cf6020526000908152604090205460ff1681565b60ce546106189073ffffffffffffffffffffffffffffffffffffffff16610508858585610b8a565b63ffffffff16347fd764ad0b0000000000000000000000000000000000000000000000000000000061057a60cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b338a34898c8c604051602401610596979695949392919061228f565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611315565b8373ffffffffffffffffffffffffffffffffffffffff167fcb0f7ffd78f9aee47a248fae8db181db6eee833039123e026dcbff529522e52a33858561069d60cd547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790565b866040516106af9594939291906122ee565b60405180910390a260405134815233907f8ebb2ec2465bdb2a06a66fc37a0963af8a2a6a1479d81d56fdb8cbb98096d5469060200160405180910390a2505060cd80547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808216600101167fffff0000000000000000000000000000000000000000000000000000000000009091161790555050565b61074b6113ca565b61075361144b565b565b60606107807f00000000000000000000000000000000000000000000000000000000000000006114c8565b6107a97f00000000000000000000000000000000000000000000000000000000000000006114c8565b6107d27f00000000000000000000000000000000000000000000000000000000000000006114c8565b6040516020016107e49392919061233c565b604051602081830303815290604052905090565b60cc5460009073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2153016108c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f43726f7373446f6d61696e4d657373656e6765723a2078446f6d61696e4d657360448201527f7361676553656e646572206973206e6f7420736574000000000000000000000060648201526084015b60405180910390fd5b5060cc5473ffffffffffffffffffffffffffffffffffffffff1690565b6108ec6113ca565b61075360006115fd565b6000547501000000000000000000000000000000000000000000900460ff1615808015610941575060005460017401000000000000000000000000000000000000000090910460ff16105b806109735750303b158015610973575060005474010000000000000000000000000000000000000000900460ff166001145b6109ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016108be565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790558015610a8557600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790555b604080516001808252818301909252600091602080830190803683370190505090503081600081518110610abb57610abb6123e1565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050610b1373420000000000000000000000000000000000000782611674565b508015610b7757600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b610b826113ca565b610753611827565b600062030d40610b9b60108561243f565b6103e8610baa6103f88661243f565b610bb4919061249a565b610bbe91906124bd565b610bc891906124bd565b949350505050565b600260975403610c3c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108be565b6002609755610c49611882565b6000610c8f888888888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506118ef92505050565b9050610c996119bd565b15610d3257843414610d2d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f43726f7373446f6d61696e4d657373656e6765723a206d69736d61746368656460448201527f206d6573736167652076616c756500000000000000000000000000000000000060648201526084016108be565b610e84565b3415610de6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605060248201527f43726f7373446f6d61696e4d657373656e6765723a2076616c7565206d75737460448201527f206265207a65726f20756e6c657373206d6573736167652069732066726f6d2060648201527f612073797374656d206164647265737300000000000000000000000000000000608482015260a4016108be565b600081815260cf602052604090205460ff16610e84576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520636160448201527f6e6e6f74206265207265706c617965640000000000000000000000000000000060648201526084016108be565b73ffffffffffffffffffffffffffffffffffffffff8616600090815260d0602052604090205460ff1615610f60576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f43726f7373446f6d61696e4d657373656e6765723a2063616e6e6f742073656e60448201527f64206d65737361676520746f20626c6f636b65642073797374656d206164647260648201527f6573730000000000000000000000000000000000000000000000000000000000608482015260a4016108be565b600081815260cb602052604090205460ff1615610fff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43726f7373446f6d61696e4d657373656e6765723a206d65737361676520686160448201527f7320616c7265616479206265656e2072656c617965640000000000000000000060648201526084016108be565b61100b61afc8856124e5565b5a101561109a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f43726f7373446f6d61696e4d657373656e6765723a20696e737566666963696560448201527f6e742067617320746f2072656c6179206d65737361676500000000000000000060648201526084016108be565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff89161790556000611136876110ee61138861afc86124fd565b5a6110f991906124fd565b8887878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611ad192505050565b60cc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead17905590508015156001036111d157600082815260cb602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c91a2611230565b600082815260cf602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183917f99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f91a25b5050600160975550505050505050565b905090565b61124d6113ca565b73ffffffffffffffffffffffffffffffffffffffff81166112f0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016108be565b610b77816115fd565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6040517fe9e05c4200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e9e05c42908490611392908890839089906000908990600401612514565b6000604051808303818588803b1580156113ab57600080fd5b505af11580156113bf573d6000803e3d6000fd5b505050505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108be565b611453611aeb565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60608160000361150b57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611535578061151f8161256c565b915061152e9050600a836125a4565b915061150f565b60008167ffffffffffffffff811115611550576115506123b2565b6040519080825280601f01601f19166020018201604052801561157a576020820181803683370190505b5090505b8415610bc85761158f6001836124fd565b915061159c600a866125b8565b6115a79060306124e5565b60f81b8183815181106115bc576115bc6123e1565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506115f6600a866125a4565b945061157e565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000547501000000000000000000000000000000000000000000900460ff1661171f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b60cc805461dead7fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560ce805490911673ffffffffffffffffffffffffffffffffffffffff841617905560005b815181101561180257600160d06000848481518110611793576117936123e1565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055806117fa8161256c565b915050611772565b5061180b611b57565b611813611c02565b61181b611cb6565b611823611d8b565b5050565b61182f611882565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861149e3390565b60655460ff1615610753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016108be565b600060f087901c808203611911576119098688858b611e3d565b9150506119b3565b8061ffff1660010361192b57611909888888888888611e5c565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f48617368696e673a20756e6b6e6f776e2063726f737320646f6d61696e206d6560448201527f73736167652076657273696f6e0000000000000000000000000000000000000060648201526084016108be565b9695505050505050565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015611240575060ce54604080517f9bf62d82000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff928316927f00000000000000000000000000000000000000000000000000000000000000001691639bf62d829160048083019260209291908290030181865afa158015611a91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab591906125cc565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b600080600080845160208601878a8af19695505050505050565b60655460ff16610753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016108be565b6000547501000000000000000000000000000000000000000000900460ff16610753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b6000547501000000000000000000000000000000000000000000900460ff16611cad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b610753336115fd565b6000547501000000000000000000000000000000000000000000900460ff16611d61576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b606580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b6000547501000000000000000000000000000000000000000000900460ff16611e36576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108be565b6001609755565b6000611e4b85858585611e7f565b805190602001209050949350505050565b6000611e6c878787878787611f18565b8051906020012090509695505050505050565b606084848484604051602401611e9894939291906125e9565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fcbd4ece9000000000000000000000000000000000000000000000000000000001790529050949350505050565b6060868686868686604051602401611f3596959493929190612633565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd764ad0b0000000000000000000000000000000000000000000000000000000017905290509695505050505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610b7757600080fd5b60008083601f840112611feb57600080fd5b50813567ffffffffffffffff81111561200357600080fd5b60208301915083602082850101111561201b57600080fd5b9250929050565b803563ffffffff8116811461203657600080fd5b919050565b6000806000806060858703121561205157600080fd5b843561205c81611fb7565b9350602085013567ffffffffffffffff81111561207857600080fd5b61208487828801611fd9565b9094509250612097905060408601612022565b905092959194509250565b6000602082840312156120b457600080fd5b81356120bf81611fb7565b9392505050565b60005b838110156120e15781810151838201526020016120c9565b838111156120f0576000848401525b50505050565b6000815180845261210e8160208601602086016120c6565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006120bf60208301846120f6565b60006020828403121561216557600080fd5b5035919050565b60008060006040848603121561218157600080fd5b833567ffffffffffffffff81111561219857600080fd5b6121a486828701611fd9565b90945092506121b7905060208501612022565b90509250925092565b600080600080600080600060c0888a0312156121db57600080fd5b8735965060208801356121ed81611fb7565b955060408801356121fd81611fb7565b9450606088013593506080880135925060a088013567ffffffffffffffff81111561222757600080fd5b6122338a828b01611fd9565b989b979a50959850939692959293505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b878152600073ffffffffffffffffffffffffffffffffffffffff808916602084015280881660408401525085606083015263ffffffff8516608083015260c060a08301526122e160c083018486612246565b9998505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8616815260806020820152600061231e608083018688612246565b905083604083015263ffffffff831660608301529695505050505050565b6000845161234e8184602089016120c6565b80830190507f2e00000000000000000000000000000000000000000000000000000000000000808252855161238a816001850160208a016120c6565b600192019182015283516123a58160028401602088016120c6565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff8083168185168183048111821515161561246257612462612410565b02949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600063ffffffff808416806124b1576124b161246b565b92169190910492915050565b600063ffffffff8083168185168083038211156124dc576124dc612410565b01949350505050565b600082198211156124f8576124f8612410565b500190565b60008282101561250f5761250f612410565b500390565b73ffffffffffffffffffffffffffffffffffffffff8616815284602082015267ffffffffffffffff84166040820152821515606082015260a06080820152600061256160a08301846120f6565b979650505050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361259d5761259d612410565b5060010190565b6000826125b3576125b361246b565b500490565b6000826125c7576125c761246b565b500690565b6000602082840312156125de57600080fd5b81516120bf81611fb7565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152506080604083015261262260808301856120f6565b905082606083015295945050505050565b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a083015261267e60c08301846120f6565b9897505050505050505056fea164736f6c634300080f000a", "devdoc": { "version": 1, "kind": "dev", @@ -688,23 +688,31 @@ "storageLayout": { "storage": [ { - "astId": 25872, + "astId": 23579, "contract": "contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger", - "label": "_initialized", + "label": "spacer0", "offset": 0, "slot": "0", + "type": "t_address" + }, + { + "astId": 26027, + "contract": "contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger", + "label": "_initialized", + "offset": 20, + "slot": "0", "type": "t_uint8" }, { - "astId": 25875, + "astId": 26030, "contract": "contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger", "label": "_initializing", - "offset": 1, + "offset": 21, "slot": "0", "type": "t_bool" }, { - "astId": 26486, + "astId": 26641, "contract": "contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger", "label": "__gap", "offset": 0, @@ -712,7 +720,7 @@ "type": "t_array(t_uint256)50_storage" }, { - "astId": 25744, + "astId": 25899, "contract": "contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger", "label": "_owner", "offset": 0, @@ -720,7 +728,7 @@ "type": "t_address" }, { - "astId": 25864, + "astId": 26019, "contract": "contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger", "label": "__gap", "offset": 0, @@ -728,7 +736,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 26037, + "astId": 26192, "contract": "contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger", "label": "_paused", "offset": 0, @@ -736,7 +744,7 @@ "type": "t_bool" }, { - "astId": 26142, + "astId": 26297, "contract": "contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger", "label": "__gap", "offset": 0, @@ -744,7 +752,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 26157, + "astId": 26312, "contract": "contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger", "label": "_status", "offset": 0, @@ -752,7 +760,7 @@ "type": "t_uint256" }, { - "astId": 26201, + "astId": 26356, "contract": "contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger", "label": "__gap", "offset": 0, @@ -760,51 +768,67 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 23479, + "astId": 23626, "contract": "contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger", - "label": "successfulMessages", + "label": "spacer1", "offset": 0, "slot": "201", + "type": "t_uint256" + }, + { + "astId": 23629, + "contract": "contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger", + "label": "spacer2", + "offset": 0, + "slot": "202", + "type": "t_uint256" + }, + { + "astId": 23634, + "contract": "contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger", + "label": "successfulMessages", + "offset": 0, + "slot": "203", "type": "t_mapping(t_bytes32,t_bool)" }, { - "astId": 23482, + "astId": 23637, "contract": "contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger", "label": "xDomainMsgSender", "offset": 0, - "slot": "202", + "slot": "204", "type": "t_address" }, { - "astId": 23485, + "astId": 23640, "contract": "contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger", "label": "msgNonce", "offset": 0, - "slot": "203", + "slot": "205", "type": "t_uint240" }, { - "astId": 23488, + "astId": 23643, "contract": "contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger", "label": "otherMessenger", "offset": 0, - "slot": "204", + "slot": "206", "type": "t_address" }, { - "astId": 23493, + "astId": 23648, "contract": "contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger", "label": "receivedMessages", "offset": 0, - "slot": "205", + "slot": "207", "type": "t_mapping(t_bytes32,t_bool)" }, { - "astId": 23498, + "astId": 23653, "contract": "contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger", "label": "blockedSystemAddresses", "offset": 0, - "slot": "206", + "slot": "208", "type": "t_mapping(t_address,t_bool)" } ], @@ -817,12 +841,14 @@ "t_array(t_uint256)49_storage": { "encoding": "inplace", "label": "uint256[49]", - "numberOfBytes": "1568" + "numberOfBytes": "1568", + "base": "t_uint256" }, "t_array(t_uint256)50_storage": { "encoding": "inplace", "label": "uint256[50]", - "numberOfBytes": "1600" + "numberOfBytes": "1600", + "base": "t_uint256" }, "t_bool": { "encoding": "inplace", @@ -836,13 +862,17 @@ }, "t_mapping(t_address,t_bool)": { "encoding": "mapping", + "key": "t_address", "label": "mapping(address => bool)", - "numberOfBytes": "32" + "numberOfBytes": "32", + "value": "t_bool" }, "t_mapping(t_bytes32,t_bool)": { "encoding": "mapping", + "key": "t_bytes32", "label": "mapping(bytes32 => bool)", - "numberOfBytes": "32" + "numberOfBytes": "32", + "value": "t_bool" }, "t_uint240": { "encoding": "inplace", diff --git a/packages/contracts-bedrock/deployments/goerli/L1CrossDomainMessengerProxy.json b/packages/contracts-bedrock/deployments/alpha-1/L1CrossDomainMessengerProxy.json similarity index 93% rename from packages/contracts-bedrock/deployments/goerli/L1CrossDomainMessengerProxy.json rename to packages/contracts-bedrock/deployments/alpha-1/L1CrossDomainMessengerProxy.json index 81adb5c1c2850..6a5d5c428be48 100644 --- a/packages/contracts-bedrock/deployments/goerli/L1CrossDomainMessengerProxy.json +++ b/packages/contracts-bedrock/deployments/alpha-1/L1CrossDomainMessengerProxy.json @@ -1,5 +1,5 @@ { - "address": "0x01023027D890148a873140f1E0628f3CD83f41f8", + "address": "0x838a6DC4E37CA45D4Ef05bb776bf05eEf50798De", "abi": [ { "inputs": [ @@ -129,41 +129,41 @@ "type": "receive" } ], - "transactionHash": "0xa13a56105e84820afb095ccde94d6a32b251a72b8f4433039378b8f38d068568", + "transactionHash": "0x87850af6e43059cdb3ddd7989131155be33050d4ca7f7c167c5f1cd0501497d0", "receipt": { "to": null, - "from": "0xCFf7a9856DB3C60AB546b8F43dC5D1A4336786A0", - "contractAddress": "0x01023027D890148a873140f1E0628f3CD83f41f8", - "transactionIndex": 0, + "from": "0x1D066Ef7AA90ae85Bb017e85968A9e1851DA95Db", + "contractAddress": "0x838a6DC4E37CA45D4Ef05bb776bf05eEf50798De", + "transactionIndex": 1, "gasUsed": "523812", - "logsBloom": "0x00000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000800000000000000000000000000000000000", - "blockHash": "0xc861953a3bc9923aa1a474a8bf39c1580dab7a2236b739d2a2d7afa984c7c661", - "transactionHash": "0xa13a56105e84820afb095ccde94d6a32b251a72b8f4433039378b8f38d068568", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000020000000000000000000000000000000", + "blockHash": "0x8503f0e1f8d0f3ce085e5a1ff5b93949f348092365c49ad10b86111b1b6df21a", + "transactionHash": "0x87850af6e43059cdb3ddd7989131155be33050d4ca7f7c167c5f1cd0501497d0", "logs": [ { - "transactionIndex": 0, - "blockNumber": 7355248, - "transactionHash": "0xa13a56105e84820afb095ccde94d6a32b251a72b8f4433039378b8f38d068568", - "address": "0x01023027D890148a873140f1E0628f3CD83f41f8", + "transactionIndex": 1, + "blockNumber": 7568962, + "transactionHash": "0x87850af6e43059cdb3ddd7989131155be33050d4ca7f7c167c5f1cd0501497d0", + "address": "0x838a6DC4E37CA45D4Ef05bb776bf05eEf50798De", "topics": [ "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cff7a9856db3c60ab546b8f43dc5d1a4336786a0", - "logIndex": 0, - "blockHash": "0xc861953a3bc9923aa1a474a8bf39c1580dab7a2236b739d2a2d7afa984c7c661" + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000001d066ef7aa90ae85bb017e85968a9e1851da95db", + "logIndex": 1, + "blockHash": "0x8503f0e1f8d0f3ce085e5a1ff5b93949f348092365c49ad10b86111b1b6df21a" } ], - "blockNumber": 7355248, - "cumulativeGasUsed": "523812", + "blockNumber": 7568962, + "cumulativeGasUsed": "1047624", "status": 1, "byzantium": true }, "args": [ - "0xCFf7a9856DB3C60AB546b8F43dC5D1A4336786A0" + "0x1D066Ef7AA90ae85Bb017e85968A9e1851DA95Db" ], "numDeployments": 1, - "solcInputHash": "cd42cb04f3b6a78e5824c9f427d0a55d", - "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\":{\"contracts/universal/Proxy.sol\":\"Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@eth-optimism/contracts-periphery/=node_modules/@eth-optimism/contracts-periphery/contracts/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/\",\":@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/\",\":@rari-capital/=node_modules/@rari-capital/\",\":@rari-capital/solmate/=node_modules/@rari-capital/solmate/\",\":contracts/=contracts/\",\":ds-test/=node_modules/ds-test/src/\",\":excessively-safe-call/=node_modules/excessively-safe-call/\",\":forge-std/=node_modules/forge-std/src/\"]},\"sources\":{\"contracts/universal/Proxy.sol\":{\"keccak256\":\"0xfa08635f1866139673ac4fe7b07330f752f93800075b895d8fcb8484f4a3f753\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8f2247604d527f560edbb851c43b6c16b37e34972ddb305e16dd73623b8288cd\",\"dweb:/ipfs/QmfM8sLAZrxrnqyRdt1XJ5LyJh4wKbeEqk3VkvxG7BDqFj\"]}},\"version\":1}", + "solcInputHash": "ada691c3f5ff59bd3e60fdb28388fb6d", + "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\":{\"contracts/universal/Proxy.sol\":\"Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@eth-optimism/contracts-periphery/=node_modules/@eth-optimism/contracts-periphery/contracts/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/\",\":@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/\",\":@rari-capital/=node_modules/@rari-capital/\",\":@rari-capital/solmate/=node_modules/@rari-capital/solmate/\",\":contracts/=contracts/\",\":ds-test/=node_modules/ds-test/src/\",\":forge-std/=node_modules/forge-std/src/\"]},\"sources\":{\"contracts/universal/Proxy.sol\":{\"keccak256\":\"0xfa08635f1866139673ac4fe7b07330f752f93800075b895d8fcb8484f4a3f753\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8f2247604d527f560edbb851c43b6c16b37e34972ddb305e16dd73623b8288cd\",\"dweb:/ipfs/QmfM8sLAZrxrnqyRdt1XJ5LyJh4wKbeEqk3VkvxG7BDqFj\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b5060405161091838038061091883398101604081905261002f916100b2565b6100388161003e565b506100e2565b60006100566000805160206108f88339815191525490565b6000805160206108f8833981519152839055604080516001600160a01b038084168252851660208201529192507f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b6000602082840312156100c457600080fd5b81516001600160a01b03811681146100db57600080fd5b9392505050565b610807806100f16000396000f3fe60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100be5780638f283970146100f8578063f851a440146101185761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61012d565b005b61006b61012d565b34801561008157600080fd5b5061006b6100903660046106d9565b610224565b6100a86100a33660046106f4565b610296565b6040516100b59190610777565b60405180910390f35b3480156100ca57600080fd5b506100d3610419565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100b5565b34801561010457600080fd5b5061006b6101133660046106d9565b6104b0565b34801561012457600080fd5b506100d3610517565b60006101577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905073ffffffffffffffffffffffffffffffffffffffff8116610201576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f50726f78793a20696d706c656d656e746174696f6e206e6f7420696e6974696160448201527f6c697a656400000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3660008037600080366000845af43d6000803e8061021e573d6000fd5b503d6000f35b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061027d575033155b1561028e5761028b816105a3565b50565b61028b61012d565b60606102c07fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806102f7575033155b1561040a57610305846105a3565b6000808573ffffffffffffffffffffffffffffffffffffffff16858560405161032f9291906107ea565b600060405180830381855af49150503d806000811461036a576040519150601f19603f3d011682016040523d82523d6000602084013e61036f565b606091505b509150915081610401576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f50726f78793a2064656c656761746563616c6c20746f206e657720696d706c6560448201527f6d656e746174696f6e20636f6e7472616374206661696c65640000000000000060648201526084016101f8565b91506104129050565b61041261012d565b9392505050565b60006104437fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061047a575033155b156104a557507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6104ad61012d565b90565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610509575033155b1561028e5761028b8161060b565b60006105417fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610578575033155b156104a557507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81905560405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60006106357fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038390556040805173ffffffffffffffffffffffffffffffffffffffff8084168252851660208201529192507f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b803573ffffffffffffffffffffffffffffffffffffffff811681146106d457600080fd5b919050565b6000602082840312156106eb57600080fd5b610412826106b0565b60008060006040848603121561070957600080fd5b610712846106b0565b9250602084013567ffffffffffffffff8082111561072f57600080fd5b818601915086601f83011261074357600080fd5b81358181111561075257600080fd5b87602082850101111561076457600080fd5b6020830194508093505050509250925092565b600060208083528351808285015260005b818110156107a457858101830151858201604001528201610788565b818111156107b6576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b818382376000910190815291905056fea164736f6c634300080f000ab53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", "deployedBytecode": "0x60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100be5780638f283970146100f8578063f851a440146101185761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61012d565b005b61006b61012d565b34801561008157600080fd5b5061006b6100903660046106d9565b610224565b6100a86100a33660046106f4565b610296565b6040516100b59190610777565b60405180910390f35b3480156100ca57600080fd5b506100d3610419565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100b5565b34801561010457600080fd5b5061006b6101133660046106d9565b6104b0565b34801561012457600080fd5b506100d3610517565b60006101577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905073ffffffffffffffffffffffffffffffffffffffff8116610201576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f50726f78793a20696d706c656d656e746174696f6e206e6f7420696e6974696160448201527f6c697a656400000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3660008037600080366000845af43d6000803e8061021e573d6000fd5b503d6000f35b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061027d575033155b1561028e5761028b816105a3565b50565b61028b61012d565b60606102c07fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806102f7575033155b1561040a57610305846105a3565b6000808573ffffffffffffffffffffffffffffffffffffffff16858560405161032f9291906107ea565b600060405180830381855af49150503d806000811461036a576040519150601f19603f3d011682016040523d82523d6000602084013e61036f565b606091505b509150915081610401576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f50726f78793a2064656c656761746563616c6c20746f206e657720696d706c6560448201527f6d656e746174696f6e20636f6e7472616374206661696c65640000000000000060648201526084016101f8565b91506104129050565b61041261012d565b9392505050565b60006104437fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061047a575033155b156104a557507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6104ad61012d565b90565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610509575033155b1561028e5761028b8161060b565b60006105417fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610578575033155b156104a557507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81905560405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60006106357fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038390556040805173ffffffffffffffffffffffffffffffffffffffff8084168252851660208201529192507f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b803573ffffffffffffffffffffffffffffffffffffffff811681146106d457600080fd5b919050565b6000602082840312156106eb57600080fd5b610412826106b0565b60008060006040848603121561070957600080fd5b610712846106b0565b9250602084013567ffffffffffffffff8082111561072f57600080fd5b818601915086601f83011261074357600080fd5b81358181111561075257600080fd5b87602082850101111561076457600080fd5b6020830194508093505050509250925092565b600060208083528351808285015260005b818110156107a457858101830151858201604001528201610788565b818111156107b6576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b818382376000910190815291905056fea164736f6c634300080f000a", "devdoc": { diff --git a/packages/contracts-bedrock/deployments/alpha-1/L1StandardBridge.json b/packages/contracts-bedrock/deployments/alpha-1/L1StandardBridge.json new file mode 100644 index 0000000000000..9c607379e2643 --- /dev/null +++ b/packages/contracts-bedrock/deployments/alpha-1/L1StandardBridge.json @@ -0,0 +1,1121 @@ +{ + "address": "0xCBBAf1644147BaeCf70441e07a36bEaCd0b89623", + "abi": [ + { + "inputs": [ + { + "internalType": "address payable", + "name": "_messenger", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "localToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "remoteToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "name": "ERC20BridgeFailed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "localToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "remoteToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "name": "ERC20BridgeFinalized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "localToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "remoteToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "name": "ERC20BridgeInitiated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "l1Token", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "l2Token", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "name": "ERC20DepositInitiated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "l1Token", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "l2Token", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "name": "ERC20WithdrawalFinalized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "name": "ETHBridgeFinalized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "name": "ETHBridgeInitiated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "name": "ETHDepositInitiated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "name": "ETHWithdrawalFinalized", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_localToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_remoteToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_minGasLimit", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "bridgeERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_localToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_remoteToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_minGasLimit", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "bridgeERC20To", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_minGasLimit", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "bridgeETH", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_minGasLimit", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "bridgeETHTo", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_localToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_remoteToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "completeOutboundTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_l1Token", + "type": "address" + }, + { + "internalType": "address", + "name": "_l2Token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_minGasLimit", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "depositERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_l1Token", + "type": "address" + }, + { + "internalType": "address", + "name": "_l2Token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_minGasLimit", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "depositERC20To", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_minGasLimit", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "depositETH", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_minGasLimit", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "depositETHTo", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "deposits", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_localToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_remoteToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "finalizeBridgeERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "finalizeBridgeETH", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_l1Token", + "type": "address" + }, + { + "internalType": "address", + "name": "_l2Token", + "type": "address" + }, + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "finalizeERC20Withdrawal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "finalizeETHWithdrawal", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "l2TokenBridge", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "messenger", + "outputs": [ + { + "internalType": "contract CrossDomainMessenger", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "otherBridge", + "outputs": [ + { + "internalType": "contract StandardBridge", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x44df9d47f228bac0a08a14c9a448350331a57886251384541330b1bae1f2c5a5", + "receipt": { + "to": null, + "from": "0x1D066Ef7AA90ae85Bb017e85968A9e1851DA95Db", + "contractAddress": "0xCBBAf1644147BaeCf70441e07a36bEaCd0b89623", + "transactionIndex": 3, + "gasUsed": "2590334", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x5bd8ca98c113de21b83bf8ab5394a0136979164858c25cc0864317a9bc69ef76", + "transactionHash": "0x44df9d47f228bac0a08a14c9a448350331a57886251384541330b1bae1f2c5a5", + "logs": [], + "blockNumber": 7568963, + "cumulativeGasUsed": "10004572", + "status": 1, + "byzantium": true + }, + "args": [ + "0x838a6DC4E37CA45D4Ef05bb776bf05eEf50798De" + ], + "numDeployments": 1, + "solcInputHash": "ada691c3f5ff59bd3e60fdb28388fb6d", + "metadata": "{\"compiler\":{\"version\":\"0.8.15+commit.e14f2714\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_messenger\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20BridgeFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20BridgeFinalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20BridgeInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20DepositInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20WithdrawalFinalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ETHBridgeFinalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ETHBridgeInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ETHDepositInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ETHWithdrawalFinalized\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_localToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"bridgeERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_localToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"bridgeERC20To\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"bridgeETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"bridgeETHTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_localToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"completeOutboundTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"depositERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"depositERC20To\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"depositETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"depositETHTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"deposits\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_localToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"finalizeBridgeERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"finalizeBridgeETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"finalizeERC20Withdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"finalizeETHWithdrawal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2TokenBridge\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"contract CrossDomainMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"otherBridge\",\"outputs\":[{\"internalType\":\"contract StandardBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"custom:proxied\":\"@title L1StandardBridge\",\"events\":{\"ERC20DepositInitiated(address,address,address,address,uint256,bytes)\":{\"custom:legacy\":\"@notice Emitted whenever an ERC20 deposit is initiated.\",\"params\":{\"amount\":\"Amount of the ERC20 deposited.\",\"extraData\":\"Extra data attached to the deposit.\",\"from\":\"Address of the depositor.\",\"l1Token\":\"Address of the token on L1.\",\"l2Token\":\"Address of the corresponding token on L2.\",\"to\":\"Address of the recipient on L2.\"}},\"ERC20WithdrawalFinalized(address,address,address,address,uint256,bytes)\":{\"custom:legacy\":\"@notice Emitted whenever an ERC20 withdrawal is finalized.\",\"params\":{\"amount\":\"Amount of the ERC20 withdrawn.\",\"extraData\":\"Extra data attached to the withdrawal.\",\"from\":\"Address of the withdrawer.\",\"l1Token\":\"Address of the token on L1.\",\"l2Token\":\"Address of the corresponding token on L2.\",\"to\":\"Address of the recipient on L1.\"}},\"ETHDepositInitiated(address,address,uint256,bytes)\":{\"custom:legacy\":\"@notice Emitted whenever a deposit of ETH from L1 into L2 is initiated.\",\"params\":{\"amount\":\"Amount of ETH deposited.\",\"extraData\":\"Extra data attached to the deposit.\",\"from\":\"Address of the depositor.\",\"to\":\"Address of the recipient on L2.\"}},\"ETHWithdrawalFinalized(address,address,uint256,bytes)\":{\"custom:legacy\":\"@notice Emitted whenever a withdrawal of ETH from L2 to L1 is finalized.\",\"params\":{\"amount\":\"Amount of ETH withdrawn.\",\"extraData\":\"Extra data attached to the withdrawal.\",\"from\":\"Address of the withdrawer.\",\"to\":\"Address of the recipient on L1.\"}}},\"kind\":\"dev\",\"methods\":{\"bridgeERC20(address,address,uint256,uint32,bytes)\":{\"params\":{\"_amount\":\"Amount of local tokens to deposit.\",\"_extraData\":\"Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.\",\"_localToken\":\"Address of the ERC20 on this chain.\",\"_minGasLimit\":\"Minimum amount of gas that the bridge can be relayed with.\",\"_remoteToken\":\"Address of the corresponding token on the remote chain.\"}},\"bridgeERC20To(address,address,address,uint256,uint32,bytes)\":{\"params\":{\"_amount\":\"Amount of local tokens to deposit.\",\"_extraData\":\"Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.\",\"_localToken\":\"Address of the ERC20 on this chain.\",\"_minGasLimit\":\"Minimum amount of gas that the bridge can be relayed with.\",\"_remoteToken\":\"Address of the corresponding token on the remote chain.\",\"_to\":\"Address of the receiver.\"}},\"bridgeETH(uint32,bytes)\":{\"params\":{\"_extraData\":\"Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.\",\"_minGasLimit\":\"Minimum amount of gas that the bridge can be relayed with.\"}},\"bridgeETHTo(address,uint32,bytes)\":{\"params\":{\"_extraData\":\"Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.\",\"_minGasLimit\":\"Minimum amount of gas that the bridge can be relayed with.\",\"_to\":\"Address of the receiver.\"}},\"completeOutboundTransfer(address,address,address,uint256)\":{\"params\":{\"_amount\":\"Amount of ETH being bridged.\",\"_localToken\":\"Address of the ERC20 on this chain.\",\"_remoteToken\":\"Address of the corresponding token on the remote chain.\",\"_to\":\"Address of the receiver.\"}},\"constructor\":{\"custom:semver\":\"0.0.2\",\"params\":{\"_messenger\":\"Address of the L1CrossDomainMessenger.\"}},\"depositERC20(address,address,uint256,uint32,bytes)\":{\"custom:legacy\":\"@notice Deposits some amount of ERC20 tokens into the sender's account on L2.\",\"params\":{\"_amount\":\"Amount of the ERC20 to deposit.\",\"_extraData\":\"Optional data to forward to L2. Data supplied here will not be used to execute any code on L2 and is only emitted as extra data for the convenience of off-chain tooling.\",\"_l1Token\":\"Address of the L1 token being deposited.\",\"_l2Token\":\"Address of the corresponding token on L2.\",\"_minGasLimit\":\"Minimum gas limit for the deposit message on L2.\"}},\"depositERC20To(address,address,address,uint256,uint32,bytes)\":{\"custom:legacy\":\"@notice Deposits some amount of ERC20 tokens into a target account on L2.\",\"params\":{\"_amount\":\"Amount of the ERC20 to deposit.\",\"_extraData\":\"Optional data to forward to L2. Data supplied here will not be used to execute any code on L2 and is only emitted as extra data for the convenience of off-chain tooling.\",\"_l1Token\":\"Address of the L1 token being deposited.\",\"_l2Token\":\"Address of the corresponding token on L2.\",\"_minGasLimit\":\"Minimum gas limit for the deposit message on L2.\",\"_to\":\"Address of the recipient on L2.\"}},\"depositETH(uint32,bytes)\":{\"custom:legacy\":\"@notice Deposits some amount of ETH into the sender's account on L2.\",\"params\":{\"_extraData\":\"Optional data to forward to L2. Data supplied here will not be used to execute any code on L2 and is only emitted as extra data for the convenience of off-chain tooling.\",\"_minGasLimit\":\"Minimum gas limit for the deposit message on L2.\"}},\"depositETHTo(address,uint32,bytes)\":{\"custom:legacy\":\"@notice Deposits some amount of ETH into a target account on L2. Note that if ETH is sent to a contract on L2 and the call fails, then that ETH will be locked in the L2StandardBridge. ETH may be recoverable if the call can be successfully replayed by increasing the amount of gas supplied to the call. If the call will fail for any amount of gas, then the ETH will be locked permanently.\",\"params\":{\"_extraData\":\"Optional data to forward to L2. Data supplied here will not be used to execute any code on L2 and is only emitted as extra data for the convenience of off-chain tooling.\",\"_minGasLimit\":\"Minimum gas limit for the deposit message on L2.\",\"_to\":\"Address of the recipient on L2.\"}},\"finalizeBridgeERC20(address,address,address,address,uint256,bytes)\":{\"params\":{\"_amount\":\"Amount of ETH being bridged.\",\"_extraData\":\"Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.\",\"_from\":\"Address of the sender.\",\"_localToken\":\"Address of the ERC20 on this chain.\",\"_remoteToken\":\"Address of the corresponding token on the remote chain.\",\"_to\":\"Address of the receiver.\"}},\"finalizeBridgeETH(address,address,uint256,bytes)\":{\"params\":{\"_amount\":\"Amount of ETH being bridged.\",\"_extraData\":\"Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.\",\"_from\":\"Address of the sender.\",\"_to\":\"Address of the receiver.\"}},\"finalizeERC20Withdrawal(address,address,address,address,uint256,bytes)\":{\"custom:legacy\":\"@notice Finalizes a withdrawal of ERC20 tokens from L2.\",\"params\":{\"_amount\":\"Amount of ETH to withdraw.\",\"_extraData\":\"Optional data forwarded from L2.\",\"_from\":\"Address of the withdrawer on L2.\",\"_l1Token\":\"Address of the token on L1.\",\"_l2Token\":\"Address of the corresponding token on L2.\",\"_to\":\"Address of the recipient on L1.\"}},\"finalizeETHWithdrawal(address,address,uint256,bytes)\":{\"custom:legacy\":\"@notice Finalizes a withdrawal of ETH from L2.\",\"params\":{\"_amount\":\"Amount of ETH to withdraw.\",\"_extraData\":\"Optional data forwarded from L2.\",\"_from\":\"Address of the withdrawer on L2.\",\"_to\":\"Address of the recipient on L1.\"}},\"l2TokenBridge()\":{\"custom:legacy\":\"@notice Retrieves the access of the corresponding L2 bridge contract.\",\"returns\":{\"_0\":\"Address of the corresponding L2 bridge contract.\"}},\"version()\":{\"returns\":{\"_0\":\"Semver contract version as a string.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"ERC20BridgeFailed(address,address,address,address,uint256,bytes)\":{\"notice\":\"Emitted when an ERC20 bridge to this chain fails.\"},\"ERC20BridgeFinalized(address,address,address,address,uint256,bytes)\":{\"notice\":\"Emitted when an ERC20 bridge is finalized on this chain.\"},\"ERC20BridgeInitiated(address,address,address,address,uint256,bytes)\":{\"notice\":\"Emitted when an ERC20 bridge is initiated to the other chain.\"},\"ETHBridgeFinalized(address,address,uint256,bytes)\":{\"notice\":\"Emitted when an ETH bridge is finalized on this chain.\"},\"ETHBridgeInitiated(address,address,uint256,bytes)\":{\"notice\":\"Emitted when an ETH bridge is initiated to the other chain.\"}},\"kind\":\"user\",\"methods\":{\"bridgeERC20(address,address,uint256,uint32,bytes)\":{\"notice\":\"Sends ERC20 tokens to the sender's address on the other chain. Note that if the ERC20 token on the other chain does not recognize the local token as the correct pair token, the ERC20 bridge will fail and the tokens will be returned to sender on this chain.\"},\"bridgeERC20To(address,address,address,uint256,uint32,bytes)\":{\"notice\":\"Sends ERC20 tokens to a receiver's address on the other chain. Note that if the ERC20 token on the other chain does not recognize the local token as the correct pair token, the ERC20 bridge will fail and the tokens will be returned to sender on this chain.\"},\"bridgeETH(uint32,bytes)\":{\"notice\":\"Sends ETH to the sender's address on the other chain.\"},\"bridgeETHTo(address,uint32,bytes)\":{\"notice\":\"Sends ETH to a receiver's address on the other chain. Note that if ETH is sent to a smart contract and the call fails, the ETH will be temporarily locked in the StandardBridge on the other chain until the call is replayed. If the call cannot be replayed with any amount of gas (call always reverts), then the ETH will be permanently locked in the StandardBridge on the other chain.\"},\"completeOutboundTransfer(address,address,address,uint256)\":{\"notice\":\"Completes an outbound token transfer. Public function, but can only be called by this contract. It's security critical that there be absolutely no way for anyone to trigger this function, except by explicit trigger within this contract. Used as a simple way to be able to try/catch any type of revert that could occur during an ERC20 mint/transfer.\"},\"deposits(address,address)\":{\"notice\":\"Mapping that stores deposits for a given pair of local and remote tokens.\"},\"finalizeBridgeERC20(address,address,address,address,uint256,bytes)\":{\"notice\":\"Finalizes an ERC20 bridge on this chain. Can only be triggered by the other StandardBridge contract on the remote chain.\"},\"finalizeBridgeETH(address,address,uint256,bytes)\":{\"notice\":\"Finalizes an ETH bridge on this chain. Can only be triggered by the other StandardBridge contract on the remote chain.\"},\"messenger()\":{\"notice\":\"Messenger contract on this domain.\"},\"otherBridge()\":{\"notice\":\"Corresponding bridge on the other domain.\"},\"version()\":{\"notice\":\"Returns the full semver contract version.\"}},\"notice\":\"The L1StandardBridge is responsible for transfering ETH and ERC20 tokens between L1 and L2. ERC20 tokens deposited into L2 are escrowed within this contract until withdrawal. ETH is transferred to and escrowed within the OptimismPortal contract.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/L1/L1StandardBridge.sol\":\"L1StandardBridge\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@eth-optimism/contracts-periphery/=node_modules/@eth-optimism/contracts-periphery/contracts/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/\",\":@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/\",\":@rari-capital/=node_modules/@rari-capital/\",\":@rari-capital/solmate/=node_modules/@rari-capital/solmate/\",\":contracts/=contracts/\",\":ds-test/=node_modules/ds-test/src/\",\":forge-std/=node_modules/forge-std/src/\"]},\"sources\":{\"contracts/L1/L1StandardBridge.sol\":{\"keccak256\":\"0x2e4ca4ea57ea44d12231f290742ceedb1bec4593c110c05e199d7fdd1e5cb8e0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a4d6ed882ff672581e877cf5a48a481b00c6b369c7d62ff862c4a546c37526b5\",\"dweb:/ipfs/QmPN1ctNLdU8PUR9W1zrUmNQ5duKsLocjtbgbYXez1neu1\"]},\"contracts/libraries/Encoding.sol\":{\"keccak256\":\"0xca8dce21b608bac08ae75d42879e90f5e7865fb29587df181a22a3b14ce21985\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://29b093d22061b4c499566cb35ce2755cce241ab9f02716cf9cdbdd81f9c47871\",\"dweb:/ipfs/QmdF4DHQUEeEeW67ugmEC3AHn6QrBBNYtwV7UaHaSTe2pa\"]},\"contracts/libraries/Hashing.sol\":{\"keccak256\":\"0xef5d0156a50f96bf32d34ef7a217872791b1b3c11baa9c13183a6388356a918d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b7790ae2e79906d26924f7b69e8a3610031db48cef4b6e306e923431def8ba86\",\"dweb:/ipfs/QmSGJEBv5XsDtsr2QTJnwGKXAXxqZafYGeZcRKKfw1yrUc\"]},\"contracts/libraries/Predeploys.sol\":{\"keccak256\":\"0x49779635e2aff61b9c501cccfec885b34665b932706362ce6b86acd75d95b8b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5d03728a5a28ea1b89f59fb2107719ba475c65124ac5acc75af09cb4d2262866\",\"dweb:/ipfs/QmWiMhr8myTyYGdKHMZeaYNxGPNFAygmQCqsAX8SX4bFjE\"]},\"contracts/libraries/SafeCall.sol\":{\"keccak256\":\"0xbb0621c028c18e9d5a54cf1a8136cf2e77f161de48aeb8d911e230f6b280c9ed\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://924ecc629c7642bc19e2f8a390f1b946d22862c8889453da681b5bc1a45d7703\",\"dweb:/ipfs/QmbNknQ8pzssXDXGVjXxzZ8zh1YnNCWtRJVepiM1TnqoqQ\"]},\"contracts/libraries/Types.sol\":{\"keccak256\":\"0x93045c0c97287a12e1bdde0685e26f185411b81b93b9df15c8cce90bccdcf77c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0c90b59d09f92aba5ab0862264efe2beb0f77fba750867f8d686a1f39ee6af2c\",\"dweb:/ipfs/QmW7Zj5d7NgDi5Mdv6jptJgfsUj8LvGroud9p2Z7vhcKLC\"]},\"contracts/libraries/rlp/RLPWriter.sol\":{\"keccak256\":\"0x5aa9d21c5b41c9786f23153f819d561ae809a1d55c7b0d423dfeafdfbacedc78\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://921c44e6a0982b9a4011900fda1bda2c06b7a85894967de98b407a83fe9f90c0\",\"dweb:/ipfs/QmSsHLKDUQ82kpKdqB6VntVGKuPDb4W9VdotsubuqWBzio\"]},\"contracts/universal/CrossDomainMessenger.sol\":{\"keccak256\":\"0x9f8f2fdd38e0653848eb8497b0c02bb82525e5946d2d98e3f28547847f91ad42\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a078624a7ab90bd7fbc6bc6a0224d3eeb3bab4c3e701213989b9781ab3a8e785\",\"dweb:/ipfs/QmRFRLGt8QZQmrA5jM7wB1d5feEaDmkS1ppH7Jo7iYtHdg\"]},\"contracts/universal/OptimismMintableERC20.sol\":{\"keccak256\":\"0xad261a9f7af1973f7cc3784b7c5a04682c64033eeb51ca54f714c15e1863ceca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://dc74cf0470d90168b795a01733262dbd5c6d06067738b1b3bed38c6e480a207c\",\"dweb:/ipfs/QmWAAVoyNJXBXHfMgkeSYdwMPHry8cfVc2DiMzZBqrqUG8\"]},\"contracts/universal/Semver.sol\":{\"keccak256\":\"0x8215e8fbaace5e06fdf0be26cd8ec224847cf03e89bd78dc8ba3ec2cb429d4fe\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cfe4869ad9a1a10aee499ed4ac74a19f9f95dd9173efa656f6b1728f6912a9ad\",\"dweb:/ipfs/QmbiKSxpNnKQv8jwEvGUJkksaLPp8UU8N1twbDimM3RhXr\"]},\"contracts/universal/StandardBridge.sol\":{\"keccak256\":\"0x8128a50c034c3e6453bf8522306721a8ed0eed80ab33ecd50a625fd42e809147\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4a4fdca31b248a77c8b348cb92cdc2c82793d53459ecedbd384d7a82032febe8\",\"dweb:/ipfs/QmduDWhe2iP5A77VLbg3UYzt3HBudddJEzvVpU6yubYt48\"]},\"contracts/universal/SupportedInterfaces.sol\":{\"keccak256\":\"0x68eb6cc2db8c22712c3912a2061d46c10600b3ded466d626acb2826e67354168\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b611eec13144ad11f1208f83055b84b142579d5761a9281e645c7294f4579bb3\",\"dweb:/ipfs/QmWVJ299etGEBEGE2v6HSt2CkoCrvcwNkY4jYFb4tnCAHS\"]},\"node_modules/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d7fc8396619de513c96b6e00301b88dd790e83542aab918425633a5f7297a15a\",\"dweb:/ipfs/QmXbP4kiZyp7guuS7xe8KaybnwkRPGrBc2Kbi3vhcTfpxb\"]},\"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x0203dcadc5737d9ef2c211d6fa15d18ebc3b30dfa51903b64870b01a062b0b4e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6eb2fd1e9894dbe778f4b8131adecebe570689e63cf892f4e21257bfe1252497\",\"dweb:/ipfs/QmXgUGNfZvrn6N2miv3nooSs7Jm34A41qz94fu2GtDFcx8\"]},\"node_modules/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"keccak256\":\"0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9c7d1f5e15633ab912b74c2f57e24559e66b03232300d4b27ff0f25bc452ecad\",\"dweb:/ipfs/QmYTJkc1cntYkKQ1Tu11nBcJLakiy93Tjytc4XHELo4GmR\"]},\"node_modules/@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"keccak256\":\"0x8cc03c5ac17e8a7396e487cda41fc1f1dfdb91db7d528e6da84bee3b6dd7e167\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://607818f1b44548c2d8268176f73cdb290e1faed971b1061930d92698366e2a11\",\"dweb:/ipfs/QmQibMe3r5no95b6q7isGT5R75V8xSofWEDLXzp95b7LgZ\"]},\"node_modules/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"keccak256\":\"0x611aa3f23e59cfdd1863c536776407b3e33d695152a266fa7cfb34440a29a8a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9b4b2110b7f2b3eb32951bc08046fa90feccffa594e1176cb91cdfb0e94726b4\",\"dweb:/ipfs/QmSxLwYjicf9zWFuieRc8WQwE4FisA1Um5jp1iSa731TGt\"]},\"node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c\",\"dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x24b04b8aacaaf1a4a0719117b29c9c3647b1f479c5ac2a60f5ff1bb6d839c238\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://43e46da9d9f49741ecd876a269e71bc7494058d7a8e9478429998adb5bc3eaa0\",\"dweb:/ipfs/QmUtp4cqzf22C5rJ76AabKADquGWcjsc33yjYXxXC4sDvy\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34\",\"dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a376d3dda2cb70536c0a45c208b29b34ac560c4cb4f513a42079f96ba47d2dd\",\"dweb:/ipfs/QmZQg6gn1sUpM8wHzwNvSnihumUCAhxD119MpXeKp8B9s8\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol\":{\"keccak256\":\"0xf41ca991f30855bf80ffd11e9347856a517b977f0a6c2d52e6421a99b7840329\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b2717fd2bdac99daa960a6de500754ea1b932093c946388c381da48658234b95\",\"dweb:/ipfs/QmP6QVMn6UeA3ByahyJbYQr5M6coHKBKsf3ySZSfbyA8R7\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"keccak256\":\"0x032807210d1d7d218963d7355d62e021a84bf1b3339f4f50be2f63b53cccaf29\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://11756f42121f6541a35a8339ea899ee7514cfaa2e6d740625fcc844419296aa6\",\"dweb:/ipfs/QmekMuk6BY4DAjzeXr4MSbKdgoqqsZnA8JPtuyWc6CwXHf\"]},\"node_modules/@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://35c47bece3c03caaa07fab37dd2bb3413bfbca20db7bd9895024390e0a469487\",\"dweb:/ipfs/QmPGWT2x3QHcKxqe6gRmAkdakhbaRgx3DLzcakHz5M4eXG\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6f2cf1c531122bc7ca96b8c8db6a60deae60441e5223065e792553d4849b5638\",\"dweb:/ipfs/QmPBdJmBBABMDCfyDjCbdxgiqRavgiSL88SYPGibgbPas9\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/ERC165Checker.sol\":{\"keccak256\":\"0xc65c83c1039508fa7a42a09a3c6a32babd1c438ba4dbb23581255e784b5d5eed\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a1b3b38db0f76429db899909025e534c366415e9ea8b5ddc4c8901e6a7fc1461\",\"dweb:/ipfs/QmYv1KxyHjLEky9JWNSsSfpGJbiCxFyzVFgTwQKpiqYGUg\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://be161e54f24e5c6fae81a12db1a8ae87bc5ae1b0ddc805d82a1440a68455088f\",\"dweb:/ipfs/QmP7C3CHdY9urF4dEMb9wmsp1wMxHF6nhA2yQE5SKiPAdy\"]}},\"version\":1}", + "bytecode": "0x6101206040523480156200001257600080fd5b5060405162002f9a38038062002f9a83398101604081905262000035916200006f565b6001600160a01b031660805273420000000000000000000000000000000000001060a052600060c081905260e052600261010052620000a1565b6000602082840312156200008257600080fd5b81516001600160a01b03811681146200009a57600080fd5b9392505050565b60805160a05160c05160e05161010051612e3d6200015d600039600061115001526000611127015260006110fe01526000818161039a01528181610436015281816105110152818161065d01528181610abb01528181610d080152818161133d0152611986015260008181610257015281816104d4015281816106330152818161069401528181610a9101528181610af201528181610cde01528181610d3f0152818161131301528181611374015261194a0152612e3d6000f3fe60806040526004361061012d5760003560e01c806387087623116100a5578063a9f9e67511610074578063b1a1a88211610059578063b1a1a88214610411578063c89701a214610424578063e11013dd1461045857600080fd5b8063a9f9e675146103d1578063af565a13146103f157600080fd5b806387087623146103255780638f601f661461034557806391c49bf81461038b5780639a2ac6d5146103be57600080fd5b80633cb747bf116100fc57806354fd4d50116100e157806354fd4d50146102c357806358a997f6146102e5578063838b25201461030557600080fd5b80633cb747bf14610245578063540abf73146102a357600080fd5b80630166a07a146101ec57806309fc88431461020c5780631532ec341461021f5780631635f5fd1461023257600080fd5b366101e757333b156101c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084015b60405180910390fd5b6101e533333462030d406040518060200160405280600081525061046b565b005b600080fd5b3480156101f857600080fd5b506101e5610207366004612687565b61061b565b6101e561021a366004612738565b6109a2565b6101e561022d36600461278b565b610a79565b6101e561024036600461278b565b610cc6565b34801561025157600080fd5b506102797f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156102af57600080fd5b506101e56102be3660046127fe565b6110e7565b3480156102cf57600080fd5b506102d86110f7565b60405161029a91906128eb565b3480156102f157600080fd5b506101e56103003660046128fe565b61119a565b34801561031157600080fd5b506101e56103203660046127fe565b611239565b34801561033157600080fd5b506101e56103403660046128fe565b611249565b34801561035157600080fd5b5061037d610360366004612981565b600260209081526000928352604080842090915290825290205481565b60405190815260200161029a565b34801561039757600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610279565b6101e56103cc3660046129ba565b6112e8565b3480156103dd57600080fd5b506101e56103ec366004612687565b6112fb565b3480156103fd57600080fd5b506101e561040c366004612a1d565b61155c565b6101e561041f366004612738565b611869565b34801561043057600080fd5b506102797f000000000000000000000000000000000000000000000000000000000000000081565b6101e56104663660046129ba565b611905565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f2849b43074093a05396b6f2a937dee8565b15a48a7b3d4bffb732a5017380af585846040516104ca929190612a6e565b60405180910390a37f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633dbb202b847f0000000000000000000000000000000000000000000000000000000000000000631635f5fd60e01b8989898860405160240161054f9493929190612a87565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e086901b90921682526105e292918890600401612ad0565b6000604051808303818588803b1580156105fb57600080fd5b505af115801561060f573d6000803e3d6000fd5b50505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801561073957507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107219190612b15565b73ffffffffffffffffffffffffffffffffffffffff16145b6107eb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101bd565b6040517faf565a1300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808916600483015280881660248301528516604482015260648101849052309063af565a1390608401600060405180830381600087803b15801561086957600080fd5b505af192505050801561087a575060015b6109165761088f878786888760008888611948565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f2755817676249910615f0a6a240ad225abe5343df8d527f7294c4af36a92009a878787876040516109099493929190612b7b565b60405180910390a4610999565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fd59c65b35445225835c83f50b6ede06a7be047d22e357073e250d9af537518cd878787876040516109909493929190612b7b565b60405180910390a45b50505050505050565b333b15610a31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101bd565b610a743333348686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061046b92505050565b505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015610b9757507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7f9190612b15565b73ffffffffffffffffffffffffffffffffffffffff16145b610c49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101bd565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f2ac69ee804d9a7a0984249f508dfab7cb2534b465b6ce1580f99a38ba9c5e631858585604051610caa93929190612bb1565b60405180910390a3610cbf8585858585610cc6565b5050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015610de457507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610da8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dcc9190612b15565b73ffffffffffffffffffffffffffffffffffffffff16145b610e96576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101bd565b823414610f25576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5374616e646172644272696467653a20616d6f756e742073656e7420646f657360448201527f206e6f74206d6174636820616d6f756e7420726571756972656400000000000060648201526084016101bd565b3073ffffffffffffffffffffffffffffffffffffffff851603610fca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a2063616e6e6f742073656e6420746f207360448201527f656c66000000000000000000000000000000000000000000000000000000000060648201526084016101bd565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f31b2166ff604fc5672ea5df08a78081d2bc6d746cadce880747f3643d819e83d85858560405161102b93929190612bb1565b60405180910390a36000611050855a8660405180602001604052806000815250611b1b565b9050806110df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a20455448207472616e736665722066616960448201527f6c6564000000000000000000000000000000000000000000000000000000000060648201526084016101bd565b505050505050565b6109998787338888888888611b35565b60606111227f0000000000000000000000000000000000000000000000000000000000000000611ddf565b61114b7f0000000000000000000000000000000000000000000000000000000000000000611ddf565b6111747f0000000000000000000000000000000000000000000000000000000000000000611ddf565b60405160200161118693929190612bd4565b604051602081830303815290604052905090565b333b15611229576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101bd565b6110df8686333388888888611f1c565b6109998787338888888888611f1c565b333b156112d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101bd565b6110df8686333388888888611b35565b6112f53385858585611fae565b50505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801561141957507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114019190612b15565b73ffffffffffffffffffffffffffffffffffffffff16145b6114cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101bd565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f3ceee06c1e37648fcbb6ed52e17b3e1f275a1f8c7b22a84b2b84732431e046b3878787876040516115459493929190612b7b565b60405180910390a46109998787878787878761061b565b3330146115eb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642062792073656c660000000000000000000000000060648201526084016101bd565b3073ffffffffffffffffffffffffffffffffffffffff851603611690576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5374616e646172644272696467653a206c6f63616c20746f6b656e2063616e6e60448201527f6f742062652073656c660000000000000000000000000000000000000000000060648201526084016101bd565b6116998461205a565b156117e7576116a8848461208c565b61175a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a4016101bd565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390528516906340c10f1990604401600060405180830381600087803b1580156117ca57600080fd5b505af11580156117de573d6000803e3d6000fd5b505050506112f5565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260026020908152604080832093871683529290522054611825908290612c79565b73ffffffffffffffffffffffffffffffffffffffff8086166000818152600260209081526040808320948916835293905291909120919091556112f5908383612133565b333b156118f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101bd565b610a743333858585611fae565b6112f53385348686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061046b92505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633dbb202b7f0000000000000000000000000000000000000000000000000000000000000000630166a07a60e01b8a8c8b8b8b8a8a6040516024016119ca9796959493929190612c90565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e085901b9092168252611a5d92918890600401612ad0565b600060405180830381600087803b158015611a7757600080fd5b505af1158015611a8b573d6000803e3d6000fd5b505050508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167f7ff126db8024424bbfd9826e8ab82ff59136289ea440b04b39a0df1b03b9cabf88888787604051611b099493929190612b7b565b60405180910390a45050505050505050565b600080600080845160208601878a8af19695505050505050565b3073ffffffffffffffffffffffffffffffffffffffff891603611bda576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5374616e646172644272696467653a206c6f63616c20746f6b656e2063616e6e60448201527f6f742062652073656c660000000000000000000000000000000000000000000060648201526084016101bd565b611be38861205a565b15611d3157611bf2888861208c565b611ca4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a4016101bd565b6040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015260248201869052891690639dc29fac90604401600060405180830381600087803b158015611d1457600080fd5b505af1158015611d28573d6000803e3d6000fd5b50505050611dc5565b611d5373ffffffffffffffffffffffffffffffffffffffff8916873087612207565b73ffffffffffffffffffffffffffffffffffffffff8089166000908152600260209081526040808320938b1683529290522054611d91908590612ced565b73ffffffffffffffffffffffffffffffffffffffff808a166000908152600260209081526040808320938c16835292905220555b611dd58888888888888888611948565b5050505050505050565b606081600003611e2257505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611e4c5780611e3681612d05565b9150611e459050600a83612d6c565b9150611e26565b60008167ffffffffffffffff811115611e6757611e67612d80565b6040519080825280601f01601f191660200182016040528015611e91576020820181803683370190505b5090505b8415611f1457611ea6600183612c79565b9150611eb3600a86612daf565b611ebe906030612ced565b60f81b818381518110611ed357611ed3612dc3565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611f0d600a86612d6c565b9450611e95565b949350505050565b8573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167f718594027abd4eaed59f95162563e0cc6d0e8d5b86b1c7be8b1b0ac3343d039688888787604051611f969493929190612b7b565b60405180910390a4611dd58888888888888888611b35565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f35d79ab81f2b2017e19afb5c5571778877782d7a8786f5907f93b0f4702f4f2334858560405161200f93929190612bb1565b60405180910390a3610cbf8585348686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061046b92505050565b6000612086827f1d1d8b6300000000000000000000000000000000000000000000000000000000612265565b92915050565b60008273ffffffffffffffffffffffffffffffffffffffff1663c01e1bd66040518163ffffffff1660e01b8152600401602060405180830381865afa1580156120d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120fd9190612b15565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610a749084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612288565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526112f59085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401612185565b600061227083612394565b8015612281575061228183836123f8565b9392505050565b60006122ea826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166124c79092919063ffffffff16565b805190915015610a7457808060200190518101906123089190612df2565b610a74576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016101bd565b60006123c0827f01ffc9a7000000000000000000000000000000000000000000000000000000006123f8565b801561208657506123f1827fffffffff000000000000000000000000000000000000000000000000000000006123f8565b1592915050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000178152825160009392849283928392918391908a617530fa92503d915060005190508280156124b0575060208210155b80156124bc5750600081115b979650505050505050565b6060611f1484846000858573ffffffffffffffffffffffffffffffffffffffff85163b612550576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016101bd565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516125799190612e14565b60006040518083038185875af1925050503d80600081146125b6576040519150601f19603f3d011682016040523d82523d6000602084013e6125bb565b606091505b50915091506124bc828286606083156125d5575081612281565b8251156125e55782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101bd91906128eb565b73ffffffffffffffffffffffffffffffffffffffff8116811461263b57600080fd5b50565b60008083601f84011261265057600080fd5b50813567ffffffffffffffff81111561266857600080fd5b60208301915083602082850101111561268057600080fd5b9250929050565b600080600080600080600060c0888a0312156126a257600080fd5b87356126ad81612619565b965060208801356126bd81612619565b955060408801356126cd81612619565b945060608801356126dd81612619565b93506080880135925060a088013567ffffffffffffffff81111561270057600080fd5b61270c8a828b0161263e565b989b979a50959850939692959293505050565b803563ffffffff8116811461273357600080fd5b919050565b60008060006040848603121561274d57600080fd5b6127568461271f565b9250602084013567ffffffffffffffff81111561277257600080fd5b61277e8682870161263e565b9497909650939450505050565b6000806000806000608086880312156127a357600080fd5b85356127ae81612619565b945060208601356127be81612619565b935060408601359250606086013567ffffffffffffffff8111156127e157600080fd5b6127ed8882890161263e565b969995985093965092949392505050565b600080600080600080600060c0888a03121561281957600080fd5b873561282481612619565b9650602088013561283481612619565b9550604088013561284481612619565b9450606088013593506128596080890161271f565b925060a088013567ffffffffffffffff81111561270057600080fd5b60005b83811015612890578181015183820152602001612878565b838111156112f55750506000910152565b600081518084526128b9816020860160208601612875565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061228160208301846128a1565b60008060008060008060a0878903121561291757600080fd5b863561292281612619565b9550602087013561293281612619565b9450604087013593506129476060880161271f565b9250608087013567ffffffffffffffff81111561296357600080fd5b61296f89828a0161263e565b979a9699509497509295939492505050565b6000806040838503121561299457600080fd5b823561299f81612619565b915060208301356129af81612619565b809150509250929050565b600080600080606085870312156129d057600080fd5b84356129db81612619565b93506129e96020860161271f565b9250604085013567ffffffffffffffff811115612a0557600080fd5b612a118782880161263e565b95989497509550505050565b60008060008060808587031215612a3357600080fd5b8435612a3e81612619565b93506020850135612a4e81612619565b92506040850135612a5e81612619565b9396929550929360600135925050565b828152604060208201526000611f1460408301846128a1565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152612ac660808301846128a1565b9695505050505050565b73ffffffffffffffffffffffffffffffffffffffff84168152606060208201526000612aff60608301856128a1565b905063ffffffff83166040830152949350505050565b600060208284031215612b2757600080fd5b815161228181612619565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff85168152836020820152606060408201526000612ac6606083018486612b32565b838152604060208201526000612bcb604083018486612b32565b95945050505050565b60008451612be6818460208901612875565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551612c22816001850160208a01612875565b60019201918201528351612c3d816002840160208801612875565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015612c8b57612c8b612c4a565b500390565b600073ffffffffffffffffffffffffffffffffffffffff808a1683528089166020840152808816604084015280871660608401525084608083015260c060a0830152612ce060c083018486612b32565b9998505050505050505050565b60008219821115612d0057612d00612c4a565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612d3657612d36612c4a565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082612d7b57612d7b612d3d565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082612dbe57612dbe612d3d565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215612e0457600080fd5b8151801515811461228157600080fd5b60008251612e26818460208701612875565b919091019291505056fea164736f6c634300080f000a", + "deployedBytecode": "0x60806040526004361061012d5760003560e01c806387087623116100a5578063a9f9e67511610074578063b1a1a88211610059578063b1a1a88214610411578063c89701a214610424578063e11013dd1461045857600080fd5b8063a9f9e675146103d1578063af565a13146103f157600080fd5b806387087623146103255780638f601f661461034557806391c49bf81461038b5780639a2ac6d5146103be57600080fd5b80633cb747bf116100fc57806354fd4d50116100e157806354fd4d50146102c357806358a997f6146102e5578063838b25201461030557600080fd5b80633cb747bf14610245578063540abf73146102a357600080fd5b80630166a07a146101ec57806309fc88431461020c5780631532ec341461021f5780631635f5fd1461023257600080fd5b366101e757333b156101c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084015b60405180910390fd5b6101e533333462030d406040518060200160405280600081525061046b565b005b600080fd5b3480156101f857600080fd5b506101e5610207366004612687565b61061b565b6101e561021a366004612738565b6109a2565b6101e561022d36600461278b565b610a79565b6101e561024036600461278b565b610cc6565b34801561025157600080fd5b506102797f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156102af57600080fd5b506101e56102be3660046127fe565b6110e7565b3480156102cf57600080fd5b506102d86110f7565b60405161029a91906128eb565b3480156102f157600080fd5b506101e56103003660046128fe565b61119a565b34801561031157600080fd5b506101e56103203660046127fe565b611239565b34801561033157600080fd5b506101e56103403660046128fe565b611249565b34801561035157600080fd5b5061037d610360366004612981565b600260209081526000928352604080842090915290825290205481565b60405190815260200161029a565b34801561039757600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610279565b6101e56103cc3660046129ba565b6112e8565b3480156103dd57600080fd5b506101e56103ec366004612687565b6112fb565b3480156103fd57600080fd5b506101e561040c366004612a1d565b61155c565b6101e561041f366004612738565b611869565b34801561043057600080fd5b506102797f000000000000000000000000000000000000000000000000000000000000000081565b6101e56104663660046129ba565b611905565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f2849b43074093a05396b6f2a937dee8565b15a48a7b3d4bffb732a5017380af585846040516104ca929190612a6e565b60405180910390a37f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633dbb202b847f0000000000000000000000000000000000000000000000000000000000000000631635f5fd60e01b8989898860405160240161054f9493929190612a87565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e086901b90921682526105e292918890600401612ad0565b6000604051808303818588803b1580156105fb57600080fd5b505af115801561060f573d6000803e3d6000fd5b50505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801561073957507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107219190612b15565b73ffffffffffffffffffffffffffffffffffffffff16145b6107eb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101bd565b6040517faf565a1300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808916600483015280881660248301528516604482015260648101849052309063af565a1390608401600060405180830381600087803b15801561086957600080fd5b505af192505050801561087a575060015b6109165761088f878786888760008888611948565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f2755817676249910615f0a6a240ad225abe5343df8d527f7294c4af36a92009a878787876040516109099493929190612b7b565b60405180910390a4610999565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fd59c65b35445225835c83f50b6ede06a7be047d22e357073e250d9af537518cd878787876040516109909493929190612b7b565b60405180910390a45b50505050505050565b333b15610a31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101bd565b610a743333348686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061046b92505050565b505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015610b9757507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7f9190612b15565b73ffffffffffffffffffffffffffffffffffffffff16145b610c49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101bd565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f2ac69ee804d9a7a0984249f508dfab7cb2534b465b6ce1580f99a38ba9c5e631858585604051610caa93929190612bb1565b60405180910390a3610cbf8585858585610cc6565b5050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015610de457507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610da8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dcc9190612b15565b73ffffffffffffffffffffffffffffffffffffffff16145b610e96576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101bd565b823414610f25576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5374616e646172644272696467653a20616d6f756e742073656e7420646f657360448201527f206e6f74206d6174636820616d6f756e7420726571756972656400000000000060648201526084016101bd565b3073ffffffffffffffffffffffffffffffffffffffff851603610fca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a2063616e6e6f742073656e6420746f207360448201527f656c66000000000000000000000000000000000000000000000000000000000060648201526084016101bd565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f31b2166ff604fc5672ea5df08a78081d2bc6d746cadce880747f3643d819e83d85858560405161102b93929190612bb1565b60405180910390a36000611050855a8660405180602001604052806000815250611b1b565b9050806110df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a20455448207472616e736665722066616960448201527f6c6564000000000000000000000000000000000000000000000000000000000060648201526084016101bd565b505050505050565b6109998787338888888888611b35565b60606111227f0000000000000000000000000000000000000000000000000000000000000000611ddf565b61114b7f0000000000000000000000000000000000000000000000000000000000000000611ddf565b6111747f0000000000000000000000000000000000000000000000000000000000000000611ddf565b60405160200161118693929190612bd4565b604051602081830303815290604052905090565b333b15611229576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101bd565b6110df8686333388888888611f1c565b6109998787338888888888611f1c565b333b156112d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101bd565b6110df8686333388888888611b35565b6112f53385858585611fae565b50505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801561141957507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114019190612b15565b73ffffffffffffffffffffffffffffffffffffffff16145b6114cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101bd565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f3ceee06c1e37648fcbb6ed52e17b3e1f275a1f8c7b22a84b2b84732431e046b3878787876040516115459493929190612b7b565b60405180910390a46109998787878787878761061b565b3330146115eb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642062792073656c660000000000000000000000000060648201526084016101bd565b3073ffffffffffffffffffffffffffffffffffffffff851603611690576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5374616e646172644272696467653a206c6f63616c20746f6b656e2063616e6e60448201527f6f742062652073656c660000000000000000000000000000000000000000000060648201526084016101bd565b6116998461205a565b156117e7576116a8848461208c565b61175a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a4016101bd565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390528516906340c10f1990604401600060405180830381600087803b1580156117ca57600080fd5b505af11580156117de573d6000803e3d6000fd5b505050506112f5565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260026020908152604080832093871683529290522054611825908290612c79565b73ffffffffffffffffffffffffffffffffffffffff8086166000818152600260209081526040808320948916835293905291909120919091556112f5908383612133565b333b156118f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101bd565b610a743333858585611fae565b6112f53385348686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061046b92505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633dbb202b7f0000000000000000000000000000000000000000000000000000000000000000630166a07a60e01b8a8c8b8b8b8a8a6040516024016119ca9796959493929190612c90565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e085901b9092168252611a5d92918890600401612ad0565b600060405180830381600087803b158015611a7757600080fd5b505af1158015611a8b573d6000803e3d6000fd5b505050508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167f7ff126db8024424bbfd9826e8ab82ff59136289ea440b04b39a0df1b03b9cabf88888787604051611b099493929190612b7b565b60405180910390a45050505050505050565b600080600080845160208601878a8af19695505050505050565b3073ffffffffffffffffffffffffffffffffffffffff891603611bda576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5374616e646172644272696467653a206c6f63616c20746f6b656e2063616e6e60448201527f6f742062652073656c660000000000000000000000000000000000000000000060648201526084016101bd565b611be38861205a565b15611d3157611bf2888861208c565b611ca4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a4016101bd565b6040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015260248201869052891690639dc29fac90604401600060405180830381600087803b158015611d1457600080fd5b505af1158015611d28573d6000803e3d6000fd5b50505050611dc5565b611d5373ffffffffffffffffffffffffffffffffffffffff8916873087612207565b73ffffffffffffffffffffffffffffffffffffffff8089166000908152600260209081526040808320938b1683529290522054611d91908590612ced565b73ffffffffffffffffffffffffffffffffffffffff808a166000908152600260209081526040808320938c16835292905220555b611dd58888888888888888611948565b5050505050505050565b606081600003611e2257505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611e4c5780611e3681612d05565b9150611e459050600a83612d6c565b9150611e26565b60008167ffffffffffffffff811115611e6757611e67612d80565b6040519080825280601f01601f191660200182016040528015611e91576020820181803683370190505b5090505b8415611f1457611ea6600183612c79565b9150611eb3600a86612daf565b611ebe906030612ced565b60f81b818381518110611ed357611ed3612dc3565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611f0d600a86612d6c565b9450611e95565b949350505050565b8573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167f718594027abd4eaed59f95162563e0cc6d0e8d5b86b1c7be8b1b0ac3343d039688888787604051611f969493929190612b7b565b60405180910390a4611dd58888888888888888611b35565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f35d79ab81f2b2017e19afb5c5571778877782d7a8786f5907f93b0f4702f4f2334858560405161200f93929190612bb1565b60405180910390a3610cbf8585348686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061046b92505050565b6000612086827f1d1d8b6300000000000000000000000000000000000000000000000000000000612265565b92915050565b60008273ffffffffffffffffffffffffffffffffffffffff1663c01e1bd66040518163ffffffff1660e01b8152600401602060405180830381865afa1580156120d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120fd9190612b15565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610a749084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612288565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526112f59085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401612185565b600061227083612394565b8015612281575061228183836123f8565b9392505050565b60006122ea826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166124c79092919063ffffffff16565b805190915015610a7457808060200190518101906123089190612df2565b610a74576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016101bd565b60006123c0827f01ffc9a7000000000000000000000000000000000000000000000000000000006123f8565b801561208657506123f1827fffffffff000000000000000000000000000000000000000000000000000000006123f8565b1592915050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000178152825160009392849283928392918391908a617530fa92503d915060005190508280156124b0575060208210155b80156124bc5750600081115b979650505050505050565b6060611f1484846000858573ffffffffffffffffffffffffffffffffffffffff85163b612550576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016101bd565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516125799190612e14565b60006040518083038185875af1925050503d80600081146125b6576040519150601f19603f3d011682016040523d82523d6000602084013e6125bb565b606091505b50915091506124bc828286606083156125d5575081612281565b8251156125e55782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101bd91906128eb565b73ffffffffffffffffffffffffffffffffffffffff8116811461263b57600080fd5b50565b60008083601f84011261265057600080fd5b50813567ffffffffffffffff81111561266857600080fd5b60208301915083602082850101111561268057600080fd5b9250929050565b600080600080600080600060c0888a0312156126a257600080fd5b87356126ad81612619565b965060208801356126bd81612619565b955060408801356126cd81612619565b945060608801356126dd81612619565b93506080880135925060a088013567ffffffffffffffff81111561270057600080fd5b61270c8a828b0161263e565b989b979a50959850939692959293505050565b803563ffffffff8116811461273357600080fd5b919050565b60008060006040848603121561274d57600080fd5b6127568461271f565b9250602084013567ffffffffffffffff81111561277257600080fd5b61277e8682870161263e565b9497909650939450505050565b6000806000806000608086880312156127a357600080fd5b85356127ae81612619565b945060208601356127be81612619565b935060408601359250606086013567ffffffffffffffff8111156127e157600080fd5b6127ed8882890161263e565b969995985093965092949392505050565b600080600080600080600060c0888a03121561281957600080fd5b873561282481612619565b9650602088013561283481612619565b9550604088013561284481612619565b9450606088013593506128596080890161271f565b925060a088013567ffffffffffffffff81111561270057600080fd5b60005b83811015612890578181015183820152602001612878565b838111156112f55750506000910152565b600081518084526128b9816020860160208601612875565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061228160208301846128a1565b60008060008060008060a0878903121561291757600080fd5b863561292281612619565b9550602087013561293281612619565b9450604087013593506129476060880161271f565b9250608087013567ffffffffffffffff81111561296357600080fd5b61296f89828a0161263e565b979a9699509497509295939492505050565b6000806040838503121561299457600080fd5b823561299f81612619565b915060208301356129af81612619565b809150509250929050565b600080600080606085870312156129d057600080fd5b84356129db81612619565b93506129e96020860161271f565b9250604085013567ffffffffffffffff811115612a0557600080fd5b612a118782880161263e565b95989497509550505050565b60008060008060808587031215612a3357600080fd5b8435612a3e81612619565b93506020850135612a4e81612619565b92506040850135612a5e81612619565b9396929550929360600135925050565b828152604060208201526000611f1460408301846128a1565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152612ac660808301846128a1565b9695505050505050565b73ffffffffffffffffffffffffffffffffffffffff84168152606060208201526000612aff60608301856128a1565b905063ffffffff83166040830152949350505050565b600060208284031215612b2757600080fd5b815161228181612619565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff85168152836020820152606060408201526000612ac6606083018486612b32565b838152604060208201526000612bcb604083018486612b32565b95945050505050565b60008451612be6818460208901612875565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551612c22816001850160208a01612875565b60019201918201528351612c3d816002840160208801612875565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015612c8b57612c8b612c4a565b500390565b600073ffffffffffffffffffffffffffffffffffffffff808a1683528089166020840152808816604084015280871660608401525084608083015260c060a0830152612ce060c083018486612b32565b9998505050505050505050565b60008219821115612d0057612d00612c4a565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612d3657612d36612c4a565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082612d7b57612d7b612d3d565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082612dbe57612dbe612d3d565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215612e0457600080fd5b8151801515811461228157600080fd5b60008251612e26818460208701612875565b919091019291505056fea164736f6c634300080f000a", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "bridgeERC20(address,address,uint256,uint32,bytes)": { + "params": { + "_amount": "Amount of local tokens to deposit.", + "_extraData": "Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.", + "_localToken": "Address of the ERC20 on this chain.", + "_minGasLimit": "Minimum amount of gas that the bridge can be relayed with.", + "_remoteToken": "Address of the corresponding token on the remote chain." + } + }, + "bridgeERC20To(address,address,address,uint256,uint32,bytes)": { + "params": { + "_amount": "Amount of local tokens to deposit.", + "_extraData": "Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.", + "_localToken": "Address of the ERC20 on this chain.", + "_minGasLimit": "Minimum amount of gas that the bridge can be relayed with.", + "_remoteToken": "Address of the corresponding token on the remote chain.", + "_to": "Address of the receiver." + } + }, + "bridgeETH(uint32,bytes)": { + "params": { + "_extraData": "Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.", + "_minGasLimit": "Minimum amount of gas that the bridge can be relayed with." + } + }, + "bridgeETHTo(address,uint32,bytes)": { + "params": { + "_extraData": "Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.", + "_minGasLimit": "Minimum amount of gas that the bridge can be relayed with.", + "_to": "Address of the receiver." + } + }, + "completeOutboundTransfer(address,address,address,uint256)": { + "params": { + "_amount": "Amount of ETH being bridged.", + "_localToken": "Address of the ERC20 on this chain.", + "_remoteToken": "Address of the corresponding token on the remote chain.", + "_to": "Address of the receiver." + } + }, + "constructor": { + "params": { + "_messenger": "Address of the L1CrossDomainMessenger." + } + }, + "depositERC20(address,address,uint256,uint32,bytes)": { + "params": { + "_amount": "Amount of the ERC20 to deposit.", + "_extraData": "Optional data to forward to L2. Data supplied here will not be used to execute any code on L2 and is only emitted as extra data for the convenience of off-chain tooling.", + "_l1Token": "Address of the L1 token being deposited.", + "_l2Token": "Address of the corresponding token on L2.", + "_minGasLimit": "Minimum gas limit for the deposit message on L2." + } + }, + "depositERC20To(address,address,address,uint256,uint32,bytes)": { + "params": { + "_amount": "Amount of the ERC20 to deposit.", + "_extraData": "Optional data to forward to L2. Data supplied here will not be used to execute any code on L2 and is only emitted as extra data for the convenience of off-chain tooling.", + "_l1Token": "Address of the L1 token being deposited.", + "_l2Token": "Address of the corresponding token on L2.", + "_minGasLimit": "Minimum gas limit for the deposit message on L2.", + "_to": "Address of the recipient on L2." + } + }, + "depositETH(uint32,bytes)": { + "params": { + "_extraData": "Optional data to forward to L2. Data supplied here will not be used to execute any code on L2 and is only emitted as extra data for the convenience of off-chain tooling.", + "_minGasLimit": "Minimum gas limit for the deposit message on L2." + } + }, + "depositETHTo(address,uint32,bytes)": { + "params": { + "_extraData": "Optional data to forward to L2. Data supplied here will not be used to execute any code on L2 and is only emitted as extra data for the convenience of off-chain tooling.", + "_minGasLimit": "Minimum gas limit for the deposit message on L2.", + "_to": "Address of the recipient on L2." + } + }, + "finalizeBridgeERC20(address,address,address,address,uint256,bytes)": { + "params": { + "_amount": "Amount of ETH being bridged.", + "_extraData": "Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.", + "_from": "Address of the sender.", + "_localToken": "Address of the ERC20 on this chain.", + "_remoteToken": "Address of the corresponding token on the remote chain.", + "_to": "Address of the receiver." + } + }, + "finalizeBridgeETH(address,address,uint256,bytes)": { + "params": { + "_amount": "Amount of ETH being bridged.", + "_extraData": "Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.", + "_from": "Address of the sender.", + "_to": "Address of the receiver." + } + }, + "finalizeERC20Withdrawal(address,address,address,address,uint256,bytes)": { + "params": { + "_amount": "Amount of ETH to withdraw.", + "_extraData": "Optional data forwarded from L2.", + "_from": "Address of the withdrawer on L2.", + "_l1Token": "Address of the token on L1.", + "_l2Token": "Address of the corresponding token on L2.", + "_to": "Address of the recipient on L1." + } + }, + "finalizeETHWithdrawal(address,address,uint256,bytes)": { + "params": { + "_amount": "Amount of ETH to withdraw.", + "_extraData": "Optional data forwarded from L2.", + "_from": "Address of the withdrawer on L2.", + "_to": "Address of the recipient on L1." + } + }, + "l2TokenBridge()": { + "returns": { + "_0": "Address of the corresponding L2 bridge contract." + } + }, + "version()": { + "returns": { + "_0": "Semver contract version as a string." + } + } + }, + "events": { + "ERC20DepositInitiated(address,address,address,address,uint256,bytes)": { + "params": { + "amount": "Amount of the ERC20 deposited.", + "extraData": "Extra data attached to the deposit.", + "from": "Address of the depositor.", + "l1Token": "Address of the token on L1.", + "l2Token": "Address of the corresponding token on L2.", + "to": "Address of the recipient on L2." + } + }, + "ERC20WithdrawalFinalized(address,address,address,address,uint256,bytes)": { + "params": { + "amount": "Amount of the ERC20 withdrawn.", + "extraData": "Extra data attached to the withdrawal.", + "from": "Address of the withdrawer.", + "l1Token": "Address of the token on L1.", + "l2Token": "Address of the corresponding token on L2.", + "to": "Address of the recipient on L1." + } + }, + "ETHDepositInitiated(address,address,uint256,bytes)": { + "params": { + "amount": "Amount of ETH deposited.", + "extraData": "Extra data attached to the deposit.", + "from": "Address of the depositor.", + "to": "Address of the recipient on L2." + } + }, + "ETHWithdrawalFinalized(address,address,uint256,bytes)": { + "params": { + "amount": "Amount of ETH withdrawn.", + "extraData": "Extra data attached to the withdrawal.", + "from": "Address of the withdrawer.", + "to": "Address of the recipient on L1." + } + } + } + }, + "userdoc": { + "version": 1, + "kind": "user", + "methods": { + "bridgeERC20(address,address,uint256,uint32,bytes)": { + "notice": "Sends ERC20 tokens to the sender's address on the other chain. Note that if the ERC20 token on the other chain does not recognize the local token as the correct pair token, the ERC20 bridge will fail and the tokens will be returned to sender on this chain." + }, + "bridgeERC20To(address,address,address,uint256,uint32,bytes)": { + "notice": "Sends ERC20 tokens to a receiver's address on the other chain. Note that if the ERC20 token on the other chain does not recognize the local token as the correct pair token, the ERC20 bridge will fail and the tokens will be returned to sender on this chain." + }, + "bridgeETH(uint32,bytes)": { + "notice": "Sends ETH to the sender's address on the other chain." + }, + "bridgeETHTo(address,uint32,bytes)": { + "notice": "Sends ETH to a receiver's address on the other chain. Note that if ETH is sent to a smart contract and the call fails, the ETH will be temporarily locked in the StandardBridge on the other chain until the call is replayed. If the call cannot be replayed with any amount of gas (call always reverts), then the ETH will be permanently locked in the StandardBridge on the other chain." + }, + "completeOutboundTransfer(address,address,address,uint256)": { + "notice": "Completes an outbound token transfer. Public function, but can only be called by this contract. It's security critical that there be absolutely no way for anyone to trigger this function, except by explicit trigger within this contract. Used as a simple way to be able to try/catch any type of revert that could occur during an ERC20 mint/transfer." + }, + "deposits(address,address)": { + "notice": "Mapping that stores deposits for a given pair of local and remote tokens." + }, + "finalizeBridgeERC20(address,address,address,address,uint256,bytes)": { + "notice": "Finalizes an ERC20 bridge on this chain. Can only be triggered by the other StandardBridge contract on the remote chain." + }, + "finalizeBridgeETH(address,address,uint256,bytes)": { + "notice": "Finalizes an ETH bridge on this chain. Can only be triggered by the other StandardBridge contract on the remote chain." + }, + "messenger()": { + "notice": "Messenger contract on this domain." + }, + "otherBridge()": { + "notice": "Corresponding bridge on the other domain." + }, + "version()": { + "notice": "Returns the full semver contract version." + } + }, + "events": { + "ERC20BridgeFailed(address,address,address,address,uint256,bytes)": { + "notice": "Emitted when an ERC20 bridge to this chain fails." + }, + "ERC20BridgeFinalized(address,address,address,address,uint256,bytes)": { + "notice": "Emitted when an ERC20 bridge is finalized on this chain." + }, + "ERC20BridgeInitiated(address,address,address,address,uint256,bytes)": { + "notice": "Emitted when an ERC20 bridge is initiated to the other chain." + }, + "ETHBridgeFinalized(address,address,uint256,bytes)": { + "notice": "Emitted when an ETH bridge is finalized on this chain." + }, + "ETHBridgeInitiated(address,address,uint256,bytes)": { + "notice": "Emitted when an ETH bridge is initiated to the other chain." + } + }, + "notice": "The L1StandardBridge is responsible for transfering ETH and ERC20 tokens between L1 and L2. ERC20 tokens deposited into L2 are escrowed within this contract until withdrawal. ETH is transferred to and escrowed within the OptimismPortal contract." + }, + "storageLayout": { + "storage": [ + { + "astId": 25117, + "contract": "contracts/L1/L1StandardBridge.sol:L1StandardBridge", + "label": "spacer0", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 25120, + "contract": "contracts/L1/L1StandardBridge.sol:L1StandardBridge", + "label": "spacer1", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 25127, + "contract": "contracts/L1/L1StandardBridge.sol:L1StandardBridge", + "label": "deposits", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/packages/contracts-bedrock/deployments/goerli/L1StandardBridgeProxy.json b/packages/contracts-bedrock/deployments/alpha-1/L1StandardBridgeProxy.json similarity index 93% rename from packages/contracts-bedrock/deployments/goerli/L1StandardBridgeProxy.json rename to packages/contracts-bedrock/deployments/alpha-1/L1StandardBridgeProxy.json index 61b922cff0846..d6eb55ee65107 100644 --- a/packages/contracts-bedrock/deployments/goerli/L1StandardBridgeProxy.json +++ b/packages/contracts-bedrock/deployments/alpha-1/L1StandardBridgeProxy.json @@ -1,5 +1,5 @@ { - "address": "0x3832f427768eA5069b3498fb3b3d719104609dAd", + "address": "0xFf94B6C486350aD92561Ba09bad3a59df764Da92", "abi": [ { "inputs": [ @@ -129,41 +129,41 @@ "type": "receive" } ], - "transactionHash": "0x84d7a3e1d7707d4bfcf0929ad5466d0ee9e31436b2d0421526ad67b7152bf740", + "transactionHash": "0x2d7637c2dc457a7a49310a3d56506d38255935e02629ad3557b971bc5057e3f6", "receipt": { "to": null, - "from": "0xCFf7a9856DB3C60AB546b8F43dC5D1A4336786A0", - "contractAddress": "0x3832f427768eA5069b3498fb3b3d719104609dAd", - "transactionIndex": 1, + "from": "0x1D066Ef7AA90ae85Bb017e85968A9e1851DA95Db", + "contractAddress": "0xFf94B6C486350aD92561Ba09bad3a59df764Da92", + "transactionIndex": 2, "gasUsed": "523812", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000800000000000000000000000000000000000000000000000000000008000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x8615ebb52b538ca8fb439e33722d8fd1e1b5a74f81d4f449a6740540d3d95097", - "transactionHash": "0x84d7a3e1d7707d4bfcf0929ad5466d0ee9e31436b2d0421526ad67b7152bf740", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000080000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x8503f0e1f8d0f3ce085e5a1ff5b93949f348092365c49ad10b86111b1b6df21a", + "transactionHash": "0x2d7637c2dc457a7a49310a3d56506d38255935e02629ad3557b971bc5057e3f6", "logs": [ { - "transactionIndex": 1, - "blockNumber": 7355252, - "transactionHash": "0x84d7a3e1d7707d4bfcf0929ad5466d0ee9e31436b2d0421526ad67b7152bf740", - "address": "0x3832f427768eA5069b3498fb3b3d719104609dAd", + "transactionIndex": 2, + "blockNumber": 7568962, + "transactionHash": "0x2d7637c2dc457a7a49310a3d56506d38255935e02629ad3557b971bc5057e3f6", + "address": "0xFf94B6C486350aD92561Ba09bad3a59df764Da92", "topics": [ "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cff7a9856db3c60ab546b8f43dc5d1a4336786a0", - "logIndex": 9, - "blockHash": "0x8615ebb52b538ca8fb439e33722d8fd1e1b5a74f81d4f449a6740540d3d95097" + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000001d066ef7aa90ae85bb017e85968a9e1851da95db", + "logIndex": 2, + "blockHash": "0x8503f0e1f8d0f3ce085e5a1ff5b93949f348092365c49ad10b86111b1b6df21a" } ], - "blockNumber": 7355252, - "cumulativeGasUsed": "804632", + "blockNumber": 7568962, + "cumulativeGasUsed": "1571436", "status": 1, "byzantium": true }, "args": [ - "0xCFf7a9856DB3C60AB546b8F43dC5D1A4336786A0" + "0x1D066Ef7AA90ae85Bb017e85968A9e1851DA95Db" ], "numDeployments": 1, - "solcInputHash": "cd42cb04f3b6a78e5824c9f427d0a55d", - "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\":{\"contracts/universal/Proxy.sol\":\"Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@eth-optimism/contracts-periphery/=node_modules/@eth-optimism/contracts-periphery/contracts/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/\",\":@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/\",\":@rari-capital/=node_modules/@rari-capital/\",\":@rari-capital/solmate/=node_modules/@rari-capital/solmate/\",\":contracts/=contracts/\",\":ds-test/=node_modules/ds-test/src/\",\":excessively-safe-call/=node_modules/excessively-safe-call/\",\":forge-std/=node_modules/forge-std/src/\"]},\"sources\":{\"contracts/universal/Proxy.sol\":{\"keccak256\":\"0xfa08635f1866139673ac4fe7b07330f752f93800075b895d8fcb8484f4a3f753\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8f2247604d527f560edbb851c43b6c16b37e34972ddb305e16dd73623b8288cd\",\"dweb:/ipfs/QmfM8sLAZrxrnqyRdt1XJ5LyJh4wKbeEqk3VkvxG7BDqFj\"]}},\"version\":1}", + "solcInputHash": "ada691c3f5ff59bd3e60fdb28388fb6d", + "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\":{\"contracts/universal/Proxy.sol\":\"Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@eth-optimism/contracts-periphery/=node_modules/@eth-optimism/contracts-periphery/contracts/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/\",\":@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/\",\":@rari-capital/=node_modules/@rari-capital/\",\":@rari-capital/solmate/=node_modules/@rari-capital/solmate/\",\":contracts/=contracts/\",\":ds-test/=node_modules/ds-test/src/\",\":forge-std/=node_modules/forge-std/src/\"]},\"sources\":{\"contracts/universal/Proxy.sol\":{\"keccak256\":\"0xfa08635f1866139673ac4fe7b07330f752f93800075b895d8fcb8484f4a3f753\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8f2247604d527f560edbb851c43b6c16b37e34972ddb305e16dd73623b8288cd\",\"dweb:/ipfs/QmfM8sLAZrxrnqyRdt1XJ5LyJh4wKbeEqk3VkvxG7BDqFj\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b5060405161091838038061091883398101604081905261002f916100b2565b6100388161003e565b506100e2565b60006100566000805160206108f88339815191525490565b6000805160206108f8833981519152839055604080516001600160a01b038084168252851660208201529192507f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b6000602082840312156100c457600080fd5b81516001600160a01b03811681146100db57600080fd5b9392505050565b610807806100f16000396000f3fe60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100be5780638f283970146100f8578063f851a440146101185761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61012d565b005b61006b61012d565b34801561008157600080fd5b5061006b6100903660046106d9565b610224565b6100a86100a33660046106f4565b610296565b6040516100b59190610777565b60405180910390f35b3480156100ca57600080fd5b506100d3610419565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100b5565b34801561010457600080fd5b5061006b6101133660046106d9565b6104b0565b34801561012457600080fd5b506100d3610517565b60006101577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905073ffffffffffffffffffffffffffffffffffffffff8116610201576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f50726f78793a20696d706c656d656e746174696f6e206e6f7420696e6974696160448201527f6c697a656400000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3660008037600080366000845af43d6000803e8061021e573d6000fd5b503d6000f35b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061027d575033155b1561028e5761028b816105a3565b50565b61028b61012d565b60606102c07fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806102f7575033155b1561040a57610305846105a3565b6000808573ffffffffffffffffffffffffffffffffffffffff16858560405161032f9291906107ea565b600060405180830381855af49150503d806000811461036a576040519150601f19603f3d011682016040523d82523d6000602084013e61036f565b606091505b509150915081610401576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f50726f78793a2064656c656761746563616c6c20746f206e657720696d706c6560448201527f6d656e746174696f6e20636f6e7472616374206661696c65640000000000000060648201526084016101f8565b91506104129050565b61041261012d565b9392505050565b60006104437fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061047a575033155b156104a557507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6104ad61012d565b90565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610509575033155b1561028e5761028b8161060b565b60006105417fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610578575033155b156104a557507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81905560405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60006106357fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038390556040805173ffffffffffffffffffffffffffffffffffffffff8084168252851660208201529192507f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b803573ffffffffffffffffffffffffffffffffffffffff811681146106d457600080fd5b919050565b6000602082840312156106eb57600080fd5b610412826106b0565b60008060006040848603121561070957600080fd5b610712846106b0565b9250602084013567ffffffffffffffff8082111561072f57600080fd5b818601915086601f83011261074357600080fd5b81358181111561075257600080fd5b87602082850101111561076457600080fd5b6020830194508093505050509250925092565b600060208083528351808285015260005b818110156107a457858101830151858201604001528201610788565b818111156107b6576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b818382376000910190815291905056fea164736f6c634300080f000ab53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", "deployedBytecode": "0x60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100be5780638f283970146100f8578063f851a440146101185761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61012d565b005b61006b61012d565b34801561008157600080fd5b5061006b6100903660046106d9565b610224565b6100a86100a33660046106f4565b610296565b6040516100b59190610777565b60405180910390f35b3480156100ca57600080fd5b506100d3610419565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100b5565b34801561010457600080fd5b5061006b6101133660046106d9565b6104b0565b34801561012457600080fd5b506100d3610517565b60006101577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905073ffffffffffffffffffffffffffffffffffffffff8116610201576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f50726f78793a20696d706c656d656e746174696f6e206e6f7420696e6974696160448201527f6c697a656400000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3660008037600080366000845af43d6000803e8061021e573d6000fd5b503d6000f35b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061027d575033155b1561028e5761028b816105a3565b50565b61028b61012d565b60606102c07fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806102f7575033155b1561040a57610305846105a3565b6000808573ffffffffffffffffffffffffffffffffffffffff16858560405161032f9291906107ea565b600060405180830381855af49150503d806000811461036a576040519150601f19603f3d011682016040523d82523d6000602084013e61036f565b606091505b509150915081610401576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f50726f78793a2064656c656761746563616c6c20746f206e657720696d706c6560448201527f6d656e746174696f6e20636f6e7472616374206661696c65640000000000000060648201526084016101f8565b91506104129050565b61041261012d565b9392505050565b60006104437fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061047a575033155b156104a557507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6104ad61012d565b90565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610509575033155b1561028e5761028b8161060b565b60006105417fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610578575033155b156104a557507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81905560405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60006106357fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038390556040805173ffffffffffffffffffffffffffffffffffffffff8084168252851660208201529192507f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b803573ffffffffffffffffffffffffffffffffffffffff811681146106d457600080fd5b919050565b6000602082840312156106eb57600080fd5b610412826106b0565b60008060006040848603121561070957600080fd5b610712846106b0565b9250602084013567ffffffffffffffff8082111561072f57600080fd5b818601915086601f83011261074357600080fd5b81358181111561075257600080fd5b87602082850101111561076457600080fd5b6020830194508093505050509250925092565b600060208083528351808285015260005b818110156107a457858101830151858201604001528201610788565b818111156107b6576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b818382376000910190815291905056fea164736f6c634300080f000a", "devdoc": { diff --git a/packages/contracts-bedrock/deployments/goerli/L2OutputOracle.json b/packages/contracts-bedrock/deployments/alpha-1/L2OutputOracle.json similarity index 82% rename from packages/contracts-bedrock/deployments/goerli/L2OutputOracle.json rename to packages/contracts-bedrock/deployments/alpha-1/L2OutputOracle.json index 29ab0903231ae..a468757c39d09 100644 --- a/packages/contracts-bedrock/deployments/goerli/L2OutputOracle.json +++ b/packages/contracts-bedrock/deployments/alpha-1/L2OutputOracle.json @@ -1,5 +1,5 @@ { - "address": "0x63870b68d62f8158269b0F2350Fe6C7B886fb515", + "address": "0xD54EEac0423186df59641D2fA945AdDB3d385b19", "abi": [ { "inputs": [ @@ -443,90 +443,90 @@ "type": "function" } ], - "transactionHash": "0xdb1f9943a8510b59170c15f3a63468df04e1af80638f1496a9bf7b6e2274b82c", + "transactionHash": "0xacf29d32fc76595ac29c0b3795ea05db894b030056f5b1eefc5d984648b25f2e", "receipt": { "to": null, - "from": "0xCFf7a9856DB3C60AB546b8F43dC5D1A4336786A0", - "contractAddress": "0x63870b68d62f8158269b0F2350Fe6C7B886fb515", + "from": "0x1D066Ef7AA90ae85Bb017e85968A9e1851DA95Db", + "contractAddress": "0xD54EEac0423186df59641D2fA945AdDB3d385b19", "transactionIndex": 0, - "gasUsed": "1628249", - "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000002000002000000000000000000000000000000000000200000000040000000000000800000000000000001000000800000000001000000000000000000000400000000000000020000000000000000000800004000000000000000000000000000400000000000000000000000000000000000000000000080000000000000000000000000000000001008000000000400000000000000000000000000040000000000000000000000000000000000040000000000000000000000000000000020000010008000400000000000000000000000000000000000000000000000000000", - "blockHash": "0x7a8e4c1522dd5daddf1d96cb9e4688ef206204ede059c0ebfd8955e97c8db648", - "transactionHash": "0xdb1f9943a8510b59170c15f3a63468df04e1af80638f1496a9bf7b6e2274b82c", + "gasUsed": "1628261", + "logsBloom": "0x00400008000000000000000000000000000000000000000000800000000002000000000000000000000000000080000400000000000000000200000000000000000000000000000000000000800000000001000000000000000000000000000000000000020000000000000000000804000000000000000000000000080000400000000000000000000000000000000000000000000081000000000000000000000000000000000000000000000400000000000000000000000000840000000000000040000000000000000000040000000000000000000000000000000020000000000000000000000000000008000000000000200000000000000000000000", + "blockHash": "0x5bd8ca98c113de21b83bf8ab5394a0136979164858c25cc0864317a9bc69ef76", + "transactionHash": "0xacf29d32fc76595ac29c0b3795ea05db894b030056f5b1eefc5d984648b25f2e", "logs": [ { "transactionIndex": 0, - "blockNumber": 7355242, - "transactionHash": "0xdb1f9943a8510b59170c15f3a63468df04e1af80638f1496a9bf7b6e2274b82c", - "address": "0x63870b68d62f8158269b0F2350Fe6C7B886fb515", + "blockNumber": 7568963, + "transactionHash": "0xacf29d32fc76595ac29c0b3795ea05db894b030056f5b1eefc5d984648b25f2e", + "address": "0xD54EEac0423186df59641D2fA945AdDB3d385b19", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000cff7a9856db3c60ab546b8f43dc5d1a4336786a0" + "0x0000000000000000000000001d066ef7aa90ae85bb017e85968a9e1851da95db" ], "data": "0x", "logIndex": 0, - "blockHash": "0x7a8e4c1522dd5daddf1d96cb9e4688ef206204ede059c0ebfd8955e97c8db648" + "blockHash": "0x5bd8ca98c113de21b83bf8ab5394a0136979164858c25cc0864317a9bc69ef76" }, { "transactionIndex": 0, - "blockNumber": 7355242, - "transactionHash": "0xdb1f9943a8510b59170c15f3a63468df04e1af80638f1496a9bf7b6e2274b82c", - "address": "0x63870b68d62f8158269b0F2350Fe6C7B886fb515", + "blockNumber": 7568963, + "transactionHash": "0xacf29d32fc76595ac29c0b3795ea05db894b030056f5b1eefc5d984648b25f2e", + "address": "0xD54EEac0423186df59641D2fA945AdDB3d385b19", "topics": [ "0x3d7728dc2838bb794606bd89f5a37930830b32060f69ee929bbfc59b669024dd", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000009881a4972a58780844bcef24c4dbd76239ce2508" + "0x000000000000000000000000154359205dceafd23ed5066bfd5d541c816a5cdf" ], "data": "0x", "logIndex": 1, - "blockHash": "0x7a8e4c1522dd5daddf1d96cb9e4688ef206204ede059c0ebfd8955e97c8db648" + "blockHash": "0x5bd8ca98c113de21b83bf8ab5394a0136979164858c25cc0864317a9bc69ef76" }, { "transactionIndex": 0, - "blockNumber": 7355242, - "transactionHash": "0xdb1f9943a8510b59170c15f3a63468df04e1af80638f1496a9bf7b6e2274b82c", - "address": "0x63870b68d62f8158269b0F2350Fe6C7B886fb515", + "blockNumber": 7568963, + "transactionHash": "0xacf29d32fc76595ac29c0b3795ea05db894b030056f5b1eefc5d984648b25f2e", + "address": "0xD54EEac0423186df59641D2fA945AdDB3d385b19", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", - "0x000000000000000000000000cff7a9856db3c60ab546b8f43dc5d1a4336786a0", - "0x000000000000000000000000c11ad48cf19d938e04ff56885aa4df724cfadbd6" + "0x0000000000000000000000001d066ef7aa90ae85bb017e85968a9e1851da95db", + "0x000000000000000000000000eed173e5b7f9860b9b9808a8b0d0ddf28db6386c" ], "data": "0x", "logIndex": 2, - "blockHash": "0x7a8e4c1522dd5daddf1d96cb9e4688ef206204ede059c0ebfd8955e97c8db648" + "blockHash": "0x5bd8ca98c113de21b83bf8ab5394a0136979164858c25cc0864317a9bc69ef76" }, { "transactionIndex": 0, - "blockNumber": 7355242, - "transactionHash": "0xdb1f9943a8510b59170c15f3a63468df04e1af80638f1496a9bf7b6e2274b82c", - "address": "0x63870b68d62f8158269b0F2350Fe6C7B886fb515", + "blockNumber": 7568963, + "transactionHash": "0xacf29d32fc76595ac29c0b3795ea05db894b030056f5b1eefc5d984648b25f2e", + "address": "0xD54EEac0423186df59641D2fA945AdDB3d385b19", "topics": [ "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", "logIndex": 3, - "blockHash": "0x7a8e4c1522dd5daddf1d96cb9e4688ef206204ede059c0ebfd8955e97c8db648" + "blockHash": "0x5bd8ca98c113de21b83bf8ab5394a0136979164858c25cc0864317a9bc69ef76" } ], - "blockNumber": 7355242, - "cumulativeGasUsed": "1628249", + "blockNumber": 7568963, + "cumulativeGasUsed": "1628261", "status": 1, "byzantium": true }, "args": [ - 6, + 1800, "0x0000000000000000000000000000000000000000000000000000000000000000", 0, 0, - 1659763951, + 1662857796, 2, - "0x9881a4972A58780844bcEf24C4DBd76239cE2508", - "0xc11Ad48CF19d938E04FF56885Aa4dF724CFadbD6" + "0x154359205DcEAFD23eD5066bFd5D541c816A5CDF", + "0xeeD173E5b7f9860b9B9808a8B0D0Ddf28db6386C" ], "numDeployments": 1, - "solcInputHash": "cd42cb04f3b6a78e5824c9f427d0a55d", - "metadata": "{\"compiler\":{\"version\":\"0.8.15+commit.e14f2714\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_submissionInterval\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_genesisL2Output\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_historicalTotalBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_startingBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_startingTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_l2BlockTime\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_proposer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"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\":\"bytes32\",\"name\":\"outputRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"l1Timestamp\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"l2BlockNumber\",\"type\":\"uint256\"}],\"name\":\"OutputDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"outputRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"l1Timestamp\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"l2BlockNumber\",\"type\":\"uint256\"}],\"name\":\"OutputProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousProposer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newProposer\",\"type\":\"address\"}],\"name\":\"ProposerChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"HISTORICAL_TOTAL_BLOCKS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"L2_BLOCK_TIME\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"STARTING_BLOCK_NUMBER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"STARTING_TIMESTAMP\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SUBMISSION_INTERVAL\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newProposer\",\"type\":\"address\"}],\"name\":\"changeProposer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_l2BlockNumber\",\"type\":\"uint256\"}],\"name\":\"computeL2Timestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"outputRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"internalType\":\"struct Types.OutputProposal\",\"name\":\"_proposal\",\"type\":\"tuple\"}],\"name\":\"deleteL2Output\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_l2BlockNumber\",\"type\":\"uint256\"}],\"name\":\"getL2Output\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"outputRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"internalType\":\"struct Types.OutputProposal\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_genesisL2Output\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_startingBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_proposer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_outputRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_l2BlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_l1Blockhash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_l1BlockNumber\",\"type\":\"uint256\"}],\"name\":\"proposeL2Output\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proposer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"custom:proxied\":\"@title L2OutputOracle\",\"events\":{\"OutputDeleted(bytes32,uint256,uint256)\":{\"params\":{\"l1Timestamp\":\"The L1 timestamp when proposed.\",\"l2BlockNumber\":\"The L2 block number of the output root.\",\"outputRoot\":\"The output root.\"}},\"OutputProposed(bytes32,uint256,uint256)\":{\"params\":{\"l1Timestamp\":\"The L1 timestamp when proposed.\",\"l2BlockNumber\":\"The L2 block number of the output root.\",\"outputRoot\":\"The output root.\"}},\"ProposerChanged(address,address)\":{\"params\":{\"newProposer\":\"The new proposer address.\",\"previousProposer\":\"The previous proposer address.\"}}},\"kind\":\"dev\",\"methods\":{\"computeL2Timestamp(uint256)\":{\"params\":{\"_l2BlockNumber\":\"The L2 block number of the target block.\"}},\"constructor\":{\"custom:semver\":\"0.0.1\",\"params\":{\"_genesisL2Output\":\"The initial L2 output of the L2 chain.\",\"_historicalTotalBlocks\":\"Number of blocks preceding this L2 chain.\",\"_l2BlockTime\":\"The timestamp of the first L2 block.\",\"_owner\":\"The address of the owner.\",\"_proposer\":\"The address of the proposer.\",\"_startingBlockNumber\":\"The number of the first L2 block.\",\"_startingTimestamp\":\"The timestamp of the first L2 block.\",\"_submissionInterval\":\"Interval in blocks at which checkpoints must be submitted.\"}},\"deleteL2Output((bytes32,uint256))\":{\"params\":{\"_proposal\":\"Represents the output proposal to delete\"}},\"getL2Output(uint256)\":{\"params\":{\"_l2BlockNumber\":\"The L2 block number of the target block.\"}},\"initialize(bytes32,uint256,address,address)\":{\"params\":{\"_genesisL2Output\":\"The initial L2 output of the L2 chain.\",\"_owner\":\"The address of the owner.\",\"_proposer\":\"The address of the proposer.\",\"_startingBlockNumber\":\"The timestamp to start L2 block at.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"proposeL2Output(bytes32,uint256,bytes32,uint256)\":{\"params\":{\"_l1BlockNumber\":\"The block number with the specified block hash.\",\"_l1Blockhash\":\"A block hash which must be included in the current chain.\",\"_l2BlockNumber\":\"The L2 block number that resulted in _outputRoot.\",\"_outputRoot\":\"The L2 output of the checkpoint block.\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"version()\":{\"returns\":{\"_0\":\"Semver contract version as a string.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"OutputDeleted(bytes32,uint256,uint256)\":{\"notice\":\"Emitted when an output is deleted.\"},\"OutputProposed(bytes32,uint256,uint256)\":{\"notice\":\"Emitted when an output is proposed.\"},\"ProposerChanged(address,address)\":{\"notice\":\"Emitted when the proposer address is changed.\"}},\"kind\":\"user\",\"methods\":{\"HISTORICAL_TOTAL_BLOCKS()\":{\"notice\":\"The number of blocks in the chain before the first block in this contract.\"},\"L2_BLOCK_TIME()\":{\"notice\":\"The time between L2 blocks in seconds.\"},\"STARTING_BLOCK_NUMBER()\":{\"notice\":\"The number of the first L2 block recorded in this contract.\"},\"STARTING_TIMESTAMP()\":{\"notice\":\"The timestamp of the first L2 block recorded in this contract.\"},\"SUBMISSION_INTERVAL()\":{\"notice\":\"The interval in L2 blocks at which checkpoints must be submitted.\"},\"changeProposer(address)\":{\"notice\":\"Transfers the proposer role to a new account (`newProposer`). Can only be called by the current owner.\"},\"computeL2Timestamp(uint256)\":{\"notice\":\"Returns the L2 timestamp corresponding to a given L2 block number. Returns a null output proposal if none is found.\"},\"deleteL2Output((bytes32,uint256))\":{\"notice\":\"Deletes the most recent output. This is used to remove the most recent output in the event that an erreneous output is submitted. It can only be called by the contract's owner, not the proposer. Longer term, this should be replaced with a more robust mechanism which will allow deletion of proposals shown to be invalid by a fault proof.\"},\"getL2Output(uint256)\":{\"notice\":\"Returns the L2 output proposal associated with a target L2 block number. If the L2 block number provided is between checkpoints, this function will rerutn the next proposal for the next checkpoint. Reverts if the output proposal is either not found, or predates the STARTING_BLOCK_NUMBER.\"},\"initialize(bytes32,uint256,address,address)\":{\"notice\":\"Initializer.\"},\"latestBlockNumber()\":{\"notice\":\"The number of the most recent L2 block recorded in this contract.\"},\"nextBlockNumber()\":{\"notice\":\"Computes the block number of the next L2 block that needs to be checkpointed.\"},\"proposeL2Output(bytes32,uint256,bytes32,uint256)\":{\"notice\":\"Accepts an outputRoot and the timestamp of the corresponding L2 block. The timestamp must be equal to the current value returned by `nextTimestamp()` in order to be accepted. This function may only be called by the Proposer.\"},\"proposer()\":{\"notice\":\"The address of the proposer;\"},\"version()\":{\"notice\":\"Returns the full semver contract version.\"}},\"notice\":\"The L2 state is committed to in this contract The payable keyword is used on proposeL2Output to save gas on the msg.value check. This contract should be deployed behind an upgradable proxy\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/L1/L2OutputOracle.sol\":\"L2OutputOracle\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@eth-optimism/contracts-periphery/=node_modules/@eth-optimism/contracts-periphery/contracts/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/\",\":@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/\",\":@rari-capital/=node_modules/@rari-capital/\",\":@rari-capital/solmate/=node_modules/@rari-capital/solmate/\",\":contracts/=contracts/\",\":ds-test/=node_modules/ds-test/src/\",\":excessively-safe-call/=node_modules/excessively-safe-call/\",\":forge-std/=node_modules/forge-std/src/\"]},\"sources\":{\"contracts/L1/L2OutputOracle.sol\":{\"keccak256\":\"0xe3242f566b5c1ae0e983e734e053552b7ef53d73f23575b5c6bbad4505aacc61\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://45451a37d695b27f1e8d80f50a75d54be55b406538b24d913cb210c021a77876\",\"dweb:/ipfs/QmUqgkGNkDBZhGJQJjKdHWwuFUhg7Cu1qPpYUcRFWSi3Pr\"]},\"contracts/libraries/Types.sol\":{\"keccak256\":\"0x93045c0c97287a12e1bdde0685e26f185411b81b93b9df15c8cce90bccdcf77c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0c90b59d09f92aba5ab0862264efe2beb0f77fba750867f8d686a1f39ee6af2c\",\"dweb:/ipfs/QmW7Zj5d7NgDi5Mdv6jptJgfsUj8LvGroud9p2Z7vhcKLC\"]},\"contracts/universal/Semver.sol\":{\"keccak256\":\"0x8215e8fbaace5e06fdf0be26cd8ec224847cf03e89bd78dc8ba3ec2cb429d4fe\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cfe4869ad9a1a10aee499ed4ac74a19f9f95dd9173efa656f6b1728f6912a9ad\",\"dweb:/ipfs/QmbiKSxpNnKQv8jwEvGUJkksaLPp8UU8N1twbDimM3RhXr\"]},\"node_modules/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d7fc8396619de513c96b6e00301b88dd790e83542aab918425633a5f7297a15a\",\"dweb:/ipfs/QmXbP4kiZyp7guuS7xe8KaybnwkRPGrBc2Kbi3vhcTfpxb\"]},\"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x0203dcadc5737d9ef2c211d6fa15d18ebc3b30dfa51903b64870b01a062b0b4e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6eb2fd1e9894dbe778f4b8131adecebe570689e63cf892f4e21257bfe1252497\",\"dweb:/ipfs/QmXgUGNfZvrn6N2miv3nooSs7Jm34A41qz94fu2GtDFcx8\"]},\"node_modules/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"keccak256\":\"0x611aa3f23e59cfdd1863c536776407b3e33d695152a266fa7cfb34440a29a8a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9b4b2110b7f2b3eb32951bc08046fa90feccffa594e1176cb91cdfb0e94726b4\",\"dweb:/ipfs/QmSxLwYjicf9zWFuieRc8WQwE4FisA1Um5jp1iSa731TGt\"]},\"node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c\",\"dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a\"]},\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x32c202bd28995dd20c4347b7c6467a6d3241c74c8ad3edcbb610cd9205916c45\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8179c356adb19e70d6b31a1eedc8c5c7f0c00e669e2540f4099e3844c6074d30\",\"dweb:/ipfs/QmWFbivarEobbqhS1go64ootVuHfVohBseerYy9FTEd1W2\"]}},\"version\":1}", + "solcInputHash": "ada691c3f5ff59bd3e60fdb28388fb6d", + "metadata": "{\"compiler\":{\"version\":\"0.8.15+commit.e14f2714\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_submissionInterval\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_genesisL2Output\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_historicalTotalBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_startingBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_startingTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_l2BlockTime\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_proposer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"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\":\"bytes32\",\"name\":\"outputRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"l1Timestamp\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"l2BlockNumber\",\"type\":\"uint256\"}],\"name\":\"OutputDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"outputRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"l1Timestamp\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"l2BlockNumber\",\"type\":\"uint256\"}],\"name\":\"OutputProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousProposer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newProposer\",\"type\":\"address\"}],\"name\":\"ProposerChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"HISTORICAL_TOTAL_BLOCKS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"L2_BLOCK_TIME\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"STARTING_BLOCK_NUMBER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"STARTING_TIMESTAMP\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SUBMISSION_INTERVAL\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newProposer\",\"type\":\"address\"}],\"name\":\"changeProposer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_l2BlockNumber\",\"type\":\"uint256\"}],\"name\":\"computeL2Timestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"outputRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"internalType\":\"struct Types.OutputProposal\",\"name\":\"_proposal\",\"type\":\"tuple\"}],\"name\":\"deleteL2Output\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_l2BlockNumber\",\"type\":\"uint256\"}],\"name\":\"getL2Output\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"outputRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"internalType\":\"struct Types.OutputProposal\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_genesisL2Output\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_startingBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_proposer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_outputRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_l2BlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_l1Blockhash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_l1BlockNumber\",\"type\":\"uint256\"}],\"name\":\"proposeL2Output\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proposer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"custom:proxied\":\"@title L2OutputOracle\",\"events\":{\"OutputDeleted(bytes32,uint256,uint256)\":{\"params\":{\"l1Timestamp\":\"The L1 timestamp when proposed.\",\"l2BlockNumber\":\"The L2 block number of the output root.\",\"outputRoot\":\"The output root.\"}},\"OutputProposed(bytes32,uint256,uint256)\":{\"params\":{\"l1Timestamp\":\"The L1 timestamp when proposed.\",\"l2BlockNumber\":\"The L2 block number of the output root.\",\"outputRoot\":\"The output root.\"}},\"ProposerChanged(address,address)\":{\"params\":{\"newProposer\":\"The new proposer address.\",\"previousProposer\":\"The previous proposer address.\"}}},\"kind\":\"dev\",\"methods\":{\"computeL2Timestamp(uint256)\":{\"params\":{\"_l2BlockNumber\":\"The L2 block number of the target block.\"}},\"constructor\":{\"custom:semver\":\"0.0.1\",\"params\":{\"_genesisL2Output\":\"The initial L2 output of the L2 chain.\",\"_historicalTotalBlocks\":\"Number of blocks preceding this L2 chain.\",\"_l2BlockTime\":\"The time per L2 block, in seconds.\",\"_owner\":\"The address of the owner.\",\"_proposer\":\"The address of the proposer.\",\"_startingBlockNumber\":\"The number of the first L2 block.\",\"_startingTimestamp\":\"The timestamp of the first L2 block.\",\"_submissionInterval\":\"Interval in blocks at which checkpoints must be submitted.\"}},\"deleteL2Output((bytes32,uint256))\":{\"params\":{\"_proposal\":\"Represents the output proposal to delete\"}},\"getL2Output(uint256)\":{\"params\":{\"_l2BlockNumber\":\"The L2 block number of the target block.\"}},\"initialize(bytes32,uint256,address,address)\":{\"params\":{\"_genesisL2Output\":\"The initial L2 output of the L2 chain.\",\"_owner\":\"The address of the owner.\",\"_proposer\":\"The address of the proposer.\",\"_startingBlockNumber\":\"The timestamp to start L2 block at.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"proposeL2Output(bytes32,uint256,bytes32,uint256)\":{\"params\":{\"_l1BlockNumber\":\"The block number with the specified block hash.\",\"_l1Blockhash\":\"A block hash which must be included in the current chain.\",\"_l2BlockNumber\":\"The L2 block number that resulted in _outputRoot.\",\"_outputRoot\":\"The L2 output of the checkpoint block.\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"version()\":{\"returns\":{\"_0\":\"Semver contract version as a string.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"OutputDeleted(bytes32,uint256,uint256)\":{\"notice\":\"Emitted when an output is deleted.\"},\"OutputProposed(bytes32,uint256,uint256)\":{\"notice\":\"Emitted when an output is proposed.\"},\"ProposerChanged(address,address)\":{\"notice\":\"Emitted when the proposer address is changed.\"}},\"kind\":\"user\",\"methods\":{\"HISTORICAL_TOTAL_BLOCKS()\":{\"notice\":\"The number of blocks in the chain before the first block in this contract.\"},\"L2_BLOCK_TIME()\":{\"notice\":\"The time between L2 blocks in seconds.\"},\"STARTING_BLOCK_NUMBER()\":{\"notice\":\"The number of the first L2 block recorded in this contract.\"},\"STARTING_TIMESTAMP()\":{\"notice\":\"The timestamp of the first L2 block recorded in this contract.\"},\"SUBMISSION_INTERVAL()\":{\"notice\":\"The interval in L2 blocks at which checkpoints must be submitted.\"},\"changeProposer(address)\":{\"notice\":\"Transfers the proposer role to a new account (`newProposer`). Can only be called by the current owner.\"},\"computeL2Timestamp(uint256)\":{\"notice\":\"Returns the L2 timestamp corresponding to a given L2 block number. Returns a null output proposal if none is found.\"},\"deleteL2Output((bytes32,uint256))\":{\"notice\":\"Deletes the most recent output. This is used to remove the most recent output in the event that an erreneous output is submitted. It can only be called by the contract's owner, not the proposer. Longer term, this should be replaced with a more robust mechanism which will allow deletion of proposals shown to be invalid by a fault proof.\"},\"getL2Output(uint256)\":{\"notice\":\"Returns the L2 output proposal associated with a target L2 block number. If the L2 block number provided is between checkpoints, this function will rerutn the next proposal for the next checkpoint. Reverts if the output proposal is either not found, or predates the STARTING_BLOCK_NUMBER.\"},\"initialize(bytes32,uint256,address,address)\":{\"notice\":\"Initializer.\"},\"latestBlockNumber()\":{\"notice\":\"The number of the most recent L2 block recorded in this contract.\"},\"nextBlockNumber()\":{\"notice\":\"Computes the block number of the next L2 block that needs to be checkpointed.\"},\"proposeL2Output(bytes32,uint256,bytes32,uint256)\":{\"notice\":\"Accepts an outputRoot and the timestamp of the corresponding L2 block. The timestamp must be equal to the current value returned by `nextTimestamp()` in order to be accepted. This function may only be called by the Proposer.\"},\"proposer()\":{\"notice\":\"The address of the proposer;\"},\"version()\":{\"notice\":\"Returns the full semver contract version.\"}},\"notice\":\"The L2 state is committed to in this contract The payable keyword is used on proposeL2Output to save gas on the msg.value check. This contract should be deployed behind an upgradable proxy\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/L1/L2OutputOracle.sol\":\"L2OutputOracle\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@eth-optimism/contracts-periphery/=node_modules/@eth-optimism/contracts-periphery/contracts/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/\",\":@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/\",\":@rari-capital/=node_modules/@rari-capital/\",\":@rari-capital/solmate/=node_modules/@rari-capital/solmate/\",\":contracts/=contracts/\",\":ds-test/=node_modules/ds-test/src/\",\":forge-std/=node_modules/forge-std/src/\"]},\"sources\":{\"contracts/L1/L2OutputOracle.sol\":{\"keccak256\":\"0xedbefffc244badc0a6ccaa4eb19112d5527a4a5366e335186a46605b7fcb1174\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2e9c96610ca1955d166368322b65065944f7de8cdd638e4921548c378819895b\",\"dweb:/ipfs/QmUmqta7EjQ5Wr6uhgmeuEh5hdRxNpKmXBjJrjBYWk23Yi\"]},\"contracts/libraries/Types.sol\":{\"keccak256\":\"0x93045c0c97287a12e1bdde0685e26f185411b81b93b9df15c8cce90bccdcf77c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0c90b59d09f92aba5ab0862264efe2beb0f77fba750867f8d686a1f39ee6af2c\",\"dweb:/ipfs/QmW7Zj5d7NgDi5Mdv6jptJgfsUj8LvGroud9p2Z7vhcKLC\"]},\"contracts/universal/Semver.sol\":{\"keccak256\":\"0x8215e8fbaace5e06fdf0be26cd8ec224847cf03e89bd78dc8ba3ec2cb429d4fe\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cfe4869ad9a1a10aee499ed4ac74a19f9f95dd9173efa656f6b1728f6912a9ad\",\"dweb:/ipfs/QmbiKSxpNnKQv8jwEvGUJkksaLPp8UU8N1twbDimM3RhXr\"]},\"node_modules/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d7fc8396619de513c96b6e00301b88dd790e83542aab918425633a5f7297a15a\",\"dweb:/ipfs/QmXbP4kiZyp7guuS7xe8KaybnwkRPGrBc2Kbi3vhcTfpxb\"]},\"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x0203dcadc5737d9ef2c211d6fa15d18ebc3b30dfa51903b64870b01a062b0b4e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6eb2fd1e9894dbe778f4b8131adecebe570689e63cf892f4e21257bfe1252497\",\"dweb:/ipfs/QmXgUGNfZvrn6N2miv3nooSs7Jm34A41qz94fu2GtDFcx8\"]},\"node_modules/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"keccak256\":\"0x611aa3f23e59cfdd1863c536776407b3e33d695152a266fa7cfb34440a29a8a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9b4b2110b7f2b3eb32951bc08046fa90feccffa594e1176cb91cdfb0e94726b4\",\"dweb:/ipfs/QmSxLwYjicf9zWFuieRc8WQwE4FisA1Um5jp1iSa731TGt\"]},\"node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c\",\"dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a\"]},\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6f2cf1c531122bc7ca96b8c8db6a60deae60441e5223065e792553d4849b5638\",\"dweb:/ipfs/QmPBdJmBBABMDCfyDjCbdxgiqRavgiSL88SYPGibgbPas9\"]}},\"version\":1}", "bytecode": "0x6101806040523480156200001257600080fd5b5060405162002159380380620021598339810160408190526200003591620005a3565b6000608081905260a052600160c052428310620000cd5760405162461bcd60e51b8152602060048201526044602482018190527f4c324f75747075744f7261636c653a20696e697469616c204c3220626c6f636b908201527f2074696d65206d757374206265206c657373207468616e2063757272656e742060648201526374696d6560e01b608482015260a4015b60405180910390fd5b60e0889052610100869052610120859052610140849052610160839052620000f88786848462000106565b505050505050505062000615565b600054610100900460ff1615808015620001275750600054600160ff909116105b8062000157575062000144306200028260201b620013171760201c565b15801562000157575060005460ff166001145b620001bc5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401620000c4565b6000805460ff191660011790558015620001e0576000805461ff0019166101001790555b604080518082018252868152426020808301918252600088815260679091529290922090518155905160019091015560668490556200021e62000291565b6200022983620002f9565b620002348262000471565b80156200027b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6001600160a01b03163b151590565b600054610100900460ff16620002ed5760405162461bcd60e51b815260206004820152602b60248201526000805160206200213983398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620000c4565b620002f7620004c3565b565b620003036200052a565b6001600160a01b038116620003815760405162461bcd60e51b815260206004820152603760248201527f4c324f75747075744f7261636c653a206e65772070726f706f7365722063616e60448201527f6e6f7420626520746865207a65726f20616464726573730000000000000000006064820152608401620000c4565b6033546001600160a01b03166001600160a01b0316816001600160a01b031603620004155760405162461bcd60e51b815260206004820152603860248201527f4c324f75747075744f7261636c653a2070726f706f7365722063616e6e6f742060448201527f6265207468652073616d6520617320746865206f776e657200000000000000006064820152608401620000c4565b6065546040516001600160a01b038084169216907f3d7728dc2838bb794606bd89f5a37930830b32060f69ee929bbfc59b669024dd90600090a3606580546001600160a01b0319166001600160a01b0392909216919091179055565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166200051f5760405162461bcd60e51b815260206004820152602b60248201526000805160206200213983398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620000c4565b620002f73362000471565b6033546001600160a01b03163314620002f75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620000c4565b80516001600160a01b03811681146200059e57600080fd5b919050565b600080600080600080600080610100898b031215620005c157600080fd5b885197506020890151965060408901519550606089015194506080890151935060a08901519250620005f660c08a0162000586565b91506200060660e08a0162000586565b90509295985092959890939650565b60805160a05160c05160e05161010051610120516101405161016051611a78620006c16000396000818161013f0152610fcc0152600081816101a801526110250152600081816101f201528181610cbe01528181610dba01528181610ef60152610ff00152600061034b0152600081816102260152818161061001528181610d9601528181610df9015261122f015260006106950152600061066c015260006106430152611a786000f3fe6080604052600436106101285760003560e01c80638da5cb5b116100a5578063a8e4fb9011610074578063d20b1a5111610059578063d20b1a51146103ba578063dcec3348146103da578063f2fde38b146103ef57600080fd5b8063a8e4fb901461036d578063d1de856c1461039a57600080fd5b80638da5cb5b1461029f5780639aaab648146102eb578063a25ae557146102fe578063a4771aad1461033957600080fd5b80634ab65d73116100fc57806354fd4d50116100e157806354fd4d5014610248578063715018a61461026a57806372d5fe211461027f57600080fd5b80634ab65d73146101e0578063529933df1461021457600080fd5b80622134cc1461012d578063093b3d901461017457806320e9fcd4146101965780634599c788146101ca575b600080fd5b34801561013957600080fd5b506101617f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561018057600080fd5b5061019461018f3660046116c9565b61040f565b005b3480156101a257600080fd5b506101617f000000000000000000000000000000000000000000000000000000000000000081565b3480156101d657600080fd5b5061016160665481565b3480156101ec57600080fd5b506101617f000000000000000000000000000000000000000000000000000000000000000081565b34801561022057600080fd5b506101617f000000000000000000000000000000000000000000000000000000000000000081565b34801561025457600080fd5b5061025d61063c565b60405161016b919061176f565b34801561027657600080fd5b506101946106df565b34801561028b57600080fd5b5061019461029a3660046117e9565b6106f3565b3480156102ab57600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161016b565b6101946102f936600461180b565b6108ff565b34801561030a57600080fd5b5061031e61031936600461183d565b610ca8565b6040805182518152602092830151928101929092520161016b565b34801561034557600080fd5b506101617f000000000000000000000000000000000000000000000000000000000000000081565b34801561037957600080fd5b506065546102c69073ffffffffffffffffffffffffffffffffffffffff1681565b3480156103a657600080fd5b506101616103b536600461183d565b610ef2565b3480156103c657600080fd5b506101946103d5366004611856565b61104f565b3480156103e657600080fd5b5061016161122b565b3480156103fb57600080fd5b5061019461040a3660046117e9565b611260565b610417611333565b6066546000908152606760209081526040918290208251808401909352805480845260019091015491830191909152825114610500576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604f60248201527f4c324f75747075744f7261636c653a206f757470757420726f6f7420746f206460448201527f656c65746520646f6573206e6f74206d6174636820746865206c61746573742060648201527f6f75747075742070726f706f73616c0000000000000000000000000000000000608482015260a4015b60405180910390fd5b80602001518260200151146105bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604d60248201527f4c324f75747075744f7261636c653a2074696d657374616d7020746f2064656c60448201527f65746520646f6573206e6f74206d6174636820746865206c6174657374206f7560648201527f747075742070726f706f73616c00000000000000000000000000000000000000608482015260a4016104f7565b606654602082015182516040517f11e942315215fbc11bf574b22ca610d001e704d870a2307833c188d31600b5c690600090a46066805460009081526067602052604081208181556001015554610635907f0000000000000000000000000000000000000000000000000000000000000000906118cb565b6066555050565b60606106677f00000000000000000000000000000000000000000000000000000000000000006113b4565b6106907f00000000000000000000000000000000000000000000000000000000000000006113b4565b6106b97f00000000000000000000000000000000000000000000000000000000000000006113b4565b6040516020016106cb939291906118e2565b604051602081830303815290604052905090565b6106e7611333565b6106f160006114e9565b565b6106fb611333565b73ffffffffffffffffffffffffffffffffffffffff811661079e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4c324f75747075744f7261636c653a206e65772070726f706f7365722063616e60448201527f6e6f7420626520746865207a65726f206164647265737300000000000000000060648201526084016104f7565b60335473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610871576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f4c324f75747075744f7261636c653a2070726f706f7365722063616e6e6f742060448201527f6265207468652073616d6520617320746865206f776e6572000000000000000060648201526084016104f7565b60655460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f3d7728dc2838bb794606bd89f5a37930830b32060f69ee929bbfc59b669024dd90600090a3606580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60655473ffffffffffffffffffffffffffffffffffffffff1633146109a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4c324f75747075744f7261636c653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642062792070726f706f73657200000000000000000060648201526084016104f7565b6109ae61122b565b8314610a62576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604860248201527f4c324f75747075744f7261636c653a20626c6f636b206e756d626572206d757360448201527f7420626520657175616c20746f206e65787420657870656374656420626c6f6360648201527f6b206e756d626572000000000000000000000000000000000000000000000000608482015260a4016104f7565b42610a6c84610ef2565b10610af9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f4c324f75747075744f7261636c653a2063616e6e6f742070726f706f7365204c60448201527f32206f757470757420696e20746865206675747572650000000000000000000060648201526084016104f7565b83610b86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f4c324f75747075744f7261636c653a204c32206f75747075742070726f706f7360448201527f616c2063616e6e6f7420626520746865207a65726f206861736800000000000060648201526084016104f7565b8115610c425781814014610c42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604860248201527f4c324f75747075744f7261636c653a20626c6f636b6861736820646f6573206e60448201527f6f74206d6174636820746865206861736820617420746865206578706563746560648201527f6420686569676874000000000000000000000000000000000000000000000000608482015260a4016104f7565b6040805180820182528581524260208083018281526000888152606790925284822093518455516001909301929092556066869055915185929187917fc120f5e881491e6e212befa39e36b8f57d5eca31915f2e5d60a420f418caa6df9190a450505050565b60408051808201909152600080825260208201527f0000000000000000000000000000000000000000000000000000000000000000821015610d92576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604b60248201527f4c324f75747075744f7261636c653a20626c6f636b206e756d6265722063616e60448201527f6e6f74206265206c657373207468616e20746865207374617274696e6720626c60648201527f6f636b206e756d6265722e000000000000000000000000000000000000000000608482015260a4016104f7565b60007f0000000000000000000000000000000000000000000000000000000000000000610ddf7f0000000000000000000000000000000000000000000000000000000000000000856118cb565b610de99190611987565b905060008115610e2c57610e1d827f00000000000000000000000000000000000000000000000000000000000000006118cb565b610e27908561199b565b610e2e565b835b600081815260676020908152604091829020825180840190935280548084526001909101549183019190915291925090610eea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f4c324f75747075744f7261636c653a204e6f206f757470757420666f756e642060448201527f666f72207468617420626c6f636b206e756d6265722e0000000000000000000060648201526084016104f7565b949350505050565b60007f0000000000000000000000000000000000000000000000000000000000000000821015610fca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605360248201527f4c324f75747075744f7261636c653a20626c6f636b206e756d626572206d757360448201527f742062652067726561746572207468616e206f7220657175616c20746f20737460648201527f617274696e6720626c6f636b206e756d62657200000000000000000000000000608482015260a4016104f7565b7f00000000000000000000000000000000000000000000000000000000000000006110157f0000000000000000000000000000000000000000000000000000000000000000846118cb565b61101f91906119b3565b611049907f000000000000000000000000000000000000000000000000000000000000000061199b565b92915050565b600054610100900460ff161580801561106f5750600054600160ff909116105b806110895750303b158015611089575060005460ff166001145b611115576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016104f7565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561117357600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b604080518082018252868152426020808301918252600088815260679091529290922090518155905160019091015560668490556111af611560565b6111b8836106f3565b6111c1826114e9565b801561122457600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b60007f000000000000000000000000000000000000000000000000000000000000000060665461125b919061199b565b905090565b611268611333565b73ffffffffffffffffffffffffffffffffffffffff811661130b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104f7565b611314816114e9565b50565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b60335473ffffffffffffffffffffffffffffffffffffffff1633146106f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104f7565b6060816000036113f757505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611421578061140b816119f0565b915061141a9050600a83611a28565b91506113fb565b60008167ffffffffffffffff81111561143c5761143c61169a565b6040519080825280601f01601f191660200182016040528015611466576020820181803683370190505b5090505b8415610eea5761147b6001836118cb565b9150611488600a86611987565b61149390603061199b565b60f81b8183815181106114a8576114a8611a3c565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506114e2600a86611a28565b945061146a565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166115f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016104f7565b6106f1600054610100900460ff16611691576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016104f7565b6106f1336114e9565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000604082840312156116db57600080fd5b6040516040810181811067ffffffffffffffff82111715611725577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604052823581526020928301359281019290925250919050565b60005b8381101561175a578181015183820152602001611742565b83811115611769576000848401525b50505050565b602081526000825180602084015261178e81604085016020870161173f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146117e457600080fd5b919050565b6000602082840312156117fb57600080fd5b611804826117c0565b9392505050565b6000806000806080858703121561182157600080fd5b5050823594602084013594506040840135936060013592509050565b60006020828403121561184f57600080fd5b5035919050565b6000806000806080858703121561186c57600080fd5b8435935060208501359250611883604086016117c0565b9150611891606086016117c0565b905092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000828210156118dd576118dd61189c565b500390565b600084516118f481846020890161173f565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551611930816001850160208a0161173f565b6001920191820152835161194b81600284016020880161173f565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261199657611996611958565b500690565b600082198211156119ae576119ae61189c565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156119eb576119eb61189c565b500290565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611a2157611a2161189c565b5060010190565b600082611a3757611a37611958565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea164736f6c634300080f000a496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", "deployedBytecode": "0x6080604052600436106101285760003560e01c80638da5cb5b116100a5578063a8e4fb9011610074578063d20b1a5111610059578063d20b1a51146103ba578063dcec3348146103da578063f2fde38b146103ef57600080fd5b8063a8e4fb901461036d578063d1de856c1461039a57600080fd5b80638da5cb5b1461029f5780639aaab648146102eb578063a25ae557146102fe578063a4771aad1461033957600080fd5b80634ab65d73116100fc57806354fd4d50116100e157806354fd4d5014610248578063715018a61461026a57806372d5fe211461027f57600080fd5b80634ab65d73146101e0578063529933df1461021457600080fd5b80622134cc1461012d578063093b3d901461017457806320e9fcd4146101965780634599c788146101ca575b600080fd5b34801561013957600080fd5b506101617f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561018057600080fd5b5061019461018f3660046116c9565b61040f565b005b3480156101a257600080fd5b506101617f000000000000000000000000000000000000000000000000000000000000000081565b3480156101d657600080fd5b5061016160665481565b3480156101ec57600080fd5b506101617f000000000000000000000000000000000000000000000000000000000000000081565b34801561022057600080fd5b506101617f000000000000000000000000000000000000000000000000000000000000000081565b34801561025457600080fd5b5061025d61063c565b60405161016b919061176f565b34801561027657600080fd5b506101946106df565b34801561028b57600080fd5b5061019461029a3660046117e9565b6106f3565b3480156102ab57600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161016b565b6101946102f936600461180b565b6108ff565b34801561030a57600080fd5b5061031e61031936600461183d565b610ca8565b6040805182518152602092830151928101929092520161016b565b34801561034557600080fd5b506101617f000000000000000000000000000000000000000000000000000000000000000081565b34801561037957600080fd5b506065546102c69073ffffffffffffffffffffffffffffffffffffffff1681565b3480156103a657600080fd5b506101616103b536600461183d565b610ef2565b3480156103c657600080fd5b506101946103d5366004611856565b61104f565b3480156103e657600080fd5b5061016161122b565b3480156103fb57600080fd5b5061019461040a3660046117e9565b611260565b610417611333565b6066546000908152606760209081526040918290208251808401909352805480845260019091015491830191909152825114610500576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604f60248201527f4c324f75747075744f7261636c653a206f757470757420726f6f7420746f206460448201527f656c65746520646f6573206e6f74206d6174636820746865206c61746573742060648201527f6f75747075742070726f706f73616c0000000000000000000000000000000000608482015260a4015b60405180910390fd5b80602001518260200151146105bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604d60248201527f4c324f75747075744f7261636c653a2074696d657374616d7020746f2064656c60448201527f65746520646f6573206e6f74206d6174636820746865206c6174657374206f7560648201527f747075742070726f706f73616c00000000000000000000000000000000000000608482015260a4016104f7565b606654602082015182516040517f11e942315215fbc11bf574b22ca610d001e704d870a2307833c188d31600b5c690600090a46066805460009081526067602052604081208181556001015554610635907f0000000000000000000000000000000000000000000000000000000000000000906118cb565b6066555050565b60606106677f00000000000000000000000000000000000000000000000000000000000000006113b4565b6106907f00000000000000000000000000000000000000000000000000000000000000006113b4565b6106b97f00000000000000000000000000000000000000000000000000000000000000006113b4565b6040516020016106cb939291906118e2565b604051602081830303815290604052905090565b6106e7611333565b6106f160006114e9565b565b6106fb611333565b73ffffffffffffffffffffffffffffffffffffffff811661079e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4c324f75747075744f7261636c653a206e65772070726f706f7365722063616e60448201527f6e6f7420626520746865207a65726f206164647265737300000000000000000060648201526084016104f7565b60335473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610871576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f4c324f75747075744f7261636c653a2070726f706f7365722063616e6e6f742060448201527f6265207468652073616d6520617320746865206f776e6572000000000000000060648201526084016104f7565b60655460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f3d7728dc2838bb794606bd89f5a37930830b32060f69ee929bbfc59b669024dd90600090a3606580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60655473ffffffffffffffffffffffffffffffffffffffff1633146109a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4c324f75747075744f7261636c653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642062792070726f706f73657200000000000000000060648201526084016104f7565b6109ae61122b565b8314610a62576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604860248201527f4c324f75747075744f7261636c653a20626c6f636b206e756d626572206d757360448201527f7420626520657175616c20746f206e65787420657870656374656420626c6f6360648201527f6b206e756d626572000000000000000000000000000000000000000000000000608482015260a4016104f7565b42610a6c84610ef2565b10610af9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f4c324f75747075744f7261636c653a2063616e6e6f742070726f706f7365204c60448201527f32206f757470757420696e20746865206675747572650000000000000000000060648201526084016104f7565b83610b86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f4c324f75747075744f7261636c653a204c32206f75747075742070726f706f7360448201527f616c2063616e6e6f7420626520746865207a65726f206861736800000000000060648201526084016104f7565b8115610c425781814014610c42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604860248201527f4c324f75747075744f7261636c653a20626c6f636b6861736820646f6573206e60448201527f6f74206d6174636820746865206861736820617420746865206578706563746560648201527f6420686569676874000000000000000000000000000000000000000000000000608482015260a4016104f7565b6040805180820182528581524260208083018281526000888152606790925284822093518455516001909301929092556066869055915185929187917fc120f5e881491e6e212befa39e36b8f57d5eca31915f2e5d60a420f418caa6df9190a450505050565b60408051808201909152600080825260208201527f0000000000000000000000000000000000000000000000000000000000000000821015610d92576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604b60248201527f4c324f75747075744f7261636c653a20626c6f636b206e756d6265722063616e60448201527f6e6f74206265206c657373207468616e20746865207374617274696e6720626c60648201527f6f636b206e756d6265722e000000000000000000000000000000000000000000608482015260a4016104f7565b60007f0000000000000000000000000000000000000000000000000000000000000000610ddf7f0000000000000000000000000000000000000000000000000000000000000000856118cb565b610de99190611987565b905060008115610e2c57610e1d827f00000000000000000000000000000000000000000000000000000000000000006118cb565b610e27908561199b565b610e2e565b835b600081815260676020908152604091829020825180840190935280548084526001909101549183019190915291925090610eea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f4c324f75747075744f7261636c653a204e6f206f757470757420666f756e642060448201527f666f72207468617420626c6f636b206e756d6265722e0000000000000000000060648201526084016104f7565b949350505050565b60007f0000000000000000000000000000000000000000000000000000000000000000821015610fca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605360248201527f4c324f75747075744f7261636c653a20626c6f636b206e756d626572206d757360448201527f742062652067726561746572207468616e206f7220657175616c20746f20737460648201527f617274696e6720626c6f636b206e756d62657200000000000000000000000000608482015260a4016104f7565b7f00000000000000000000000000000000000000000000000000000000000000006110157f0000000000000000000000000000000000000000000000000000000000000000846118cb565b61101f91906119b3565b611049907f000000000000000000000000000000000000000000000000000000000000000061199b565b92915050565b600054610100900460ff161580801561106f5750600054600160ff909116105b806110895750303b158015611089575060005460ff166001145b611115576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016104f7565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561117357600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b604080518082018252868152426020808301918252600088815260679091529290922090518155905160019091015560668490556111af611560565b6111b8836106f3565b6111c1826114e9565b801561122457600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b60007f000000000000000000000000000000000000000000000000000000000000000060665461125b919061199b565b905090565b611268611333565b73ffffffffffffffffffffffffffffffffffffffff811661130b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104f7565b611314816114e9565b50565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b60335473ffffffffffffffffffffffffffffffffffffffff1633146106f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104f7565b6060816000036113f757505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611421578061140b816119f0565b915061141a9050600a83611a28565b91506113fb565b60008167ffffffffffffffff81111561143c5761143c61169a565b6040519080825280601f01601f191660200182016040528015611466576020820181803683370190505b5090505b8415610eea5761147b6001836118cb565b9150611488600a86611987565b61149390603061199b565b60f81b8183815181106114a8576114a8611a3c565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506114e2600a86611a28565b945061146a565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166115f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016104f7565b6106f1600054610100900460ff16611691576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016104f7565b6106f1336114e9565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000604082840312156116db57600080fd5b6040516040810181811067ffffffffffffffff82111715611725577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604052823581526020928301359281019290925250919050565b60005b8381101561175a578181015183820152602001611742565b83811115611769576000848401525b50505050565b602081526000825180602084015261178e81604085016020870161173f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146117e457600080fd5b919050565b6000602082840312156117fb57600080fd5b611804826117c0565b9392505050565b6000806000806080858703121561182157600080fd5b5050823594602084013594506040840135936060013592509050565b60006020828403121561184f57600080fd5b5035919050565b6000806000806080858703121561186c57600080fd5b8435935060208501359250611883604086016117c0565b9150611891606086016117c0565b905092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000828210156118dd576118dd61189c565b500390565b600084516118f481846020890161173f565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551611930816001850160208a0161173f565b6001920191820152835161194b81600284016020880161173f565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261199657611996611958565b500690565b600082198211156119ae576119ae61189c565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156119eb576119eb61189c565b500290565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611a2157611a2161189c565b5060010190565b600082611a3757611a37611958565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea164736f6c634300080f000a", "devdoc": { @@ -542,7 +542,7 @@ "params": { "_genesisL2Output": "The initial L2 output of the L2 chain.", "_historicalTotalBlocks": "Number of blocks preceding this L2 chain.", - "_l2BlockTime": "The timestamp of the first L2 block.", + "_l2BlockTime": "The time per L2 block, in seconds.", "_owner": "The address of the owner.", "_proposer": "The address of the proposer.", "_startingBlockNumber": "The number of the first L2 block.", @@ -680,7 +680,7 @@ "storageLayout": { "storage": [ { - "astId": 25872, + "astId": 26027, "contract": "contracts/L1/L2OutputOracle.sol:L2OutputOracle", "label": "_initialized", "offset": 0, @@ -688,7 +688,7 @@ "type": "t_uint8" }, { - "astId": 25875, + "astId": 26030, "contract": "contracts/L1/L2OutputOracle.sol:L2OutputOracle", "label": "_initializing", "offset": 1, @@ -696,7 +696,7 @@ "type": "t_bool" }, { - "astId": 26486, + "astId": 26641, "contract": "contracts/L1/L2OutputOracle.sol:L2OutputOracle", "label": "__gap", "offset": 0, @@ -704,7 +704,7 @@ "type": "t_array(t_uint256)50_storage" }, { - "astId": 25744, + "astId": 25899, "contract": "contracts/L1/L2OutputOracle.sol:L2OutputOracle", "label": "_owner", "offset": 0, @@ -712,7 +712,7 @@ "type": "t_address" }, { - "astId": 25864, + "astId": 26019, "contract": "contracts/L1/L2OutputOracle.sol:L2OutputOracle", "label": "__gap", "offset": 0, @@ -720,7 +720,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 493, + "astId": 479, "contract": "contracts/L1/L2OutputOracle.sol:L2OutputOracle", "label": "proposer", "offset": 0, @@ -728,7 +728,7 @@ "type": "t_address" }, { - "astId": 496, + "astId": 482, "contract": "contracts/L1/L2OutputOracle.sol:L2OutputOracle", "label": "latestBlockNumber", "offset": 0, @@ -736,12 +736,12 @@ "type": "t_uint256" }, { - "astId": 502, + "astId": 488, "contract": "contracts/L1/L2OutputOracle.sol:L2OutputOracle", "label": "l2Outputs", "offset": 0, "slot": "103", - "type": "t_mapping(t_uint256,t_struct(OutputProposal)4282_storage)" + "type": "t_mapping(t_uint256,t_struct(OutputProposal)4280_storage)" } ], "types": { @@ -753,12 +753,14 @@ "t_array(t_uint256)49_storage": { "encoding": "inplace", "label": "uint256[49]", - "numberOfBytes": "1568" + "numberOfBytes": "1568", + "base": "t_uint256" }, "t_array(t_uint256)50_storage": { "encoding": "inplace", "label": "uint256[50]", - "numberOfBytes": "1600" + "numberOfBytes": "1600", + "base": "t_uint256" }, "t_bool": { "encoding": "inplace", @@ -770,15 +772,35 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_mapping(t_uint256,t_struct(OutputProposal)4282_storage)": { + "t_mapping(t_uint256,t_struct(OutputProposal)4280_storage)": { "encoding": "mapping", + "key": "t_uint256", "label": "mapping(uint256 => struct Types.OutputProposal)", - "numberOfBytes": "32" + "numberOfBytes": "32", + "value": "t_struct(OutputProposal)4280_storage" }, - "t_struct(OutputProposal)4282_storage": { + "t_struct(OutputProposal)4280_storage": { "encoding": "inplace", "label": "struct Types.OutputProposal", - "numberOfBytes": "64" + "numberOfBytes": "64", + "members": [ + { + "astId": 4277, + "contract": "contracts/L1/L2OutputOracle.sol:L2OutputOracle", + "label": "outputRoot", + "offset": 0, + "slot": "0", + "type": "t_bytes32" + }, + { + "astId": 4279, + "contract": "contracts/L1/L2OutputOracle.sol:L2OutputOracle", + "label": "timestamp", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ] }, "t_uint256": { "encoding": "inplace", diff --git a/packages/contracts-bedrock/deployments/goerli/L2OutputOracleProxy.json b/packages/contracts-bedrock/deployments/alpha-1/L2OutputOracleProxy.json similarity index 94% rename from packages/contracts-bedrock/deployments/goerli/L2OutputOracleProxy.json rename to packages/contracts-bedrock/deployments/alpha-1/L2OutputOracleProxy.json index f3abc1a77f6bb..5a6e62aed51ce 100644 --- a/packages/contracts-bedrock/deployments/goerli/L2OutputOracleProxy.json +++ b/packages/contracts-bedrock/deployments/alpha-1/L2OutputOracleProxy.json @@ -1,5 +1,5 @@ { - "address": "0x1Bf3F468e52aA31fd19BaF006B23c327c8fc7198", + "address": "0x3A234299a14De50027eA65dCdf1c0DaC729e04A6", "abi": [ { "inputs": [ @@ -129,41 +129,41 @@ "type": "receive" } ], - "transactionHash": "0x204356941c68d28601818d4c456f39d6ab468aa621e3402d60e3f0495bcc46f0", + "transactionHash": "0x8a68db6e7b7e80554e6781b827d7a3567614ef252fa07269027d9ddb99e131cf", "receipt": { "to": null, - "from": "0xCFf7a9856DB3C60AB546b8F43dC5D1A4336786A0", - "contractAddress": "0x1Bf3F468e52aA31fd19BaF006B23c327c8fc7198", + "from": "0x1D066Ef7AA90ae85Bb017e85968A9e1851DA95Db", + "contractAddress": "0x3A234299a14De50027eA65dCdf1c0DaC729e04A6", "transactionIndex": 0, "gasUsed": "523812", - "logsBloom": "0x00000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000400000000000400000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x5a232ae40912369d0f5c387d2e599533ec015636b0fb7dd573706e11478f096e", - "transactionHash": "0x204356941c68d28601818d4c456f39d6ab468aa621e3402d60e3f0495bcc46f0", + "logsBloom": "0x00040000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x8503f0e1f8d0f3ce085e5a1ff5b93949f348092365c49ad10b86111b1b6df21a", + "transactionHash": "0x8a68db6e7b7e80554e6781b827d7a3567614ef252fa07269027d9ddb99e131cf", "logs": [ { "transactionIndex": 0, - "blockNumber": 7355241, - "transactionHash": "0x204356941c68d28601818d4c456f39d6ab468aa621e3402d60e3f0495bcc46f0", - "address": "0x1Bf3F468e52aA31fd19BaF006B23c327c8fc7198", + "blockNumber": 7568962, + "transactionHash": "0x8a68db6e7b7e80554e6781b827d7a3567614ef252fa07269027d9ddb99e131cf", + "address": "0x3A234299a14De50027eA65dCdf1c0DaC729e04A6", "topics": [ "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cff7a9856db3c60ab546b8f43dc5d1a4336786a0", + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000001d066ef7aa90ae85bb017e85968a9e1851da95db", "logIndex": 0, - "blockHash": "0x5a232ae40912369d0f5c387d2e599533ec015636b0fb7dd573706e11478f096e" + "blockHash": "0x8503f0e1f8d0f3ce085e5a1ff5b93949f348092365c49ad10b86111b1b6df21a" } ], - "blockNumber": 7355241, + "blockNumber": 7568962, "cumulativeGasUsed": "523812", "status": 1, "byzantium": true }, "args": [ - "0xCFf7a9856DB3C60AB546b8F43dC5D1A4336786A0" + "0x1D066Ef7AA90ae85Bb017e85968A9e1851DA95Db" ], "numDeployments": 1, - "solcInputHash": "cd42cb04f3b6a78e5824c9f427d0a55d", - "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\":{\"contracts/universal/Proxy.sol\":\"Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@eth-optimism/contracts-periphery/=node_modules/@eth-optimism/contracts-periphery/contracts/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/\",\":@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/\",\":@rari-capital/=node_modules/@rari-capital/\",\":@rari-capital/solmate/=node_modules/@rari-capital/solmate/\",\":contracts/=contracts/\",\":ds-test/=node_modules/ds-test/src/\",\":excessively-safe-call/=node_modules/excessively-safe-call/\",\":forge-std/=node_modules/forge-std/src/\"]},\"sources\":{\"contracts/universal/Proxy.sol\":{\"keccak256\":\"0xfa08635f1866139673ac4fe7b07330f752f93800075b895d8fcb8484f4a3f753\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8f2247604d527f560edbb851c43b6c16b37e34972ddb305e16dd73623b8288cd\",\"dweb:/ipfs/QmfM8sLAZrxrnqyRdt1XJ5LyJh4wKbeEqk3VkvxG7BDqFj\"]}},\"version\":1}", + "solcInputHash": "ada691c3f5ff59bd3e60fdb28388fb6d", + "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\":{\"contracts/universal/Proxy.sol\":\"Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@eth-optimism/contracts-periphery/=node_modules/@eth-optimism/contracts-periphery/contracts/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/\",\":@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/\",\":@rari-capital/=node_modules/@rari-capital/\",\":@rari-capital/solmate/=node_modules/@rari-capital/solmate/\",\":contracts/=contracts/\",\":ds-test/=node_modules/ds-test/src/\",\":forge-std/=node_modules/forge-std/src/\"]},\"sources\":{\"contracts/universal/Proxy.sol\":{\"keccak256\":\"0xfa08635f1866139673ac4fe7b07330f752f93800075b895d8fcb8484f4a3f753\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8f2247604d527f560edbb851c43b6c16b37e34972ddb305e16dd73623b8288cd\",\"dweb:/ipfs/QmfM8sLAZrxrnqyRdt1XJ5LyJh4wKbeEqk3VkvxG7BDqFj\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b5060405161091838038061091883398101604081905261002f916100b2565b6100388161003e565b506100e2565b60006100566000805160206108f88339815191525490565b6000805160206108f8833981519152839055604080516001600160a01b038084168252851660208201529192507f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b6000602082840312156100c457600080fd5b81516001600160a01b03811681146100db57600080fd5b9392505050565b610807806100f16000396000f3fe60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100be5780638f283970146100f8578063f851a440146101185761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61012d565b005b61006b61012d565b34801561008157600080fd5b5061006b6100903660046106d9565b610224565b6100a86100a33660046106f4565b610296565b6040516100b59190610777565b60405180910390f35b3480156100ca57600080fd5b506100d3610419565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100b5565b34801561010457600080fd5b5061006b6101133660046106d9565b6104b0565b34801561012457600080fd5b506100d3610517565b60006101577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905073ffffffffffffffffffffffffffffffffffffffff8116610201576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f50726f78793a20696d706c656d656e746174696f6e206e6f7420696e6974696160448201527f6c697a656400000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3660008037600080366000845af43d6000803e8061021e573d6000fd5b503d6000f35b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061027d575033155b1561028e5761028b816105a3565b50565b61028b61012d565b60606102c07fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806102f7575033155b1561040a57610305846105a3565b6000808573ffffffffffffffffffffffffffffffffffffffff16858560405161032f9291906107ea565b600060405180830381855af49150503d806000811461036a576040519150601f19603f3d011682016040523d82523d6000602084013e61036f565b606091505b509150915081610401576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f50726f78793a2064656c656761746563616c6c20746f206e657720696d706c6560448201527f6d656e746174696f6e20636f6e7472616374206661696c65640000000000000060648201526084016101f8565b91506104129050565b61041261012d565b9392505050565b60006104437fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061047a575033155b156104a557507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6104ad61012d565b90565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610509575033155b1561028e5761028b8161060b565b60006105417fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610578575033155b156104a557507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81905560405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60006106357fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038390556040805173ffffffffffffffffffffffffffffffffffffffff8084168252851660208201529192507f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b803573ffffffffffffffffffffffffffffffffffffffff811681146106d457600080fd5b919050565b6000602082840312156106eb57600080fd5b610412826106b0565b60008060006040848603121561070957600080fd5b610712846106b0565b9250602084013567ffffffffffffffff8082111561072f57600080fd5b818601915086601f83011261074357600080fd5b81358181111561075257600080fd5b87602082850101111561076457600080fd5b6020830194508093505050509250925092565b600060208083528351808285015260005b818110156107a457858101830151858201604001528201610788565b818111156107b6576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b818382376000910190815291905056fea164736f6c634300080f000ab53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", "deployedBytecode": "0x60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100be5780638f283970146100f8578063f851a440146101185761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61012d565b005b61006b61012d565b34801561008157600080fd5b5061006b6100903660046106d9565b610224565b6100a86100a33660046106f4565b610296565b6040516100b59190610777565b60405180910390f35b3480156100ca57600080fd5b506100d3610419565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100b5565b34801561010457600080fd5b5061006b6101133660046106d9565b6104b0565b34801561012457600080fd5b506100d3610517565b60006101577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905073ffffffffffffffffffffffffffffffffffffffff8116610201576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f50726f78793a20696d706c656d656e746174696f6e206e6f7420696e6974696160448201527f6c697a656400000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3660008037600080366000845af43d6000803e8061021e573d6000fd5b503d6000f35b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061027d575033155b1561028e5761028b816105a3565b50565b61028b61012d565b60606102c07fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806102f7575033155b1561040a57610305846105a3565b6000808573ffffffffffffffffffffffffffffffffffffffff16858560405161032f9291906107ea565b600060405180830381855af49150503d806000811461036a576040519150601f19603f3d011682016040523d82523d6000602084013e61036f565b606091505b509150915081610401576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f50726f78793a2064656c656761746563616c6c20746f206e657720696d706c6560448201527f6d656e746174696f6e20636f6e7472616374206661696c65640000000000000060648201526084016101f8565b91506104129050565b61041261012d565b9392505050565b60006104437fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061047a575033155b156104a557507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6104ad61012d565b90565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610509575033155b1561028e5761028b8161060b565b60006105417fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610578575033155b156104a557507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81905560405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60006106357fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038390556040805173ffffffffffffffffffffffffffffffffffffffff8084168252851660208201529192507f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b803573ffffffffffffffffffffffffffffffffffffffff811681146106d457600080fd5b919050565b6000602082840312156106eb57600080fd5b610412826106b0565b60008060006040848603121561070957600080fd5b610712846106b0565b9250602084013567ffffffffffffffff8082111561072f57600080fd5b818601915086601f83011261074357600080fd5b81358181111561075257600080fd5b87602082850101111561076457600080fd5b6020830194508093505050509250925092565b600060208083528351808285015260005b818110156107a457858101830151858201604001528201610788565b818111156107b6576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b818382376000910190815291905056fea164736f6c634300080f000a", "devdoc": { diff --git a/packages/contracts-bedrock/deployments/goerli/OptimismMintableERC20Factory.json b/packages/contracts-bedrock/deployments/alpha-1/OptimismMintableERC20Factory.json similarity index 97% rename from packages/contracts-bedrock/deployments/goerli/OptimismMintableERC20Factory.json rename to packages/contracts-bedrock/deployments/alpha-1/OptimismMintableERC20Factory.json index e40f08c15aa59..447dac74e0530 100644 --- a/packages/contracts-bedrock/deployments/goerli/OptimismMintableERC20Factory.json +++ b/packages/contracts-bedrock/deployments/alpha-1/OptimismMintableERC20Factory.json @@ -1,5 +1,5 @@ { - "address": "0xb62Aa662Dde5f8026B7Ed1115A877812BDe4AbaA", + "address": "0xCa07cdc32f256e60D9d65CC69A41629DA634411e", "abi": [ { "inputs": [ @@ -128,28 +128,28 @@ "type": "function" } ], - "transactionHash": "0x9d7d9b835060f034d9fbde56439951e08018ec19ab46e1bafb5ace3f2fde8c52", + "transactionHash": "0xa13fc231f7be573067c11dda2bb672772d847be8a0b76ec96c2a0a95117c1a1d", "receipt": { "to": null, - "from": "0xCFf7a9856DB3C60AB546b8F43dC5D1A4336786A0", - "contractAddress": "0xb62Aa662Dde5f8026B7Ed1115A877812BDe4AbaA", - "transactionIndex": 0, + "from": "0x1D066Ef7AA90ae85Bb017e85968A9e1851DA95Db", + "contractAddress": "0xCa07cdc32f256e60D9d65CC69A41629DA634411e", + "transactionIndex": 4, "gasUsed": "1541685", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x8265c24b8fe9878eb0672c598d4cf9c630b0113cc8472d8a3a12f6363732600c", - "transactionHash": "0x9d7d9b835060f034d9fbde56439951e08018ec19ab46e1bafb5ace3f2fde8c52", + "blockHash": "0x5bd8ca98c113de21b83bf8ab5394a0136979164858c25cc0864317a9bc69ef76", + "transactionHash": "0xa13fc231f7be573067c11dda2bb672772d847be8a0b76ec96c2a0a95117c1a1d", "logs": [], - "blockNumber": 7355257, - "cumulativeGasUsed": "1541685", + "blockNumber": 7568963, + "cumulativeGasUsed": "11546257", "status": 1, "byzantium": true }, "args": [ - "0x3832f427768eA5069b3498fb3b3d719104609dAd" + "0xFf94B6C486350aD92561Ba09bad3a59df764Da92" ], "numDeployments": 1, - "solcInputHash": "cd42cb04f3b6a78e5824c9f427d0a55d", - "metadata": "{\"compiler\":{\"version\":\"0.8.15+commit.e14f2714\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"deployer\",\"type\":\"address\"}],\"name\":\"OptimismMintableERC20Created\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"}],\"name\":\"StandardL2TokenCreated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"name\":\"createOptimismMintableERC20\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"name\":\"createStandardL2Token\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"custom:proxied\":\"@custom:predeployed 0x4200000000000000000000000000000000000012\",\"events\":{\"OptimismMintableERC20Created(address,address,address)\":{\"params\":{\"deployer\":\"Address of the account that deployed the token.\",\"localToken\":\"Address of the created token on the local chain.\",\"remoteToken\":\"Address of the corresponding token on the remote chain.\"}},\"StandardL2TokenCreated(address,address)\":{\"custom:legacy\":\"@notice Emitted whenever a new OptimismMintableERC20 is created. Legacy version of the newer OptimismMintableERC20Created event. We recommend relying on that event instead.\",\"params\":{\"localToken\":\"Address of the created token on the local chain.\",\"remoteToken\":\"Address of the token on the remote chain.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_bridge\":\"Address of the StandardBridge on this chain.\"}},\"createOptimismMintableERC20(address,string,string)\":{\"params\":{\"_name\":\"ERC20 name.\",\"_remoteToken\":\"Address of the token on the remote chain.\",\"_symbol\":\"ERC20 symbol.\"},\"returns\":{\"_0\":\"Address of the newly created token.\"}},\"createStandardL2Token(address,string,string)\":{\"custom:legacy\":\"@notice Creates an instance of the OptimismMintableERC20 contract. Legacy version of the newer createOptimismMintableERC20 function, which has a more intuitive name.\",\"params\":{\"_name\":\"ERC20 name.\",\"_remoteToken\":\"Address of the token on the remote chain.\",\"_symbol\":\"ERC20 symbol.\"},\"returns\":{\"_0\":\"Address of the newly created token.\"}}},\"title\":\"OptimismMintableERC20Factory\",\"version\":1},\"userdoc\":{\"events\":{\"OptimismMintableERC20Created(address,address,address)\":{\"notice\":\"Emitted whenever a new OptimismMintableERC20 is created.\"}},\"kind\":\"user\",\"methods\":{\"bridge()\":{\"notice\":\"Address of the StandardBridge on this chain.\"},\"createOptimismMintableERC20(address,string,string)\":{\"notice\":\"Creates an instance of the OptimismMintableERC20 contract.\"}},\"notice\":\"OptimismMintableERC20Factory is a factory contract that generates OptimismMintableERC20 contracts on the network it's deployed to. Simplifies the deployment process for users who may be less familiar with deploying smart contracts. Designed to be backwards compatible with the older StandardL2ERC20Factory contract.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/universal/OptimismMintableERC20Factory.sol\":\"OptimismMintableERC20Factory\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@eth-optimism/contracts-periphery/=node_modules/@eth-optimism/contracts-periphery/contracts/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/\",\":@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/\",\":@rari-capital/=node_modules/@rari-capital/\",\":@rari-capital/solmate/=node_modules/@rari-capital/solmate/\",\":contracts/=contracts/\",\":ds-test/=node_modules/ds-test/src/\",\":excessively-safe-call/=node_modules/excessively-safe-call/\",\":forge-std/=node_modules/forge-std/src/\"]},\"sources\":{\"contracts/universal/OptimismMintableERC20.sol\":{\"keccak256\":\"0xad261a9f7af1973f7cc3784b7c5a04682c64033eeb51ca54f714c15e1863ceca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://dc74cf0470d90168b795a01733262dbd5c6d06067738b1b3bed38c6e480a207c\",\"dweb:/ipfs/QmWAAVoyNJXBXHfMgkeSYdwMPHry8cfVc2DiMzZBqrqUG8\"]},\"contracts/universal/OptimismMintableERC20Factory.sol\":{\"keccak256\":\"0xe888dedb04ba419e02c7ac97118250f0dab77ce371f9b94a89f9324122ceb04f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2bb80135654001f92cd7c5080e5d413db35a3e6569f39b58f0d5a02d0b13ef7c\",\"dweb:/ipfs/QmU3qYXmxuchqYZaH6TMcWPQTg8EMqX8inGFFEgZUfCxPC\"]},\"contracts/universal/SupportedInterfaces.sol\":{\"keccak256\":\"0x68eb6cc2db8c22712c3912a2061d46c10600b3ded466d626acb2826e67354168\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b611eec13144ad11f1208f83055b84b142579d5761a9281e645c7294f4579bb3\",\"dweb:/ipfs/QmWVJ299etGEBEGE2v6HSt2CkoCrvcwNkY4jYFb4tnCAHS\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xe0c8b625a79bac0fe80f17cfb521e072805cc9cef1c96a5caf45b264e74812fa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://12fd1efc9ad061ef675bd50fb0c8e3c6f2952a09f8df0e3c688b8d81b8918838\",\"dweb:/ipfs/QmawN6PjTwy91pU7ANjCSgbsLc8TDA6hwu9GsFFaNSuhb5\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34\",\"dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a376d3dda2cb70536c0a45c208b29b34ac560c4cb4f513a42079f96ba47d2dd\",\"dweb:/ipfs/QmZQg6gn1sUpM8wHzwNvSnihumUCAhxD119MpXeKp8B9s8\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://be161e54f24e5c6fae81a12db1a8ae87bc5ae1b0ddc805d82a1440a68455088f\",\"dweb:/ipfs/QmP7C3CHdY9urF4dEMb9wmsp1wMxHF6nhA2yQE5SKiPAdy\"]}},\"version\":1}", + "solcInputHash": "ada691c3f5ff59bd3e60fdb28388fb6d", + "metadata": "{\"compiler\":{\"version\":\"0.8.15+commit.e14f2714\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"deployer\",\"type\":\"address\"}],\"name\":\"OptimismMintableERC20Created\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"}],\"name\":\"StandardL2TokenCreated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"name\":\"createOptimismMintableERC20\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"name\":\"createStandardL2Token\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"custom:proxied\":\"@custom:predeployed 0x4200000000000000000000000000000000000012\",\"events\":{\"OptimismMintableERC20Created(address,address,address)\":{\"params\":{\"deployer\":\"Address of the account that deployed the token.\",\"localToken\":\"Address of the created token on the local chain.\",\"remoteToken\":\"Address of the corresponding token on the remote chain.\"}},\"StandardL2TokenCreated(address,address)\":{\"custom:legacy\":\"@notice Emitted whenever a new OptimismMintableERC20 is created. Legacy version of the newer OptimismMintableERC20Created event. We recommend relying on that event instead.\",\"params\":{\"localToken\":\"Address of the created token on the local chain.\",\"remoteToken\":\"Address of the token on the remote chain.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_bridge\":\"Address of the StandardBridge on this chain.\"}},\"createOptimismMintableERC20(address,string,string)\":{\"params\":{\"_name\":\"ERC20 name.\",\"_remoteToken\":\"Address of the token on the remote chain.\",\"_symbol\":\"ERC20 symbol.\"},\"returns\":{\"_0\":\"Address of the newly created token.\"}},\"createStandardL2Token(address,string,string)\":{\"custom:legacy\":\"@notice Creates an instance of the OptimismMintableERC20 contract. Legacy version of the newer createOptimismMintableERC20 function, which has a more intuitive name.\",\"params\":{\"_name\":\"ERC20 name.\",\"_remoteToken\":\"Address of the token on the remote chain.\",\"_symbol\":\"ERC20 symbol.\"},\"returns\":{\"_0\":\"Address of the newly created token.\"}}},\"title\":\"OptimismMintableERC20Factory\",\"version\":1},\"userdoc\":{\"events\":{\"OptimismMintableERC20Created(address,address,address)\":{\"notice\":\"Emitted whenever a new OptimismMintableERC20 is created.\"}},\"kind\":\"user\",\"methods\":{\"bridge()\":{\"notice\":\"Address of the StandardBridge on this chain.\"},\"createOptimismMintableERC20(address,string,string)\":{\"notice\":\"Creates an instance of the OptimismMintableERC20 contract.\"}},\"notice\":\"OptimismMintableERC20Factory is a factory contract that generates OptimismMintableERC20 contracts on the network it's deployed to. Simplifies the deployment process for users who may be less familiar with deploying smart contracts. Designed to be backwards compatible with the older StandardL2ERC20Factory contract.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/universal/OptimismMintableERC20Factory.sol\":\"OptimismMintableERC20Factory\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@eth-optimism/contracts-periphery/=node_modules/@eth-optimism/contracts-periphery/contracts/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/\",\":@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/\",\":@rari-capital/=node_modules/@rari-capital/\",\":@rari-capital/solmate/=node_modules/@rari-capital/solmate/\",\":contracts/=contracts/\",\":ds-test/=node_modules/ds-test/src/\",\":forge-std/=node_modules/forge-std/src/\"]},\"sources\":{\"contracts/universal/OptimismMintableERC20.sol\":{\"keccak256\":\"0xad261a9f7af1973f7cc3784b7c5a04682c64033eeb51ca54f714c15e1863ceca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://dc74cf0470d90168b795a01733262dbd5c6d06067738b1b3bed38c6e480a207c\",\"dweb:/ipfs/QmWAAVoyNJXBXHfMgkeSYdwMPHry8cfVc2DiMzZBqrqUG8\"]},\"contracts/universal/OptimismMintableERC20Factory.sol\":{\"keccak256\":\"0xe888dedb04ba419e02c7ac97118250f0dab77ce371f9b94a89f9324122ceb04f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2bb80135654001f92cd7c5080e5d413db35a3e6569f39b58f0d5a02d0b13ef7c\",\"dweb:/ipfs/QmU3qYXmxuchqYZaH6TMcWPQTg8EMqX8inGFFEgZUfCxPC\"]},\"contracts/universal/SupportedInterfaces.sol\":{\"keccak256\":\"0x68eb6cc2db8c22712c3912a2061d46c10600b3ded466d626acb2826e67354168\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b611eec13144ad11f1208f83055b84b142579d5761a9281e645c7294f4579bb3\",\"dweb:/ipfs/QmWVJ299etGEBEGE2v6HSt2CkoCrvcwNkY4jYFb4tnCAHS\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x24b04b8aacaaf1a4a0719117b29c9c3647b1f479c5ac2a60f5ff1bb6d839c238\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://43e46da9d9f49741ecd876a269e71bc7494058d7a8e9478429998adb5bc3eaa0\",\"dweb:/ipfs/QmUtp4cqzf22C5rJ76AabKADquGWcjsc33yjYXxXC4sDvy\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34\",\"dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a376d3dda2cb70536c0a45c208b29b34ac560c4cb4f513a42079f96ba47d2dd\",\"dweb:/ipfs/QmZQg6gn1sUpM8wHzwNvSnihumUCAhxD119MpXeKp8B9s8\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://be161e54f24e5c6fae81a12db1a8ae87bc5ae1b0ddc805d82a1440a68455088f\",\"dweb:/ipfs/QmP7C3CHdY9urF4dEMb9wmsp1wMxHF6nhA2yQE5SKiPAdy\"]}},\"version\":1}", "bytecode": "0x60a060405234801561001057600080fd5b50604051611baa380380611baa83398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b608051611b1961009160003960008181609a015261017e0152611b196000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063896f93d114610046578063ce5ac90f14610082578063e78cea9214610095575b600080fd5b610059610054366004610371565b6100bc565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b610059610090366004610371565b6100d1565b6100597f000000000000000000000000000000000000000000000000000000000000000081565b60006100c98484846100d1565b949350505050565b600073ffffffffffffffffffffffffffffffffffffffff841661017a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d4d696e7461626c654552433230466163746f72793a206d7560448201527f73742070726f766964652072656d6f746520746f6b656e206164647265737300606482015260840160405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000008585856040516101ac9061028a565b6101b9949392919061046b565b604051809103906000f0801580156101d5573d6000803e3d6000fd5b5090508073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fceeb8e7d520d7f3b65fc11a262b91066940193b05d4f93df07cfdced0eb551cf60405160405180910390a360405133815273ffffffffffffffffffffffffffffffffffffffff80831691908716907f52fe89dd5930f343d25650b62fd367bae47088bcddffd2a88350a6ecdd620cdb9060200160405180910390a3949350505050565b61164b806104c283390190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f8301126102d757600080fd5b813567ffffffffffffffff808211156102f2576102f2610297565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561033857610338610297565b8160405283815286602085880101111561035157600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060006060848603121561038657600080fd5b833573ffffffffffffffffffffffffffffffffffffffff811681146103aa57600080fd5b9250602084013567ffffffffffffffff808211156103c757600080fd5b6103d3878388016102c6565b935060408601359150808211156103e957600080fd5b506103f6868287016102c6565b9150509250925092565b6000815180845260005b818110156104265760208185018101518683018201520161040a565b81811115610438576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250608060408301526104a46080830185610400565b82810360608401526104b68185610400565b97965050505050505056fe60806040523480156200001157600080fd5b506040516200164b3803806200164b833981016040819052620000349162000179565b8181600362000044838262000298565b50600462000053828262000298565b5050600580546001600160a01b039586166001600160a01b03199182161790915560068054969095169516949094179092555062000364915050565b80516001600160a01b0381168114620000a757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620000d457600080fd5b81516001600160401b0380821115620000f157620000f1620000ac565b604051601f8301601f19908116603f011681019082821181831017156200011c576200011c620000ac565b816040528381526020925086838588010111156200013957600080fd5b600091505b838210156200015d57858201830151818301840152908201906200013e565b838211156200016f5760008385830101525b9695505050505050565b600080600080608085870312156200019057600080fd5b6200019b856200008f565b9350620001ab602086016200008f565b60408601519093506001600160401b0380821115620001c957600080fd5b620001d788838901620000c2565b93506060870151915080821115620001ee57600080fd5b50620001fd87828801620000c2565b91505092959194509250565b600181811c908216806200021e57607f821691505b6020821081036200023f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200029357600081815260208120601f850160051c810160208610156200026e5750805b601f850160051c820191505b818110156200028f578281556001016200027a565b5050505b505050565b81516001600160401b03811115620002b457620002b4620000ac565b620002cc81620002c5845462000209565b8462000245565b602080601f831160018114620003045760008415620002eb5750858301515b600019600386901b1c1916600185901b1785556200028f565b600085815260208120601f198616915b82811015620003355788860151825594840194600190910190840162000314565b5085821015620003545787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6112d780620003746000396000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c806395d89b41116100b2578063ae1f6aaf11610081578063d6c0b2c411610066578063d6c0b2c4146102bb578063dd62ed3e146102db578063e78cea921461032157600080fd5b8063ae1f6aaf1461025e578063c01e1bd61461029d57600080fd5b806395d89b411461021d5780639dc29fac14610225578063a457c2d714610238578063a9059cbb1461024b57600080fd5b806323b872dd1161010957806339509351116100ee57806339509351146101bf57806340c10f19146101d257806370a08231146101e757600080fd5b806323b872dd1461019d578063313ce567146101b057600080fd5b806301ffc9a71461013b57806306fdde0314610163578063095ea7b31461017857806318160ddd1461018b575b600080fd5b61014e610149366004611080565b610341565b60405190151581526020015b60405180910390f35b61016b610432565b60405161015a91906110c9565b61014e610186366004611165565b6104c4565b6002545b60405190815260200161015a565b61014e6101ab36600461118f565b6104dc565b6040516012815260200161015a565b61014e6101cd366004611165565b610500565b6101e56101e0366004611165565b61054c565b005b61018f6101f53660046111cb565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b61016b610656565b6101e5610233366004611165565b610665565b61014e610246366004611165565b61075e565b61014e610259366004611165565b61082f565b60065473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161015a565b60055473ffffffffffffffffffffffffffffffffffffffff16610278565b6005546102789073ffffffffffffffffffffffffffffffffffffffff1681565b61018f6102e93660046111e6565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b6006546102789073ffffffffffffffffffffffffffffffffffffffff1681565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007f1d1d8b63000000000000000000000000000000000000000000000000000000007f0bc32271000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000085168314806103fa57507fffffffff00000000000000000000000000000000000000000000000000000000858116908316145b8061042957507fffffffff00000000000000000000000000000000000000000000000000000000858116908216145b95945050505050565b60606003805461044190611219565b80601f016020809104026020016040519081016040528092919081815260200182805461046d90611219565b80156104ba5780601f1061048f576101008083540402835291602001916104ba565b820191906000526020600020905b81548152906001019060200180831161049d57829003601f168201915b5050505050905090565b6000336104d281858561083d565b5060019392505050565b6000336104ea8582856109f1565b6104f5858585610ac8565b506001949350505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091906104d2908290869061054790879061129b565b61083d565b60065473ffffffffffffffffffffffffffffffffffffffff1633146105f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f4f7074696d69736d4d696e7461626c6545524332303a206f6e6c79206272696460448201527f67652063616e206d696e7420616e64206275726e00000000000000000000000060648201526084015b60405180910390fd5b6106028282610d7b565b8173ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968858260405161064a91815260200190565b60405180910390a25050565b60606004805461044190611219565b60065473ffffffffffffffffffffffffffffffffffffffff16331461070c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f4f7074696d69736d4d696e7461626c6545524332303a206f6e6c79206272696460448201527f67652063616e206d696e7420616e64206275726e00000000000000000000000060648201526084016105ef565b6107168282610e9b565b8173ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca58260405161064a91815260200190565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919083811015610822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016105ef565b6104f5828686840361083d565b6000336104d2818585610ac8565b73ffffffffffffffffffffffffffffffffffffffff83166108df576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016105ef565b73ffffffffffffffffffffffffffffffffffffffff8216610982576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016105ef565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610ac25781811015610ab5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105ef565b610ac2848484840361083d565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316610b6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016105ef565b73ffffffffffffffffffffffffffffffffffffffff8216610c0e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016105ef565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610cc4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016105ef565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260208190526040808220858503905591851681529081208054849290610d0890849061129b565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610d6e91815260200190565b60405180910390a3610ac2565b73ffffffffffffffffffffffffffffffffffffffff8216610df8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105ef565b8060026000828254610e0a919061129b565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604081208054839290610e4490849061129b565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b73ffffffffffffffffffffffffffffffffffffffff8216610f3e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016105ef565b73ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604090205481811015610ff4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016105ef565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604081208383039055600280548492906110309084906112b3565b909155505060405182815260009073ffffffffffffffffffffffffffffffffffffffff8516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020016109e4565b60006020828403121561109257600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146110c257600080fd5b9392505050565b600060208083528351808285015260005b818110156110f6578581018301518582016040015282016110da565b81811115611108576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461116057600080fd5b919050565b6000806040838503121561117857600080fd5b6111818361113c565b946020939093013593505050565b6000806000606084860312156111a457600080fd5b6111ad8461113c565b92506111bb6020850161113c565b9150604084013590509250925092565b6000602082840312156111dd57600080fd5b6110c28261113c565b600080604083850312156111f957600080fd5b6112028361113c565b91506112106020840161113c565b90509250929050565b600181811c9082168061122d57607f821691505b602082108103611266577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082198211156112ae576112ae61126c565b500190565b6000828210156112c5576112c561126c565b50039056fea164736f6c634300080f000aa164736f6c634300080f000a", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063896f93d114610046578063ce5ac90f14610082578063e78cea9214610095575b600080fd5b610059610054366004610371565b6100bc565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b610059610090366004610371565b6100d1565b6100597f000000000000000000000000000000000000000000000000000000000000000081565b60006100c98484846100d1565b949350505050565b600073ffffffffffffffffffffffffffffffffffffffff841661017a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d4d696e7461626c654552433230466163746f72793a206d7560448201527f73742070726f766964652072656d6f746520746f6b656e206164647265737300606482015260840160405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000008585856040516101ac9061028a565b6101b9949392919061046b565b604051809103906000f0801580156101d5573d6000803e3d6000fd5b5090508073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fceeb8e7d520d7f3b65fc11a262b91066940193b05d4f93df07cfdced0eb551cf60405160405180910390a360405133815273ffffffffffffffffffffffffffffffffffffffff80831691908716907f52fe89dd5930f343d25650b62fd367bae47088bcddffd2a88350a6ecdd620cdb9060200160405180910390a3949350505050565b61164b806104c283390190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f8301126102d757600080fd5b813567ffffffffffffffff808211156102f2576102f2610297565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561033857610338610297565b8160405283815286602085880101111561035157600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060006060848603121561038657600080fd5b833573ffffffffffffffffffffffffffffffffffffffff811681146103aa57600080fd5b9250602084013567ffffffffffffffff808211156103c757600080fd5b6103d3878388016102c6565b935060408601359150808211156103e957600080fd5b506103f6868287016102c6565b9150509250925092565b6000815180845260005b818110156104265760208185018101518683018201520161040a565b81811115610438576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250608060408301526104a46080830185610400565b82810360608401526104b68185610400565b97965050505050505056fe60806040523480156200001157600080fd5b506040516200164b3803806200164b833981016040819052620000349162000179565b8181600362000044838262000298565b50600462000053828262000298565b5050600580546001600160a01b039586166001600160a01b03199182161790915560068054969095169516949094179092555062000364915050565b80516001600160a01b0381168114620000a757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620000d457600080fd5b81516001600160401b0380821115620000f157620000f1620000ac565b604051601f8301601f19908116603f011681019082821181831017156200011c576200011c620000ac565b816040528381526020925086838588010111156200013957600080fd5b600091505b838210156200015d57858201830151818301840152908201906200013e565b838211156200016f5760008385830101525b9695505050505050565b600080600080608085870312156200019057600080fd5b6200019b856200008f565b9350620001ab602086016200008f565b60408601519093506001600160401b0380821115620001c957600080fd5b620001d788838901620000c2565b93506060870151915080821115620001ee57600080fd5b50620001fd87828801620000c2565b91505092959194509250565b600181811c908216806200021e57607f821691505b6020821081036200023f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200029357600081815260208120601f850160051c810160208610156200026e5750805b601f850160051c820191505b818110156200028f578281556001016200027a565b5050505b505050565b81516001600160401b03811115620002b457620002b4620000ac565b620002cc81620002c5845462000209565b8462000245565b602080601f831160018114620003045760008415620002eb5750858301515b600019600386901b1c1916600185901b1785556200028f565b600085815260208120601f198616915b82811015620003355788860151825594840194600190910190840162000314565b5085821015620003545787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6112d780620003746000396000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c806395d89b41116100b2578063ae1f6aaf11610081578063d6c0b2c411610066578063d6c0b2c4146102bb578063dd62ed3e146102db578063e78cea921461032157600080fd5b8063ae1f6aaf1461025e578063c01e1bd61461029d57600080fd5b806395d89b411461021d5780639dc29fac14610225578063a457c2d714610238578063a9059cbb1461024b57600080fd5b806323b872dd1161010957806339509351116100ee57806339509351146101bf57806340c10f19146101d257806370a08231146101e757600080fd5b806323b872dd1461019d578063313ce567146101b057600080fd5b806301ffc9a71461013b57806306fdde0314610163578063095ea7b31461017857806318160ddd1461018b575b600080fd5b61014e610149366004611080565b610341565b60405190151581526020015b60405180910390f35b61016b610432565b60405161015a91906110c9565b61014e610186366004611165565b6104c4565b6002545b60405190815260200161015a565b61014e6101ab36600461118f565b6104dc565b6040516012815260200161015a565b61014e6101cd366004611165565b610500565b6101e56101e0366004611165565b61054c565b005b61018f6101f53660046111cb565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b61016b610656565b6101e5610233366004611165565b610665565b61014e610246366004611165565b61075e565b61014e610259366004611165565b61082f565b60065473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161015a565b60055473ffffffffffffffffffffffffffffffffffffffff16610278565b6005546102789073ffffffffffffffffffffffffffffffffffffffff1681565b61018f6102e93660046111e6565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b6006546102789073ffffffffffffffffffffffffffffffffffffffff1681565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007f1d1d8b63000000000000000000000000000000000000000000000000000000007f0bc32271000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000085168314806103fa57507fffffffff00000000000000000000000000000000000000000000000000000000858116908316145b8061042957507fffffffff00000000000000000000000000000000000000000000000000000000858116908216145b95945050505050565b60606003805461044190611219565b80601f016020809104026020016040519081016040528092919081815260200182805461046d90611219565b80156104ba5780601f1061048f576101008083540402835291602001916104ba565b820191906000526020600020905b81548152906001019060200180831161049d57829003601f168201915b5050505050905090565b6000336104d281858561083d565b5060019392505050565b6000336104ea8582856109f1565b6104f5858585610ac8565b506001949350505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091906104d2908290869061054790879061129b565b61083d565b60065473ffffffffffffffffffffffffffffffffffffffff1633146105f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f4f7074696d69736d4d696e7461626c6545524332303a206f6e6c79206272696460448201527f67652063616e206d696e7420616e64206275726e00000000000000000000000060648201526084015b60405180910390fd5b6106028282610d7b565b8173ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968858260405161064a91815260200190565b60405180910390a25050565b60606004805461044190611219565b60065473ffffffffffffffffffffffffffffffffffffffff16331461070c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f4f7074696d69736d4d696e7461626c6545524332303a206f6e6c79206272696460448201527f67652063616e206d696e7420616e64206275726e00000000000000000000000060648201526084016105ef565b6107168282610e9b565b8173ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca58260405161064a91815260200190565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919083811015610822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016105ef565b6104f5828686840361083d565b6000336104d2818585610ac8565b73ffffffffffffffffffffffffffffffffffffffff83166108df576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016105ef565b73ffffffffffffffffffffffffffffffffffffffff8216610982576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016105ef565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610ac25781811015610ab5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105ef565b610ac2848484840361083d565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316610b6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016105ef565b73ffffffffffffffffffffffffffffffffffffffff8216610c0e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016105ef565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610cc4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016105ef565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260208190526040808220858503905591851681529081208054849290610d0890849061129b565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610d6e91815260200190565b60405180910390a3610ac2565b73ffffffffffffffffffffffffffffffffffffffff8216610df8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105ef565b8060026000828254610e0a919061129b565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604081208054839290610e4490849061129b565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b73ffffffffffffffffffffffffffffffffffffffff8216610f3e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016105ef565b73ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604090205481811015610ff4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016105ef565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604081208383039055600280548492906110309084906112b3565b909155505060405182815260009073ffffffffffffffffffffffffffffffffffffffff8516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020016109e4565b60006020828403121561109257600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146110c257600080fd5b9392505050565b600060208083528351808285015260005b818110156110f6578581018301518582016040015282016110da565b81811115611108576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461116057600080fd5b919050565b6000806040838503121561117857600080fd5b6111818361113c565b946020939093013593505050565b6000806000606084860312156111a457600080fd5b6111ad8461113c565b92506111bb6020850161113c565b9150604084013590509250925092565b6000602082840312156111dd57600080fd5b6110c28261113c565b600080604083850312156111f957600080fd5b6112028361113c565b91506112106020840161113c565b90509250929050565b600181811c9082168061122d57607f821691505b602082108103611266577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082198211156112ae576112ae61126c565b500190565b6000828210156112c5576112c561126c565b50039056fea164736f6c634300080f000aa164736f6c634300080f000a", "devdoc": { diff --git a/packages/contracts-bedrock/deployments/goerli/OptimismMintableERC20FactoryProxy.json b/packages/contracts-bedrock/deployments/alpha-1/OptimismMintableERC20FactoryProxy.json similarity index 93% rename from packages/contracts-bedrock/deployments/goerli/OptimismMintableERC20FactoryProxy.json rename to packages/contracts-bedrock/deployments/alpha-1/OptimismMintableERC20FactoryProxy.json index 14813b50d5439..c635eb3fae477 100644 --- a/packages/contracts-bedrock/deployments/goerli/OptimismMintableERC20FactoryProxy.json +++ b/packages/contracts-bedrock/deployments/alpha-1/OptimismMintableERC20FactoryProxy.json @@ -1,5 +1,5 @@ { - "address": "0xb5E4194987D5d8e510C4ce56F59B74022248378B", + "address": "0x28A8256cEC0B8044Bd40221A651ccEe92Cd320bC", "abi": [ { "inputs": [ @@ -129,41 +129,41 @@ "type": "receive" } ], - "transactionHash": "0x61bf21e3f46ca6ec0fe28516c5919a6500b46a64091472c52d77698b43fcbf9f", + "transactionHash": "0x2a8cae8d8c786cfd8ff7a72b6dc3e83d018cabba73b5a6533151bfd41921088d", "receipt": { "to": null, - "from": "0xCFf7a9856DB3C60AB546b8F43dC5D1A4336786A0", - "contractAddress": "0xb5E4194987D5d8e510C4ce56F59B74022248378B", - "transactionIndex": 1, + "from": "0x1D066Ef7AA90ae85Bb017e85968A9e1851DA95Db", + "contractAddress": "0x28A8256cEC0B8044Bd40221A651ccEe92Cd320bC", + "transactionIndex": 4, "gasUsed": "523812", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000800000004000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xe2e611cb975a19fac260eaf296392315907a6ec6941f1b7026ae742cd83c7f5a", - "transactionHash": "0x61bf21e3f46ca6ec0fe28516c5919a6500b46a64091472c52d77698b43fcbf9f", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000002000000000000000000000000000000000000000000000000000000000000000800000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000020000000000000000000000000000000000000000000000", + "blockHash": "0x8503f0e1f8d0f3ce085e5a1ff5b93949f348092365c49ad10b86111b1b6df21a", + "transactionHash": "0x2a8cae8d8c786cfd8ff7a72b6dc3e83d018cabba73b5a6533151bfd41921088d", "logs": [ { - "transactionIndex": 1, - "blockNumber": 7355256, - "transactionHash": "0x61bf21e3f46ca6ec0fe28516c5919a6500b46a64091472c52d77698b43fcbf9f", - "address": "0xb5E4194987D5d8e510C4ce56F59B74022248378B", + "transactionIndex": 4, + "blockNumber": 7568962, + "transactionHash": "0x2a8cae8d8c786cfd8ff7a72b6dc3e83d018cabba73b5a6533151bfd41921088d", + "address": "0x28A8256cEC0B8044Bd40221A651ccEe92Cd320bC", "topics": [ "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cff7a9856db3c60ab546b8f43dc5d1a4336786a0", - "logIndex": 1, - "blockHash": "0xe2e611cb975a19fac260eaf296392315907a6ec6941f1b7026ae742cd83c7f5a" + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000001d066ef7aa90ae85bb017e85968a9e1851da95db", + "logIndex": 4, + "blockHash": "0x8503f0e1f8d0f3ce085e5a1ff5b93949f348092365c49ad10b86111b1b6df21a" } ], - "blockNumber": 7355256, - "cumulativeGasUsed": "588544", + "blockNumber": 7568962, + "cumulativeGasUsed": "2619060", "status": 1, "byzantium": true }, "args": [ - "0xCFf7a9856DB3C60AB546b8F43dC5D1A4336786A0" + "0x1D066Ef7AA90ae85Bb017e85968A9e1851DA95Db" ], "numDeployments": 1, - "solcInputHash": "cd42cb04f3b6a78e5824c9f427d0a55d", - "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\":{\"contracts/universal/Proxy.sol\":\"Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@eth-optimism/contracts-periphery/=node_modules/@eth-optimism/contracts-periphery/contracts/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/\",\":@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/\",\":@rari-capital/=node_modules/@rari-capital/\",\":@rari-capital/solmate/=node_modules/@rari-capital/solmate/\",\":contracts/=contracts/\",\":ds-test/=node_modules/ds-test/src/\",\":excessively-safe-call/=node_modules/excessively-safe-call/\",\":forge-std/=node_modules/forge-std/src/\"]},\"sources\":{\"contracts/universal/Proxy.sol\":{\"keccak256\":\"0xfa08635f1866139673ac4fe7b07330f752f93800075b895d8fcb8484f4a3f753\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8f2247604d527f560edbb851c43b6c16b37e34972ddb305e16dd73623b8288cd\",\"dweb:/ipfs/QmfM8sLAZrxrnqyRdt1XJ5LyJh4wKbeEqk3VkvxG7BDqFj\"]}},\"version\":1}", + "solcInputHash": "ada691c3f5ff59bd3e60fdb28388fb6d", + "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\":{\"contracts/universal/Proxy.sol\":\"Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@eth-optimism/contracts-periphery/=node_modules/@eth-optimism/contracts-periphery/contracts/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/\",\":@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/\",\":@rari-capital/=node_modules/@rari-capital/\",\":@rari-capital/solmate/=node_modules/@rari-capital/solmate/\",\":contracts/=contracts/\",\":ds-test/=node_modules/ds-test/src/\",\":forge-std/=node_modules/forge-std/src/\"]},\"sources\":{\"contracts/universal/Proxy.sol\":{\"keccak256\":\"0xfa08635f1866139673ac4fe7b07330f752f93800075b895d8fcb8484f4a3f753\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8f2247604d527f560edbb851c43b6c16b37e34972ddb305e16dd73623b8288cd\",\"dweb:/ipfs/QmfM8sLAZrxrnqyRdt1XJ5LyJh4wKbeEqk3VkvxG7BDqFj\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b5060405161091838038061091883398101604081905261002f916100b2565b6100388161003e565b506100e2565b60006100566000805160206108f88339815191525490565b6000805160206108f8833981519152839055604080516001600160a01b038084168252851660208201529192507f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b6000602082840312156100c457600080fd5b81516001600160a01b03811681146100db57600080fd5b9392505050565b610807806100f16000396000f3fe60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100be5780638f283970146100f8578063f851a440146101185761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61012d565b005b61006b61012d565b34801561008157600080fd5b5061006b6100903660046106d9565b610224565b6100a86100a33660046106f4565b610296565b6040516100b59190610777565b60405180910390f35b3480156100ca57600080fd5b506100d3610419565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100b5565b34801561010457600080fd5b5061006b6101133660046106d9565b6104b0565b34801561012457600080fd5b506100d3610517565b60006101577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905073ffffffffffffffffffffffffffffffffffffffff8116610201576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f50726f78793a20696d706c656d656e746174696f6e206e6f7420696e6974696160448201527f6c697a656400000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3660008037600080366000845af43d6000803e8061021e573d6000fd5b503d6000f35b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061027d575033155b1561028e5761028b816105a3565b50565b61028b61012d565b60606102c07fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806102f7575033155b1561040a57610305846105a3565b6000808573ffffffffffffffffffffffffffffffffffffffff16858560405161032f9291906107ea565b600060405180830381855af49150503d806000811461036a576040519150601f19603f3d011682016040523d82523d6000602084013e61036f565b606091505b509150915081610401576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f50726f78793a2064656c656761746563616c6c20746f206e657720696d706c6560448201527f6d656e746174696f6e20636f6e7472616374206661696c65640000000000000060648201526084016101f8565b91506104129050565b61041261012d565b9392505050565b60006104437fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061047a575033155b156104a557507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6104ad61012d565b90565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610509575033155b1561028e5761028b8161060b565b60006105417fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610578575033155b156104a557507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81905560405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60006106357fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038390556040805173ffffffffffffffffffffffffffffffffffffffff8084168252851660208201529192507f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b803573ffffffffffffffffffffffffffffffffffffffff811681146106d457600080fd5b919050565b6000602082840312156106eb57600080fd5b610412826106b0565b60008060006040848603121561070957600080fd5b610712846106b0565b9250602084013567ffffffffffffffff8082111561072f57600080fd5b818601915086601f83011261074357600080fd5b81358181111561075257600080fd5b87602082850101111561076457600080fd5b6020830194508093505050509250925092565b600060208083528351808285015260005b818110156107a457858101830151858201604001528201610788565b818111156107b6576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b818382376000910190815291905056fea164736f6c634300080f000ab53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", "deployedBytecode": "0x60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100be5780638f283970146100f8578063f851a440146101185761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61012d565b005b61006b61012d565b34801561008157600080fd5b5061006b6100903660046106d9565b610224565b6100a86100a33660046106f4565b610296565b6040516100b59190610777565b60405180910390f35b3480156100ca57600080fd5b506100d3610419565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100b5565b34801561010457600080fd5b5061006b6101133660046106d9565b6104b0565b34801561012457600080fd5b506100d3610517565b60006101577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905073ffffffffffffffffffffffffffffffffffffffff8116610201576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f50726f78793a20696d706c656d656e746174696f6e206e6f7420696e6974696160448201527f6c697a656400000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3660008037600080366000845af43d6000803e8061021e573d6000fd5b503d6000f35b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061027d575033155b1561028e5761028b816105a3565b50565b61028b61012d565b60606102c07fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806102f7575033155b1561040a57610305846105a3565b6000808573ffffffffffffffffffffffffffffffffffffffff16858560405161032f9291906107ea565b600060405180830381855af49150503d806000811461036a576040519150601f19603f3d011682016040523d82523d6000602084013e61036f565b606091505b509150915081610401576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f50726f78793a2064656c656761746563616c6c20746f206e657720696d706c6560448201527f6d656e746174696f6e20636f6e7472616374206661696c65640000000000000060648201526084016101f8565b91506104129050565b61041261012d565b9392505050565b60006104437fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061047a575033155b156104a557507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6104ad61012d565b90565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610509575033155b1561028e5761028b8161060b565b60006105417fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610578575033155b156104a557507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81905560405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60006106357fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038390556040805173ffffffffffffffffffffffffffffffffffffffff8084168252851660208201529192507f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b803573ffffffffffffffffffffffffffffffffffffffff811681146106d457600080fd5b919050565b6000602082840312156106eb57600080fd5b610412826106b0565b60008060006040848603121561070957600080fd5b610712846106b0565b9250602084013567ffffffffffffffff8082111561072f57600080fd5b818601915086601f83011261074357600080fd5b81358181111561075257600080fd5b87602082850101111561076457600080fd5b6020830194508093505050509250925092565b600060208083528351808285015260005b818110156107a457858101830151858201604001528201610788565b818111156107b6576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b818382376000910190815291905056fea164736f6c634300080f000a", "devdoc": { diff --git a/packages/contracts-bedrock/deployments/alpha-1/OptimismPortal.json b/packages/contracts-bedrock/deployments/alpha-1/OptimismPortal.json new file mode 100644 index 0000000000000..ad46584b9abb9 --- /dev/null +++ b/packages/contracts-bedrock/deployments/alpha-1/OptimismPortal.json @@ -0,0 +1,704 @@ +{ + "address": "0x1A164AcA739BDC7455bF70aE9dF1AA9A8E8b2d05", + "abi": [ + { + "inputs": [ + { + "internalType": "contract L2OutputOracle", + "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": "contract L2OutputOracle", + "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": "struct Types.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": "withdrawerStorageRoot", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "latestBlockhash", + "type": "bytes32" + } + ], + "internalType": "struct Types.OutputRootProof", + "name": "_outputRootProof", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "_withdrawalProof", + "type": "bytes" + } + ], + "name": "finalizeWithdrawalTransaction", + "outputs": [], + "stateMutability": "payable", + "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" + } + ], + "transactionHash": "0xde39150c1ecceeafd5fb91bbc712d93a2b6ad4fb3b69c151ddbce11e5d65cf58", + "receipt": { + "to": null, + "from": "0x1D066Ef7AA90ae85Bb017e85968A9e1851DA95Db", + "contractAddress": "0x1A164AcA739BDC7455bF70aE9dF1AA9A8E8b2d05", + "transactionIndex": 1, + "gasUsed": "3456779", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000002000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000", + "blockHash": "0x5bd8ca98c113de21b83bf8ab5394a0136979164858c25cc0864317a9bc69ef76", + "transactionHash": "0xde39150c1ecceeafd5fb91bbc712d93a2b6ad4fb3b69c151ddbce11e5d65cf58", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 7568963, + "transactionHash": "0xde39150c1ecceeafd5fb91bbc712d93a2b6ad4fb3b69c151ddbce11e5d65cf58", + "address": "0x1A164AcA739BDC7455bF70aE9dF1AA9A8E8b2d05", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 4, + "blockHash": "0x5bd8ca98c113de21b83bf8ab5394a0136979164858c25cc0864317a9bc69ef76" + } + ], + "blockNumber": 7568963, + "cumulativeGasUsed": "5085040", + "status": 1, + "byzantium": true + }, + "args": [ + "0x3A234299a14De50027eA65dCdf1c0DaC729e04A6", + 2 + ], + "numDeployments": 1, + "solcInputHash": "ada691c3f5ff59bd3e60fdb28388fb6d", + "metadata": "{\"compiler\":{\"version\":\"0.8.15+commit.e14f2714\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract L2OutputOracle\",\"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\":\"contract L2OutputOracle\",\"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\":\"struct Types.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\":\"withdrawerStorageRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"latestBlockhash\",\"type\":\"bytes32\"}],\"internalType\":\"struct Types.OutputRootProof\",\"name\":\"_outputRootProof\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"_withdrawalProof\",\"type\":\"bytes\"}],\"name\":\"finalizeWithdrawalTransaction\",\"outputs\":[],\"stateMutability\":\"payable\",\"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\"}],\"devdoc\":{\"custom:proxied\":\"@title OptimismPortal\",\"events\":{\"TransactionDeposited(address,address,uint256,bytes)\":{\"params\":{\"from\":\"Address that triggered the deposit transaction.\",\"opaqueData\":\"ABI encoded deposit data to be parsed off-chain.\",\"to\":\"Address that the deposit transaction is directed to.\",\"version\":\"Version of this deposit transaction event.\"}},\"WithdrawalFinalized(bytes32,bool)\":{\"params\":{\"success\":\"Whether the withdrawal transaction was successful.\",\"withdrawalHash\":\"Hash of the withdrawal transaction.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"custom:semver\":\"0.0.1\",\"params\":{\"_finalizationPeriodSeconds\":\"Output finalization time in seconds.\",\"_l2Oracle\":\"Address of the L2OutputOracle contract.\"}},\"depositTransaction(address,uint256,uint64,bool,bytes)\":{\"params\":{\"_data\":\"Data to trigger the recipient with.\",\"_gasLimit\":\"Minimum L2 gas limit (can be greater than or equal to this value).\",\"_isCreation\":\"Whether or not the transaction is a contract creation.\",\"_to\":\"Target address on L2.\",\"_value\":\"ETH value to send to the recipient.\"}},\"finalizeWithdrawalTransaction((uint256,address,address,uint256,uint256,bytes),uint256,(bytes32,bytes32,bytes32,bytes32),bytes)\":{\"params\":{\"_l2BlockNumber\":\"L2 block number of the outputRoot.\",\"_outputRootProof\":\"Inclusion proof of the withdrawer contracts storage root.\",\"_tx\":\"Withdrawal transaction to finalize.\",\"_withdrawalProof\":\"Inclusion proof for the given withdrawal in the withdrawer contract.\"}},\"isBlockFinalized(uint256)\":{\"params\":{\"_l2BlockNumber\":\"The number of the L2 block.\"}},\"version()\":{\"returns\":{\"_0\":\"Semver contract version as a string.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"TransactionDeposited(address,address,uint256,bytes)\":{\"notice\":\"Emitted when a transaction is deposited from L1 to L2. The parameters of this event are read by the rollup node and used to derive deposit transactions on L2.\"},\"WithdrawalFinalized(bytes32,bool)\":{\"notice\":\"Emitted when a withdrawal transaction is finalized.\"}},\"kind\":\"user\",\"methods\":{\"BASE_FEE_MAX_CHANGE_DENOMINATOR()\":{\"notice\":\"Denominator that determines max change on fee per block.\"},\"ELASTICITY_MULTIPLIER()\":{\"notice\":\"Along with the resource limit, determines the target resource limit.\"},\"FINALIZATION_PERIOD_SECONDS()\":{\"notice\":\"Minimum time (in seconds) that must elapse before a withdrawal can be finalized.\"},\"INITIAL_BASE_FEE()\":{\"notice\":\"Initial base fee value.\"},\"L2_ORACLE()\":{\"notice\":\"Address of the L2OutputOracle.\"},\"MAX_RESOURCE_LIMIT()\":{\"notice\":\"Maximum amount of the resource that can be used within this block.\"},\"MINIMUM_BASE_FEE()\":{\"notice\":\"Minimum base fee value, cannot go lower than this.\"},\"TARGET_RESOURCE_LIMIT()\":{\"notice\":\"Target amount of the resource that should be used within this block.\"},\"depositTransaction(address,uint256,uint64,bool,bytes)\":{\"notice\":\"Accepts deposits of ETH and data, and emits a TransactionDeposited event for use in deriving deposit transactions. Note that if a deposit is made by a contract, its address will be aliased when retrieved using `tx.origin` or `msg.sender`. Consider using the CrossDomainMessenger contracts for a simpler developer experience.\"},\"finalizeWithdrawalTransaction((uint256,address,address,uint256,uint256,bytes),uint256,(bytes32,bytes32,bytes32,bytes32),bytes)\":{\"notice\":\"Finalizes a withdrawal transaction.\"},\"finalizedWithdrawals(bytes32)\":{\"notice\":\"A list of withdrawal hashes which have been successfully finalized.\"},\"initialize()\":{\"notice\":\"Initializer;\"},\"isBlockFinalized(uint256)\":{\"notice\":\"Determine if a given block number is finalized. Reverts if the call to L2_ORACLE.getL2Output reverts. Returns a boolean otherwise.\"},\"l2Sender()\":{\"notice\":\"Address of the L2 account which initiated a withdrawal in this transaction. If the of this variable is the default L2 sender address, then we are NOT inside of a call to finalizeWithdrawalTransaction.\"},\"params()\":{\"notice\":\"EIP-1559 style gas parameters.\"},\"version()\":{\"notice\":\"Returns the full semver contract version.\"}},\"notice\":\"The OptimismPortal is a low-level contract responsible for passing messages between L1 and L2. Messages sent directly to the OptimismPortal have no form of replayability. Users are encouraged to use the L1CrossDomainMessenger for a higher-level interface.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/L1/OptimismPortal.sol\":\"OptimismPortal\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@eth-optimism/contracts-periphery/=node_modules/@eth-optimism/contracts-periphery/contracts/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/\",\":@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/\",\":@rari-capital/=node_modules/@rari-capital/\",\":@rari-capital/solmate/=node_modules/@rari-capital/solmate/\",\":contracts/=contracts/\",\":ds-test/=node_modules/ds-test/src/\",\":forge-std/=node_modules/forge-std/src/\"]},\"sources\":{\"contracts/L1/L2OutputOracle.sol\":{\"keccak256\":\"0xedbefffc244badc0a6ccaa4eb19112d5527a4a5366e335186a46605b7fcb1174\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2e9c96610ca1955d166368322b65065944f7de8cdd638e4921548c378819895b\",\"dweb:/ipfs/QmUmqta7EjQ5Wr6uhgmeuEh5hdRxNpKmXBjJrjBYWk23Yi\"]},\"contracts/L1/OptimismPortal.sol\":{\"keccak256\":\"0x4ef7b68c74ec41fc277a34440f81c7a0819543af5dd9bd6afa6ef58a60be5c71\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b7364929db9c69b51ec9e833ec1a439558897d4d068eaf8de63a29128f06ca5a\",\"dweb:/ipfs/QmdqGYu4F5Xzok6vbcoo1UnsxXZ5odJDMw1bLmWjgaM8Dd\"]},\"contracts/L1/ResourceMetering.sol\":{\"keccak256\":\"0xcbb34b35a67da37c07bc9ddf900012b94605491e6845a8811fd5d6d9fff8aed6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://84f801cd1c3d30f13a9a537c550898ffb170a810d640e2138ff6efe16c76a6ca\",\"dweb:/ipfs/QmYR49Qv7nJey69r726QmkpAWwqukAN7CBXj3xn5KxHUcV\"]},\"contracts/libraries/Burn.sol\":{\"keccak256\":\"0x54233b226ba6919dc46d438bc790108d8f855001002a1b9c3c37aed7a83e5f3f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4051a4baca357a9191a6c9e3aa1593a17b69dd7915966e23e4cb269e9c1d9ed4\",\"dweb:/ipfs/QmadKjGKvxm53abVHQdsxrXBc8e9jXywu6vvhkAgjsx59J\"]},\"contracts/libraries/Bytes.sol\":{\"keccak256\":\"0x90538c876448b34513ece8e91dc3d541291f17263813f2baf7a0e93b09993f31\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://16bd9e3249cd8659fdfe03a4c77b4d72ff9d3abbde81054dcd37710d1e176e8f\",\"dweb:/ipfs/QmbQ9VBUJfzWUK2KneSFNjtiH4dmPKChsZSQVNFAXJrrrZ\"]},\"contracts/libraries/Encoding.sol\":{\"keccak256\":\"0xca8dce21b608bac08ae75d42879e90f5e7865fb29587df181a22a3b14ce21985\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://29b093d22061b4c499566cb35ce2755cce241ab9f02716cf9cdbdd81f9c47871\",\"dweb:/ipfs/QmdF4DHQUEeEeW67ugmEC3AHn6QrBBNYtwV7UaHaSTe2pa\"]},\"contracts/libraries/Hashing.sol\":{\"keccak256\":\"0xef5d0156a50f96bf32d34ef7a217872791b1b3c11baa9c13183a6388356a918d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b7790ae2e79906d26924f7b69e8a3610031db48cef4b6e306e923431def8ba86\",\"dweb:/ipfs/QmSGJEBv5XsDtsr2QTJnwGKXAXxqZafYGeZcRKKfw1yrUc\"]},\"contracts/libraries/SafeCall.sol\":{\"keccak256\":\"0xbb0621c028c18e9d5a54cf1a8136cf2e77f161de48aeb8d911e230f6b280c9ed\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://924ecc629c7642bc19e2f8a390f1b946d22862c8889453da681b5bc1a45d7703\",\"dweb:/ipfs/QmbNknQ8pzssXDXGVjXxzZ8zh1YnNCWtRJVepiM1TnqoqQ\"]},\"contracts/libraries/Types.sol\":{\"keccak256\":\"0x93045c0c97287a12e1bdde0685e26f185411b81b93b9df15c8cce90bccdcf77c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0c90b59d09f92aba5ab0862264efe2beb0f77fba750867f8d686a1f39ee6af2c\",\"dweb:/ipfs/QmW7Zj5d7NgDi5Mdv6jptJgfsUj8LvGroud9p2Z7vhcKLC\"]},\"contracts/libraries/rlp/RLPReader.sol\":{\"keccak256\":\"0xef51cf7340f3e3f6ff9f651d6b284831a38f1631635c5d72121ad9498caf15b3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://034c29eee4bc5ed4f0d013162d20c17cbc0ba5d26fd0cd477bcac0235e8266f0\",\"dweb:/ipfs/QmQZ1eFbqkVKAkKc4mXUCbGrdD6rE4sgzbzbSzS8RC4SCX\"]},\"contracts/libraries/rlp/RLPWriter.sol\":{\"keccak256\":\"0x5aa9d21c5b41c9786f23153f819d561ae809a1d55c7b0d423dfeafdfbacedc78\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://921c44e6a0982b9a4011900fda1bda2c06b7a85894967de98b407a83fe9f90c0\",\"dweb:/ipfs/QmSsHLKDUQ82kpKdqB6VntVGKuPDb4W9VdotsubuqWBzio\"]},\"contracts/libraries/trie/MerkleTrie.sol\":{\"keccak256\":\"0xbbf5b9e6b2ea942038ca5ed5722352c499019b0a0026edbda9a70f777aa2600d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2222d31689b9a41747a0082c8c8689ca7560ca69528f3901c73ca0d2efc2985f\",\"dweb:/ipfs/QmXHEZtsUkrGLGT9R5kHETRNwPURCVnrKKvbbmHpDUUHVj\"]},\"contracts/libraries/trie/SecureMerkleTrie.sol\":{\"keccak256\":\"0xd27ad3665179493bab93a4316bcd2a780bfec524f774226420e931acf8043ebb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b3ec639edab8c22e020dd7a108f69d7dc99f2e9d0bb9075e9aa41d4bd1f5cc03\",\"dweb:/ipfs/QmR9fMgKEVLNm4LPbpSEX9AepmELxX6JXNm2o8tCXceBSF\"]},\"contracts/universal/Semver.sol\":{\"keccak256\":\"0x8215e8fbaace5e06fdf0be26cd8ec224847cf03e89bd78dc8ba3ec2cb429d4fe\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cfe4869ad9a1a10aee499ed4ac74a19f9f95dd9173efa656f6b1728f6912a9ad\",\"dweb:/ipfs/QmbiKSxpNnKQv8jwEvGUJkksaLPp8UU8N1twbDimM3RhXr\"]},\"contracts/vendor/AddressAliasHelper.sol\":{\"keccak256\":\"0x6ecb83b4ec80fbe49c22f4f95d90482de64660ef5d422a19f4d4b04df31c1237\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://1d0885be6e473962f9a0622176a22300165ac0cc1a1d7f2e22b11c3d656ace88\",\"dweb:/ipfs/QmPRa3KmRpXW5P9ykveKRDgYN5zYo4cYLAYSnoqHX3KnXR\"]},\"node_modules/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d7fc8396619de513c96b6e00301b88dd790e83542aab918425633a5f7297a15a\",\"dweb:/ipfs/QmXbP4kiZyp7guuS7xe8KaybnwkRPGrBc2Kbi3vhcTfpxb\"]},\"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x0203dcadc5737d9ef2c211d6fa15d18ebc3b30dfa51903b64870b01a062b0b4e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6eb2fd1e9894dbe778f4b8131adecebe570689e63cf892f4e21257bfe1252497\",\"dweb:/ipfs/QmXgUGNfZvrn6N2miv3nooSs7Jm34A41qz94fu2GtDFcx8\"]},\"node_modules/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"keccak256\":\"0x611aa3f23e59cfdd1863c536776407b3e33d695152a266fa7cfb34440a29a8a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9b4b2110b7f2b3eb32951bc08046fa90feccffa594e1176cb91cdfb0e94726b4\",\"dweb:/ipfs/QmSxLwYjicf9zWFuieRc8WQwE4FisA1Um5jp1iSa731TGt\"]},\"node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c\",\"dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a\"]},\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6f2cf1c531122bc7ca96b8c8db6a60deae60441e5223065e792553d4849b5638\",\"dweb:/ipfs/QmPBdJmBBABMDCfyDjCbdxgiqRavgiSL88SYPGibgbPas9\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0xd15c3e400531f00203839159b2b8e7209c5158b35618f570c695b7e47f12e9f0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b600b852e0597aa69989cc263111f02097e2827edc1bdc70306303e3af5e9929\",\"dweb:/ipfs/QmU4WfM28A1nDqghuuGeFmN3CnVrk6opWtiF65K4vhFPeC\"]},\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0xb3ebde1c8d27576db912d87c3560dab14adfb9cd001be95890ec4ba035e652e7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a709421c4f5d4677db8216055d2d4dac96a613efdb08178a9f7041f0c5cef689\",\"dweb:/ipfs/QmYs2rStvVLDnSJs8HgaMD1ABwoKKWdiVbQyNfLfFWTjTy\"]},\"node_modules/@rari-capital/solmate/src/utils/FixedPointMathLib.sol\":{\"keccak256\":\"0x622fcd8a49e132df5ec7651cc6ae3aaf0cf59bdcd67a9a804a1b9e2485113b7d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://af77088eb606427d4c55e578984a615779c86bc30646a20f7bb27299ba390f7c\",\"dweb:/ipfs/QmZGQdhdQDtHc7gZXWrKXgA3govc74X8U63BiWhPQK3mK8\"]}},\"version\":1}", + "bytecode": "0x6101206040523480156200001257600080fd5b5060405162003f9e38038062003f9e833981016040819052620000359162000261565b6000608081905260a052600160c0526001600160a01b0382166101005260e08190526200006162000069565b50506200029d565b600054610100900460ff16158080156200008a5750600054600160ff909116105b80620000ba5750620000a730620001af60201b6200127b1760201c565b158015620000ba575060005460ff166001145b620001235760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801562000147576000805461ff0019166101001790555b603380546001600160a01b03191661dead17905562000165620001be565b8015620001ac576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6001600160a01b03163b151590565b600054610100900460ff166200022b5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016200011a565b60408051606081018252633b9aca0080825260006020830152436001600160401b031691909201819052600160c01b0217600155565b600080604083850312156200027557600080fd5b82516001600160a01b03811681146200028d57600080fd5b6020939093015192949293505050565b60805160a05160c05160e05161010051613ca7620002f76000396000818161013401528181610b690152610d900152600081816103bd015261155401526000610918015260006108ef015260006108c60152613ca76000f3fe6080604052600436106100f65760003560e01c8063a14238e71161008a578063cff0ab9611610059578063cff0ab96146102f7578063e9e05c4214610398578063f4daa291146103ab578063fdc9fe1d146103df57600080fd5b8063a14238e71461026d578063c4fc4798146102ad578063ca3e99ba146102cd578063cd7c9789146102e257600080fd5b80636bb0291e116100c65780636bb0291e146102005780638129fc1c14610215578063867ead131461022a5780639bf62d821461024057600080fd5b80621c2ff61461012257806313620abd1461018057806354fd4d50146101b957806364b79208146101db57600080fd5b3661011d5761011b3334620186a06000604051806020016040528060008152506103f2565b005b600080fd5b34801561012e57600080fd5b506101567f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561018c57600080fd5b50610198633b9aca0081565b6040516fffffffffffffffffffffffffffffffff9091168152602001610177565b3480156101c557600080fd5b506101ce6108bf565b60405161017791906132fa565b3480156101e757600080fd5b506101f2627a120081565b604051908152602001610177565b34801561020c57600080fd5b506101f2600481565b34801561022157600080fd5b5061011b610962565b34801561023657600080fd5b506101f261271081565b34801561024c57600080fd5b506033546101569073ffffffffffffffffffffffffffffffffffffffff1681565b34801561027957600080fd5b5061029d61028836600461330d565b60346020526000908152604090205460ff1681565b6040519015158152602001610177565b3480156102b957600080fd5b5061029d6102c836600461330d565b610b20565b3480156102d957600080fd5b506101f2610be5565b3480156102ee57600080fd5b506101f2600881565b34801561030357600080fd5b5060015461035f906fffffffffffffffffffffffffffffffff81169067ffffffffffffffff7001000000000000000000000000000000008204811691780100000000000000000000000000000000000000000000000090041683565b604080516fffffffffffffffffffffffffffffffff909416845267ffffffffffffffff9283166020850152911690820152606001610177565b61011b6103a6366004613452565b6103f2565b3480156103b757600080fd5b506101f27f000000000000000000000000000000000000000000000000000000000000000081565b61011b6103ed366004613540565b610bf6565b8260005a905083156104a95773ffffffffffffffffffffffffffffffffffffffff8716156104a957604080517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482015260248101919091527f4f7074696d69736d506f7274616c3a206d7573742073656e6420746f2061646460448201527f72657373283029207768656e206372656174696e67206120636f6e747261637460648201526084015b60405180910390fd5b333281146104ca575033731111000000000000000000000000000000001111015b600034888888886040516020016104e5959493929190613634565b604051602081830303815290604052905060008973ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fb3813568d9991fc951961fcb4c784893574240a28925604d09fc577c55bb7c328460405161055591906132fa565b60405180910390a45050600154600090610595907801000000000000000000000000000000000000000000000000900467ffffffffffffffff16436136c8565b9050801561071e5760006105ad6004627a120061370e565b6001546105d89190700100000000000000000000000000000000900467ffffffffffffffff16613776565b9050600060086105ec6004627a120061370e565b60015461060c9085906fffffffffffffffffffffffffffffffff166137ea565b610616919061370e565b610620919061370e565b60015490915060009061066c906106569061064e9085906fffffffffffffffffffffffffffffffff166138a6565b612710611297565b6fffffffffffffffffffffffffffffffff6112b2565b905060018411156106df576106dc610656670de0b6b3a76400006106c861069460088361370e565b6106a690670de0b6b3a7640000613776565b6106b160018a6136c8565b6106c390670de0b6b3a764000061391a565b6112c1565b6106d290856137ea565b61064e919061370e565b90505b6fffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff4316021760015550505b60018054849190601090610751908490700100000000000000000000000000000000900467ffffffffffffffff16613957565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550627a1200600160000160109054906101000a900467ffffffffffffffff1667ffffffffffffffff16131561082d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f5265736f757263654d65746572696e673a2063616e6e6f7420627579206d6f7260448201527f6520676173207468616e20617661696c61626c6520676173206c696d6974000060648201526084016104a0565b600154600090610859906fffffffffffffffffffffffffffffffff1667ffffffffffffffff8616613983565b6fffffffffffffffffffffffffffffffff169050600061087d48633b9aca006112f2565b61088790836139bb565b905060005a61089690866136c8565b9050808211156108b2576108b26108ad82846136c8565b611302565b5050505050505050505050565b60606108ea7f0000000000000000000000000000000000000000000000000000000000000000611330565b6109137f0000000000000000000000000000000000000000000000000000000000000000611330565b61093c7f0000000000000000000000000000000000000000000000000000000000000000611330565b60405160200161094e939291906139cf565b604051602081830303815290604052905090565b600054610100900460ff16158080156109825750600054600160ff909116105b8061099c5750303b15801561099c575060005460ff166001145b610a28576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016104a0565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610a8657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b603380547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055610aba61146d565b8015610b1d57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6040517fa25ae55700000000000000000000000000000000000000000000000000000000815260048101829052600090819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063a25ae557906024016040805180830381865afa158015610baf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd39190613a45565b9050610bde81611550565b9392505050565b610bf36004627a120061370e565b81565b60335473ffffffffffffffffffffffffffffffffffffffff1661dead14610c9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d506f7274616c3a2063616e206f6e6c79207472696767657260448201527f206f6e65207769746864726177616c20706572207472616e73616374696f6e0060648201526084016104a0565b3073ffffffffffffffffffffffffffffffffffffffff16856040015173ffffffffffffffffffffffffffffffffffffffff1603610d5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d506f7274616c3a20796f752063616e6e6f742073656e642060448201527f6d6573736167657320746f2074686520706f7274616c20636f6e74726163740060648201526084016104a0565b6040517fa25ae557000000000000000000000000000000000000000000000000000000008152600481018590526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a25ae557906024016040805180830381865afa158015610deb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0f9190613a45565b9050610e1a81611550565b610ea6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4f7074696d69736d506f7274616c3a2070726f706f73616c206973206e6f742060448201527f7965742066696e616c697a65640000000000000000000000000000000000000060648201526084016104a0565b610ebd610eb836869003860186613a94565b61158a565b815114610f4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f7074696d69736d506f7274616c3a20696e76616c6964206f7574707574207260448201527f6f6f742070726f6f66000000000000000000000000000000000000000000000060648201526084016104a0565b6000610f57876115e6565b9050610f9e81866040013586868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061161692505050565b61102a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4f7074696d69736d506f7274616c3a20696e76616c696420776974686472617760448201527f616c20696e636c7573696f6e2070726f6f66000000000000000000000000000060648201526084016104a0565b60008181526034602052604090205460ff16156110c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f4f7074696d69736d506f7274616c3a207769746864726177616c20686173206160448201527f6c7265616479206265656e2066696e616c697a6564000000000000000000000060648201526084016104a0565b600081815260346020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055608087015161111290614e2090613afa565b5a10156111a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4f7074696d69736d506f7274616c3a20696e73756666696369656e742067617360448201527f20746f2066696e616c697a65207769746864726177616c00000000000000000060648201526084016104a0565b8660200151603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000611204886040015189608001518a606001518b60a001516116dd565b603380547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead17905560405190915082907fdb5c7652857aa163daadd670e116628fb42e869d8ac4251ef8971d9e5727df1b9061126990841515815260200190565b60405180910390a25050505050505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6000818312156112a757816112a9565b825b90505b92915050565b60008183126112a757816112a9565b60006112a9670de0b6b3a7640000836112d9866116f7565b6112e391906137ea565b6112ed919061370e565b61193b565b6000818310156112a757816112a9565b6000805a90505b825a61131590836136c8565b101561132b5761132482613b12565b9150611309565b505050565b60608160000361137357505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b811561139d578061138781613b12565b91506113969050600a836139bb565b9150611377565b60008167ffffffffffffffff8111156113b8576113b861334f565b6040519080825280601f01601f1916602001820160405280156113e2576020820181803683370190505b5090505b8415611465576113f76001836136c8565b9150611404600a86613b4a565b61140f906030613afa565b60f81b81838151811061142457611424613b5e565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061145e600a866139bb565b94506113e6565b949350505050565b600054610100900460ff16611504576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016104a0565b60408051606081018252633b9aca00808252600060208301524367ffffffffffffffff169190920181905278010000000000000000000000000000000000000000000000000217600155565b60007f000000000000000000000000000000000000000000000000000000000000000082602001516115829190613afa565b421192915050565b600081600001518260200151836040015184606001516040516020016115c9949392919093845260208401929092526040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b80516020808301516040808501516060860151608087015160a088015193516000976115c9979096959101613b8d565b604080516020810185905260009181018290528190606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828252805160209182012090830181905292506116d49101604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828201909152600182527f01000000000000000000000000000000000000000000000000000000000000006020830152908587611b7a565b95945050505050565b600080600080845160208601878a8af19695505050505050565b6000808213611762576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f554e444546494e4544000000000000000000000000000000000000000000000060448201526064016104a0565b6000606061176f84611b9e565b03609f8181039490941b90931c6c465772b2bbbb5f824b15207a3081018102606090811d6d0388eaa27412d5aca026815d636e018202811d6d0df99ac502031bf953eff472fdcc018202811d6d13cdffb29d51d99322bdff5f2211018202811d6d0a0f742023def783a307a986912e018202811d6d01920d8043ca89b5239253284e42018202811d6c0b7a86d7375468fac667a0a527016c29508e458543d8aa4df2abee7883018302821d6d0139601a2efabe717e604cbb4894018302821d6d02247f7a7b6594320649aa03aba1018302821d7fffffffffffffffffffffffffffffffffffffff73c0c716a594e00d54e3c4cbc9018302821d7ffffffffffffffffffffffffffffffffffffffdc7b88c420e53a9890533129f6f01830290911d7fffffffffffffffffffffffffffffffffffffff465fda27eb4d63ded474e5f832019091027ffffffffffffffff5f6af8f7b3396644f18e157960000000000000000000000000105711340daa0d5f769dba1915cef59f0815a5506027d0267a36c0c95b3975ab3ee5b203a7614a3f75373f047d803ae7b6687f2b393909302929092017d57115e47018c7177eebf7cd370a3356a1b7863008a5ae8028c72b88642840160ae1d92915050565b60007ffffffffffffffffffffffffffffffffffffffffffffffffdb731c958f34d94c1821361196c57506000919050565b680755bf798b4a1bf1e582126119de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4558505f4f564552464c4f57000000000000000000000000000000000000000060448201526064016104a0565b6503782dace9d9604e83901b059150600060606bb17217f7d1cf79abc9e3b39884821b056b80000000000000000000000001901d6bb17217f7d1cf79abc9e3b39881029093037fffffffffffffffffffffffffffffffffffffffdbf3ccf1604d263450f02a550481018102606090811d6d0277594991cfc85f6e2461837cd9018202811d7fffffffffffffffffffffffffffffffffffffe5adedaa1cb095af9e4da10e363c018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d7ffffffffffffffffffffffffffffffffffffd38dc772608b0ae56cce01296c0eb018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084017ffffffffffffffffffffffffffffffffffffffe2c69812cf03b0763fd454a8f7e010290911d6e0587f503bb6ea29d25fcb7401964500190910279d835ebba824c98fb31b83b2ca45c000000000000000000000000010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b600080611b8686611c74565b9050611b9481868686611ca6565b9695505050505050565b6000808211611c09576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f554e444546494e4544000000000000000000000000000000000000000000000060448201526064016104a0565b5060016fffffffffffffffffffffffffffffffff821160071b82811c67ffffffffffffffff1060061b1782811c63ffffffff1060051b1782811c61ffff1060041b1782811c60ff10600390811b90911783811c600f1060021b1783811c909110821b1791821c111790565b60608180519060200120604051602001611c9091815260200190565b6040516020818303038152906040529050919050565b6000806000611cb6878686611ce3565b91509150818015611cd857508051602080830191909120875191880191909120145b979650505050505050565b600060606000611cf285611dfe565b90506000806000611d04848a89611ef9565b81519295509093509150158080611d185750815b611da4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4d65726b6c65547269653a2070726f76696465642070726f6f6620697320696e60448201527f76616c696400000000000000000000000000000000000000000000000000000060648201526084016104a0565b600081611dc05760405180602001604052806000815250611dec565b611dec86611dcf6001886136c8565b81518110611ddf57611ddf613b5e565b6020026020010151612482565b919b919a509098505050505050505050565b60606000611e0b836124ac565b90506000815167ffffffffffffffff811115611e2957611e2961334f565b604051908082528060200260200182016040528015611e6e57816020015b6040805180820190915260608082526020820152815260200190600190039081611e475790505b50905060005b8251811015611ef1576000611ea1848381518110611e9457611e94613b5e565b60200260200101516124df565b90506040518060400160405280828152602001611ebd836124ac565b815250838381518110611ed257611ed2613b5e565b6020026020010181905250508080611ee990613b12565b915050611e74565b509392505050565b60006060818080611f09876125a6565b90506000869050600080611f30604051806040016040528060608152602001606081525090565b60005b8c5181101561243e578c8181518110611f4e57611f4e613b5e565b602002602001015191508284611f649190613afa565b9350611f71600188613afa565b965083600003611ff257815180516020909101208514611fed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4d65726b6c65547269653a20696e76616c696420726f6f74206861736800000060448201526064016104a0565b61212e565b81515160201161209457815180516020909101208514611fed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4d65726b6c65547269653a20696e76616c6964206c6172676520696e7465726e60448201527f616c20686173680000000000000000000000000000000000000000000000000060648201526084016104a0565b815185906120a190613be4565b1461212e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4d65726b6c65547269653a20696e76616c696420696e7465726e616c206e6f6460448201527f652068617368000000000000000000000000000000000000000000000000000060648201526084016104a0565b61213a60106001613afa565b826020015151036121ac578551841461243e57600086858151811061216157612161613b5e565b602001015160f81c60f81b60f81c9050600083602001518260ff168151811061218c5761218c613b5e565b6020026020010151905061219f81612729565b965060019450505061242c565b6002826020015151036123a45760006121c48361275f565b90506000816000815181106121db576121db613b5e565b016020015160f81c905060006121f2600283613c26565b6121fd906002613c48565b9050600061220e848360ff16612783565b9050600061221c8b8a612783565b9050600061222a83836127b9565b905060ff851660021480612241575060ff85166003145b15612297578083511480156122565750808251145b1561226857612265818b613afa565b99505b507f8000000000000000000000000000000000000000000000000000000000000000995061243e945050505050565b60ff851615806122aa575060ff85166001145b1561231c57825181146122e657507f8000000000000000000000000000000000000000000000000000000000000000995061243e945050505050565b61230d886020015160018151811061230057612300613b5e565b6020026020010151612729565b9a50975061242c945050505050565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4d65726b6c65547269653a2072656365697665642061206e6f6465207769746860448201527f20616e20756e6b6e6f776e20707265666978000000000000000000000000000060648201526084016104a0565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f4d65726b6c65547269653a20726563656976656420616e20756e70617273656160448201527f626c65206e6f646500000000000000000000000000000000000000000000000060648201526084016104a0565b8061243681613b12565b915050611f33565b507f800000000000000000000000000000000000000000000000000000000000000084148661246d8786612783565b909e909d50909b509950505050505050505050565b602081015180516060916112ac9161249c906001906136c8565b81518110611e9457611e94613b5e565b6040805180820182526000808252602091820152815180830190925282518252808301908201526060906112ac90612865565b606060008060006124ef85612abe565b91945092509050600081600181111561250a5761250a613c6b565b14612597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f524c505265616465723a20696e76616c696420524c502062797465732076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016104a0565b6116d485602001518484612fa9565b60606000825160026125b8919061391a565b67ffffffffffffffff8111156125d0576125d061334f565b6040519080825280601f01601f1916602001820160405280156125fa576020820181803683370190505b50905060005b835181101561272257600484828151811061261d5761261d613b5e565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016901c8261265283600261391a565b8151811061266257612662613b5e565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060108482815181106126a5576126a5613b5e565b01602001516126b7919060f81c613c26565b60f81b826126c683600261391a565b6126d1906001613afa565b815181106126e1576126e1613b5e565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508061271a81613b12565b915050612600565b5092915050565b6000606060208360000151101561274a5761274383613087565b9050612756565b612753836124df565b90505b610bde81613be4565b60606112ac61277e8360200151600081518110611e9457611e94613b5e565b6125a6565b6060825182106127a257506040805160208101909152600081526112ac565b6112a983838486516127b491906136c8565b613092565b6000805b8084511180156127cd5750808351115b801561284e57508281815181106127e6576127e6613b5e565b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191684828151811061282557612825613b5e565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016145b156112a9578061285d81613b12565b9150506127bd565b606060008061287384612abe565b9193509091506001905081600181111561288f5761288f613c6b565b1461291c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f524c505265616465723a20696e76616c696420524c50206c6973742076616c7560448201527f650000000000000000000000000000000000000000000000000000000000000060648201526084016104a0565b6040805160208082526104208201909252600091816020015b60408051808201909152600080825260208201528152602001906001900390816129355790505090506000835b8651811015612ab357602082106129fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f524c505265616465723a2070726f766964656420524c50206c6973742065786360448201527f65656473206d6178206c697374206c656e67746800000000000000000000000060648201526084016104a0565b600080612a386040518060400160405280858c60000151612a1c91906136c8565b8152602001858c60200151612a319190613afa565b9052612abe565b509150915060405180604001604052808383612a549190613afa565b8152602001848b60200151612a699190613afa565b815250858581518110612a7e57612a7e613b5e565b6020908102919091010152612a94600185613afa565b9350612aa08183613afa565b612aaa9084613afa565b92505050612962565b508152949350505050565b600080600080846000015111612b56576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f524c505265616465723a20524c50206974656d2063616e6e6f74206265206e7560448201527f6c6c00000000000000000000000000000000000000000000000000000000000060648201526084016104a0565b6020840151805160001a607f8111612b7b576000600160009450945094505050612fa2565b60b78111612c37576000612b906080836136c8565b905080876000015111612c25576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f524c505265616465723a20696e76616c696420524c502073686f72742073747260448201527f696e67000000000000000000000000000000000000000000000000000000000060648201526084016104a0565b60019550935060009250612fa2915050565b60bf8111612da6576000612c4c60b7836136c8565b905080876000015111612ce1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67207374726960448201527f6e67206c656e677468000000000000000000000000000000000000000000000060648201526084016104a0565b600183015160208290036101000a9004612cfb8183613afa565b885111612d8a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67207374726960448201527f6e6700000000000000000000000000000000000000000000000000000000000060648201526084016104a0565b612d95826001613afa565b9650945060009350612fa292505050565b60f78111612e61576000612dbb60c0836136c8565b905080876000015111612e50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f524c505265616465723a20696e76616c696420524c502073686f7274206c697360448201527f740000000000000000000000000000000000000000000000000000000000000060648201526084016104a0565b600195509350849250612fa2915050565b6000612e6e60f7836136c8565b905080876000015111612f03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67206c69737460448201527f206c656e6774680000000000000000000000000000000000000000000000000060648201526084016104a0565b600183015160208290036101000a9004612f1d8183613afa565b885111612f86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67206c69737460448201526064016104a0565b612f91826001613afa565b9650945060019350612fa292505050565b9193909250565b606060008267ffffffffffffffff811115612fc657612fc661334f565b6040519080825280601f01601f191660200182016040528015612ff0576020820181803683370190505b5090508051600003613003579050610bde565b600061300f8587613afa565b90506020820160005b6130236020876139bb565b81101561305a5782518252613039602084613afa565b9250613046602083613afa565b91508061305281613b12565b915050613018565b5060006001602087066020036101000a039050808251168119845116178252839450505050509392505050565b60606112ac8261326a565b60608182601f011015613101576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f7700000000000000000000000000000000000060448201526064016104a0565b82828401101561316d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f7700000000000000000000000000000000000060448201526064016104a0565b818301845110156131da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f736c6963655f6f75744f66426f756e647300000000000000000000000000000060448201526064016104a0565b6060821580156131f95760405191506000825260208201604052613261565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561323257805183526020928301920161321a565b5050858452601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016604052505b50949350505050565b60606112ac826020015160008460000151612fa9565b60005b8381101561329b578181015183820152602001613283565b838111156132aa576000848401525b50505050565b600081518084526132c8816020860160208601613280565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006112a960208301846132b0565b60006020828403121561331f57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461334a57600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160c0810167ffffffffffffffff811182821017156133a1576133a161334f565b60405290565b600082601f8301126133b857600080fd5b813567ffffffffffffffff808211156133d3576133d361334f565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156134195761341961334f565b8160405283815286602085880101111561343257600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a0868803121561346a57600080fd5b61347386613326565b945060208601359350604086013567ffffffffffffffff808216821461349857600080fd5b90935060608701359081151582146134af57600080fd5b909250608087013590808211156134c557600080fd5b506134d2888289016133a7565b9150509295509295909350565b6000608082840312156134f157600080fd5b50919050565b60008083601f84011261350957600080fd5b50813567ffffffffffffffff81111561352157600080fd5b60208301915083602082850101111561353957600080fd5b9250929050565b600080600080600060e0868803121561355857600080fd5b853567ffffffffffffffff8082111561357057600080fd5b9087019060c0828a03121561358457600080fd5b61358c61337e565b8235815261359c60208401613326565b60208201526135ad60408401613326565b6040820152606083013560608201526080830135608082015260a0830135828111156135d857600080fd5b6135e48b8286016133a7565b60a0830152509650602088013595506136008960408a016134df565b945060c088013591508082111561361657600080fd5b50613623888289016134f7565b969995985093965092949392505050565b8581528460208201527fffffffffffffffff0000000000000000000000000000000000000000000000008460c01b16604082015282151560f81b604882015260008251613688816049850160208701613280565b919091016049019695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000828210156136da576136da613699565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261371d5761371d6136df565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f80000000000000000000000000000000000000000000000000000000000000008314161561377157613771613699565b500590565b6000808312837f8000000000000000000000000000000000000000000000000000000000000000018312811516156137b0576137b0613699565b837f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0183138116156137e4576137e4613699565b50500390565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60008413600084138583048511828216161561382b5761382b613699565b7f8000000000000000000000000000000000000000000000000000000000000000600087128682058812818416161561386657613866613699565b6000871292508782058712848416161561388257613882613699565b8785058712818416161561389857613898613699565b505050929093029392505050565b6000808212827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038413811516156138e0576138e0613699565b827f800000000000000000000000000000000000000000000000000000000000000003841281161561391457613914613699565b50500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561395257613952613699565b500290565b600067ffffffffffffffff80831681851680830382111561397a5761397a613699565b01949350505050565b60006fffffffffffffffffffffffffffffffff808316818516818304811182151516156139b2576139b2613699565b02949350505050565b6000826139ca576139ca6136df565b500490565b600084516139e1818460208901613280565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551613a1d816001850160208a01613280565b60019201918201528351613a38816002840160208801613280565b0160020195945050505050565b600060408284031215613a5757600080fd5b6040516040810181811067ffffffffffffffff82111715613a7a57613a7a61334f565b604052825181526020928301519281019290925250919050565b600060808284031215613aa657600080fd5b6040516080810181811067ffffffffffffffff82111715613ac957613ac961334f565b8060405250823581526020830135602082015260408301356040820152606083013560608201528091505092915050565b60008219821115613b0d57613b0d613699565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b4357613b43613699565b5060010190565b600082613b5957613b596136df565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a0830152613bd860c08301846132b0565b98975050505050505050565b805160208083015191908110156134f1577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60209190910360031b1b16919050565b600060ff831680613c3957613c396136df565b8060ff84160691505092915050565b600060ff821660ff841680821015613c6257613c62613699565b90039392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea164736f6c634300080f000a", + "deployedBytecode": "0x6080604052600436106100f65760003560e01c8063a14238e71161008a578063cff0ab9611610059578063cff0ab96146102f7578063e9e05c4214610398578063f4daa291146103ab578063fdc9fe1d146103df57600080fd5b8063a14238e71461026d578063c4fc4798146102ad578063ca3e99ba146102cd578063cd7c9789146102e257600080fd5b80636bb0291e116100c65780636bb0291e146102005780638129fc1c14610215578063867ead131461022a5780639bf62d821461024057600080fd5b80621c2ff61461012257806313620abd1461018057806354fd4d50146101b957806364b79208146101db57600080fd5b3661011d5761011b3334620186a06000604051806020016040528060008152506103f2565b005b600080fd5b34801561012e57600080fd5b506101567f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561018c57600080fd5b50610198633b9aca0081565b6040516fffffffffffffffffffffffffffffffff9091168152602001610177565b3480156101c557600080fd5b506101ce6108bf565b60405161017791906132fa565b3480156101e757600080fd5b506101f2627a120081565b604051908152602001610177565b34801561020c57600080fd5b506101f2600481565b34801561022157600080fd5b5061011b610962565b34801561023657600080fd5b506101f261271081565b34801561024c57600080fd5b506033546101569073ffffffffffffffffffffffffffffffffffffffff1681565b34801561027957600080fd5b5061029d61028836600461330d565b60346020526000908152604090205460ff1681565b6040519015158152602001610177565b3480156102b957600080fd5b5061029d6102c836600461330d565b610b20565b3480156102d957600080fd5b506101f2610be5565b3480156102ee57600080fd5b506101f2600881565b34801561030357600080fd5b5060015461035f906fffffffffffffffffffffffffffffffff81169067ffffffffffffffff7001000000000000000000000000000000008204811691780100000000000000000000000000000000000000000000000090041683565b604080516fffffffffffffffffffffffffffffffff909416845267ffffffffffffffff9283166020850152911690820152606001610177565b61011b6103a6366004613452565b6103f2565b3480156103b757600080fd5b506101f27f000000000000000000000000000000000000000000000000000000000000000081565b61011b6103ed366004613540565b610bf6565b8260005a905083156104a95773ffffffffffffffffffffffffffffffffffffffff8716156104a957604080517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482015260248101919091527f4f7074696d69736d506f7274616c3a206d7573742073656e6420746f2061646460448201527f72657373283029207768656e206372656174696e67206120636f6e747261637460648201526084015b60405180910390fd5b333281146104ca575033731111000000000000000000000000000000001111015b600034888888886040516020016104e5959493929190613634565b604051602081830303815290604052905060008973ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fb3813568d9991fc951961fcb4c784893574240a28925604d09fc577c55bb7c328460405161055591906132fa565b60405180910390a45050600154600090610595907801000000000000000000000000000000000000000000000000900467ffffffffffffffff16436136c8565b9050801561071e5760006105ad6004627a120061370e565b6001546105d89190700100000000000000000000000000000000900467ffffffffffffffff16613776565b9050600060086105ec6004627a120061370e565b60015461060c9085906fffffffffffffffffffffffffffffffff166137ea565b610616919061370e565b610620919061370e565b60015490915060009061066c906106569061064e9085906fffffffffffffffffffffffffffffffff166138a6565b612710611297565b6fffffffffffffffffffffffffffffffff6112b2565b905060018411156106df576106dc610656670de0b6b3a76400006106c861069460088361370e565b6106a690670de0b6b3a7640000613776565b6106b160018a6136c8565b6106c390670de0b6b3a764000061391a565b6112c1565b6106d290856137ea565b61064e919061370e565b90505b6fffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff4316021760015550505b60018054849190601090610751908490700100000000000000000000000000000000900467ffffffffffffffff16613957565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550627a1200600160000160109054906101000a900467ffffffffffffffff1667ffffffffffffffff16131561082d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f5265736f757263654d65746572696e673a2063616e6e6f7420627579206d6f7260448201527f6520676173207468616e20617661696c61626c6520676173206c696d6974000060648201526084016104a0565b600154600090610859906fffffffffffffffffffffffffffffffff1667ffffffffffffffff8616613983565b6fffffffffffffffffffffffffffffffff169050600061087d48633b9aca006112f2565b61088790836139bb565b905060005a61089690866136c8565b9050808211156108b2576108b26108ad82846136c8565b611302565b5050505050505050505050565b60606108ea7f0000000000000000000000000000000000000000000000000000000000000000611330565b6109137f0000000000000000000000000000000000000000000000000000000000000000611330565b61093c7f0000000000000000000000000000000000000000000000000000000000000000611330565b60405160200161094e939291906139cf565b604051602081830303815290604052905090565b600054610100900460ff16158080156109825750600054600160ff909116105b8061099c5750303b15801561099c575060005460ff166001145b610a28576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016104a0565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610a8657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b603380547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055610aba61146d565b8015610b1d57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6040517fa25ae55700000000000000000000000000000000000000000000000000000000815260048101829052600090819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063a25ae557906024016040805180830381865afa158015610baf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd39190613a45565b9050610bde81611550565b9392505050565b610bf36004627a120061370e565b81565b60335473ffffffffffffffffffffffffffffffffffffffff1661dead14610c9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d506f7274616c3a2063616e206f6e6c79207472696767657260448201527f206f6e65207769746864726177616c20706572207472616e73616374696f6e0060648201526084016104a0565b3073ffffffffffffffffffffffffffffffffffffffff16856040015173ffffffffffffffffffffffffffffffffffffffff1603610d5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d506f7274616c3a20796f752063616e6e6f742073656e642060448201527f6d6573736167657320746f2074686520706f7274616c20636f6e74726163740060648201526084016104a0565b6040517fa25ae557000000000000000000000000000000000000000000000000000000008152600481018590526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a25ae557906024016040805180830381865afa158015610deb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0f9190613a45565b9050610e1a81611550565b610ea6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4f7074696d69736d506f7274616c3a2070726f706f73616c206973206e6f742060448201527f7965742066696e616c697a65640000000000000000000000000000000000000060648201526084016104a0565b610ebd610eb836869003860186613a94565b61158a565b815114610f4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f7074696d69736d506f7274616c3a20696e76616c6964206f7574707574207260448201527f6f6f742070726f6f66000000000000000000000000000000000000000000000060648201526084016104a0565b6000610f57876115e6565b9050610f9e81866040013586868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061161692505050565b61102a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4f7074696d69736d506f7274616c3a20696e76616c696420776974686472617760448201527f616c20696e636c7573696f6e2070726f6f66000000000000000000000000000060648201526084016104a0565b60008181526034602052604090205460ff16156110c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f4f7074696d69736d506f7274616c3a207769746864726177616c20686173206160448201527f6c7265616479206265656e2066696e616c697a6564000000000000000000000060648201526084016104a0565b600081815260346020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055608087015161111290614e2090613afa565b5a10156111a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4f7074696d69736d506f7274616c3a20696e73756666696369656e742067617360448201527f20746f2066696e616c697a65207769746864726177616c00000000000000000060648201526084016104a0565b8660200151603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000611204886040015189608001518a606001518b60a001516116dd565b603380547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead17905560405190915082907fdb5c7652857aa163daadd670e116628fb42e869d8ac4251ef8971d9e5727df1b9061126990841515815260200190565b60405180910390a25050505050505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6000818312156112a757816112a9565b825b90505b92915050565b60008183126112a757816112a9565b60006112a9670de0b6b3a7640000836112d9866116f7565b6112e391906137ea565b6112ed919061370e565b61193b565b6000818310156112a757816112a9565b6000805a90505b825a61131590836136c8565b101561132b5761132482613b12565b9150611309565b505050565b60608160000361137357505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b811561139d578061138781613b12565b91506113969050600a836139bb565b9150611377565b60008167ffffffffffffffff8111156113b8576113b861334f565b6040519080825280601f01601f1916602001820160405280156113e2576020820181803683370190505b5090505b8415611465576113f76001836136c8565b9150611404600a86613b4a565b61140f906030613afa565b60f81b81838151811061142457611424613b5e565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061145e600a866139bb565b94506113e6565b949350505050565b600054610100900460ff16611504576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016104a0565b60408051606081018252633b9aca00808252600060208301524367ffffffffffffffff169190920181905278010000000000000000000000000000000000000000000000000217600155565b60007f000000000000000000000000000000000000000000000000000000000000000082602001516115829190613afa565b421192915050565b600081600001518260200151836040015184606001516040516020016115c9949392919093845260208401929092526040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b80516020808301516040808501516060860151608087015160a088015193516000976115c9979096959101613b8d565b604080516020810185905260009181018290528190606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828252805160209182012090830181905292506116d49101604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828201909152600182527f01000000000000000000000000000000000000000000000000000000000000006020830152908587611b7a565b95945050505050565b600080600080845160208601878a8af19695505050505050565b6000808213611762576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f554e444546494e4544000000000000000000000000000000000000000000000060448201526064016104a0565b6000606061176f84611b9e565b03609f8181039490941b90931c6c465772b2bbbb5f824b15207a3081018102606090811d6d0388eaa27412d5aca026815d636e018202811d6d0df99ac502031bf953eff472fdcc018202811d6d13cdffb29d51d99322bdff5f2211018202811d6d0a0f742023def783a307a986912e018202811d6d01920d8043ca89b5239253284e42018202811d6c0b7a86d7375468fac667a0a527016c29508e458543d8aa4df2abee7883018302821d6d0139601a2efabe717e604cbb4894018302821d6d02247f7a7b6594320649aa03aba1018302821d7fffffffffffffffffffffffffffffffffffffff73c0c716a594e00d54e3c4cbc9018302821d7ffffffffffffffffffffffffffffffffffffffdc7b88c420e53a9890533129f6f01830290911d7fffffffffffffffffffffffffffffffffffffff465fda27eb4d63ded474e5f832019091027ffffffffffffffff5f6af8f7b3396644f18e157960000000000000000000000000105711340daa0d5f769dba1915cef59f0815a5506027d0267a36c0c95b3975ab3ee5b203a7614a3f75373f047d803ae7b6687f2b393909302929092017d57115e47018c7177eebf7cd370a3356a1b7863008a5ae8028c72b88642840160ae1d92915050565b60007ffffffffffffffffffffffffffffffffffffffffffffffffdb731c958f34d94c1821361196c57506000919050565b680755bf798b4a1bf1e582126119de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4558505f4f564552464c4f57000000000000000000000000000000000000000060448201526064016104a0565b6503782dace9d9604e83901b059150600060606bb17217f7d1cf79abc9e3b39884821b056b80000000000000000000000001901d6bb17217f7d1cf79abc9e3b39881029093037fffffffffffffffffffffffffffffffffffffffdbf3ccf1604d263450f02a550481018102606090811d6d0277594991cfc85f6e2461837cd9018202811d7fffffffffffffffffffffffffffffffffffffe5adedaa1cb095af9e4da10e363c018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d7ffffffffffffffffffffffffffffffffffffd38dc772608b0ae56cce01296c0eb018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084017ffffffffffffffffffffffffffffffffffffffe2c69812cf03b0763fd454a8f7e010290911d6e0587f503bb6ea29d25fcb7401964500190910279d835ebba824c98fb31b83b2ca45c000000000000000000000000010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b600080611b8686611c74565b9050611b9481868686611ca6565b9695505050505050565b6000808211611c09576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f554e444546494e4544000000000000000000000000000000000000000000000060448201526064016104a0565b5060016fffffffffffffffffffffffffffffffff821160071b82811c67ffffffffffffffff1060061b1782811c63ffffffff1060051b1782811c61ffff1060041b1782811c60ff10600390811b90911783811c600f1060021b1783811c909110821b1791821c111790565b60608180519060200120604051602001611c9091815260200190565b6040516020818303038152906040529050919050565b6000806000611cb6878686611ce3565b91509150818015611cd857508051602080830191909120875191880191909120145b979650505050505050565b600060606000611cf285611dfe565b90506000806000611d04848a89611ef9565b81519295509093509150158080611d185750815b611da4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4d65726b6c65547269653a2070726f76696465642070726f6f6620697320696e60448201527f76616c696400000000000000000000000000000000000000000000000000000060648201526084016104a0565b600081611dc05760405180602001604052806000815250611dec565b611dec86611dcf6001886136c8565b81518110611ddf57611ddf613b5e565b6020026020010151612482565b919b919a509098505050505050505050565b60606000611e0b836124ac565b90506000815167ffffffffffffffff811115611e2957611e2961334f565b604051908082528060200260200182016040528015611e6e57816020015b6040805180820190915260608082526020820152815260200190600190039081611e475790505b50905060005b8251811015611ef1576000611ea1848381518110611e9457611e94613b5e565b60200260200101516124df565b90506040518060400160405280828152602001611ebd836124ac565b815250838381518110611ed257611ed2613b5e565b6020026020010181905250508080611ee990613b12565b915050611e74565b509392505050565b60006060818080611f09876125a6565b90506000869050600080611f30604051806040016040528060608152602001606081525090565b60005b8c5181101561243e578c8181518110611f4e57611f4e613b5e565b602002602001015191508284611f649190613afa565b9350611f71600188613afa565b965083600003611ff257815180516020909101208514611fed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4d65726b6c65547269653a20696e76616c696420726f6f74206861736800000060448201526064016104a0565b61212e565b81515160201161209457815180516020909101208514611fed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4d65726b6c65547269653a20696e76616c6964206c6172676520696e7465726e60448201527f616c20686173680000000000000000000000000000000000000000000000000060648201526084016104a0565b815185906120a190613be4565b1461212e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4d65726b6c65547269653a20696e76616c696420696e7465726e616c206e6f6460448201527f652068617368000000000000000000000000000000000000000000000000000060648201526084016104a0565b61213a60106001613afa565b826020015151036121ac578551841461243e57600086858151811061216157612161613b5e565b602001015160f81c60f81b60f81c9050600083602001518260ff168151811061218c5761218c613b5e565b6020026020010151905061219f81612729565b965060019450505061242c565b6002826020015151036123a45760006121c48361275f565b90506000816000815181106121db576121db613b5e565b016020015160f81c905060006121f2600283613c26565b6121fd906002613c48565b9050600061220e848360ff16612783565b9050600061221c8b8a612783565b9050600061222a83836127b9565b905060ff851660021480612241575060ff85166003145b15612297578083511480156122565750808251145b1561226857612265818b613afa565b99505b507f8000000000000000000000000000000000000000000000000000000000000000995061243e945050505050565b60ff851615806122aa575060ff85166001145b1561231c57825181146122e657507f8000000000000000000000000000000000000000000000000000000000000000995061243e945050505050565b61230d886020015160018151811061230057612300613b5e565b6020026020010151612729565b9a50975061242c945050505050565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4d65726b6c65547269653a2072656365697665642061206e6f6465207769746860448201527f20616e20756e6b6e6f776e20707265666978000000000000000000000000000060648201526084016104a0565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f4d65726b6c65547269653a20726563656976656420616e20756e70617273656160448201527f626c65206e6f646500000000000000000000000000000000000000000000000060648201526084016104a0565b8061243681613b12565b915050611f33565b507f800000000000000000000000000000000000000000000000000000000000000084148661246d8786612783565b909e909d50909b509950505050505050505050565b602081015180516060916112ac9161249c906001906136c8565b81518110611e9457611e94613b5e565b6040805180820182526000808252602091820152815180830190925282518252808301908201526060906112ac90612865565b606060008060006124ef85612abe565b91945092509050600081600181111561250a5761250a613c6b565b14612597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f524c505265616465723a20696e76616c696420524c502062797465732076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016104a0565b6116d485602001518484612fa9565b60606000825160026125b8919061391a565b67ffffffffffffffff8111156125d0576125d061334f565b6040519080825280601f01601f1916602001820160405280156125fa576020820181803683370190505b50905060005b835181101561272257600484828151811061261d5761261d613b5e565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016901c8261265283600261391a565b8151811061266257612662613b5e565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060108482815181106126a5576126a5613b5e565b01602001516126b7919060f81c613c26565b60f81b826126c683600261391a565b6126d1906001613afa565b815181106126e1576126e1613b5e565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508061271a81613b12565b915050612600565b5092915050565b6000606060208360000151101561274a5761274383613087565b9050612756565b612753836124df565b90505b610bde81613be4565b60606112ac61277e8360200151600081518110611e9457611e94613b5e565b6125a6565b6060825182106127a257506040805160208101909152600081526112ac565b6112a983838486516127b491906136c8565b613092565b6000805b8084511180156127cd5750808351115b801561284e57508281815181106127e6576127e6613b5e565b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191684828151811061282557612825613b5e565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016145b156112a9578061285d81613b12565b9150506127bd565b606060008061287384612abe565b9193509091506001905081600181111561288f5761288f613c6b565b1461291c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f524c505265616465723a20696e76616c696420524c50206c6973742076616c7560448201527f650000000000000000000000000000000000000000000000000000000000000060648201526084016104a0565b6040805160208082526104208201909252600091816020015b60408051808201909152600080825260208201528152602001906001900390816129355790505090506000835b8651811015612ab357602082106129fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f524c505265616465723a2070726f766964656420524c50206c6973742065786360448201527f65656473206d6178206c697374206c656e67746800000000000000000000000060648201526084016104a0565b600080612a386040518060400160405280858c60000151612a1c91906136c8565b8152602001858c60200151612a319190613afa565b9052612abe565b509150915060405180604001604052808383612a549190613afa565b8152602001848b60200151612a699190613afa565b815250858581518110612a7e57612a7e613b5e565b6020908102919091010152612a94600185613afa565b9350612aa08183613afa565b612aaa9084613afa565b92505050612962565b508152949350505050565b600080600080846000015111612b56576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f524c505265616465723a20524c50206974656d2063616e6e6f74206265206e7560448201527f6c6c00000000000000000000000000000000000000000000000000000000000060648201526084016104a0565b6020840151805160001a607f8111612b7b576000600160009450945094505050612fa2565b60b78111612c37576000612b906080836136c8565b905080876000015111612c25576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f524c505265616465723a20696e76616c696420524c502073686f72742073747260448201527f696e67000000000000000000000000000000000000000000000000000000000060648201526084016104a0565b60019550935060009250612fa2915050565b60bf8111612da6576000612c4c60b7836136c8565b905080876000015111612ce1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67207374726960448201527f6e67206c656e677468000000000000000000000000000000000000000000000060648201526084016104a0565b600183015160208290036101000a9004612cfb8183613afa565b885111612d8a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67207374726960448201527f6e6700000000000000000000000000000000000000000000000000000000000060648201526084016104a0565b612d95826001613afa565b9650945060009350612fa292505050565b60f78111612e61576000612dbb60c0836136c8565b905080876000015111612e50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f524c505265616465723a20696e76616c696420524c502073686f7274206c697360448201527f740000000000000000000000000000000000000000000000000000000000000060648201526084016104a0565b600195509350849250612fa2915050565b6000612e6e60f7836136c8565b905080876000015111612f03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67206c69737460448201527f206c656e6774680000000000000000000000000000000000000000000000000060648201526084016104a0565b600183015160208290036101000a9004612f1d8183613afa565b885111612f86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67206c69737460448201526064016104a0565b612f91826001613afa565b9650945060019350612fa292505050565b9193909250565b606060008267ffffffffffffffff811115612fc657612fc661334f565b6040519080825280601f01601f191660200182016040528015612ff0576020820181803683370190505b5090508051600003613003579050610bde565b600061300f8587613afa565b90506020820160005b6130236020876139bb565b81101561305a5782518252613039602084613afa565b9250613046602083613afa565b91508061305281613b12565b915050613018565b5060006001602087066020036101000a039050808251168119845116178252839450505050509392505050565b60606112ac8261326a565b60608182601f011015613101576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f7700000000000000000000000000000000000060448201526064016104a0565b82828401101561316d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f7700000000000000000000000000000000000060448201526064016104a0565b818301845110156131da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f736c6963655f6f75744f66426f756e647300000000000000000000000000000060448201526064016104a0565b6060821580156131f95760405191506000825260208201604052613261565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561323257805183526020928301920161321a565b5050858452601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016604052505b50949350505050565b60606112ac826020015160008460000151612fa9565b60005b8381101561329b578181015183820152602001613283565b838111156132aa576000848401525b50505050565b600081518084526132c8816020860160208601613280565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006112a960208301846132b0565b60006020828403121561331f57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461334a57600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160c0810167ffffffffffffffff811182821017156133a1576133a161334f565b60405290565b600082601f8301126133b857600080fd5b813567ffffffffffffffff808211156133d3576133d361334f565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156134195761341961334f565b8160405283815286602085880101111561343257600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a0868803121561346a57600080fd5b61347386613326565b945060208601359350604086013567ffffffffffffffff808216821461349857600080fd5b90935060608701359081151582146134af57600080fd5b909250608087013590808211156134c557600080fd5b506134d2888289016133a7565b9150509295509295909350565b6000608082840312156134f157600080fd5b50919050565b60008083601f84011261350957600080fd5b50813567ffffffffffffffff81111561352157600080fd5b60208301915083602082850101111561353957600080fd5b9250929050565b600080600080600060e0868803121561355857600080fd5b853567ffffffffffffffff8082111561357057600080fd5b9087019060c0828a03121561358457600080fd5b61358c61337e565b8235815261359c60208401613326565b60208201526135ad60408401613326565b6040820152606083013560608201526080830135608082015260a0830135828111156135d857600080fd5b6135e48b8286016133a7565b60a0830152509650602088013595506136008960408a016134df565b945060c088013591508082111561361657600080fd5b50613623888289016134f7565b969995985093965092949392505050565b8581528460208201527fffffffffffffffff0000000000000000000000000000000000000000000000008460c01b16604082015282151560f81b604882015260008251613688816049850160208701613280565b919091016049019695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000828210156136da576136da613699565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261371d5761371d6136df565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f80000000000000000000000000000000000000000000000000000000000000008314161561377157613771613699565b500590565b6000808312837f8000000000000000000000000000000000000000000000000000000000000000018312811516156137b0576137b0613699565b837f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0183138116156137e4576137e4613699565b50500390565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60008413600084138583048511828216161561382b5761382b613699565b7f8000000000000000000000000000000000000000000000000000000000000000600087128682058812818416161561386657613866613699565b6000871292508782058712848416161561388257613882613699565b8785058712818416161561389857613898613699565b505050929093029392505050565b6000808212827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038413811516156138e0576138e0613699565b827f800000000000000000000000000000000000000000000000000000000000000003841281161561391457613914613699565b50500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561395257613952613699565b500290565b600067ffffffffffffffff80831681851680830382111561397a5761397a613699565b01949350505050565b60006fffffffffffffffffffffffffffffffff808316818516818304811182151516156139b2576139b2613699565b02949350505050565b6000826139ca576139ca6136df565b500490565b600084516139e1818460208901613280565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551613a1d816001850160208a01613280565b60019201918201528351613a38816002840160208801613280565b0160020195945050505050565b600060408284031215613a5757600080fd5b6040516040810181811067ffffffffffffffff82111715613a7a57613a7a61334f565b604052825181526020928301519281019290925250919050565b600060808284031215613aa657600080fd5b6040516080810181811067ffffffffffffffff82111715613ac957613ac961334f565b8060405250823581526020830135602082015260408301356040820152606083013560608201528091505092915050565b60008219821115613b0d57613b0d613699565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b4357613b43613699565b5060010190565b600082613b5957613b596136df565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a0830152613bd860c08301846132b0565b98975050505050505050565b805160208083015191908110156134f1577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60209190910360031b1b16919050565b600060ff831680613c3957613c396136df565b8060ff84160691505092915050565b600060ff821660ff841680821015613c6257613c62613699565b90039392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea164736f6c634300080f000a", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "constructor": { + "params": { + "_finalizationPeriodSeconds": "Output finalization time in seconds.", + "_l2Oracle": "Address of the L2OutputOracle contract." + } + }, + "depositTransaction(address,uint256,uint64,bool,bytes)": { + "params": { + "_data": "Data to trigger the recipient with.", + "_gasLimit": "Minimum L2 gas limit (can be greater than or equal to this value).", + "_isCreation": "Whether or not the transaction is a contract creation.", + "_to": "Target address on L2.", + "_value": "ETH value to send to the recipient." + } + }, + "finalizeWithdrawalTransaction((uint256,address,address,uint256,uint256,bytes),uint256,(bytes32,bytes32,bytes32,bytes32),bytes)": { + "params": { + "_l2BlockNumber": "L2 block number of the outputRoot.", + "_outputRootProof": "Inclusion proof of the withdrawer contracts storage root.", + "_tx": "Withdrawal transaction to finalize.", + "_withdrawalProof": "Inclusion proof for the given withdrawal in the withdrawer contract." + } + }, + "isBlockFinalized(uint256)": { + "params": { + "_l2BlockNumber": "The number of the L2 block." + } + }, + "version()": { + "returns": { + "_0": "Semver contract version as a string." + } + } + }, + "events": { + "TransactionDeposited(address,address,uint256,bytes)": { + "params": { + "from": "Address that triggered the deposit transaction.", + "opaqueData": "ABI encoded deposit data to be parsed off-chain.", + "to": "Address that the deposit transaction is directed to.", + "version": "Version of this deposit transaction event." + } + }, + "WithdrawalFinalized(bytes32,bool)": { + "params": { + "success": "Whether the withdrawal transaction was successful.", + "withdrawalHash": "Hash of the withdrawal transaction." + } + } + } + }, + "userdoc": { + "version": 1, + "kind": "user", + "methods": { + "BASE_FEE_MAX_CHANGE_DENOMINATOR()": { + "notice": "Denominator that determines max change on fee per block." + }, + "ELASTICITY_MULTIPLIER()": { + "notice": "Along with the resource limit, determines the target resource limit." + }, + "FINALIZATION_PERIOD_SECONDS()": { + "notice": "Minimum time (in seconds) that must elapse before a withdrawal can be finalized." + }, + "INITIAL_BASE_FEE()": { + "notice": "Initial base fee value." + }, + "L2_ORACLE()": { + "notice": "Address of the L2OutputOracle." + }, + "MAX_RESOURCE_LIMIT()": { + "notice": "Maximum amount of the resource that can be used within this block." + }, + "MINIMUM_BASE_FEE()": { + "notice": "Minimum base fee value, cannot go lower than this." + }, + "TARGET_RESOURCE_LIMIT()": { + "notice": "Target amount of the resource that should be used within this block." + }, + "depositTransaction(address,uint256,uint64,bool,bytes)": { + "notice": "Accepts deposits of ETH and data, and emits a TransactionDeposited event for use in deriving deposit transactions. Note that if a deposit is made by a contract, its address will be aliased when retrieved using `tx.origin` or `msg.sender`. Consider using the CrossDomainMessenger contracts for a simpler developer experience." + }, + "finalizeWithdrawalTransaction((uint256,address,address,uint256,uint256,bytes),uint256,(bytes32,bytes32,bytes32,bytes32),bytes)": { + "notice": "Finalizes a withdrawal transaction." + }, + "finalizedWithdrawals(bytes32)": { + "notice": "A list of withdrawal hashes which have been successfully finalized." + }, + "initialize()": { + "notice": "Initializer;" + }, + "isBlockFinalized(uint256)": { + "notice": "Determine if a given block number is finalized. Reverts if the call to L2_ORACLE.getL2Output reverts. Returns a boolean otherwise." + }, + "l2Sender()": { + "notice": "Address of the L2 account which initiated a withdrawal in this transaction. If the of this variable is the default L2 sender address, then we are NOT inside of a call to finalizeWithdrawalTransaction." + }, + "params()": { + "notice": "EIP-1559 style gas parameters." + }, + "version()": { + "notice": "Returns the full semver contract version." + } + }, + "events": { + "TransactionDeposited(address,address,uint256,bytes)": { + "notice": "Emitted when a transaction is deposited from L1 to L2. The parameters of this event are read by the rollup node and used to derive deposit transactions on L2." + }, + "WithdrawalFinalized(bytes32,bool)": { + "notice": "Emitted when a withdrawal transaction is finalized." + } + }, + "notice": "The OptimismPortal is a low-level contract responsible for passing messages between L1 and L2. Messages sent directly to the OptimismPortal have no form of replayability. Users are encouraged to use the L1CrossDomainMessenger for a higher-level interface." + }, + "storageLayout": { + "storage": [ + { + "astId": 26027, + "contract": "contracts/L1/OptimismPortal.sol:OptimismPortal", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 26030, + "contract": "contracts/L1/OptimismPortal.sol:OptimismPortal", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1374, + "contract": "contracts/L1/OptimismPortal.sol:OptimismPortal", + "label": "params", + "offset": 0, + "slot": "1", + "type": "t_struct(ResourceParams)1344_storage" + }, + { + "astId": 1379, + "contract": "contracts/L1/OptimismPortal.sol:OptimismPortal", + "label": "__gap", + "offset": 0, + "slot": "2", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 947, + "contract": "contracts/L1/OptimismPortal.sol:OptimismPortal", + "label": "l2Sender", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 960, + "contract": "contracts/L1/OptimismPortal.sol:OptimismPortal", + "label": "finalizedWithdrawals", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_bytes32,t_bool)" + }, + { + "astId": 965, + "contract": "contracts/L1/OptimismPortal.sol:OptimismPortal", + "label": "__gap", + "offset": 0, + "slot": "53", + "type": "t_array(t_uint256)48_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)48_storage": { + "encoding": "inplace", + "label": "uint256[48]", + "numberOfBytes": "1536", + "base": "t_uint256" + }, + "t_array(t_uint256)49_storage": { + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568", + "base": "t_uint256" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_bool)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_struct(ResourceParams)1344_storage": { + "encoding": "inplace", + "label": "struct ResourceMetering.ResourceParams", + "numberOfBytes": "32", + "members": [ + { + "astId": 1339, + "contract": "contracts/L1/OptimismPortal.sol:OptimismPortal", + "label": "prevBaseFee", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 1341, + "contract": "contracts/L1/OptimismPortal.sol:OptimismPortal", + "label": "prevBoughtGas", + "offset": 16, + "slot": "0", + "type": "t_uint64" + }, + { + "astId": 1343, + "contract": "contracts/L1/OptimismPortal.sol:OptimismPortal", + "label": "prevBlockNum", + "offset": 24, + "slot": "0", + "type": "t_uint64" + } + ] + }, + "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" + } + } + } +} \ No newline at end of file diff --git a/packages/contracts-bedrock/deployments/goerli/OptimismPortalProxy.json b/packages/contracts-bedrock/deployments/alpha-1/OptimismPortalProxy.json similarity index 93% rename from packages/contracts-bedrock/deployments/goerli/OptimismPortalProxy.json rename to packages/contracts-bedrock/deployments/alpha-1/OptimismPortalProxy.json index e2d373ed60e34..db1ef65566935 100644 --- a/packages/contracts-bedrock/deployments/goerli/OptimismPortalProxy.json +++ b/packages/contracts-bedrock/deployments/alpha-1/OptimismPortalProxy.json @@ -1,5 +1,5 @@ { - "address": "0xf39Acf72E84af85b191BF03f7B9BcAb102Bd9172", + "address": "0xA581Ca3353DB73115C4625FFC7aDF5dB379434A8", "abi": [ { "inputs": [ @@ -129,41 +129,41 @@ "type": "receive" } ], - "transactionHash": "0x3aa85561932d72b07ac16a88536b21fea5e8a93bf3b87c81f635b8622c634042", + "transactionHash": "0xd27e6f05e0b5541088e8ac3bf8e0434a5545c53b822a764cadbcb0a1a0c3ba49", "receipt": { "to": null, - "from": "0xCFf7a9856DB3C60AB546b8F43dC5D1A4336786A0", - "contractAddress": "0xf39Acf72E84af85b191BF03f7B9BcAb102Bd9172", - "transactionIndex": 0, + "from": "0x1D066Ef7AA90ae85Bb017e85968A9e1851DA95Db", + "contractAddress": "0xA581Ca3353DB73115C4625FFC7aDF5dB379434A8", + "transactionIndex": 3, "gasUsed": "523812", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000020000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000004000000000", - "blockHash": "0x3b98b3141f805127ca40450d4feb5267fbeb61c7b81418bb97fb0488484554c4", - "transactionHash": "0x3aa85561932d72b07ac16a88536b21fea5e8a93bf3b87c81f635b8622c634042", + "logsBloom": "0x00008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080400000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x8503f0e1f8d0f3ce085e5a1ff5b93949f348092365c49ad10b86111b1b6df21a", + "transactionHash": "0xd27e6f05e0b5541088e8ac3bf8e0434a5545c53b822a764cadbcb0a1a0c3ba49", "logs": [ { - "transactionIndex": 0, - "blockNumber": 7355245, - "transactionHash": "0x3aa85561932d72b07ac16a88536b21fea5e8a93bf3b87c81f635b8622c634042", - "address": "0xf39Acf72E84af85b191BF03f7B9BcAb102Bd9172", + "transactionIndex": 3, + "blockNumber": 7568962, + "transactionHash": "0xd27e6f05e0b5541088e8ac3bf8e0434a5545c53b822a764cadbcb0a1a0c3ba49", + "address": "0xA581Ca3353DB73115C4625FFC7aDF5dB379434A8", "topics": [ "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cff7a9856db3c60ab546b8f43dc5d1a4336786a0", - "logIndex": 0, - "blockHash": "0x3b98b3141f805127ca40450d4feb5267fbeb61c7b81418bb97fb0488484554c4" + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000001d066ef7aa90ae85bb017e85968a9e1851da95db", + "logIndex": 3, + "blockHash": "0x8503f0e1f8d0f3ce085e5a1ff5b93949f348092365c49ad10b86111b1b6df21a" } ], - "blockNumber": 7355245, - "cumulativeGasUsed": "523812", + "blockNumber": 7568962, + "cumulativeGasUsed": "2095248", "status": 1, "byzantium": true }, "args": [ - "0xCFf7a9856DB3C60AB546b8F43dC5D1A4336786A0" + "0x1D066Ef7AA90ae85Bb017e85968A9e1851DA95Db" ], "numDeployments": 1, - "solcInputHash": "cd42cb04f3b6a78e5824c9f427d0a55d", - "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\":{\"contracts/universal/Proxy.sol\":\"Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@eth-optimism/contracts-periphery/=node_modules/@eth-optimism/contracts-periphery/contracts/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/\",\":@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/\",\":@rari-capital/=node_modules/@rari-capital/\",\":@rari-capital/solmate/=node_modules/@rari-capital/solmate/\",\":contracts/=contracts/\",\":ds-test/=node_modules/ds-test/src/\",\":excessively-safe-call/=node_modules/excessively-safe-call/\",\":forge-std/=node_modules/forge-std/src/\"]},\"sources\":{\"contracts/universal/Proxy.sol\":{\"keccak256\":\"0xfa08635f1866139673ac4fe7b07330f752f93800075b895d8fcb8484f4a3f753\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8f2247604d527f560edbb851c43b6c16b37e34972ddb305e16dd73623b8288cd\",\"dweb:/ipfs/QmfM8sLAZrxrnqyRdt1XJ5LyJh4wKbeEqk3VkvxG7BDqFj\"]}},\"version\":1}", + "solcInputHash": "ada691c3f5ff59bd3e60fdb28388fb6d", + "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\":{\"contracts/universal/Proxy.sol\":\"Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@eth-optimism/contracts-periphery/=node_modules/@eth-optimism/contracts-periphery/contracts/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/\",\":@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/\",\":@rari-capital/=node_modules/@rari-capital/\",\":@rari-capital/solmate/=node_modules/@rari-capital/solmate/\",\":contracts/=contracts/\",\":ds-test/=node_modules/ds-test/src/\",\":forge-std/=node_modules/forge-std/src/\"]},\"sources\":{\"contracts/universal/Proxy.sol\":{\"keccak256\":\"0xfa08635f1866139673ac4fe7b07330f752f93800075b895d8fcb8484f4a3f753\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8f2247604d527f560edbb851c43b6c16b37e34972ddb305e16dd73623b8288cd\",\"dweb:/ipfs/QmfM8sLAZrxrnqyRdt1XJ5LyJh4wKbeEqk3VkvxG7BDqFj\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b5060405161091838038061091883398101604081905261002f916100b2565b6100388161003e565b506100e2565b60006100566000805160206108f88339815191525490565b6000805160206108f8833981519152839055604080516001600160a01b038084168252851660208201529192507f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b6000602082840312156100c457600080fd5b81516001600160a01b03811681146100db57600080fd5b9392505050565b610807806100f16000396000f3fe60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100be5780638f283970146100f8578063f851a440146101185761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61012d565b005b61006b61012d565b34801561008157600080fd5b5061006b6100903660046106d9565b610224565b6100a86100a33660046106f4565b610296565b6040516100b59190610777565b60405180910390f35b3480156100ca57600080fd5b506100d3610419565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100b5565b34801561010457600080fd5b5061006b6101133660046106d9565b6104b0565b34801561012457600080fd5b506100d3610517565b60006101577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905073ffffffffffffffffffffffffffffffffffffffff8116610201576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f50726f78793a20696d706c656d656e746174696f6e206e6f7420696e6974696160448201527f6c697a656400000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3660008037600080366000845af43d6000803e8061021e573d6000fd5b503d6000f35b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061027d575033155b1561028e5761028b816105a3565b50565b61028b61012d565b60606102c07fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806102f7575033155b1561040a57610305846105a3565b6000808573ffffffffffffffffffffffffffffffffffffffff16858560405161032f9291906107ea565b600060405180830381855af49150503d806000811461036a576040519150601f19603f3d011682016040523d82523d6000602084013e61036f565b606091505b509150915081610401576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f50726f78793a2064656c656761746563616c6c20746f206e657720696d706c6560448201527f6d656e746174696f6e20636f6e7472616374206661696c65640000000000000060648201526084016101f8565b91506104129050565b61041261012d565b9392505050565b60006104437fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061047a575033155b156104a557507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6104ad61012d565b90565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610509575033155b1561028e5761028b8161060b565b60006105417fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610578575033155b156104a557507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81905560405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60006106357fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038390556040805173ffffffffffffffffffffffffffffffffffffffff8084168252851660208201529192507f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b803573ffffffffffffffffffffffffffffffffffffffff811681146106d457600080fd5b919050565b6000602082840312156106eb57600080fd5b610412826106b0565b60008060006040848603121561070957600080fd5b610712846106b0565b9250602084013567ffffffffffffffff8082111561072f57600080fd5b818601915086601f83011261074357600080fd5b81358181111561075257600080fd5b87602082850101111561076457600080fd5b6020830194508093505050509250925092565b600060208083528351808285015260005b818110156107a457858101830151858201604001528201610788565b818111156107b6576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b818382376000910190815291905056fea164736f6c634300080f000ab53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", "deployedBytecode": "0x60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100be5780638f283970146100f8578063f851a440146101185761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61012d565b005b61006b61012d565b34801561008157600080fd5b5061006b6100903660046106d9565b610224565b6100a86100a33660046106f4565b610296565b6040516100b59190610777565b60405180910390f35b3480156100ca57600080fd5b506100d3610419565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100b5565b34801561010457600080fd5b5061006b6101133660046106d9565b6104b0565b34801561012457600080fd5b506100d3610517565b60006101577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905073ffffffffffffffffffffffffffffffffffffffff8116610201576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f50726f78793a20696d706c656d656e746174696f6e206e6f7420696e6974696160448201527f6c697a656400000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3660008037600080366000845af43d6000803e8061021e573d6000fd5b503d6000f35b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061027d575033155b1561028e5761028b816105a3565b50565b61028b61012d565b60606102c07fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806102f7575033155b1561040a57610305846105a3565b6000808573ffffffffffffffffffffffffffffffffffffffff16858560405161032f9291906107ea565b600060405180830381855af49150503d806000811461036a576040519150601f19603f3d011682016040523d82523d6000602084013e61036f565b606091505b509150915081610401576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f50726f78793a2064656c656761746563616c6c20746f206e657720696d706c6560448201527f6d656e746174696f6e20636f6e7472616374206661696c65640000000000000060648201526084016101f8565b91506104129050565b61041261012d565b9392505050565b60006104437fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061047a575033155b156104a557507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6104ad61012d565b90565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610509575033155b1561028e5761028b8161060b565b60006105417fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610578575033155b156104a557507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81905560405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60006106357fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038390556040805173ffffffffffffffffffffffffffffffffffffffff8084168252851660208201529192507f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b803573ffffffffffffffffffffffffffffffffffffffff811681146106d457600080fd5b919050565b6000602082840312156106eb57600080fd5b610412826106b0565b60008060006040848603121561070957600080fd5b610712846106b0565b9250602084013567ffffffffffffffff8082111561072f57600080fd5b818601915086601f83011261074357600080fd5b81358181111561075257600080fd5b87602082850101111561076457600080fd5b6020830194508093505050509250925092565b600060208083528351808285015260005b818110156107a457858101830151858201604001528201610788565b818111156107b6576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b818382376000910190815291905056fea164736f6c634300080f000a", "devdoc": { diff --git a/packages/contracts-bedrock/deployments/goerli/ProxyAdmin.json b/packages/contracts-bedrock/deployments/alpha-1/ProxyAdmin.json similarity index 92% rename from packages/contracts-bedrock/deployments/goerli/ProxyAdmin.json rename to packages/contracts-bedrock/deployments/alpha-1/ProxyAdmin.json index ab0eb922cff41..c73a01d7e7ef1 100644 --- a/packages/contracts-bedrock/deployments/goerli/ProxyAdmin.json +++ b/packages/contracts-bedrock/deployments/alpha-1/ProxyAdmin.json @@ -1,5 +1,5 @@ { - "address": "0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1", + "address": "0x657ABd214bbA3580e8E82345DC5B2b308A738457", "abi": [ { "inputs": [ @@ -299,43 +299,43 @@ "type": "function" } ], - "transactionHash": "0xd4c554d46e4395d812e72e473415551e8c519da963bead4c776d93e36ecbfc85", + "transactionHash": "0xaa380894ba5b614c7b72ff311e4414df7551c43b8cfd349db9a2affc25e238cb", "receipt": { "to": null, - "from": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", - "contractAddress": "0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1", - "transactionIndex": 0, + "from": "0x1D066Ef7AA90ae85Bb017e85968A9e1851DA95Db", + "contractAddress": "0x657ABd214bbA3580e8E82345DC5B2b308A738457", + "transactionIndex": 6, "gasUsed": "1622894", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000020000000020000100000800000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000200000000000000000000000002000000000000000000020000000000000000000030000000000000000000000000000000000000000000000", - "blockHash": "0xaeff4c7621126c925936684083b15da29ab7a4afa0487871c2f47653592e0487", - "transactionHash": "0xd4c554d46e4395d812e72e473415551e8c519da963bead4c776d93e36ecbfc85", + "logsBloom": "0x00000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000004000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000810000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000020000000000000000000020000000008000000000000000000000000000000000000", + "blockHash": "0x5bd8ca98c113de21b83bf8ab5394a0136979164858c25cc0864317a9bc69ef76", + "transactionHash": "0xaa380894ba5b614c7b72ff311e4414df7551c43b8cfd349db9a2affc25e238cb", "logs": [ { - "transactionIndex": 0, - "blockNumber": 17, - "transactionHash": "0xd4c554d46e4395d812e72e473415551e8c519da963bead4c776d93e36ecbfc85", - "address": "0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1", + "transactionIndex": 6, + "blockNumber": 7568963, + "transactionHash": "0xaa380894ba5b614c7b72ff311e4414df7551c43b8cfd349db9a2affc25e238cb", + "address": "0x657ABd214bbA3580e8E82345DC5B2b308A738457", "topics": [ "0x8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d76", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + "0x0000000000000000000000001d066ef7aa90ae85bb017e85968a9e1851da95db" ], "data": "0x", - "logIndex": 0, - "blockHash": "0xaeff4c7621126c925936684083b15da29ab7a4afa0487871c2f47653592e0487" + "logIndex": 8, + "blockHash": "0x5bd8ca98c113de21b83bf8ab5394a0136979164858c25cc0864317a9bc69ef76" } ], - "blockNumber": 17, - "cumulativeGasUsed": "1622894", + "blockNumber": 7568963, + "cumulativeGasUsed": "13573823", "status": 1, "byzantium": true }, "args": [ - "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" + "0x1D066Ef7AA90ae85Bb017e85968A9e1851DA95Db" ], "numDeployments": 1, - "solcInputHash": "a94fc0e98621248a4fbd9c87bf1e6a39", - "metadata": "{\"compiler\":{\"version\":\"0.8.15+commit.e14f2714\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"contract AddressManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_newAdmin\",\"type\":\"address\"}],\"name\":\"changeProxyAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_proxy\",\"type\":\"address\"}],\"name\":\"getProxyAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_proxy\",\"type\":\"address\"}],\"name\":\"getProxyImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"implementationName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isUpgrading\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"proxyType\",\"outputs\":[{\"internalType\":\"enum ProxyAdmin.ProxyType\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"setAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract AddressManager\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"setImplementationName\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"internalType\":\"enum ProxyAdmin.ProxyType\",\"name\":\"_type\",\"type\":\"uint8\"}],\"name\":\"setProxyType\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_upgrading\",\"type\":\"bool\"}],\"name\":\"setUpgrading\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"upgradeAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"changeProxyAdmin(address,address)\":{\"params\":{\"_newAdmin\":\"Address of the new proxy admin.\",\"_proxy\":\"Address of the proxy to update.\"}},\"constructor\":{\"params\":{\"_owner\":\"Address of the initial owner of this contract.\"}},\"getProxyAdmin(address)\":{\"params\":{\"_proxy\":\"Address of the proxy to get the admin of.\"},\"returns\":{\"_0\":\"Address of the admin of the proxy.\"}},\"getProxyImplementation(address)\":{\"params\":{\"_proxy\":\"Address of the proxy to get the implementation of.\"},\"returns\":{\"_0\":\"Address of the implementation of the proxy.\"}},\"isUpgrading()\":{\"custom:legacy\":\"@notice Legacy function used to tell ChugSplashProxy contracts if an upgrade is happening.\",\"returns\":{\"_0\":\"Whether or not there is an upgrade going on. May not actually tell you whether an upgrade is going on, since we don't currently plan to use this variable for anything other than a legacy indicator to fix a UX bug in the ChugSplash proxy.\"}},\"setAddress(string,address)\":{\"custom:legacy\":\"@notice Set an address in the address manager. Since only the owner of the AddressManager can directly modify addresses and the ProxyAdmin will own the AddressManager, this gives the owner of the ProxyAdmin the ability to modify addresses directly.\",\"params\":{\"_address\":\"Address to attach to the given name.\",\"_name\":\"Name to set within the AddressManager.\"}},\"setAddressManager(address)\":{\"params\":{\"_address\":\"Address of the AddressManager.\"}},\"setImplementationName(address,string)\":{\"params\":{\"_address\":\"Address of the ResolvedDelegateProxy.\",\"_name\":\"Name of the implementation for the proxy.\"}},\"setProxyType(address,uint8)\":{\"params\":{\"_address\":\"Address of the proxy.\",\"_type\":\"Type of the proxy.\"}},\"setUpgrading(bool)\":{\"custom:legacy\":\"@notice Set the upgrading status for the Chugsplash proxy type.\",\"params\":{\"_upgrading\":\"Whether or not the system is upgrading.\"}},\"upgrade(address,address)\":{\"params\":{\"_implementation\":\"Address of the new implementation address.\",\"_proxy\":\"Address of the proxy to upgrade.\"}},\"upgradeAndCall(address,address,bytes)\":{\"params\":{\"_data\":\"Data to trigger the new implementation with.\",\"_implementation\":\"Address of the new implementation address.\",\"_proxy\":\"Address of the proxy to upgrade.\"}}},\"stateVariables\":{\"addressManager\":{\"custom:legacy\":\"@notice The address of the address manager, this is required to manage the ResolvedDelegateProxy type.\"},\"implementationName\":{\"custom:legacy\":\"@notice A reverse mapping of addresses to names held in the AddressManager. This must be manually kept up to date with changes in the AddressManager for this contract to be able to work as an admin for the ResolvedDelegateProxy type.\"},\"proxyType\":{\"custom:legacy\":\"@notice A mapping of proxy types, used for backwards compatibility.\"},\"upgrading\":{\"custom:legacy\":\"@notice A legacy upgrading indicator used by the old Chugsplash Proxy.\"}},\"title\":\"ProxyAdmin\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"changeProxyAdmin(address,address)\":{\"notice\":\"Updates the admin of the given proxy address.\"},\"getProxyAdmin(address)\":{\"notice\":\"Returns the admin of the given proxy address.\"},\"getProxyImplementation(address)\":{\"notice\":\"Returns the implementation of the given proxy address.\"},\"setAddressManager(address)\":{\"notice\":\"Set the address of the AddressManager. This is required to manage legacy ResolvedDelegateProxy type proxy contracts.\"},\"setImplementationName(address,string)\":{\"notice\":\"Sets the implementation name for a given address. Only required for ResolvedDelegateProxy type proxies that have an implementation name.\"},\"setProxyType(address,uint8)\":{\"notice\":\"Sets the proxy type for a given address. Only required for non-standard (legacy) proxy types.\"},\"upgrade(address,address)\":{\"notice\":\"Changes a proxy's implementation contract.\"},\"upgradeAndCall(address,address,bytes)\":{\"notice\":\"Changes a proxy's implementation contract and delegatecalls the new implementation with some given data. Useful for atomic upgrade-and-initialize calls.\"}},\"notice\":\"This is an auxiliary contract meant to be assigned as the admin of an ERC1967 Proxy, based on the OpenZeppelin implementation. It has backwards compatibility logic to work with the various types of proxies that have been deployed by Optimism in the past.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/universal/ProxyAdmin.sol\":\"ProxyAdmin\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@eth-optimism/contracts-periphery/=node_modules/@eth-optimism/contracts-periphery/contracts/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/\",\":@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/\",\":@rari-capital/=node_modules/@rari-capital/\",\":@rari-capital/solmate/=node_modules/@rari-capital/solmate/\",\":ds-test/=node_modules/ds-test/src/\",\":excessively-safe-call/=node_modules/excessively-safe-call/\",\":forge-std/=node_modules/forge-std/src/\"]},\"sources\":{\"contracts/legacy/AddressManager.sol\":{\"keccak256\":\"0x7a353d4c92eed32665fd2f0023c55054901293cf7a6e14ca108229d87c047b10\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b92ba23601d1951271729a20db931a45639d9376b7c8e2705c23dc360833715a\",\"dweb:/ipfs/QmTKwYLNYYBKZpd31VNBANmguVUwFZifSg7joHSgLZjZCj\"]},\"contracts/legacy/L1ChugSplashProxy.sol\":{\"keccak256\":\"0x6ae7bf6ea9ac0e3511ee4cb15d946589da0dd35098ff762c0b2903d064f24875\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://02028d86c1d38563021d5ead5282271ccdf1c03a24f2eaee056ae2157f0554ee\",\"dweb:/ipfs/QmW9urkBBRTmZ8FjL5Y5zWbdnRhPDruxCCLnpr2CTkozKM\"]},\"contracts/universal/Proxy.sol\":{\"keccak256\":\"0xfa08635f1866139673ac4fe7b07330f752f93800075b895d8fcb8484f4a3f753\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8f2247604d527f560edbb851c43b6c16b37e34972ddb305e16dd73623b8288cd\",\"dweb:/ipfs/QmfM8sLAZrxrnqyRdt1XJ5LyJh4wKbeEqk3VkvxG7BDqFj\"]},\"contracts/universal/ProxyAdmin.sol\":{\"keccak256\":\"0x94e7e76054d1b85f223daf87441e0aa7d73bcabeb029a5ec71fb5d8fda8d8a56\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9766567fa6dbc1da3fcd008b17585852aa88a03c42a605b351f2e2c3713a4267\",\"dweb:/ipfs/QmNQJQXe9bsSFisBkgoAMLMV8YZP7mukraty5P8xVk1sx1\"]},\"node_modules/@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x24e0364e503a9bbde94c715d26573a76f14cd2a202d45f96f52134ab806b67b9\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e12cbaa7378fd9b62280e4e1d164bedcb4399ce238f5f98fc0eefb7e50577981\",\"dweb:/ipfs/QmXRoFGUgfsaRkoPT5bxNMtSayKTQ8GZATLPXf69HcRA51\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"node_modules/@rari-capital/solmate/src/auth/Owned.sol\":{\"keccak256\":\"0x7e91c80b0dd1a14a19cb9e661b99924043adab6d9d893bbfcf3a6a3dc23a6743\",\"license\":\"AGPL-3.0-only\",\"urls\":[\"bzz-raw://515890d9fc87d6762dae2354a3a0714a26c652f0ea5bb631122be1968ef8c0e9\",\"dweb:/ipfs/QmTRpQ7uoAR1vCACKJm14Ba3oKVLqcA9reTwbHAPxawVpM\"]}},\"version\":1}", + "solcInputHash": "ada691c3f5ff59bd3e60fdb28388fb6d", + "metadata": "{\"compiler\":{\"version\":\"0.8.15+commit.e14f2714\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"contract AddressManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_newAdmin\",\"type\":\"address\"}],\"name\":\"changeProxyAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_proxy\",\"type\":\"address\"}],\"name\":\"getProxyAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_proxy\",\"type\":\"address\"}],\"name\":\"getProxyImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"implementationName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isUpgrading\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"proxyType\",\"outputs\":[{\"internalType\":\"enum ProxyAdmin.ProxyType\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"setAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract AddressManager\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"setImplementationName\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"internalType\":\"enum ProxyAdmin.ProxyType\",\"name\":\"_type\",\"type\":\"uint8\"}],\"name\":\"setProxyType\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_upgrading\",\"type\":\"bool\"}],\"name\":\"setUpgrading\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"upgradeAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"changeProxyAdmin(address,address)\":{\"params\":{\"_newAdmin\":\"Address of the new proxy admin.\",\"_proxy\":\"Address of the proxy to update.\"}},\"constructor\":{\"params\":{\"_owner\":\"Address of the initial owner of this contract.\"}},\"getProxyAdmin(address)\":{\"params\":{\"_proxy\":\"Address of the proxy to get the admin of.\"},\"returns\":{\"_0\":\"Address of the admin of the proxy.\"}},\"getProxyImplementation(address)\":{\"params\":{\"_proxy\":\"Address of the proxy to get the implementation of.\"},\"returns\":{\"_0\":\"Address of the implementation of the proxy.\"}},\"isUpgrading()\":{\"custom:legacy\":\"@notice Legacy function used to tell ChugSplashProxy contracts if an upgrade is happening.\",\"returns\":{\"_0\":\"Whether or not there is an upgrade going on. May not actually tell you whether an upgrade is going on, since we don't currently plan to use this variable for anything other than a legacy indicator to fix a UX bug in the ChugSplash proxy.\"}},\"setAddress(string,address)\":{\"custom:legacy\":\"@notice Set an address in the address manager. Since only the owner of the AddressManager can directly modify addresses and the ProxyAdmin will own the AddressManager, this gives the owner of the ProxyAdmin the ability to modify addresses directly.\",\"params\":{\"_address\":\"Address to attach to the given name.\",\"_name\":\"Name to set within the AddressManager.\"}},\"setAddressManager(address)\":{\"params\":{\"_address\":\"Address of the AddressManager.\"}},\"setImplementationName(address,string)\":{\"params\":{\"_address\":\"Address of the ResolvedDelegateProxy.\",\"_name\":\"Name of the implementation for the proxy.\"}},\"setProxyType(address,uint8)\":{\"params\":{\"_address\":\"Address of the proxy.\",\"_type\":\"Type of the proxy.\"}},\"setUpgrading(bool)\":{\"custom:legacy\":\"@notice Set the upgrading status for the Chugsplash proxy type.\",\"params\":{\"_upgrading\":\"Whether or not the system is upgrading.\"}},\"upgrade(address,address)\":{\"params\":{\"_implementation\":\"Address of the new implementation address.\",\"_proxy\":\"Address of the proxy to upgrade.\"}},\"upgradeAndCall(address,address,bytes)\":{\"params\":{\"_data\":\"Data to trigger the new implementation with.\",\"_implementation\":\"Address of the new implementation address.\",\"_proxy\":\"Address of the proxy to upgrade.\"}}},\"stateVariables\":{\"addressManager\":{\"custom:legacy\":\"@notice The address of the address manager, this is required to manage the ResolvedDelegateProxy type.\"},\"implementationName\":{\"custom:legacy\":\"@notice A reverse mapping of addresses to names held in the AddressManager. This must be manually kept up to date with changes in the AddressManager for this contract to be able to work as an admin for the ResolvedDelegateProxy type.\"},\"proxyType\":{\"custom:legacy\":\"@notice A mapping of proxy types, used for backwards compatibility.\"},\"upgrading\":{\"custom:legacy\":\"@notice A legacy upgrading indicator used by the old Chugsplash Proxy.\"}},\"title\":\"ProxyAdmin\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"changeProxyAdmin(address,address)\":{\"notice\":\"Updates the admin of the given proxy address.\"},\"getProxyAdmin(address)\":{\"notice\":\"Returns the admin of the given proxy address.\"},\"getProxyImplementation(address)\":{\"notice\":\"Returns the implementation of the given proxy address.\"},\"setAddressManager(address)\":{\"notice\":\"Set the address of the AddressManager. This is required to manage legacy ResolvedDelegateProxy type proxy contracts.\"},\"setImplementationName(address,string)\":{\"notice\":\"Sets the implementation name for a given address. Only required for ResolvedDelegateProxy type proxies that have an implementation name.\"},\"setProxyType(address,uint8)\":{\"notice\":\"Sets the proxy type for a given address. Only required for non-standard (legacy) proxy types.\"},\"upgrade(address,address)\":{\"notice\":\"Changes a proxy's implementation contract.\"},\"upgradeAndCall(address,address,bytes)\":{\"notice\":\"Changes a proxy's implementation contract and delegatecalls the new implementation with some given data. Useful for atomic upgrade-and-initialize calls.\"}},\"notice\":\"This is an auxiliary contract meant to be assigned as the admin of an ERC1967 Proxy, based on the OpenZeppelin implementation. It has backwards compatibility logic to work with the various types of proxies that have been deployed by Optimism in the past.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/universal/ProxyAdmin.sol\":\"ProxyAdmin\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@eth-optimism/contracts-periphery/=node_modules/@eth-optimism/contracts-periphery/contracts/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/\",\":@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/\",\":@rari-capital/=node_modules/@rari-capital/\",\":@rari-capital/solmate/=node_modules/@rari-capital/solmate/\",\":contracts/=contracts/\",\":ds-test/=node_modules/ds-test/src/\",\":forge-std/=node_modules/forge-std/src/\"]},\"sources\":{\"contracts/legacy/AddressManager.sol\":{\"keccak256\":\"0x7a353d4c92eed32665fd2f0023c55054901293cf7a6e14ca108229d87c047b10\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b92ba23601d1951271729a20db931a45639d9376b7c8e2705c23dc360833715a\",\"dweb:/ipfs/QmTKwYLNYYBKZpd31VNBANmguVUwFZifSg7joHSgLZjZCj\"]},\"contracts/legacy/L1ChugSplashProxy.sol\":{\"keccak256\":\"0x6ae7bf6ea9ac0e3511ee4cb15d946589da0dd35098ff762c0b2903d064f24875\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://02028d86c1d38563021d5ead5282271ccdf1c03a24f2eaee056ae2157f0554ee\",\"dweb:/ipfs/QmW9urkBBRTmZ8FjL5Y5zWbdnRhPDruxCCLnpr2CTkozKM\"]},\"contracts/universal/Proxy.sol\":{\"keccak256\":\"0xfa08635f1866139673ac4fe7b07330f752f93800075b895d8fcb8484f4a3f753\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8f2247604d527f560edbb851c43b6c16b37e34972ddb305e16dd73623b8288cd\",\"dweb:/ipfs/QmfM8sLAZrxrnqyRdt1XJ5LyJh4wKbeEqk3VkvxG7BDqFj\"]},\"contracts/universal/ProxyAdmin.sol\":{\"keccak256\":\"0x94e7e76054d1b85f223daf87441e0aa7d73bcabeb029a5ec71fb5d8fda8d8a56\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9766567fa6dbc1da3fcd008b17585852aa88a03c42a605b351f2e2c3713a4267\",\"dweb:/ipfs/QmNQJQXe9bsSFisBkgoAMLMV8YZP7mukraty5P8xVk1sx1\"]},\"node_modules/@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xa94b34880e3c1b0b931662cb1c09e5dfa6662f31cba80e07c5ee71cd135c9673\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://40fb1b5102468f783961d0af743f91b9980cf66b50d1d12009f6bb1869cea4d2\",\"dweb:/ipfs/QmYqEbJML4jB1GHbzD4cUZDtJg5wVwNm3vDJq1GbyDus8y\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"node_modules/@rari-capital/solmate/src/auth/Owned.sol\":{\"keccak256\":\"0x7e91c80b0dd1a14a19cb9e661b99924043adab6d9d893bbfcf3a6a3dc23a6743\",\"license\":\"AGPL-3.0-only\",\"urls\":[\"bzz-raw://515890d9fc87d6762dae2354a3a0714a26c652f0ea5bb631122be1968ef8c0e9\",\"dweb:/ipfs/QmTRpQ7uoAR1vCACKJm14Ba3oKVLqcA9reTwbHAPxawVpM\"]}},\"version\":1}", "bytecode": "0x60806040526003805460ff60a01b1916905534801561001d57600080fd5b50604051611cdc380380611cdc83398101604081905261003c9161008b565b600080546001600160a01b0319166001600160a01b03831690811782556040518392907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d76908290a350506100bb565b60006020828403121561009d57600080fd5b81516001600160a01b03811681146100b457600080fd5b9392505050565b611c12806100ca6000396000f3fe6080604052600436106100f35760003560e01c8063860f7cda1161008a57806399a88ec41161005957806399a88ec4146102db5780639b2ea4bd146102fb578063b79472621461031b578063f3b7dead1461035657600080fd5b8063860f7cda1461025b5780638d52d4a01461027b5780638da5cb5b1461029b5780639623609d146102c857600080fd5b8063238181ae116100c6578063238181ae146101a45780633ab76e9f146101d15780636bd9f516146101fe5780637eff275e1461023b57600080fd5b80630652b57a146100f857806307c8f7b01461011a57806313af40351461013a578063204e1c7a1461015a575b600080fd5b34801561010457600080fd5b506101186101133660046114be565b610376565b005b34801561012657600080fd5b506101186101353660046114db565b610443565b34801561014657600080fd5b506101186101553660046114be565b61050e565b34801561016657600080fd5b5061017a6101753660046114be565b6105ff565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156101b057600080fd5b506101c46101bf3660046114be565b610820565b60405161019b9190611573565b3480156101dd57600080fd5b5060035461017a9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561020a57600080fd5b5061022e6102193660046114be565b60016020526000908152604090205460ff1681565b60405161019b91906115b5565b34801561024757600080fd5b506101186102563660046115f6565b6108ba565b34801561026757600080fd5b50610118610276366004611751565b610ae6565b34801561028757600080fd5b506101186102963660046117a1565b610b96565b3480156102a757600080fd5b5060005461017a9073ffffffffffffffffffffffffffffffffffffffff1681565b6101186102d63660046117d3565b610c83565b3480156102e757600080fd5b506101186102f63660046115f6565b610f13565b34801561030757600080fd5b50610118610316366004611849565b611214565b34801561032757600080fd5b5060035474010000000000000000000000000000000000000000900460ff16604051901515815260200161019b565b34801561036257600080fd5b5061017a6103713660046114be565b611323565b60005473ffffffffffffffffffffffffffffffffffffffff1633146103fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064015b60405180910390fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff1633146104c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016103f3565b6003805491151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff16331461058f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016103f3565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081178255604051909133917f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d769190a350565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604081205460ff168181600281111561063b5761063b611586565b036106b6578273ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561068b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106af9190611890565b9392505050565b60018160028111156106ca576106ca611586565b0361071a578273ffffffffffffffffffffffffffffffffffffffff1663aaf10f426040518163ffffffff1660e01b8152600401602060405180830381865afa15801561068b573d6000803e3d6000fd5b600281600281111561072e5761072e611586565b036107b85760035473ffffffffffffffffffffffffffffffffffffffff8481166000908152600260205260409081902090517fbf40fac1000000000000000000000000000000000000000000000000000000008152919092169163bf40fac19161079b91906004016118fa565b602060405180830381865afa15801561068b573d6000803e3d6000fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f50726f787941646d696e3a20756e6b6e6f776e2070726f78792074797065000060448201526064016103f3565b50919050565b60026020526000908152604090208054610839906118ad565b80601f0160208091040260200160405190810160405280929190818152602001828054610865906118ad565b80156108b25780601f10610887576101008083540402835291602001916108b2565b820191906000526020600020905b81548152906001019060200180831161089557829003601f168201915b505050505081565b60005473ffffffffffffffffffffffffffffffffffffffff16331461093b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016103f3565b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604081205460ff169081600281111561097757610977611586565b03610a03576040517f8f28397000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152841690638f283970906024015b600060405180830381600087803b1580156109e657600080fd5b505af11580156109fa573d6000803e3d6000fd5b50505050505050565b6001816002811115610a1757610a17611586565b03610a70576040517f13af403500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301528416906313af4035906024016109cc565b6002816002811115610a8457610a84611586565b036107b8576003546040517ff2fde38b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301529091169063f2fde38b906024016109cc565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b67576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016103f3565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600260205260409020610ae182826119e9565b60005473ffffffffffffffffffffffffffffffffffffffff163314610c17576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016103f3565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600160208190526040909120805483927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0090911690836002811115610c7a57610c7a611586565b02179055505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610d04576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016103f3565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604081205460ff1690816002811115610d4057610d40611586565b03610e06576040517f4f1ef28600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851690634f1ef286903490610d9b9087908790600401611b03565b60006040518083038185885af1158015610db9573d6000803e3d6000fd5b50505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610e009190810190611b3a565b50610f0d565b610e108484610f13565b60008473ffffffffffffffffffffffffffffffffffffffff163484604051610e389190611bb1565b60006040518083038185875af1925050503d8060008114610e75576040519150601f19603f3d011682016040523d82523d6000602084013e610e7a565b606091505b5050905080610f0b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f50726f787941646d696e3a2063616c6c20746f2070726f78792061667465722060448201527f75706772616465206661696c656400000000000000000000000000000000000060648201526084016103f3565b505b50505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610f94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016103f3565b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604081205460ff1690816002811115610fd057610fd0611586565b03611029576040517f3659cfe600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152841690633659cfe6906024016109cc565b600181600281111561103d5761103d611586565b036110bc576040517f9b0b0fda0000000000000000000000000000000000000000000000000000000081527f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc600482015273ffffffffffffffffffffffffffffffffffffffff8381166024830152841690639b0b0fda906044016109cc565b60028160028111156110d0576110d0611586565b036107b85773ffffffffffffffffffffffffffffffffffffffff831660009081526002602052604081208054611105906118ad565b80601f0160208091040260200160405190810160405280929190818152602001828054611131906118ad565b801561117e5780601f106111535761010080835404028352916020019161117e565b820191906000526020600020905b81548152906001019060200180831161116157829003601f168201915b50506003546040517f9b2ea4bd00000000000000000000000000000000000000000000000000000000815294955073ffffffffffffffffffffffffffffffffffffffff1693639b2ea4bd93506111dc92508591508790600401611bcd565b600060405180830381600087803b1580156111f657600080fd5b505af115801561120a573d6000803e3d6000fd5b5050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611295576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016103f3565b6003546040517f9b2ea4bd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690639b2ea4bd906112ed9085908590600401611bcd565b600060405180830381600087803b15801561130757600080fd5b505af115801561131b573d6000803e3d6000fd5b505050505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604081205460ff168181600281111561135f5761135f611586565b036113af578273ffffffffffffffffffffffffffffffffffffffff1663f851a4406040518163ffffffff1660e01b8152600401602060405180830381865afa15801561068b573d6000803e3d6000fd5b60018160028111156113c3576113c3611586565b03611413578273ffffffffffffffffffffffffffffffffffffffff1663893d20e86040518163ffffffff1660e01b8152600401602060405180830381865afa15801561068b573d6000803e3d6000fd5b600281600281111561142757611427611586565b036107b857600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561068b573d6000803e3d6000fd5b73ffffffffffffffffffffffffffffffffffffffff811681146114bb57600080fd5b50565b6000602082840312156114d057600080fd5b81356106af81611499565b6000602082840312156114ed57600080fd5b813580151581146106af57600080fd5b60005b83811015611518578181015183820152602001611500565b83811115610f0d5750506000910152565b600081518084526115418160208601602086016114fd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006106af6020830184611529565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60208101600383106115f0577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b6000806040838503121561160957600080fd5b823561161481611499565b9150602083013561162481611499565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156116a5576116a561162f565b604052919050565b600067ffffffffffffffff8211156116c7576116c761162f565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b6000611706611701846116ad565b61165e565b905082815283838301111561171a57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261174257600080fd5b6106af838335602085016116f3565b6000806040838503121561176457600080fd5b823561176f81611499565b9150602083013567ffffffffffffffff81111561178b57600080fd5b61179785828601611731565b9150509250929050565b600080604083850312156117b457600080fd5b82356117bf81611499565b915060208301356003811061162457600080fd5b6000806000606084860312156117e857600080fd5b83356117f381611499565b9250602084013561180381611499565b9150604084013567ffffffffffffffff81111561181f57600080fd5b8401601f8101861361183057600080fd5b61183f868235602084016116f3565b9150509250925092565b6000806040838503121561185c57600080fd5b823567ffffffffffffffff81111561187357600080fd5b61187f85828601611731565b925050602083013561162481611499565b6000602082840312156118a257600080fd5b81516106af81611499565b600181811c908216806118c157607f821691505b60208210810361081a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060208083526000845461190e816118ad565b8084870152604060018084166000811461192f576001811461196757611995565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a01019550611995565b896000528660002060005b8581101561198d5781548b8201860152908301908801611972565b8a0184019650505b509398975050505050505050565b601f821115610ae157600081815260208120601f850160051c810160208610156119ca5750805b601f850160051c820191505b8181101561131b578281556001016119d6565b815167ffffffffffffffff811115611a0357611a0361162f565b611a1781611a1184546118ad565b846119a3565b602080601f831160018114611a6a5760008415611a345750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b17855561131b565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015611ab757888601518255948401946001909101908401611a98565b5085821015611af357878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b73ffffffffffffffffffffffffffffffffffffffff83168152604060208201526000611b326040830184611529565b949350505050565b600060208284031215611b4c57600080fd5b815167ffffffffffffffff811115611b6357600080fd5b8201601f81018413611b7457600080fd5b8051611b82611701826116ad565b818152856020838501011115611b9757600080fd5b611ba88260208301602086016114fd565b95945050505050565b60008251611bc38184602087016114fd565b9190910192915050565b604081526000611be06040830185611529565b905073ffffffffffffffffffffffffffffffffffffffff83166020830152939250505056fea164736f6c634300080f000a", "deployedBytecode": "0x6080604052600436106100f35760003560e01c8063860f7cda1161008a57806399a88ec41161005957806399a88ec4146102db5780639b2ea4bd146102fb578063b79472621461031b578063f3b7dead1461035657600080fd5b8063860f7cda1461025b5780638d52d4a01461027b5780638da5cb5b1461029b5780639623609d146102c857600080fd5b8063238181ae116100c6578063238181ae146101a45780633ab76e9f146101d15780636bd9f516146101fe5780637eff275e1461023b57600080fd5b80630652b57a146100f857806307c8f7b01461011a57806313af40351461013a578063204e1c7a1461015a575b600080fd5b34801561010457600080fd5b506101186101133660046114be565b610376565b005b34801561012657600080fd5b506101186101353660046114db565b610443565b34801561014657600080fd5b506101186101553660046114be565b61050e565b34801561016657600080fd5b5061017a6101753660046114be565b6105ff565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156101b057600080fd5b506101c46101bf3660046114be565b610820565b60405161019b9190611573565b3480156101dd57600080fd5b5060035461017a9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561020a57600080fd5b5061022e6102193660046114be565b60016020526000908152604090205460ff1681565b60405161019b91906115b5565b34801561024757600080fd5b506101186102563660046115f6565b6108ba565b34801561026757600080fd5b50610118610276366004611751565b610ae6565b34801561028757600080fd5b506101186102963660046117a1565b610b96565b3480156102a757600080fd5b5060005461017a9073ffffffffffffffffffffffffffffffffffffffff1681565b6101186102d63660046117d3565b610c83565b3480156102e757600080fd5b506101186102f63660046115f6565b610f13565b34801561030757600080fd5b50610118610316366004611849565b611214565b34801561032757600080fd5b5060035474010000000000000000000000000000000000000000900460ff16604051901515815260200161019b565b34801561036257600080fd5b5061017a6103713660046114be565b611323565b60005473ffffffffffffffffffffffffffffffffffffffff1633146103fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064015b60405180910390fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff1633146104c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016103f3565b6003805491151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff16331461058f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016103f3565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081178255604051909133917f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d769190a350565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604081205460ff168181600281111561063b5761063b611586565b036106b6578273ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561068b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106af9190611890565b9392505050565b60018160028111156106ca576106ca611586565b0361071a578273ffffffffffffffffffffffffffffffffffffffff1663aaf10f426040518163ffffffff1660e01b8152600401602060405180830381865afa15801561068b573d6000803e3d6000fd5b600281600281111561072e5761072e611586565b036107b85760035473ffffffffffffffffffffffffffffffffffffffff8481166000908152600260205260409081902090517fbf40fac1000000000000000000000000000000000000000000000000000000008152919092169163bf40fac19161079b91906004016118fa565b602060405180830381865afa15801561068b573d6000803e3d6000fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f50726f787941646d696e3a20756e6b6e6f776e2070726f78792074797065000060448201526064016103f3565b50919050565b60026020526000908152604090208054610839906118ad565b80601f0160208091040260200160405190810160405280929190818152602001828054610865906118ad565b80156108b25780601f10610887576101008083540402835291602001916108b2565b820191906000526020600020905b81548152906001019060200180831161089557829003601f168201915b505050505081565b60005473ffffffffffffffffffffffffffffffffffffffff16331461093b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016103f3565b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604081205460ff169081600281111561097757610977611586565b03610a03576040517f8f28397000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152841690638f283970906024015b600060405180830381600087803b1580156109e657600080fd5b505af11580156109fa573d6000803e3d6000fd5b50505050505050565b6001816002811115610a1757610a17611586565b03610a70576040517f13af403500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301528416906313af4035906024016109cc565b6002816002811115610a8457610a84611586565b036107b8576003546040517ff2fde38b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301529091169063f2fde38b906024016109cc565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b67576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016103f3565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600260205260409020610ae182826119e9565b60005473ffffffffffffffffffffffffffffffffffffffff163314610c17576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016103f3565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600160208190526040909120805483927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0090911690836002811115610c7a57610c7a611586565b02179055505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610d04576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016103f3565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604081205460ff1690816002811115610d4057610d40611586565b03610e06576040517f4f1ef28600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851690634f1ef286903490610d9b9087908790600401611b03565b60006040518083038185885af1158015610db9573d6000803e3d6000fd5b50505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610e009190810190611b3a565b50610f0d565b610e108484610f13565b60008473ffffffffffffffffffffffffffffffffffffffff163484604051610e389190611bb1565b60006040518083038185875af1925050503d8060008114610e75576040519150601f19603f3d011682016040523d82523d6000602084013e610e7a565b606091505b5050905080610f0b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f50726f787941646d696e3a2063616c6c20746f2070726f78792061667465722060448201527f75706772616465206661696c656400000000000000000000000000000000000060648201526084016103f3565b505b50505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610f94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016103f3565b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604081205460ff1690816002811115610fd057610fd0611586565b03611029576040517f3659cfe600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152841690633659cfe6906024016109cc565b600181600281111561103d5761103d611586565b036110bc576040517f9b0b0fda0000000000000000000000000000000000000000000000000000000081527f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc600482015273ffffffffffffffffffffffffffffffffffffffff8381166024830152841690639b0b0fda906044016109cc565b60028160028111156110d0576110d0611586565b036107b85773ffffffffffffffffffffffffffffffffffffffff831660009081526002602052604081208054611105906118ad565b80601f0160208091040260200160405190810160405280929190818152602001828054611131906118ad565b801561117e5780601f106111535761010080835404028352916020019161117e565b820191906000526020600020905b81548152906001019060200180831161116157829003601f168201915b50506003546040517f9b2ea4bd00000000000000000000000000000000000000000000000000000000815294955073ffffffffffffffffffffffffffffffffffffffff1693639b2ea4bd93506111dc92508591508790600401611bcd565b600060405180830381600087803b1580156111f657600080fd5b505af115801561120a573d6000803e3d6000fd5b5050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611295576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016103f3565b6003546040517f9b2ea4bd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690639b2ea4bd906112ed9085908590600401611bcd565b600060405180830381600087803b15801561130757600080fd5b505af115801561131b573d6000803e3d6000fd5b505050505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604081205460ff168181600281111561135f5761135f611586565b036113af578273ffffffffffffffffffffffffffffffffffffffff1663f851a4406040518163ffffffff1660e01b8152600401602060405180830381865afa15801561068b573d6000803e3d6000fd5b60018160028111156113c3576113c3611586565b03611413578273ffffffffffffffffffffffffffffffffffffffff1663893d20e86040518163ffffffff1660e01b8152600401602060405180830381865afa15801561068b573d6000803e3d6000fd5b600281600281111561142757611427611586565b036107b857600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561068b573d6000803e3d6000fd5b73ffffffffffffffffffffffffffffffffffffffff811681146114bb57600080fd5b50565b6000602082840312156114d057600080fd5b81356106af81611499565b6000602082840312156114ed57600080fd5b813580151581146106af57600080fd5b60005b83811015611518578181015183820152602001611500565b83811115610f0d5750506000910152565b600081518084526115418160208601602086016114fd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006106af6020830184611529565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60208101600383106115f0577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b6000806040838503121561160957600080fd5b823561161481611499565b9150602083013561162481611499565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156116a5576116a561162f565b604052919050565b600067ffffffffffffffff8211156116c7576116c761162f565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b6000611706611701846116ad565b61165e565b905082815283838301111561171a57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261174257600080fd5b6106af838335602085016116f3565b6000806040838503121561176457600080fd5b823561176f81611499565b9150602083013567ffffffffffffffff81111561178b57600080fd5b61179785828601611731565b9150509250929050565b600080604083850312156117b457600080fd5b82356117bf81611499565b915060208301356003811061162457600080fd5b6000806000606084860312156117e857600080fd5b83356117f381611499565b9250602084013561180381611499565b9150604084013567ffffffffffffffff81111561181f57600080fd5b8401601f8101861361183057600080fd5b61183f868235602084016116f3565b9150509250925092565b6000806040838503121561185c57600080fd5b823567ffffffffffffffff81111561187357600080fd5b61187f85828601611731565b925050602083013561162481611499565b6000602082840312156118a257600080fd5b81516106af81611499565b600181811c908216806118c157607f821691505b60208210810361081a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060208083526000845461190e816118ad565b8084870152604060018084166000811461192f576001811461196757611995565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a01019550611995565b896000528660002060005b8581101561198d5781548b8201860152908301908801611972565b8a0184019650505b509398975050505050505050565b601f821115610ae157600081815260208120601f850160051c810160208610156119ca5750805b601f850160051c820191505b8181101561131b578281556001016119d6565b815167ffffffffffffffff811115611a0357611a0361162f565b611a1781611a1184546118ad565b846119a3565b602080601f831160018114611a6a5760008415611a345750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b17855561131b565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015611ab757888601518255948401946001909101908401611a98565b5085821015611af357878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b73ffffffffffffffffffffffffffffffffffffffff83168152604060208201526000611b326040830184611529565b949350505050565b600060208284031215611b4c57600080fd5b815167ffffffffffffffff811115611b6357600080fd5b8201601f81018413611b7457600080fd5b8051611b82611701826116ad565b818152856020838501011115611b9757600080fd5b611ba88260208301602086016114fd565b95945050505050565b60008251611bc38184602087016114fd565b9190910192915050565b604081526000611be06040830185611529565b905073ffffffffffffffffffffffffffffffffffffffff83166020830152939250505056fea164736f6c634300080f000a", "devdoc": { @@ -452,7 +452,7 @@ "storageLayout": { "storage": [ { - "astId": 28443, + "astId": 27540, "contract": "contracts/universal/ProxyAdmin.sol:ProxyAdmin", "label": "owner", "offset": 0, @@ -460,15 +460,15 @@ "type": "t_address" }, { - "astId": 24435, + "astId": 24589, "contract": "contracts/universal/ProxyAdmin.sol:ProxyAdmin", "label": "proxyType", "offset": 0, "slot": "1", - "type": "t_mapping(t_address,t_enum(ProxyType)24429)" + "type": "t_mapping(t_address,t_enum(ProxyType)24583)" }, { - "astId": 24440, + "astId": 24594, "contract": "contracts/universal/ProxyAdmin.sol:ProxyAdmin", "label": "implementationName", "offset": 0, @@ -476,15 +476,15 @@ "type": "t_mapping(t_address,t_string_storage)" }, { - "astId": 24444, + "astId": 24598, "contract": "contracts/universal/ProxyAdmin.sol:ProxyAdmin", "label": "addressManager", "offset": 0, "slot": "3", - "type": "t_contract(AddressManager)2693" + "type": "t_contract(AddressManager)2662" }, { - "astId": 24448, + "astId": 24602, "contract": "contracts/universal/ProxyAdmin.sol:ProxyAdmin", "label": "upgrading", "offset": 20, @@ -503,22 +503,22 @@ "label": "bool", "numberOfBytes": "1" }, - "t_contract(AddressManager)2693": { + "t_contract(AddressManager)2662": { "encoding": "inplace", "label": "contract AddressManager", "numberOfBytes": "20" }, - "t_enum(ProxyType)24429": { + "t_enum(ProxyType)24583": { "encoding": "inplace", "label": "enum ProxyAdmin.ProxyType", "numberOfBytes": "1" }, - "t_mapping(t_address,t_enum(ProxyType)24429)": { + "t_mapping(t_address,t_enum(ProxyType)24583)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => enum ProxyAdmin.ProxyType)", "numberOfBytes": "32", - "value": "t_enum(ProxyType)24429" + "value": "t_enum(ProxyType)24583" }, "t_mapping(t_address,t_string_storage)": { "encoding": "mapping", diff --git a/packages/contracts-bedrock/deployments/goerli/solcInputs/cd42cb04f3b6a78e5824c9f427d0a55d.json b/packages/contracts-bedrock/deployments/alpha-1/solcInputs/ada691c3f5ff59bd3e60fdb28388fb6d.json similarity index 83% rename from packages/contracts-bedrock/deployments/goerli/solcInputs/cd42cb04f3b6a78e5824c9f427d0a55d.json rename to packages/contracts-bedrock/deployments/alpha-1/solcInputs/ada691c3f5ff59bd3e60fdb28388fb6d.json index dcd9cf1509313..4cbb07b7a8d77 100644 --- a/packages/contracts-bedrock/deployments/goerli/solcInputs/cd42cb04f3b6a78e5824c9f427d0a55d.json +++ b/packages/contracts-bedrock/deployments/alpha-1/solcInputs/ada691c3f5ff59bd3e60fdb28388fb6d.json @@ -5,13 +5,13 @@ "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport { Predeploys } from \"../libraries/Predeploys.sol\";\nimport { OptimismPortal } from \"./OptimismPortal.sol\";\nimport { CrossDomainMessenger } from \"../universal/CrossDomainMessenger.sol\";\nimport { Semver } from \"../universal/Semver.sol\";\n\n/**\n * @custom:proxied\n * @title L1CrossDomainMessenger\n * @notice The L1CrossDomainMessenger is a message passing interface between L1 and L2 responsible\n * for sending and receiving data on the L1 side. Users are encouraged to use this\n * interface instead of interacting with lower-level contracts directly.\n */\ncontract L1CrossDomainMessenger is CrossDomainMessenger, Semver {\n /**\n * @notice Address of the OptimismPortal.\n */\n OptimismPortal public immutable portal;\n\n /**\n * @custom:semver 0.0.1\n *\n * @param _portal Address of the OptimismPortal contract on this network.\n */\n constructor(OptimismPortal _portal) Semver(0, 0, 1) {\n portal = _portal;\n initialize();\n }\n\n /**\n * @notice Initializer.\n */\n function initialize() public initializer {\n address[] memory blockedSystemAddresses = new address[](1);\n blockedSystemAddresses[0] = address(this);\n __CrossDomainMessenger_init(Predeploys.L2_CROSS_DOMAIN_MESSENGER, blockedSystemAddresses);\n }\n\n /**\n * @notice Sends a message via the OptimismPortal contract.\n *\n * @param _to Address of the recipient on L2.\n * @param _gasLimit Minimum gas limit that the message can be executed with.\n * @param _value ETH value to attach to the message and send to the recipient.\n * @param _data Data to attach to the message and call the recipient with.\n */\n function _sendMessage(\n address _to,\n uint64 _gasLimit,\n uint256 _value,\n bytes memory _data\n ) internal override {\n portal.depositTransaction{ value: _value }(_to, _value, _gasLimit, false, _data);\n }\n\n /**\n * @notice Checks whether the message being sent from the other messenger.\n *\n * @return True if the message was sent from the messenger, false otherwise.\n */\n function _isOtherMessenger() internal view override returns (bool) {\n return msg.sender == address(portal) && portal.l2Sender() == otherMessenger;\n }\n}\n" }, "contracts/L1/L1StandardBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport { Predeploys } from \"../libraries/Predeploys.sol\";\nimport { StandardBridge } from \"../universal/StandardBridge.sol\";\nimport { Semver } from \"../universal/Semver.sol\";\n\n/**\n * @custom:proxied\n * @title L1StandardBridge\n * @notice The L1StandardBridge is responsible for transfering ETH and ERC20 tokens between L1 and\n * L2. ERC20 tokens deposited into L2 are escrowed within this contract until withdrawal.\n * ETH is transferred to and escrowed within the OptimismPortal contract.\n */\ncontract L1StandardBridge is StandardBridge, Semver {\n /**\n * @custom:legacy\n * @notice Emitted whenever a deposit of ETH from L1 into L2 is initiated.\n *\n * @param from Address of the depositor.\n * @param to Address of the recipient on L2.\n * @param amount Amount of ETH deposited.\n * @param extraData Extra data attached to the deposit.\n */\n event ETHDepositInitiated(\n address indexed from,\n address indexed to,\n uint256 amount,\n bytes extraData\n );\n\n /**\n * @custom:legacy\n * @notice Emitted whenever a withdrawal of ETH from L2 to L1 is finalized.\n *\n * @param from Address of the withdrawer.\n * @param to Address of the recipient on L1.\n * @param amount Amount of ETH withdrawn.\n * @param extraData Extra data attached to the withdrawal.\n */\n event ETHWithdrawalFinalized(\n address indexed from,\n address indexed to,\n uint256 amount,\n bytes extraData\n );\n\n /**\n * @custom:legacy\n * @notice Emitted whenever an ERC20 deposit is initiated.\n *\n * @param l1Token Address of the token on L1.\n * @param l2Token Address of the corresponding token on L2.\n * @param from Address of the depositor.\n * @param to Address of the recipient on L2.\n * @param amount Amount of the ERC20 deposited.\n * @param extraData Extra data attached to the deposit.\n */\n event ERC20DepositInitiated(\n address indexed l1Token,\n address indexed l2Token,\n address indexed from,\n address to,\n uint256 amount,\n bytes extraData\n );\n\n /**\n * @custom:legacy\n * @notice Emitted whenever an ERC20 withdrawal is finalized.\n *\n * @param l1Token Address of the token on L1.\n * @param l2Token Address of the corresponding token on L2.\n * @param from Address of the withdrawer.\n * @param to Address of the recipient on L1.\n * @param amount Amount of the ERC20 withdrawn.\n * @param extraData Extra data attached to the withdrawal.\n */\n event ERC20WithdrawalFinalized(\n address indexed l1Token,\n address indexed l2Token,\n address indexed from,\n address to,\n uint256 amount,\n bytes extraData\n );\n\n /**\n * @custom:semver 0.0.1\n *\n * @param _messenger Address of the L1CrossDomainMessenger.\n */\n constructor(address payable _messenger) Semver(0, 0, 1) {\n initialize(_messenger);\n }\n\n /**\n * @custom:legacy\n * @notice Finalizes a withdrawal of ERC20 tokens from L2.\n *\n * @param _l1Token Address of the token on L1.\n * @param _l2Token Address of the corresponding token on L2.\n * @param _from Address of the withdrawer on L2.\n * @param _to Address of the recipient on L1.\n * @param _amount Amount of ETH to withdraw.\n * @param _extraData Optional data forwarded from L2.\n */\n function finalizeERC20Withdrawal(\n address _l1Token,\n address _l2Token,\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _extraData\n ) external onlyOtherBridge {\n emit ERC20WithdrawalFinalized(_l1Token, _l2Token, _from, _to, _amount, _extraData);\n finalizeBridgeERC20(_l1Token, _l2Token, _from, _to, _amount, _extraData);\n }\n\n /**\n * @custom:legacy\n * @notice Deposits some amount of ETH into the sender's account on L2.\n *\n * @param _minGasLimit Minimum gas limit for the deposit message on L2.\n * @param _extraData Optional data to forward to L2. Data supplied here will not be used to\n * execute any code on L2 and is only emitted as extra data for the\n * convenience of off-chain tooling.\n */\n function depositETH(uint32 _minGasLimit, bytes calldata _extraData) external payable onlyEOA {\n _initiateETHDeposit(msg.sender, msg.sender, _minGasLimit, _extraData);\n }\n\n /**\n * @custom:legacy\n * @notice Deposits some amount of ETH into a target account on L2.\n * Note that if ETH is sent to a contract on L2 and the call fails, then that ETH will\n * be locked in the L2StandardBridge. ETH may be recoverable if the call can be\n * successfully replayed by increasing the amount of gas supplied to the call. If the\n * call will fail for any amount of gas, then the ETH will be locked permanently.\n *\n * @param _to Address of the recipient on L2.\n * @param _minGasLimit Minimum gas limit for the deposit message on L2.\n * @param _extraData Optional data to forward to L2. Data supplied here will not be used to\n * execute any code on L2 and is only emitted as extra data for the\n * convenience of off-chain tooling.\n */\n function depositETHTo(\n address _to,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) external payable {\n _initiateETHDeposit(msg.sender, _to, _minGasLimit, _extraData);\n }\n\n /**\n * @custom:legacy\n * @notice Deposits some amount of ERC20 tokens into the sender's account on L2.\n *\n * @param _l1Token Address of the L1 token being deposited.\n * @param _l2Token Address of the corresponding token on L2.\n * @param _amount Amount of the ERC20 to deposit.\n * @param _minGasLimit Minimum gas limit for the deposit message on L2.\n * @param _extraData Optional data to forward to L2. Data supplied here will not be used to\n * execute any code on L2 and is only emitted as extra data for the\n * convenience of off-chain tooling.\n */\n function depositERC20(\n address _l1Token,\n address _l2Token,\n uint256 _amount,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) external virtual onlyEOA {\n _initiateERC20Deposit(\n _l1Token,\n _l2Token,\n msg.sender,\n msg.sender,\n _amount,\n _minGasLimit,\n _extraData\n );\n }\n\n /**\n * @custom:legacy\n * @notice Deposits some amount of ERC20 tokens into a target account on L2.\n *\n * @param _l1Token Address of the L1 token being deposited.\n * @param _l2Token Address of the corresponding token on L2.\n * @param _to Address of the recipient on L2.\n * @param _amount Amount of the ERC20 to deposit.\n * @param _minGasLimit Minimum gas limit for the deposit message on L2.\n * @param _extraData Optional data to forward to L2. Data supplied here will not be used to\n * execute any code on L2 and is only emitted as extra data for the\n * convenience of off-chain tooling.\n */\n function depositERC20To(\n address _l1Token,\n address _l2Token,\n address _to,\n uint256 _amount,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) external virtual {\n _initiateERC20Deposit(\n _l1Token,\n _l2Token,\n msg.sender,\n _to,\n _amount,\n _minGasLimit,\n _extraData\n );\n }\n\n /**\n * @custom:legacy\n * @notice Finalizes a withdrawal of ETH from L2.\n *\n * @param _from Address of the withdrawer on L2.\n * @param _to Address of the recipient on L1.\n * @param _amount Amount of ETH to withdraw.\n * @param _extraData Optional data forwarded from L2.\n */\n function finalizeETHWithdrawal(\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _extraData\n ) external payable onlyOtherBridge {\n emit ETHWithdrawalFinalized(_from, _to, _amount, _extraData);\n finalizeBridgeETH(_from, _to, _amount, _extraData);\n }\n\n /**\n * @custom:legacy\n * @notice Retrieves the access of the corresponding L2 bridge contract.\n *\n * @return Address of the corresponding L2 bridge contract.\n */\n function l2TokenBridge() external view returns (address) {\n return address(otherBridge);\n }\n\n /**\n * @notice Initializer.\n *\n * @param _messenger Address of the L1CrossDomainMessenger.\n */\n function initialize(address payable _messenger) public initializer {\n __StandardBridge_init(_messenger, payable(Predeploys.L2_STANDARD_BRIDGE));\n }\n\n /**\n * @notice Internal function for initiating an ETH deposit.\n *\n * @param _from Address of the sender on L1.\n * @param _to Address of the recipient on L2.\n * @param _minGasLimit Minimum gas limit for the deposit message on L2.\n * @param _extraData Optional data to forward to L2.\n */\n function _initiateETHDeposit(\n address _from,\n address _to,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) internal {\n emit ETHDepositInitiated(_from, _to, msg.value, _extraData);\n _initiateBridgeETH(_from, _to, msg.value, _minGasLimit, _extraData);\n }\n\n /**\n * @notice Internal function for initiating an ERC20 deposit.\n *\n * @param _l1Token Address of the L1 token being deposited.\n * @param _l2Token Address of the corresponding token on L2.\n * @param _from Address of the sender on L1.\n * @param _to Address of the recipient on L2.\n * @param _amount Amount of the ERC20 to deposit.\n * @param _minGasLimit Minimum gas limit for the deposit message on L2.\n * @param _extraData Optional data to forward to L2.\n */\n function _initiateERC20Deposit(\n address _l1Token,\n address _l2Token,\n address _from,\n address _to,\n uint256 _amount,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) internal {\n emit ERC20DepositInitiated(_l1Token, _l2Token, _from, _to, _amount, _extraData);\n _initiateBridgeERC20(_l1Token, _l2Token, _from, _to, _amount, _minGasLimit, _extraData);\n }\n}\n" + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport { Predeploys } from \"../libraries/Predeploys.sol\";\nimport { StandardBridge } from \"../universal/StandardBridge.sol\";\nimport { Semver } from \"../universal/Semver.sol\";\n\n/**\n * @custom:proxied\n * @title L1StandardBridge\n * @notice The L1StandardBridge is responsible for transfering ETH and ERC20 tokens between L1 and\n * L2. ERC20 tokens deposited into L2 are escrowed within this contract until withdrawal.\n * ETH is transferred to and escrowed within the OptimismPortal contract.\n */\ncontract L1StandardBridge is StandardBridge, Semver {\n /**\n * @custom:legacy\n * @notice Emitted whenever a deposit of ETH from L1 into L2 is initiated.\n *\n * @param from Address of the depositor.\n * @param to Address of the recipient on L2.\n * @param amount Amount of ETH deposited.\n * @param extraData Extra data attached to the deposit.\n */\n event ETHDepositInitiated(\n address indexed from,\n address indexed to,\n uint256 amount,\n bytes extraData\n );\n\n /**\n * @custom:legacy\n * @notice Emitted whenever a withdrawal of ETH from L2 to L1 is finalized.\n *\n * @param from Address of the withdrawer.\n * @param to Address of the recipient on L1.\n * @param amount Amount of ETH withdrawn.\n * @param extraData Extra data attached to the withdrawal.\n */\n event ETHWithdrawalFinalized(\n address indexed from,\n address indexed to,\n uint256 amount,\n bytes extraData\n );\n\n /**\n * @custom:legacy\n * @notice Emitted whenever an ERC20 deposit is initiated.\n *\n * @param l1Token Address of the token on L1.\n * @param l2Token Address of the corresponding token on L2.\n * @param from Address of the depositor.\n * @param to Address of the recipient on L2.\n * @param amount Amount of the ERC20 deposited.\n * @param extraData Extra data attached to the deposit.\n */\n event ERC20DepositInitiated(\n address indexed l1Token,\n address indexed l2Token,\n address indexed from,\n address to,\n uint256 amount,\n bytes extraData\n );\n\n /**\n * @custom:legacy\n * @notice Emitted whenever an ERC20 withdrawal is finalized.\n *\n * @param l1Token Address of the token on L1.\n * @param l2Token Address of the corresponding token on L2.\n * @param from Address of the withdrawer.\n * @param to Address of the recipient on L1.\n * @param amount Amount of the ERC20 withdrawn.\n * @param extraData Extra data attached to the withdrawal.\n */\n event ERC20WithdrawalFinalized(\n address indexed l1Token,\n address indexed l2Token,\n address indexed from,\n address to,\n uint256 amount,\n bytes extraData\n );\n\n /**\n * @custom:semver 0.0.2\n *\n * @param _messenger Address of the L1CrossDomainMessenger.\n */\n constructor(address payable _messenger)\n Semver(0, 0, 2)\n StandardBridge(_messenger, payable(Predeploys.L2_STANDARD_BRIDGE))\n {}\n\n /**\n * @custom:legacy\n * @notice Finalizes a withdrawal of ERC20 tokens from L2.\n *\n * @param _l1Token Address of the token on L1.\n * @param _l2Token Address of the corresponding token on L2.\n * @param _from Address of the withdrawer on L2.\n * @param _to Address of the recipient on L1.\n * @param _amount Amount of ETH to withdraw.\n * @param _extraData Optional data forwarded from L2.\n */\n function finalizeERC20Withdrawal(\n address _l1Token,\n address _l2Token,\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _extraData\n ) external onlyOtherBridge {\n emit ERC20WithdrawalFinalized(_l1Token, _l2Token, _from, _to, _amount, _extraData);\n finalizeBridgeERC20(_l1Token, _l2Token, _from, _to, _amount, _extraData);\n }\n\n /**\n * @custom:legacy\n * @notice Deposits some amount of ETH into the sender's account on L2.\n *\n * @param _minGasLimit Minimum gas limit for the deposit message on L2.\n * @param _extraData Optional data to forward to L2. Data supplied here will not be used to\n * execute any code on L2 and is only emitted as extra data for the\n * convenience of off-chain tooling.\n */\n function depositETH(uint32 _minGasLimit, bytes calldata _extraData) external payable onlyEOA {\n _initiateETHDeposit(msg.sender, msg.sender, _minGasLimit, _extraData);\n }\n\n /**\n * @custom:legacy\n * @notice Deposits some amount of ETH into a target account on L2.\n * Note that if ETH is sent to a contract on L2 and the call fails, then that ETH will\n * be locked in the L2StandardBridge. ETH may be recoverable if the call can be\n * successfully replayed by increasing the amount of gas supplied to the call. If the\n * call will fail for any amount of gas, then the ETH will be locked permanently.\n *\n * @param _to Address of the recipient on L2.\n * @param _minGasLimit Minimum gas limit for the deposit message on L2.\n * @param _extraData Optional data to forward to L2. Data supplied here will not be used to\n * execute any code on L2 and is only emitted as extra data for the\n * convenience of off-chain tooling.\n */\n function depositETHTo(\n address _to,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) external payable {\n _initiateETHDeposit(msg.sender, _to, _minGasLimit, _extraData);\n }\n\n /**\n * @custom:legacy\n * @notice Deposits some amount of ERC20 tokens into the sender's account on L2.\n *\n * @param _l1Token Address of the L1 token being deposited.\n * @param _l2Token Address of the corresponding token on L2.\n * @param _amount Amount of the ERC20 to deposit.\n * @param _minGasLimit Minimum gas limit for the deposit message on L2.\n * @param _extraData Optional data to forward to L2. Data supplied here will not be used to\n * execute any code on L2 and is only emitted as extra data for the\n * convenience of off-chain tooling.\n */\n function depositERC20(\n address _l1Token,\n address _l2Token,\n uint256 _amount,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) external virtual onlyEOA {\n _initiateERC20Deposit(\n _l1Token,\n _l2Token,\n msg.sender,\n msg.sender,\n _amount,\n _minGasLimit,\n _extraData\n );\n }\n\n /**\n * @custom:legacy\n * @notice Deposits some amount of ERC20 tokens into a target account on L2.\n *\n * @param _l1Token Address of the L1 token being deposited.\n * @param _l2Token Address of the corresponding token on L2.\n * @param _to Address of the recipient on L2.\n * @param _amount Amount of the ERC20 to deposit.\n * @param _minGasLimit Minimum gas limit for the deposit message on L2.\n * @param _extraData Optional data to forward to L2. Data supplied here will not be used to\n * execute any code on L2 and is only emitted as extra data for the\n * convenience of off-chain tooling.\n */\n function depositERC20To(\n address _l1Token,\n address _l2Token,\n address _to,\n uint256 _amount,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) external virtual {\n _initiateERC20Deposit(\n _l1Token,\n _l2Token,\n msg.sender,\n _to,\n _amount,\n _minGasLimit,\n _extraData\n );\n }\n\n /**\n * @custom:legacy\n * @notice Finalizes a withdrawal of ETH from L2.\n *\n * @param _from Address of the withdrawer on L2.\n * @param _to Address of the recipient on L1.\n * @param _amount Amount of ETH to withdraw.\n * @param _extraData Optional data forwarded from L2.\n */\n function finalizeETHWithdrawal(\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _extraData\n ) external payable onlyOtherBridge {\n emit ETHWithdrawalFinalized(_from, _to, _amount, _extraData);\n finalizeBridgeETH(_from, _to, _amount, _extraData);\n }\n\n /**\n * @custom:legacy\n * @notice Retrieves the access of the corresponding L2 bridge contract.\n *\n * @return Address of the corresponding L2 bridge contract.\n */\n function l2TokenBridge() external view returns (address) {\n return address(otherBridge);\n }\n\n /**\n * @notice Internal function for initiating an ETH deposit.\n *\n * @param _from Address of the sender on L1.\n * @param _to Address of the recipient on L2.\n * @param _minGasLimit Minimum gas limit for the deposit message on L2.\n * @param _extraData Optional data to forward to L2.\n */\n function _initiateETHDeposit(\n address _from,\n address _to,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) internal {\n emit ETHDepositInitiated(_from, _to, msg.value, _extraData);\n _initiateBridgeETH(_from, _to, msg.value, _minGasLimit, _extraData);\n }\n\n /**\n * @notice Internal function for initiating an ERC20 deposit.\n *\n * @param _l1Token Address of the L1 token being deposited.\n * @param _l2Token Address of the corresponding token on L2.\n * @param _from Address of the sender on L1.\n * @param _to Address of the recipient on L2.\n * @param _amount Amount of the ERC20 to deposit.\n * @param _minGasLimit Minimum gas limit for the deposit message on L2.\n * @param _extraData Optional data to forward to L2.\n */\n function _initiateERC20Deposit(\n address _l1Token,\n address _l2Token,\n address _from,\n address _to,\n uint256 _amount,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) internal {\n emit ERC20DepositInitiated(_l1Token, _l2Token, _from, _to, _amount, _extraData);\n _initiateBridgeERC20(_l1Token, _l2Token, _from, _to, _amount, _minGasLimit, _extraData);\n }\n}\n" }, "contracts/L1/L2OutputOracle.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport {\n OwnableUpgradeable\n} from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport { Semver } from \"../universal/Semver.sol\";\nimport { Types } from \"../libraries/Types.sol\";\n\n/**\n * @custom:proxied\n * @title L2OutputOracle\n * @notice The L2 state is committed to in this contract\n * The payable keyword is used on proposeL2Output to save gas on the msg.value check.\n * This contract should be deployed behind an upgradable proxy\n */\n// slither-disable-next-line locked-ether\ncontract L2OutputOracle is OwnableUpgradeable, Semver {\n /**\n * @notice The interval in L2 blocks at which checkpoints must be submitted.\n */\n // solhint-disable-next-line var-name-mixedcase\n uint256 public immutable SUBMISSION_INTERVAL;\n\n /**\n * @notice The number of blocks in the chain before the first block in this contract.\n */\n // solhint-disable-next-line var-name-mixedcase\n uint256 public immutable HISTORICAL_TOTAL_BLOCKS;\n\n /**\n * @notice The number of the first L2 block recorded in this contract.\n */\n // solhint-disable-next-line var-name-mixedcase\n uint256 public immutable STARTING_BLOCK_NUMBER;\n\n /**\n * @notice The timestamp of the first L2 block recorded in this contract.\n */\n // solhint-disable-next-line var-name-mixedcase\n uint256 public immutable STARTING_TIMESTAMP;\n\n /**\n * @notice The time between L2 blocks in seconds.\n */\n // solhint-disable-next-line var-name-mixedcase\n uint256 public immutable L2_BLOCK_TIME;\n\n /**\n * @notice The address of the proposer;\n */\n address public proposer;\n\n /**\n * @notice The number of the most recent L2 block recorded in this contract.\n */\n uint256 public latestBlockNumber;\n\n /**\n * @notice A mapping from L2 block numbers to the respective output root. Note that these\n * outputs should not be considered finalized until the finalization period (as defined\n * in the Optimism Portal) has passed.\n */\n mapping(uint256 => Types.OutputProposal) internal l2Outputs;\n\n /**\n * @notice Emitted when an output is proposed.\n *\n * @param outputRoot The output root.\n * @param l1Timestamp The L1 timestamp when proposed.\n * @param l2BlockNumber The L2 block number of the output root.\n */\n event OutputProposed(\n bytes32 indexed outputRoot,\n uint256 indexed l1Timestamp,\n uint256 indexed l2BlockNumber\n );\n\n /**\n * @notice Emitted when an output is deleted.\n *\n * @param outputRoot The output root.\n * @param l1Timestamp The L1 timestamp when proposed.\n * @param l2BlockNumber The L2 block number of the output root.\n */\n event OutputDeleted(\n bytes32 indexed outputRoot,\n uint256 indexed l1Timestamp,\n uint256 indexed l2BlockNumber\n );\n\n /**\n * @notice Emitted when the proposer address is changed.\n *\n * @param previousProposer The previous proposer address.\n * @param newProposer The new proposer address.\n */\n event ProposerChanged(address indexed previousProposer, address indexed newProposer);\n\n /**\n * @notice Reverts if called by any account other than the proposer.\n */\n modifier onlyProposer() {\n require(proposer == msg.sender, \"L2OutputOracle: function can only be called by proposer\");\n _;\n }\n\n /**\n * @custom:semver 0.0.1\n *\n * @param _submissionInterval Interval in blocks at which checkpoints must be submitted.\n * @param _genesisL2Output The initial L2 output of the L2 chain.\n * @param _historicalTotalBlocks Number of blocks preceding this L2 chain.\n * @param _startingBlockNumber The number of the first L2 block.\n * @param _startingTimestamp The timestamp of the first L2 block.\n * @param _l2BlockTime The timestamp of the first L2 block.\n * @param _proposer The address of the proposer.\n * @param _owner The address of the owner.\n */\n constructor(\n uint256 _submissionInterval,\n bytes32 _genesisL2Output,\n uint256 _historicalTotalBlocks,\n uint256 _startingBlockNumber,\n uint256 _startingTimestamp,\n uint256 _l2BlockTime,\n address _proposer,\n address _owner\n ) Semver(0, 0, 1) {\n require(\n _l2BlockTime < block.timestamp,\n \"L2OutputOracle: initial L2 block time must be less than current time\"\n );\n\n SUBMISSION_INTERVAL = _submissionInterval;\n HISTORICAL_TOTAL_BLOCKS = _historicalTotalBlocks;\n STARTING_BLOCK_NUMBER = _startingBlockNumber;\n STARTING_TIMESTAMP = _startingTimestamp;\n L2_BLOCK_TIME = _l2BlockTime;\n\n initialize(_genesisL2Output, _startingBlockNumber, _proposer, _owner);\n }\n\n /**\n * @notice Deletes the most recent output. This is used to remove the most recent output in the\n * event that an erreneous output is submitted. It can only be called by the contract's\n * owner, not the proposer. Longer term, this should be replaced with a more robust\n * mechanism which will allow deletion of proposals shown to be invalid by a fault\n * proof.\n *\n * @param _proposal Represents the output proposal to delete\n */\n function deleteL2Output(Types.OutputProposal memory _proposal) external onlyOwner {\n Types.OutputProposal memory outputToDelete = l2Outputs[latestBlockNumber];\n\n require(\n _proposal.outputRoot == outputToDelete.outputRoot,\n \"L2OutputOracle: output root to delete does not match the latest output proposal\"\n );\n\n require(\n _proposal.timestamp == outputToDelete.timestamp,\n \"L2OutputOracle: timestamp to delete does not match the latest output proposal\"\n );\n\n emit OutputDeleted(outputToDelete.outputRoot, outputToDelete.timestamp, latestBlockNumber);\n\n delete l2Outputs[latestBlockNumber];\n latestBlockNumber = latestBlockNumber - SUBMISSION_INTERVAL;\n }\n\n /**\n * @notice Accepts an outputRoot and the timestamp of the corresponding L2 block. The\n * timestamp must be equal to the current value returned by `nextTimestamp()` in order\n * to be accepted. This function may only be called by the Proposer.\n *\n * @param _outputRoot The L2 output of the checkpoint block.\n * @param _l2BlockNumber The L2 block number that resulted in _outputRoot.\n * @param _l1Blockhash A block hash which must be included in the current chain.\n * @param _l1BlockNumber The block number with the specified block hash.\n */\n function proposeL2Output(\n bytes32 _outputRoot,\n uint256 _l2BlockNumber,\n bytes32 _l1Blockhash,\n uint256 _l1BlockNumber\n ) external payable onlyProposer {\n require(\n _l2BlockNumber == nextBlockNumber(),\n \"L2OutputOracle: block number must be equal to next expected block number\"\n );\n\n require(\n computeL2Timestamp(_l2BlockNumber) < block.timestamp,\n \"L2OutputOracle: cannot propose L2 output in the future\"\n );\n\n require(\n _outputRoot != bytes32(0),\n \"L2OutputOracle: L2 output proposal cannot be the zero hash\"\n );\n\n if (_l1Blockhash != bytes32(0)) {\n // This check allows the proposer to propose an output based on a given L1 block,\n // without fear that it will be reorged out.\n // It will also revert if the blockheight provided is more than 256 blocks behind the\n // chain tip (as the hash will return as zero). This does open the door to a griefing\n // attack in which the proposer's submission is censored until the block is no longer\n // retrievable, if the proposer is experiencing this attack it can simply leave out the\n // blockhash value, and delay submission until it is confident that the L1 block is\n // finalized.\n require(\n blockhash(_l1BlockNumber) == _l1Blockhash,\n \"L2OutputOracle: blockhash does not match the hash at the expected height\"\n );\n }\n\n l2Outputs[_l2BlockNumber] = Types.OutputProposal(_outputRoot, block.timestamp);\n latestBlockNumber = _l2BlockNumber;\n\n emit OutputProposed(_outputRoot, block.timestamp, _l2BlockNumber);\n }\n\n /**\n * @notice Returns the L2 output proposal associated with a target L2 block number. If the\n * L2 block number provided is between checkpoints, this function will rerutn the next\n * proposal for the next checkpoint.\n * Reverts if the output proposal is either not found, or predates\n * the STARTING_BLOCK_NUMBER.\n *\n * @param _l2BlockNumber The L2 block number of the target block.\n */\n function getL2Output(uint256 _l2BlockNumber)\n external\n view\n returns (Types.OutputProposal memory)\n {\n require(\n _l2BlockNumber >= STARTING_BLOCK_NUMBER,\n \"L2OutputOracle: block number cannot be less than the starting block number.\"\n );\n\n // Find the distance between _l2BlockNumber, and the checkpoint block before it.\n uint256 offset = (_l2BlockNumber - STARTING_BLOCK_NUMBER) % SUBMISSION_INTERVAL;\n\n // If the offset is zero, then the _l2BlockNumber should be checkpointed.\n // Otherwise, we'll look up the next block that will be checkpointed.\n uint256 lookupBlockNumber = offset == 0\n ? _l2BlockNumber\n : _l2BlockNumber + (SUBMISSION_INTERVAL - offset);\n\n Types.OutputProposal memory output = l2Outputs[lookupBlockNumber];\n require(\n output.outputRoot != bytes32(0),\n \"L2OutputOracle: No output found for that block number.\"\n );\n return output;\n }\n\n /**\n * @notice Initializer.\n *\n * @param _genesisL2Output The initial L2 output of the L2 chain.\n * @param _startingBlockNumber The timestamp to start L2 block at.\n * @param _proposer The address of the proposer.\n * @param _owner The address of the owner.\n */\n function initialize(\n bytes32 _genesisL2Output,\n uint256 _startingBlockNumber,\n address _proposer,\n address _owner\n ) public initializer {\n l2Outputs[_startingBlockNumber] = Types.OutputProposal(_genesisL2Output, block.timestamp);\n latestBlockNumber = _startingBlockNumber;\n __Ownable_init();\n changeProposer(_proposer);\n _transferOwnership(_owner);\n }\n\n /**\n * @notice Transfers the proposer role to a new account (`newProposer`).\n * Can only be called by the current owner.\n */\n function changeProposer(address _newProposer) public onlyOwner {\n require(\n _newProposer != address(0),\n \"L2OutputOracle: new proposer cannot be the zero address\"\n );\n\n require(\n _newProposer != owner(),\n \"L2OutputOracle: proposer cannot be the same as the owner\"\n );\n\n emit ProposerChanged(proposer, _newProposer);\n proposer = _newProposer;\n }\n\n /**\n * @notice Computes the block number of the next L2 block that needs to be checkpointed.\n */\n function nextBlockNumber() public view returns (uint256) {\n return latestBlockNumber + SUBMISSION_INTERVAL;\n }\n\n /**\n * @notice Returns the L2 timestamp corresponding to a given L2 block number.\n * Returns a null output proposal if none is found.\n *\n * @param _l2BlockNumber The L2 block number of the target block.\n */\n function computeL2Timestamp(uint256 _l2BlockNumber) public view returns (uint256) {\n require(\n _l2BlockNumber >= STARTING_BLOCK_NUMBER,\n \"L2OutputOracle: block number must be greater than or equal to starting block number\"\n );\n\n return STARTING_TIMESTAMP + ((_l2BlockNumber - STARTING_BLOCK_NUMBER) * L2_BLOCK_TIME);\n }\n}\n" + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport {\n OwnableUpgradeable\n} from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport { Semver } from \"../universal/Semver.sol\";\nimport { Types } from \"../libraries/Types.sol\";\n\n/**\n * @custom:proxied\n * @title L2OutputOracle\n * @notice The L2 state is committed to in this contract\n * The payable keyword is used on proposeL2Output to save gas on the msg.value check.\n * This contract should be deployed behind an upgradable proxy\n */\n// slither-disable-next-line locked-ether\ncontract L2OutputOracle is OwnableUpgradeable, Semver {\n /**\n * @notice The interval in L2 blocks at which checkpoints must be submitted.\n */\n // solhint-disable-next-line var-name-mixedcase\n uint256 public immutable SUBMISSION_INTERVAL;\n\n /**\n * @notice The number of blocks in the chain before the first block in this contract.\n */\n // solhint-disable-next-line var-name-mixedcase\n uint256 public immutable HISTORICAL_TOTAL_BLOCKS;\n\n /**\n * @notice The number of the first L2 block recorded in this contract.\n */\n // solhint-disable-next-line var-name-mixedcase\n uint256 public immutable STARTING_BLOCK_NUMBER;\n\n /**\n * @notice The timestamp of the first L2 block recorded in this contract.\n */\n // solhint-disable-next-line var-name-mixedcase\n uint256 public immutable STARTING_TIMESTAMP;\n\n /**\n * @notice The time between L2 blocks in seconds.\n */\n // solhint-disable-next-line var-name-mixedcase\n uint256 public immutable L2_BLOCK_TIME;\n\n /**\n * @notice The address of the proposer;\n */\n address public proposer;\n\n /**\n * @notice The number of the most recent L2 block recorded in this contract.\n */\n uint256 public latestBlockNumber;\n\n /**\n * @notice A mapping from L2 block numbers to the respective output root. Note that these\n * outputs should not be considered finalized until the finalization period (as defined\n * in the Optimism Portal) has passed.\n */\n mapping(uint256 => Types.OutputProposal) internal l2Outputs;\n\n /**\n * @notice Emitted when an output is proposed.\n *\n * @param outputRoot The output root.\n * @param l1Timestamp The L1 timestamp when proposed.\n * @param l2BlockNumber The L2 block number of the output root.\n */\n event OutputProposed(\n bytes32 indexed outputRoot,\n uint256 indexed l1Timestamp,\n uint256 indexed l2BlockNumber\n );\n\n /**\n * @notice Emitted when an output is deleted.\n *\n * @param outputRoot The output root.\n * @param l1Timestamp The L1 timestamp when proposed.\n * @param l2BlockNumber The L2 block number of the output root.\n */\n event OutputDeleted(\n bytes32 indexed outputRoot,\n uint256 indexed l1Timestamp,\n uint256 indexed l2BlockNumber\n );\n\n /**\n * @notice Emitted when the proposer address is changed.\n *\n * @param previousProposer The previous proposer address.\n * @param newProposer The new proposer address.\n */\n event ProposerChanged(address indexed previousProposer, address indexed newProposer);\n\n /**\n * @notice Reverts if called by any account other than the proposer.\n */\n modifier onlyProposer() {\n require(proposer == msg.sender, \"L2OutputOracle: function can only be called by proposer\");\n _;\n }\n\n /**\n * @custom:semver 0.0.1\n *\n * @param _submissionInterval Interval in blocks at which checkpoints must be submitted.\n * @param _genesisL2Output The initial L2 output of the L2 chain.\n * @param _historicalTotalBlocks Number of blocks preceding this L2 chain.\n * @param _startingBlockNumber The number of the first L2 block.\n * @param _startingTimestamp The timestamp of the first L2 block.\n * @param _l2BlockTime The time per L2 block, in seconds.\n * @param _proposer The address of the proposer.\n * @param _owner The address of the owner.\n */\n constructor(\n uint256 _submissionInterval,\n bytes32 _genesisL2Output,\n uint256 _historicalTotalBlocks,\n uint256 _startingBlockNumber,\n uint256 _startingTimestamp,\n uint256 _l2BlockTime,\n address _proposer,\n address _owner\n ) Semver(0, 0, 1) {\n require(\n _l2BlockTime < block.timestamp,\n \"L2OutputOracle: initial L2 block time must be less than current time\"\n );\n\n SUBMISSION_INTERVAL = _submissionInterval;\n HISTORICAL_TOTAL_BLOCKS = _historicalTotalBlocks;\n STARTING_BLOCK_NUMBER = _startingBlockNumber;\n STARTING_TIMESTAMP = _startingTimestamp;\n L2_BLOCK_TIME = _l2BlockTime;\n\n initialize(_genesisL2Output, _startingBlockNumber, _proposer, _owner);\n }\n\n /**\n * @notice Deletes the most recent output. This is used to remove the most recent output in the\n * event that an erreneous output is submitted. It can only be called by the contract's\n * owner, not the proposer. Longer term, this should be replaced with a more robust\n * mechanism which will allow deletion of proposals shown to be invalid by a fault\n * proof.\n *\n * @param _proposal Represents the output proposal to delete\n */\n function deleteL2Output(Types.OutputProposal memory _proposal) external onlyOwner {\n Types.OutputProposal memory outputToDelete = l2Outputs[latestBlockNumber];\n\n require(\n _proposal.outputRoot == outputToDelete.outputRoot,\n \"L2OutputOracle: output root to delete does not match the latest output proposal\"\n );\n\n require(\n _proposal.timestamp == outputToDelete.timestamp,\n \"L2OutputOracle: timestamp to delete does not match the latest output proposal\"\n );\n\n emit OutputDeleted(outputToDelete.outputRoot, outputToDelete.timestamp, latestBlockNumber);\n\n delete l2Outputs[latestBlockNumber];\n latestBlockNumber = latestBlockNumber - SUBMISSION_INTERVAL;\n }\n\n /**\n * @notice Accepts an outputRoot and the timestamp of the corresponding L2 block. The\n * timestamp must be equal to the current value returned by `nextTimestamp()` in order\n * to be accepted. This function may only be called by the Proposer.\n *\n * @param _outputRoot The L2 output of the checkpoint block.\n * @param _l2BlockNumber The L2 block number that resulted in _outputRoot.\n * @param _l1Blockhash A block hash which must be included in the current chain.\n * @param _l1BlockNumber The block number with the specified block hash.\n */\n function proposeL2Output(\n bytes32 _outputRoot,\n uint256 _l2BlockNumber,\n bytes32 _l1Blockhash,\n uint256 _l1BlockNumber\n ) external payable onlyProposer {\n require(\n _l2BlockNumber == nextBlockNumber(),\n \"L2OutputOracle: block number must be equal to next expected block number\"\n );\n\n require(\n computeL2Timestamp(_l2BlockNumber) < block.timestamp,\n \"L2OutputOracle: cannot propose L2 output in the future\"\n );\n\n require(\n _outputRoot != bytes32(0),\n \"L2OutputOracle: L2 output proposal cannot be the zero hash\"\n );\n\n if (_l1Blockhash != bytes32(0)) {\n // This check allows the proposer to propose an output based on a given L1 block,\n // without fear that it will be reorged out.\n // It will also revert if the blockheight provided is more than 256 blocks behind the\n // chain tip (as the hash will return as zero). This does open the door to a griefing\n // attack in which the proposer's submission is censored until the block is no longer\n // retrievable, if the proposer is experiencing this attack it can simply leave out the\n // blockhash value, and delay submission until it is confident that the L1 block is\n // finalized.\n require(\n blockhash(_l1BlockNumber) == _l1Blockhash,\n \"L2OutputOracle: blockhash does not match the hash at the expected height\"\n );\n }\n\n l2Outputs[_l2BlockNumber] = Types.OutputProposal(_outputRoot, block.timestamp);\n latestBlockNumber = _l2BlockNumber;\n\n emit OutputProposed(_outputRoot, block.timestamp, _l2BlockNumber);\n }\n\n /**\n * @notice Returns the L2 output proposal associated with a target L2 block number. If the\n * L2 block number provided is between checkpoints, this function will rerutn the next\n * proposal for the next checkpoint.\n * Reverts if the output proposal is either not found, or predates\n * the STARTING_BLOCK_NUMBER.\n *\n * @param _l2BlockNumber The L2 block number of the target block.\n */\n function getL2Output(uint256 _l2BlockNumber)\n external\n view\n returns (Types.OutputProposal memory)\n {\n require(\n _l2BlockNumber >= STARTING_BLOCK_NUMBER,\n \"L2OutputOracle: block number cannot be less than the starting block number.\"\n );\n\n // Find the distance between _l2BlockNumber, and the checkpoint block before it.\n uint256 offset = (_l2BlockNumber - STARTING_BLOCK_NUMBER) % SUBMISSION_INTERVAL;\n\n // If the offset is zero, then the _l2BlockNumber should be checkpointed.\n // Otherwise, we'll look up the next block that will be checkpointed.\n uint256 lookupBlockNumber = offset == 0\n ? _l2BlockNumber\n : _l2BlockNumber + (SUBMISSION_INTERVAL - offset);\n\n Types.OutputProposal memory output = l2Outputs[lookupBlockNumber];\n require(\n output.outputRoot != bytes32(0),\n \"L2OutputOracle: No output found for that block number.\"\n );\n return output;\n }\n\n /**\n * @notice Initializer.\n *\n * @param _genesisL2Output The initial L2 output of the L2 chain.\n * @param _startingBlockNumber The timestamp to start L2 block at.\n * @param _proposer The address of the proposer.\n * @param _owner The address of the owner.\n */\n function initialize(\n bytes32 _genesisL2Output,\n uint256 _startingBlockNumber,\n address _proposer,\n address _owner\n ) public initializer {\n l2Outputs[_startingBlockNumber] = Types.OutputProposal(_genesisL2Output, block.timestamp);\n latestBlockNumber = _startingBlockNumber;\n __Ownable_init();\n changeProposer(_proposer);\n _transferOwnership(_owner);\n }\n\n /**\n * @notice Transfers the proposer role to a new account (`newProposer`).\n * Can only be called by the current owner.\n */\n function changeProposer(address _newProposer) public onlyOwner {\n require(\n _newProposer != address(0),\n \"L2OutputOracle: new proposer cannot be the zero address\"\n );\n\n require(\n _newProposer != owner(),\n \"L2OutputOracle: proposer cannot be the same as the owner\"\n );\n\n emit ProposerChanged(proposer, _newProposer);\n proposer = _newProposer;\n }\n\n /**\n * @notice Computes the block number of the next L2 block that needs to be checkpointed.\n */\n function nextBlockNumber() public view returns (uint256) {\n return latestBlockNumber + SUBMISSION_INTERVAL;\n }\n\n /**\n * @notice Returns the L2 timestamp corresponding to a given L2 block number.\n * Returns a null output proposal if none is found.\n *\n * @param _l2BlockNumber The L2 block number of the target block.\n */\n function computeL2Timestamp(uint256 _l2BlockNumber) public view returns (uint256) {\n require(\n _l2BlockNumber >= STARTING_BLOCK_NUMBER,\n \"L2OutputOracle: block number must be greater than or equal to starting block number\"\n );\n\n return STARTING_TIMESTAMP + ((_l2BlockNumber - STARTING_BLOCK_NUMBER) * L2_BLOCK_TIME);\n }\n}\n" }, "contracts/L1/OptimismPortal.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport { Initializable } from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport { ExcessivelySafeCall } from \"excessively-safe-call/src/ExcessivelySafeCall.sol\";\nimport { L2OutputOracle } from \"./L2OutputOracle.sol\";\nimport { Types } from \"../libraries/Types.sol\";\nimport { Hashing } from \"../libraries/Hashing.sol\";\nimport { SecureMerkleTrie } from \"../libraries/trie/SecureMerkleTrie.sol\";\nimport { AddressAliasHelper } from \"../vendor/AddressAliasHelper.sol\";\nimport { ResourceMetering } from \"./ResourceMetering.sol\";\nimport { Semver } from \"../universal/Semver.sol\";\n\n/**\n * @custom:proxied\n * @title OptimismPortal\n * @notice The OptimismPortal is a low-level contract responsible for passing messages between L1\n * and L2. Messages sent directly to the OptimismPortal have no form of replayability.\n * Users are encouraged to use the L1CrossDomainMessenger for a higher-level interface.\n */\ncontract OptimismPortal is Initializable, ResourceMetering, Semver {\n /**\n * @notice Version of the deposit event.\n */\n uint256 internal constant DEPOSIT_VERSION = 0;\n\n /**\n * @notice Value used to reset the l2Sender, this is more efficient than setting it to zero.\n */\n address internal constant DEFAULT_L2_SENDER = 0x000000000000000000000000000000000000dEaD;\n\n /**\n * @notice Minimum time (in seconds) that must elapse before a withdrawal can be finalized.\n */\n // solhint-disable-next-line var-name-mixedcase\n uint256 public immutable FINALIZATION_PERIOD_SECONDS;\n\n /**\n * @notice Address of the L2OutputOracle.\n */\n // solhint-disable-next-line var-name-mixedcase\n L2OutputOracle public immutable L2_ORACLE;\n\n /**\n * @notice Address of the L2 account which initiated a withdrawal in this transaction. If the\n * of this variable is the default L2 sender address, then we are NOT inside of a call\n * to finalizeWithdrawalTransaction.\n */\n address public l2Sender;\n\n /**\n * @notice The L2 gas limit set when eth is deposited using the receive() function.\n */\n uint64 internal constant RECEIVE_DEFAULT_GAS_LIMIT = 100_000;\n\n /**\n * @notice Additional gas reserved for clean up after finalizing a transaction withdrawal.\n */\n uint256 internal constant FINALIZE_GAS_BUFFER = 20_000;\n\n /**\n * @notice A list of withdrawal hashes which have been successfully finalized.\n */\n mapping(bytes32 => bool) public finalizedWithdrawals;\n\n /**\n * @notice Reserve extra slots (to to a total of 50) in the storage layout for future upgrades.\n */\n uint256[48] private __gap;\n\n /**\n * @notice Emitted when a transaction is deposited from L1 to L2. The parameters of this event\n * are read by the rollup node and used to derive deposit transactions on L2.\n *\n * @param from Address that triggered the deposit transaction.\n * @param to Address that the deposit transaction is directed to.\n * @param version Version of this deposit transaction event.\n * @param opaqueData ABI encoded deposit data to be parsed off-chain.\n */\n event TransactionDeposited(\n address indexed from,\n address indexed to,\n uint256 indexed version,\n bytes opaqueData\n );\n\n /**\n * @notice Emitted when a withdrawal transaction is finalized.\n *\n * @param withdrawalHash Hash of the withdrawal transaction.\n * @param success Whether the withdrawal transaction was successful.\n */\n event WithdrawalFinalized(bytes32 indexed withdrawalHash, bool success);\n\n /**\n * @custom:semver 0.0.1\n *\n * @param _l2Oracle Address of the L2OutputOracle contract.\n * @param _finalizationPeriodSeconds Output finalization time in seconds.\n */\n constructor(L2OutputOracle _l2Oracle, uint256 _finalizationPeriodSeconds) Semver(0, 0, 1) {\n L2_ORACLE = _l2Oracle;\n FINALIZATION_PERIOD_SECONDS = _finalizationPeriodSeconds;\n initialize();\n }\n\n /**\n * @notice Accepts value so that users can send ETH directly to this contract and have the\n * funds be deposited to their address on L2. This is intended as a convenience\n * function for EOAs. Contracts should call the depositTransaction() function directly\n * otherwise any deposited funds will be lost due to address aliasing.\n */\n receive() external payable {\n depositTransaction(msg.sender, msg.value, RECEIVE_DEFAULT_GAS_LIMIT, false, bytes(\"\"));\n }\n\n /**\n * @notice Finalizes a withdrawal transaction.\n *\n * @param _tx Withdrawal transaction to finalize.\n * @param _l2BlockNumber L2 block number of the outputRoot.\n * @param _outputRootProof Inclusion proof of the withdrawer contracts storage root.\n * @param _withdrawalProof Inclusion proof for the given withdrawal in the withdrawer contract.\n */\n function finalizeWithdrawalTransaction(\n Types.WithdrawalTransaction memory _tx,\n uint256 _l2BlockNumber,\n Types.OutputRootProof calldata _outputRootProof,\n bytes calldata _withdrawalProof\n ) external payable {\n // Prevent nested withdrawals within withdrawals.\n require(\n l2Sender == DEFAULT_L2_SENDER,\n \"OptimismPortal: can only trigger one withdrawal per transaction\"\n );\n\n // Prevent users from creating a deposit transaction where this address is the message\n // sender on L2.\n // In the context of the proxy delegate calling to this implementation,\n // address(this) will return the address of the proxy.\n require(\n _tx.target != address(this),\n \"OptimismPortal: you cannot send messages to the portal contract\"\n );\n\n // Get the output root. This will fail if there is no\n // output root for the given block number.\n Types.OutputProposal memory proposal = L2_ORACLE.getL2Output(_l2BlockNumber);\n\n // Ensure that enough time has passed since the proposal was submitted before allowing a\n // withdrawal. Under the assumption that the fault proof mechanism is operating correctly,\n // we can infer that any withdrawal that has passed the finalization period must be valid\n // and can therefore be operated on.\n require(_isOutputFinalized(proposal), \"OptimismPortal: proposal is not yet finalized\");\n\n // Verify that the output root can be generated with the elements in the proof.\n require(\n proposal.outputRoot == Hashing.hashOutputRootProof(_outputRootProof),\n \"OptimismPortal: invalid output root proof\"\n );\n\n // All withdrawals have a unique hash, we'll use this as the identifier for the withdrawal\n // and to prevent replay attacks.\n bytes32 withdrawalHash = Hashing.hashWithdrawal(_tx);\n\n // Verify that the hash of this withdrawal was stored in the withdrawal contract on L2. If\n // this is true, then we know that this withdrawal was actually triggered on L2 can can\n // therefore be relayed on L1.\n require(\n _verifyWithdrawalInclusion(\n withdrawalHash,\n _outputRootProof.withdrawerStorageRoot,\n _withdrawalProof\n ),\n \"OptimismPortal: invalid withdrawal inclusion proof\"\n );\n\n // Check that this withdrawal has not already been finalized, this is replay protection.\n require(\n finalizedWithdrawals[withdrawalHash] == false,\n \"OptimismPortal: withdrawal has already been finalized\"\n );\n\n // Mark the withdrawal as finalized so it can't be replayed.\n finalizedWithdrawals[withdrawalHash] = true;\n\n // We want to maintain the property that the amount of gas supplied to the call to the\n // target contract is at least the gas limit specified by the user. We can do this by\n // enforcing that, at this point in time, we still have gaslimit + buffer gas available.\n require(\n gasleft() >= _tx.gasLimit + FINALIZE_GAS_BUFFER,\n \"OptimismPortal: insufficient gas to finalize withdrawal\"\n );\n\n // Set the l2Sender so contracts know who triggered this withdrawal on L2.\n l2Sender = _tx.sender;\n\n // Trigger the call to the target contract. We use excessivelySafeCall because we don't\n // care about the returndata and we don't want target contracts to be able to force this\n // call to run out of gas.\n (bool success, ) = ExcessivelySafeCall.excessivelySafeCall(\n _tx.target,\n _tx.gasLimit,\n _tx.value,\n 0,\n _tx.data\n );\n\n // Reset the l2Sender back to the default value.\n l2Sender = DEFAULT_L2_SENDER;\n\n // All withdrawals are immediately finalized. Replayability can\n // be achieved through contracts built on top of this contract\n emit WithdrawalFinalized(withdrawalHash, success);\n }\n\n /**\n * @notice Determine if a given block number is finalized. Reverts if the call to\n * L2_ORACLE.getL2Output reverts. Returns a boolean otherwise.\n *\n * @param _l2BlockNumber The number of the L2 block.\n */\n function isBlockFinalized(uint256 _l2BlockNumber) external view returns (bool) {\n Types.OutputProposal memory proposal = L2_ORACLE.getL2Output(_l2BlockNumber);\n return _isOutputFinalized(proposal);\n }\n\n /**\n * @notice Initializer;\n */\n function initialize() public initializer {\n l2Sender = DEFAULT_L2_SENDER;\n __ResourceMetering_init();\n }\n\n /**\n * @notice Accepts deposits of ETH and data, and emits a TransactionDeposited event for use in\n * deriving deposit transactions. Note that if a deposit is made by a contract, its\n * address will be aliased when retrieved using `tx.origin` or `msg.sender`. Consider\n * using the CrossDomainMessenger contracts for a simpler developer experience.\n *\n * @param _to Target address on L2.\n * @param _value ETH value to send to the recipient.\n * @param _gasLimit Minimum L2 gas limit (can be greater than or equal to this value).\n * @param _isCreation Whether or not the transaction is a contract creation.\n * @param _data Data to trigger the recipient with.\n */\n function depositTransaction(\n address _to,\n uint256 _value,\n uint64 _gasLimit,\n bool _isCreation,\n bytes memory _data\n ) public payable metered(_gasLimit) {\n // Just to be safe, make sure that people specify address(0) as the target when doing\n // contract creations.\n if (_isCreation) {\n require(\n _to == address(0),\n \"OptimismPortal: must send to address(0) when creating a contract\"\n );\n }\n\n // Transform the from-address to its alias if the caller is a contract.\n address from = msg.sender;\n if (msg.sender != tx.origin) {\n from = AddressAliasHelper.applyL1ToL2Alias(msg.sender);\n }\n\n bytes memory opaqueData = abi.encodePacked(\n msg.value,\n _value,\n _gasLimit,\n _isCreation,\n _data\n );\n\n // Emit a TransactionDeposited event so that the rollup node can derive a deposit\n // transaction for this deposit.\n emit TransactionDeposited(from, _to, DEPOSIT_VERSION, opaqueData);\n }\n\n /**\n * @notice Determine if an L2 Output is finalized.\n *\n * @param _proposal The output proposal to check.\n */\n function _isOutputFinalized(Types.OutputProposal memory _proposal)\n internal\n view\n returns (bool)\n {\n return block.timestamp > _proposal.timestamp + FINALIZATION_PERIOD_SECONDS;\n }\n\n /**\n * @notice Verifies a Merkle Trie inclusion proof that a given withdrawal hash is present in\n * the storage of the L2ToL1MessagePasser contract.\n *\n * @param _withdrawalHash Hash of the withdrawal to verify.\n * @param _storageRoot Root of the storage of the L2ToL1MessagePasser contract.\n * @param _proof Inclusion proof of the withdrawal hash in the storage root.\n */\n function _verifyWithdrawalInclusion(\n bytes32 _withdrawalHash,\n bytes32 _storageRoot,\n bytes memory _proof\n ) internal pure returns (bool) {\n bytes32 storageKey = keccak256(\n abi.encode(\n _withdrawalHash,\n uint256(0) // The withdrawals mapping is at the first slot in the layout.\n )\n );\n\n return\n SecureMerkleTrie.verifyInclusionProof(\n abi.encode(storageKey),\n hex\"01\",\n _proof,\n _storageRoot\n );\n }\n}\n" + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport { Initializable } from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport { SafeCall } from \"../libraries/SafeCall.sol\";\nimport { L2OutputOracle } from \"./L2OutputOracle.sol\";\nimport { Types } from \"../libraries/Types.sol\";\nimport { Hashing } from \"../libraries/Hashing.sol\";\nimport { SecureMerkleTrie } from \"../libraries/trie/SecureMerkleTrie.sol\";\nimport { AddressAliasHelper } from \"../vendor/AddressAliasHelper.sol\";\nimport { ResourceMetering } from \"./ResourceMetering.sol\";\nimport { Semver } from \"../universal/Semver.sol\";\n\n/**\n * @custom:proxied\n * @title OptimismPortal\n * @notice The OptimismPortal is a low-level contract responsible for passing messages between L1\n * and L2. Messages sent directly to the OptimismPortal have no form of replayability.\n * Users are encouraged to use the L1CrossDomainMessenger for a higher-level interface.\n */\ncontract OptimismPortal is Initializable, ResourceMetering, Semver {\n /**\n * @notice Version of the deposit event.\n */\n uint256 internal constant DEPOSIT_VERSION = 0;\n\n /**\n * @notice Value used to reset the l2Sender, this is more efficient than setting it to zero.\n */\n address internal constant DEFAULT_L2_SENDER = 0x000000000000000000000000000000000000dEaD;\n\n /**\n * @notice Minimum time (in seconds) that must elapse before a withdrawal can be finalized.\n */\n // solhint-disable-next-line var-name-mixedcase\n uint256 public immutable FINALIZATION_PERIOD_SECONDS;\n\n /**\n * @notice Address of the L2OutputOracle.\n */\n // solhint-disable-next-line var-name-mixedcase\n L2OutputOracle public immutable L2_ORACLE;\n\n /**\n * @notice Address of the L2 account which initiated a withdrawal in this transaction. If the\n * of this variable is the default L2 sender address, then we are NOT inside of a call\n * to finalizeWithdrawalTransaction.\n */\n address public l2Sender;\n\n /**\n * @notice The L2 gas limit set when eth is deposited using the receive() function.\n */\n uint64 internal constant RECEIVE_DEFAULT_GAS_LIMIT = 100_000;\n\n /**\n * @notice Additional gas reserved for clean up after finalizing a transaction withdrawal.\n */\n uint256 internal constant FINALIZE_GAS_BUFFER = 20_000;\n\n /**\n * @notice A list of withdrawal hashes which have been successfully finalized.\n */\n mapping(bytes32 => bool) public finalizedWithdrawals;\n\n /**\n * @notice Reserve extra slots (to to a total of 50) in the storage layout for future upgrades.\n */\n uint256[48] private __gap;\n\n /**\n * @notice Emitted when a transaction is deposited from L1 to L2. The parameters of this event\n * are read by the rollup node and used to derive deposit transactions on L2.\n *\n * @param from Address that triggered the deposit transaction.\n * @param to Address that the deposit transaction is directed to.\n * @param version Version of this deposit transaction event.\n * @param opaqueData ABI encoded deposit data to be parsed off-chain.\n */\n event TransactionDeposited(\n address indexed from,\n address indexed to,\n uint256 indexed version,\n bytes opaqueData\n );\n\n /**\n * @notice Emitted when a withdrawal transaction is finalized.\n *\n * @param withdrawalHash Hash of the withdrawal transaction.\n * @param success Whether the withdrawal transaction was successful.\n */\n event WithdrawalFinalized(bytes32 indexed withdrawalHash, bool success);\n\n /**\n * @custom:semver 0.0.1\n *\n * @param _l2Oracle Address of the L2OutputOracle contract.\n * @param _finalizationPeriodSeconds Output finalization time in seconds.\n */\n constructor(L2OutputOracle _l2Oracle, uint256 _finalizationPeriodSeconds) Semver(0, 0, 1) {\n L2_ORACLE = _l2Oracle;\n FINALIZATION_PERIOD_SECONDS = _finalizationPeriodSeconds;\n initialize();\n }\n\n /**\n * @notice Accepts value so that users can send ETH directly to this contract and have the\n * funds be deposited to their address on L2. This is intended as a convenience\n * function for EOAs. Contracts should call the depositTransaction() function directly\n * otherwise any deposited funds will be lost due to address aliasing.\n */\n receive() external payable {\n depositTransaction(msg.sender, msg.value, RECEIVE_DEFAULT_GAS_LIMIT, false, bytes(\"\"));\n }\n\n /**\n * @notice Finalizes a withdrawal transaction.\n *\n * @param _tx Withdrawal transaction to finalize.\n * @param _l2BlockNumber L2 block number of the outputRoot.\n * @param _outputRootProof Inclusion proof of the withdrawer contracts storage root.\n * @param _withdrawalProof Inclusion proof for the given withdrawal in the withdrawer contract.\n */\n function finalizeWithdrawalTransaction(\n Types.WithdrawalTransaction memory _tx,\n uint256 _l2BlockNumber,\n Types.OutputRootProof calldata _outputRootProof,\n bytes calldata _withdrawalProof\n ) external payable {\n // Prevent nested withdrawals within withdrawals.\n require(\n l2Sender == DEFAULT_L2_SENDER,\n \"OptimismPortal: can only trigger one withdrawal per transaction\"\n );\n\n // Prevent users from creating a deposit transaction where this address is the message\n // sender on L2.\n // In the context of the proxy delegate calling to this implementation,\n // address(this) will return the address of the proxy.\n require(\n _tx.target != address(this),\n \"OptimismPortal: you cannot send messages to the portal contract\"\n );\n\n // Get the output root. This will fail if there is no\n // output root for the given block number.\n Types.OutputProposal memory proposal = L2_ORACLE.getL2Output(_l2BlockNumber);\n\n // Ensure that enough time has passed since the proposal was submitted before allowing a\n // withdrawal. Under the assumption that the fault proof mechanism is operating correctly,\n // we can infer that any withdrawal that has passed the finalization period must be valid\n // and can therefore be operated on.\n require(_isOutputFinalized(proposal), \"OptimismPortal: proposal is not yet finalized\");\n\n // Verify that the output root can be generated with the elements in the proof.\n require(\n proposal.outputRoot == Hashing.hashOutputRootProof(_outputRootProof),\n \"OptimismPortal: invalid output root proof\"\n );\n\n // All withdrawals have a unique hash, we'll use this as the identifier for the withdrawal\n // and to prevent replay attacks.\n bytes32 withdrawalHash = Hashing.hashWithdrawal(_tx);\n\n // Verify that the hash of this withdrawal was stored in the withdrawal contract on L2. If\n // this is true, then we know that this withdrawal was actually triggered on L2 can can\n // therefore be relayed on L1.\n require(\n _verifyWithdrawalInclusion(\n withdrawalHash,\n _outputRootProof.withdrawerStorageRoot,\n _withdrawalProof\n ),\n \"OptimismPortal: invalid withdrawal inclusion proof\"\n );\n\n // Check that this withdrawal has not already been finalized, this is replay protection.\n require(\n finalizedWithdrawals[withdrawalHash] == false,\n \"OptimismPortal: withdrawal has already been finalized\"\n );\n\n // Mark the withdrawal as finalized so it can't be replayed.\n finalizedWithdrawals[withdrawalHash] = true;\n\n // We want to maintain the property that the amount of gas supplied to the call to the\n // target contract is at least the gas limit specified by the user. We can do this by\n // enforcing that, at this point in time, we still have gaslimit + buffer gas available.\n require(\n gasleft() >= _tx.gasLimit + FINALIZE_GAS_BUFFER,\n \"OptimismPortal: insufficient gas to finalize withdrawal\"\n );\n\n // Set the l2Sender so contracts know who triggered this withdrawal on L2.\n l2Sender = _tx.sender;\n\n // Trigger the call to the target contract. We use SafeCall because we don't\n // care about the returndata and we don't want target contracts to be able to force this\n // call to run out of gas via a returndata bomb.\n bool success = SafeCall.call(_tx.target, _tx.gasLimit, _tx.value, _tx.data);\n\n // Reset the l2Sender back to the default value.\n l2Sender = DEFAULT_L2_SENDER;\n\n // All withdrawals are immediately finalized. Replayability can\n // be achieved through contracts built on top of this contract\n emit WithdrawalFinalized(withdrawalHash, success);\n }\n\n /**\n * @notice Determine if a given block number is finalized. Reverts if the call to\n * L2_ORACLE.getL2Output reverts. Returns a boolean otherwise.\n *\n * @param _l2BlockNumber The number of the L2 block.\n */\n function isBlockFinalized(uint256 _l2BlockNumber) external view returns (bool) {\n Types.OutputProposal memory proposal = L2_ORACLE.getL2Output(_l2BlockNumber);\n return _isOutputFinalized(proposal);\n }\n\n /**\n * @notice Initializer;\n */\n function initialize() public initializer {\n l2Sender = DEFAULT_L2_SENDER;\n __ResourceMetering_init();\n }\n\n /**\n * @notice Accepts deposits of ETH and data, and emits a TransactionDeposited event for use in\n * deriving deposit transactions. Note that if a deposit is made by a contract, its\n * address will be aliased when retrieved using `tx.origin` or `msg.sender`. Consider\n * using the CrossDomainMessenger contracts for a simpler developer experience.\n *\n * @param _to Target address on L2.\n * @param _value ETH value to send to the recipient.\n * @param _gasLimit Minimum L2 gas limit (can be greater than or equal to this value).\n * @param _isCreation Whether or not the transaction is a contract creation.\n * @param _data Data to trigger the recipient with.\n */\n function depositTransaction(\n address _to,\n uint256 _value,\n uint64 _gasLimit,\n bool _isCreation,\n bytes memory _data\n ) public payable metered(_gasLimit) {\n // Just to be safe, make sure that people specify address(0) as the target when doing\n // contract creations.\n if (_isCreation) {\n require(\n _to == address(0),\n \"OptimismPortal: must send to address(0) when creating a contract\"\n );\n }\n\n // Transform the from-address to its alias if the caller is a contract.\n address from = msg.sender;\n if (msg.sender != tx.origin) {\n from = AddressAliasHelper.applyL1ToL2Alias(msg.sender);\n }\n\n bytes memory opaqueData = abi.encodePacked(\n msg.value,\n _value,\n _gasLimit,\n _isCreation,\n _data\n );\n\n // Emit a TransactionDeposited event so that the rollup node can derive a deposit\n // transaction for this deposit.\n emit TransactionDeposited(from, _to, DEPOSIT_VERSION, opaqueData);\n }\n\n /**\n * @notice Determine if an L2 Output is finalized.\n *\n * @param _proposal The output proposal to check.\n */\n function _isOutputFinalized(Types.OutputProposal memory _proposal)\n internal\n view\n returns (bool)\n {\n return block.timestamp > _proposal.timestamp + FINALIZATION_PERIOD_SECONDS;\n }\n\n /**\n * @notice Verifies a Merkle Trie inclusion proof that a given withdrawal hash is present in\n * the storage of the L2ToL1MessagePasser contract.\n *\n * @param _withdrawalHash Hash of the withdrawal to verify.\n * @param _storageRoot Root of the storage of the L2ToL1MessagePasser contract.\n * @param _proof Inclusion proof of the withdrawal hash in the storage root.\n */\n function _verifyWithdrawalInclusion(\n bytes32 _withdrawalHash,\n bytes32 _storageRoot,\n bytes memory _proof\n ) internal pure returns (bool) {\n bytes32 storageKey = keccak256(\n abi.encode(\n _withdrawalHash,\n uint256(0) // The withdrawals mapping is at the first slot in the layout.\n )\n );\n\n return\n SecureMerkleTrie.verifyInclusionProof(\n abi.encode(storageKey),\n hex\"01\",\n _proof,\n _storageRoot\n );\n }\n}\n" }, "contracts/L1/ResourceMetering.sol": { "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport { Initializable } from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport { Math } from \"@openzeppelin/contracts/utils/math/Math.sol\";\nimport { SignedMath } from \"@openzeppelin/contracts/utils/math/SignedMath.sol\";\nimport { FixedPointMathLib } from \"@rari-capital/solmate/src/utils/FixedPointMathLib.sol\";\nimport { Burn } from \"../libraries/Burn.sol\";\n\n/**\n * @title ResourceMetering\n * @notice ResourceMetering implements an EIP-1559 style resource metering system where pricing\n * updates automatically based on current demand.\n */\nabstract contract ResourceMetering is Initializable {\n /**\n * @notice Represents the various parameters that control the way in which resources are\n * metered. Corresponds to the EIP-1559 resource metering system.\n */\n struct ResourceParams {\n uint128 prevBaseFee;\n uint64 prevBoughtGas;\n uint64 prevBlockNum;\n }\n\n /**\n * @notice Maximum amount of the resource that can be used within this block.\n */\n int256 public constant MAX_RESOURCE_LIMIT = 8_000_000;\n\n /**\n * @notice Along with the resource limit, determines the target resource limit.\n */\n int256 public constant ELASTICITY_MULTIPLIER = 4;\n\n /**\n * @notice Target amount of the resource that should be used within this block.\n */\n int256 public constant TARGET_RESOURCE_LIMIT = MAX_RESOURCE_LIMIT / ELASTICITY_MULTIPLIER;\n\n /**\n * @notice Denominator that determines max change on fee per block.\n */\n int256 public constant BASE_FEE_MAX_CHANGE_DENOMINATOR = 8;\n\n /**\n * @notice Minimum base fee value, cannot go lower than this.\n */\n int256 public constant MINIMUM_BASE_FEE = 10_000;\n\n /**\n * @notice Initial base fee value.\n */\n uint128 public constant INITIAL_BASE_FEE = 1_000_000_000;\n\n /**\n * @notice EIP-1559 style gas parameters.\n */\n ResourceParams public params;\n\n /**\n * @notice Reserve extra slots (to a total of 50) in the storage layout for future upgrades.\n */\n uint256[49] private __gap;\n\n /**\n * @notice Meters access to a function based an amount of a requested resource.\n *\n * @param _amount Amount of the resource requested.\n */\n modifier metered(uint64 _amount) {\n // Record initial gas amount so we can refund for it later.\n uint256 initialGas = gasleft();\n\n // Run the underlying function.\n _;\n\n // Update block number and base fee if necessary.\n uint256 blockDiff = block.number - params.prevBlockNum;\n if (blockDiff > 0) {\n // Handle updating EIP-1559 style gas parameters. We use EIP-1559 to restrict the rate\n // at which deposits can be created and therefore limit the potential for deposits to\n // spam the L2 system. Fee scheme is very similar to EIP-1559 with minor changes.\n int256 gasUsedDelta = int256(uint256(params.prevBoughtGas)) - TARGET_RESOURCE_LIMIT;\n int256 baseFeeDelta = (int256(uint256(params.prevBaseFee)) * gasUsedDelta) /\n TARGET_RESOURCE_LIMIT /\n BASE_FEE_MAX_CHANGE_DENOMINATOR;\n\n // Update base fee by adding the base fee delta and clamp the resulting value between\n // min and max.\n int256 newBaseFee = SignedMath.min(\n SignedMath.max(\n int256(uint256(params.prevBaseFee)) + baseFeeDelta,\n int256(MINIMUM_BASE_FEE)\n ),\n int256(uint256(type(uint128).max))\n );\n\n // If we skipped more than one block, we also need to account for every empty block.\n // Empty block means there was no demand for deposits in that block, so we should\n // reflect this lack of demand in the fee.\n if (blockDiff > 1) {\n // Update the base fee by repeatedly applying the exponent 1-(1/change_denominator)\n // blockDiff - 1 times. Simulates multiple empty blocks. Clamp the resulting value\n // between min and max.\n newBaseFee = SignedMath.min(\n SignedMath.max(\n int256(\n (newBaseFee *\n (\n FixedPointMathLib.powWad(\n 1e18 - (1e18 / BASE_FEE_MAX_CHANGE_DENOMINATOR),\n int256((blockDiff - 1) * 1e18)\n )\n )) / 1e18\n ),\n int256(MINIMUM_BASE_FEE)\n ),\n int256(uint256(type(uint128).max))\n );\n }\n\n // Update new base fee, reset bought gas, and update block number.\n params.prevBaseFee = uint128(uint256(newBaseFee));\n params.prevBoughtGas = 0;\n params.prevBlockNum = uint64(block.number);\n }\n\n // Make sure we can actually buy the resource amount requested by the user.\n params.prevBoughtGas += _amount;\n require(\n int256(uint256(params.prevBoughtGas)) <= MAX_RESOURCE_LIMIT,\n \"ResourceMetering: cannot buy more gas than available gas limit\"\n );\n\n // Determine the amount of ETH to be paid.\n uint256 resourceCost = _amount * params.prevBaseFee;\n\n // We currently charge for this ETH amount as an L1 gas burn, so we convert the ETH amount\n // into gas by dividing by the L1 base fee. We assume a minimum base fee of 1 gwei to avoid\n // division by zero for L1s that don't support 1559 or to avoid excessive gas burns during\n // periods of extremely low L1 demand. One-day average gas fee hasn't dipped below 1 gwei\n // during any 1 day period in the last 5 years, so should be fine.\n uint256 gasCost = resourceCost / Math.max(block.basefee, 1000000000);\n\n // Give the user a refund based on the amount of gas they used to do all of the work up to\n // this point. Since we're at the end of the modifier, this should be pretty accurate. Acts\n // effectively like a dynamic stipend (with a minimum value).\n uint256 usedGas = initialGas - gasleft();\n if (gasCost > usedGas) {\n Burn.gas(gasCost - usedGas);\n }\n }\n\n /**\n * @notice Sets initial resource parameter values. This function must either be called by the\n * initializer function of an upgradeable child contract.\n */\n // solhint-disable-next-line func-name-mixedcase\n function __ResourceMetering_init() internal onlyInitializing {\n params = ResourceParams({\n prevBaseFee: INITIAL_BASE_FEE,\n prevBoughtGas: 0,\n prevBlockNum: uint64(block.number)\n });\n }\n}\n" @@ -23,10 +23,10 @@ "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport { Semver } from \"../universal/Semver.sol\";\n\n/**\n * @custom:proxied\n * @custom:predeploy 0x4200000000000000000000000000000000000015\n * @title L1Block\n * @notice The L1Block predeploy gives users access to information about the last known L1 block.\n * Values within this contract are updated once per epoch (every L1 block) and can only be\n * set by the \"depositor\" account, a special system address. Depositor account transactions\n * are created by the protocol whenever we move to a new epoch.\n */\ncontract L1Block is Semver {\n /**\n * @notice Address of the special depositor account.\n */\n address public constant DEPOSITOR_ACCOUNT = 0xDeaDDEaDDeAdDeAdDEAdDEaddeAddEAdDEAd0001;\n\n /**\n * @notice The latest L1 block number known by the L2 system.\n */\n uint64 public number;\n\n /**\n * @notice The latest L1 timestamp known by the L2 system.\n */\n uint64 public timestamp;\n\n /**\n * @notice The latest L1 basefee.\n */\n uint256 public basefee;\n\n /**\n * @notice The latest L1 blockhash.\n */\n bytes32 public hash;\n\n /**\n * @notice The number of L2 blocks in the same epoch.\n */\n uint64 public sequenceNumber;\n\n /**\n * @custom:semver 0.0.1\n */\n constructor() Semver(0, 0, 1) {}\n\n /**\n * @notice Updates the L1 block values.\n *\n * @param _number L1 blocknumber.\n * @param _timestamp L1 timestamp.\n * @param _basefee L1 basefee.\n * @param _hash L1 blockhash.\n * @param _sequenceNumber Number of L2 blocks since epoch start.\n */\n function setL1BlockValues(\n uint64 _number,\n uint64 _timestamp,\n uint256 _basefee,\n bytes32 _hash,\n uint64 _sequenceNumber\n ) external {\n require(\n msg.sender == DEPOSITOR_ACCOUNT,\n \"L1Block: only the depositor account can set L1 block values\"\n );\n\n number = _number;\n timestamp = _timestamp;\n basefee = _basefee;\n hash = _hash;\n sequenceNumber = _sequenceNumber;\n }\n}\n" }, "contracts/L2/L2CrossDomainMessenger.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport { AddressAliasHelper } from \"../vendor/AddressAliasHelper.sol\";\nimport { Predeploys } from \"../libraries/Predeploys.sol\";\nimport { CrossDomainMessenger } from \"../universal/CrossDomainMessenger.sol\";\nimport { Semver } from \"../universal/Semver.sol\";\nimport { L2ToL1MessagePasser } from \"./L2ToL1MessagePasser.sol\";\n\n/**\n * @custom:proxied\n * @custom:predeploy 0x4200000000000000000000000000000000000007\n * @title L2CrossDomainMessenger\n * @notice The L2CrossDomainMessenger is a high-level interface for message passing between L1 and\n * L2 on the L2 side. Users are generally encouraged to use this contract instead of lower\n * level message passing contracts.\n */\ncontract L2CrossDomainMessenger is CrossDomainMessenger, Semver {\n /**\n * @custom:semver 0.0.1\n *\n * @param _l1CrossDomainMessenger Address of the L1CrossDomainMessenger contract.\n */\n constructor(address _l1CrossDomainMessenger) Semver(0, 0, 1) {\n initialize(_l1CrossDomainMessenger);\n }\n\n /**\n * @notice Initializer.\n *\n * @param _l1CrossDomainMessenger Address of the L1CrossDomainMessenger contract.\n */\n function initialize(address _l1CrossDomainMessenger) public initializer {\n address[] memory blockedSystemAddresses = new address[](2);\n blockedSystemAddresses[0] = address(this);\n blockedSystemAddresses[1] = Predeploys.L2_TO_L1_MESSAGE_PASSER;\n __CrossDomainMessenger_init(_l1CrossDomainMessenger, blockedSystemAddresses);\n }\n\n /**\n * @custom:legacy\n * @notice Legacy getter for the remote messenger. Use otherMessenger going forward.\n *\n * @return Address of the L1CrossDomainMessenger contract.\n */\n function l1CrossDomainMessenger() public view returns (address) {\n return otherMessenger;\n }\n\n /**\n * @notice Sends a message from L2 to L1.\n *\n * @param _to Address to send the message to.\n * @param _gasLimit Minimum gas limit to execute the message with.\n * @param _value ETH value to send with the message.\n * @param _data Data to trigger the recipient with.\n */\n function _sendMessage(\n address _to,\n uint64 _gasLimit,\n uint256 _value,\n bytes memory _data\n ) internal override {\n L2ToL1MessagePasser(payable(Predeploys.L2_TO_L1_MESSAGE_PASSER)).initiateWithdrawal{\n value: _value\n }(_to, _gasLimit, _data);\n }\n\n /**\n * @notice Checks that the message sender is the L1CrossDomainMessenger on L1.\n *\n * @return True if the message sender is the L1CrossDomainMessenger on L1.\n */\n function _isOtherMessenger() internal view override returns (bool) {\n return AddressAliasHelper.undoL1ToL2Alias(msg.sender) == otherMessenger;\n }\n}\n" + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport { AddressAliasHelper } from \"../vendor/AddressAliasHelper.sol\";\nimport { Predeploys } from \"../libraries/Predeploys.sol\";\nimport { CrossDomainMessenger } from \"../universal/CrossDomainMessenger.sol\";\nimport { Semver } from \"../universal/Semver.sol\";\nimport { L2ToL1MessagePasser } from \"./L2ToL1MessagePasser.sol\";\n\n/**\n * @custom:proxied\n * @custom:predeploy 0x4200000000000000000000000000000000000007\n * @title L2CrossDomainMessenger\n * @notice The L2CrossDomainMessenger is a high-level interface for message passing between L1 and\n * L2 on the L2 side. Users are generally encouraged to use this contract instead of lower\n * level message passing contracts.\n */\ncontract L2CrossDomainMessenger is CrossDomainMessenger, Semver {\n /**\n * @custom:semver 0.0.1\n *\n * @param _l1CrossDomainMessenger Address of the L1CrossDomainMessenger contract.\n */\n constructor(address _l1CrossDomainMessenger) Semver(0, 0, 1) {\n initialize(_l1CrossDomainMessenger);\n }\n\n /**\n * @notice Initializer.\n *\n * @param _l1CrossDomainMessenger Address of the L1CrossDomainMessenger contract.\n */\n function initialize(address _l1CrossDomainMessenger) public initializer {\n address[] memory blockedSystemAddresses = new address[](2);\n blockedSystemAddresses[0] = Predeploys.L2_CROSS_DOMAIN_MESSENGER;\n blockedSystemAddresses[1] = Predeploys.L2_TO_L1_MESSAGE_PASSER;\n __CrossDomainMessenger_init(_l1CrossDomainMessenger, blockedSystemAddresses);\n }\n\n /**\n * @custom:legacy\n * @notice Legacy getter for the remote messenger. Use otherMessenger going forward.\n *\n * @return Address of the L1CrossDomainMessenger contract.\n */\n function l1CrossDomainMessenger() public view returns (address) {\n return otherMessenger;\n }\n\n /**\n * @notice Sends a message from L2 to L1.\n *\n * @param _to Address to send the message to.\n * @param _gasLimit Minimum gas limit to execute the message with.\n * @param _value ETH value to send with the message.\n * @param _data Data to trigger the recipient with.\n */\n function _sendMessage(\n address _to,\n uint64 _gasLimit,\n uint256 _value,\n bytes memory _data\n ) internal override {\n L2ToL1MessagePasser(payable(Predeploys.L2_TO_L1_MESSAGE_PASSER)).initiateWithdrawal{\n value: _value\n }(_to, _gasLimit, _data);\n }\n\n /**\n * @notice Checks that the message sender is the L1CrossDomainMessenger on L1.\n *\n * @return True if the message sender is the L1CrossDomainMessenger on L1.\n */\n function _isOtherMessenger() internal view override returns (bool) {\n return AddressAliasHelper.undoL1ToL2Alias(msg.sender) == otherMessenger;\n }\n}\n" }, "contracts/L2/L2StandardBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport { Predeploys } from \"../libraries/Predeploys.sol\";\nimport { StandardBridge } from \"../universal/StandardBridge.sol\";\nimport { Semver } from \"../universal/Semver.sol\";\nimport { OptimismMintableERC20 } from \"../universal/OptimismMintableERC20.sol\";\n\n/**\n * @custom:proxied\n * @custom:predeploy 0x4200000000000000000000000000000000000010\n * @title L2StandardBridge\n * @notice The L2StandardBridge is responsible for transfering ETH and ERC20 tokens between L1 and\n * L2. ERC20 tokens sent to L1 are escrowed within this contract.\n * Note that this contract is not intended to support all variations of ERC20 tokens.\n * Examples of some token types that may not be properly supported by this contract include,\n * but are not limited to: tokens with transfer fees, rebasing tokens, and\n * tokens with blocklists.\n */\ncontract L2StandardBridge is StandardBridge, Semver {\n /**\n * @custom:legacy\n * @notice Emitted whenever a withdrawal from L2 to L1 is initiated.\n *\n * @param l1Token Address of the token on L1.\n * @param l2Token Address of the corresponding token on L2.\n * @param from Address of the withdrawer.\n * @param to Address of the recipient on L1.\n * @param amount Amount of the ERC20 withdrawn.\n * @param extraData Extra data attached to the withdrawal.\n */\n event WithdrawalInitiated(\n address indexed l1Token,\n address indexed l2Token,\n address indexed from,\n address to,\n uint256 amount,\n bytes extraData\n );\n\n /**\n * @custom:legacy\n * @notice Emitted whenever an ERC20 deposit is finalized.\n *\n * @param l1Token Address of the token on L1.\n * @param l2Token Address of the corresponding token on L2.\n * @param from Address of the depositor.\n * @param to Address of the recipient on L2.\n * @param amount Amount of the ERC20 deposited.\n * @param extraData Extra data attached to the deposit.\n */\n event DepositFinalized(\n address indexed l1Token,\n address indexed l2Token,\n address indexed from,\n address to,\n uint256 amount,\n bytes extraData\n );\n\n /**\n * @custom:legacy\n * @notice Emitted whenever a deposit fails.\n *\n * @param l1Token Address of the token on L1.\n * @param l2Token Address of the corresponding token on L2.\n * @param from Address of the depositor.\n * @param to Address of the recipient on L2.\n * @param amount Amount of the ERC20 deposited.\n * @param extraData Extra data attached to the deposit.\n */\n event DepositFailed(\n address indexed l1Token,\n address indexed l2Token,\n address indexed from,\n address to,\n uint256 amount,\n bytes extraData\n );\n\n /**\n * @custom:semver 0.0.1\n *\n * @param _otherBridge Address of the L1StandardBridge.\n */\n constructor(address payable _otherBridge) Semver(0, 0, 1) {\n initialize(_otherBridge);\n }\n\n /**\n * @custom:legacy\n * @notice Initiates a withdrawal from L2 to L1.\n *\n * @param _l2Token Address of the L2 token to withdraw.\n * @param _amount Amount of the L2 token to withdraw.\n * @param _minGasLimit Minimum gas limit to use for the transaction.\n * @param _extraData Extra data attached to the withdrawal.\n */\n function withdraw(\n address _l2Token,\n uint256 _amount,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) external payable virtual onlyEOA {\n _initiateWithdrawal(_l2Token, msg.sender, msg.sender, _amount, _minGasLimit, _extraData);\n }\n\n /**\n * @custom:legacy\n * @notice Initiates a withdrawal from L2 to L1 to a target account on L1.\n * Note that if ETH is sent to a contract on L1 and the call fails, then that ETH will\n * be locked in the L1StandardBridge. ETH may be recoverable if the call can be\n * successfully replayed by increasing the amount of gas supplied to the call. If the\n * call will fail for any amount of gas, then the ETH will be locked permanently.\n *\n * @param _l2Token Address of the L2 token to withdraw.\n * @param _to Recipient account on L1.\n * @param _amount Amount of the L2 token to withdraw.\n * @param _minGasLimit Minimum gas limit to use for the transaction.\n * @param _extraData Extra data attached to the withdrawal.\n */\n function withdrawTo(\n address _l2Token,\n address _to,\n uint256 _amount,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) external payable virtual {\n _initiateWithdrawal(_l2Token, msg.sender, _to, _amount, _minGasLimit, _extraData);\n }\n\n /**\n * @custom:legacy\n * @notice Finalizes a deposit from L1 to L2.\n *\n * @param _l1Token Address of the L1 token to deposit.\n * @param _l2Token Address of the corresponding L2 token.\n * @param _from Address of the depositor.\n * @param _to Address of the recipient.\n * @param _amount Amount of the tokens being deposited.\n * @param _extraData Extra data attached to the deposit.\n */\n function finalizeDeposit(\n address _l1Token,\n address _l2Token,\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _extraData\n ) external payable virtual {\n if (_l1Token == address(0) && _l2Token == Predeploys.LEGACY_ERC20_ETH) {\n finalizeBridgeETH(_from, _to, _amount, _extraData);\n } else {\n finalizeBridgeERC20(_l2Token, _l1Token, _from, _to, _amount, _extraData);\n }\n emit DepositFinalized(_l1Token, _l2Token, _from, _to, _amount, _extraData);\n }\n\n /**\n * @notice Initializer.\n *\n * @param _otherBridge Address of the L1StandardBridge.\n */\n function initialize(address payable _otherBridge) public initializer {\n __StandardBridge_init(payable(Predeploys.L2_CROSS_DOMAIN_MESSENGER), _otherBridge);\n }\n\n /**\n * @custom:legacy\n * @notice Internal function to a withdrawal from L2 to L1 to a target account on L1.\n *\n * @param _l2Token Address of the L2 token to withdraw.\n * @param _from Address of the withdrawer.\n * @param _to Recipient account on L1.\n * @param _amount Amount of the L2 token to withdraw.\n * @param _minGasLimit Minimum gas limit to use for the transaction.\n * @param _extraData Extra data attached to the withdrawal.\n */\n function _initiateWithdrawal(\n address _l2Token,\n address _from,\n address _to,\n uint256 _amount,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) internal {\n address l1Token = OptimismMintableERC20(_l2Token).l1Token();\n if (_l2Token == Predeploys.LEGACY_ERC20_ETH) {\n require(\n msg.value == _amount,\n \"L2StandardBridge: ETH withdrawals must include sufficient ETH value\"\n );\n\n _initiateBridgeETH(_from, _to, _amount, _minGasLimit, _extraData);\n } else {\n _initiateBridgeERC20(_l2Token, l1Token, _from, _to, _amount, _minGasLimit, _extraData);\n }\n emit WithdrawalInitiated(l1Token, _l2Token, _from, _to, _amount, _extraData);\n }\n}\n" + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport { Predeploys } from \"../libraries/Predeploys.sol\";\nimport { StandardBridge } from \"../universal/StandardBridge.sol\";\nimport { Semver } from \"../universal/Semver.sol\";\nimport { OptimismMintableERC20 } from \"../universal/OptimismMintableERC20.sol\";\n\n/**\n * @custom:proxied\n * @custom:predeploy 0x4200000000000000000000000000000000000010\n * @title L2StandardBridge\n * @notice The L2StandardBridge is responsible for transfering ETH and ERC20 tokens between L1 and\n * L2. ERC20 tokens sent to L1 are escrowed within this contract.\n * Note that this contract is not intended to support all variations of ERC20 tokens.\n * Examples of some token types that may not be properly supported by this contract include,\n * but are not limited to: tokens with transfer fees, rebasing tokens, and\n * tokens with blocklists.\n */\ncontract L2StandardBridge is StandardBridge, Semver {\n /**\n * @custom:legacy\n * @notice Emitted whenever a withdrawal from L2 to L1 is initiated.\n *\n * @param l1Token Address of the token on L1.\n * @param l2Token Address of the corresponding token on L2.\n * @param from Address of the withdrawer.\n * @param to Address of the recipient on L1.\n * @param amount Amount of the ERC20 withdrawn.\n * @param extraData Extra data attached to the withdrawal.\n */\n event WithdrawalInitiated(\n address indexed l1Token,\n address indexed l2Token,\n address indexed from,\n address to,\n uint256 amount,\n bytes extraData\n );\n\n /**\n * @custom:legacy\n * @notice Emitted whenever an ERC20 deposit is finalized.\n *\n * @param l1Token Address of the token on L1.\n * @param l2Token Address of the corresponding token on L2.\n * @param from Address of the depositor.\n * @param to Address of the recipient on L2.\n * @param amount Amount of the ERC20 deposited.\n * @param extraData Extra data attached to the deposit.\n */\n event DepositFinalized(\n address indexed l1Token,\n address indexed l2Token,\n address indexed from,\n address to,\n uint256 amount,\n bytes extraData\n );\n\n /**\n * @custom:legacy\n * @notice Emitted whenever a deposit fails.\n *\n * @param l1Token Address of the token on L1.\n * @param l2Token Address of the corresponding token on L2.\n * @param from Address of the depositor.\n * @param to Address of the recipient on L2.\n * @param amount Amount of the ERC20 deposited.\n * @param extraData Extra data attached to the deposit.\n */\n event DepositFailed(\n address indexed l1Token,\n address indexed l2Token,\n address indexed from,\n address to,\n uint256 amount,\n bytes extraData\n );\n\n /**\n * @custom:semver 0.0.2\n *\n * @param _otherBridge Address of the L1StandardBridge.\n */\n constructor(address payable _otherBridge)\n Semver(0, 0, 2)\n StandardBridge(payable(Predeploys.L2_CROSS_DOMAIN_MESSENGER), _otherBridge)\n {}\n\n /**\n * @custom:legacy\n * @notice Initiates a withdrawal from L2 to L1.\n *\n * @param _l2Token Address of the L2 token to withdraw.\n * @param _amount Amount of the L2 token to withdraw.\n * @param _minGasLimit Minimum gas limit to use for the transaction.\n * @param _extraData Extra data attached to the withdrawal.\n */\n function withdraw(\n address _l2Token,\n uint256 _amount,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) external payable virtual onlyEOA {\n _initiateWithdrawal(_l2Token, msg.sender, msg.sender, _amount, _minGasLimit, _extraData);\n }\n\n /**\n * @custom:legacy\n * @notice Initiates a withdrawal from L2 to L1 to a target account on L1.\n * Note that if ETH is sent to a contract on L1 and the call fails, then that ETH will\n * be locked in the L1StandardBridge. ETH may be recoverable if the call can be\n * successfully replayed by increasing the amount of gas supplied to the call. If the\n * call will fail for any amount of gas, then the ETH will be locked permanently.\n *\n * @param _l2Token Address of the L2 token to withdraw.\n * @param _to Recipient account on L1.\n * @param _amount Amount of the L2 token to withdraw.\n * @param _minGasLimit Minimum gas limit to use for the transaction.\n * @param _extraData Extra data attached to the withdrawal.\n */\n function withdrawTo(\n address _l2Token,\n address _to,\n uint256 _amount,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) external payable virtual {\n _initiateWithdrawal(_l2Token, msg.sender, _to, _amount, _minGasLimit, _extraData);\n }\n\n /**\n * @custom:legacy\n * @notice Finalizes a deposit from L1 to L2.\n *\n * @param _l1Token Address of the L1 token to deposit.\n * @param _l2Token Address of the corresponding L2 token.\n * @param _from Address of the depositor.\n * @param _to Address of the recipient.\n * @param _amount Amount of the tokens being deposited.\n * @param _extraData Extra data attached to the deposit.\n */\n function finalizeDeposit(\n address _l1Token,\n address _l2Token,\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _extraData\n ) external payable virtual {\n if (_l1Token == address(0) && _l2Token == Predeploys.LEGACY_ERC20_ETH) {\n finalizeBridgeETH(_from, _to, _amount, _extraData);\n } else {\n finalizeBridgeERC20(_l2Token, _l1Token, _from, _to, _amount, _extraData);\n }\n emit DepositFinalized(_l1Token, _l2Token, _from, _to, _amount, _extraData);\n }\n\n /**\n * @custom:legacy\n * @notice Internal function to a withdrawal from L2 to L1 to a target account on L1.\n *\n * @param _l2Token Address of the L2 token to withdraw.\n * @param _from Address of the withdrawer.\n * @param _to Recipient account on L1.\n * @param _amount Amount of the L2 token to withdraw.\n * @param _minGasLimit Minimum gas limit to use for the transaction.\n * @param _extraData Extra data attached to the withdrawal.\n */\n function _initiateWithdrawal(\n address _l2Token,\n address _from,\n address _to,\n uint256 _amount,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) internal {\n address l1Token = OptimismMintableERC20(_l2Token).l1Token();\n if (_l2Token == Predeploys.LEGACY_ERC20_ETH) {\n require(\n msg.value == _amount,\n \"L2StandardBridge: ETH withdrawals must include sufficient ETH value\"\n );\n\n _initiateBridgeETH(_from, _to, _amount, _minGasLimit, _extraData);\n } else {\n _initiateBridgeERC20(_l2Token, l1Token, _from, _to, _amount, _minGasLimit, _extraData);\n }\n emit WithdrawalInitiated(l1Token, _l2Token, _from, _to, _amount, _extraData);\n }\n}\n" }, "contracts/L2/L2ToL1MessagePasser.sol": { "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport { Types } from \"../libraries/Types.sol\";\nimport { Hashing } from \"../libraries/Hashing.sol\";\nimport { Burn } from \"../libraries/Burn.sol\";\nimport { Semver } from \"../universal/Semver.sol\";\n\n/**\n * @custom:proxied\n * @custom:predeploy 0x4200000000000000000000000000000000000000\n * @title L2ToL1MessagePasser\n * @notice The L2ToL1MessagePasser is a dedicated contract where messages that are being sent from\n * L2 to L1 can be stored. The storage root of this contract is pulled up to the top level\n * of the L2 output to reduce the cost of proving the existence of sent messages.\n */\ncontract L2ToL1MessagePasser is Semver {\n /**\n * @notice The L1 gas limit set when eth is withdrawn using the receive() function.\n */\n uint256 internal constant RECEIVE_DEFAULT_GAS_LIMIT = 100_000;\n\n /**\n * @notice Includes the message hashes for all withdrawals\n */\n mapping(bytes32 => bool) public sentMessages;\n\n /**\n * @notice A unique value hashed with each withdrawal.\n */\n uint256 public nonce;\n\n /**\n * @notice Emitted any time a withdrawal is initiated.\n *\n * @param nonce Unique value corresponding to each withdrawal.\n * @param sender The L2 account address which initiated the withdrawal.\n * @param target The L1 account address the call will be send to.\n * @param value The ETH value submitted for withdrawal, to be forwarded to the target.\n * @param gasLimit The minimum amount of gas that must be provided when withdrawing on L1.\n * @param data The data to be forwarded to the target on L1.\n */\n event WithdrawalInitiated(\n uint256 indexed nonce,\n address indexed sender,\n address indexed target,\n uint256 value,\n uint256 gasLimit,\n bytes data\n );\n\n /**\n * @notice Emitted any time a withdrawal is initiated. An extension to\n * WithdrawalInitiated so that the interface is maintained.\n *\n * @param hash The hash of the withdrawal\n */\n event WithdrawalInitiatedExtension1(bytes32 indexed hash);\n\n /**\n * @notice Emitted when the balance of this contract is burned.\n *\n * @param amount Amount of ETh that was burned.\n */\n event WithdrawerBalanceBurnt(uint256 indexed amount);\n\n /**\n * @custom:semver 0.0.1\n */\n constructor() Semver(0, 0, 1) {}\n\n /**\n * @notice Allows users to withdraw ETH by sending directly to this contract.\n */\n receive() external payable {\n initiateWithdrawal(msg.sender, RECEIVE_DEFAULT_GAS_LIMIT, bytes(\"\"));\n }\n\n /**\n * @notice Removes all ETH held by this contract from the state. Used to prevent the amount of\n * ETH on L2 inflating when ETH is withdrawn. Currently only way to do this is to\n * create a contract and self-destruct it to itself. Anyone can call this function. Not\n * incentivized since this function is very cheap.\n */\n function burn() external {\n uint256 balance = address(this).balance;\n Burn.eth(balance);\n emit WithdrawerBalanceBurnt(balance);\n }\n\n /**\n * @notice Sends a message from L2 to L1.\n *\n * @param _target Address to call on L1 execution.\n * @param _gasLimit Minimum gas limit for executing the message on L1.\n * @param _data Data to forward to L1 target.\n */\n function initiateWithdrawal(\n address _target,\n uint256 _gasLimit,\n bytes memory _data\n ) public payable {\n bytes32 withdrawalHash = Hashing.hashWithdrawal(\n Types.WithdrawalTransaction({\n nonce: nonce,\n sender: msg.sender,\n target: _target,\n value: msg.value,\n gasLimit: _gasLimit,\n data: _data\n })\n );\n\n sentMessages[withdrawalHash] = true;\n\n emit WithdrawalInitiated(nonce, msg.sender, _target, msg.value, _gasLimit, _data);\n emit WithdrawalInitiatedExtension1(withdrawalHash);\n\n unchecked {\n ++nonce;\n }\n }\n}\n" @@ -65,7 +65,10 @@ "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport { Types } from \"./Types.sol\";\nimport { Encoding } from \"./Encoding.sol\";\n\n/**\n * @title Hashing\n * @notice Hashing handles Optimism's various different hashing schemes.\n */\nlibrary Hashing {\n /**\n * @notice Computes the hash of the RLP encoded L2 transaction that would be generated when a\n * given deposit is sent to the L2 system. Useful for searching for a deposit in the L2\n * system.\n *\n * @param _tx User deposit transaction to hash.\n *\n * @return Hash of the RLP encoded L2 deposit transaction.\n */\n function hashDepositTransaction(Types.UserDepositTransaction memory _tx)\n internal\n pure\n returns (bytes32)\n {\n return keccak256(Encoding.encodeDepositTransaction(_tx));\n }\n\n /**\n * @notice Computes the deposit transaction's \"source hash\", a value that guarantees the hash\n * of the L2 transaction that corresponds to a deposit is unique and is\n * deterministically generated from L1 transaction data.\n *\n * @param _l1BlockHash Hash of the L1 block where the deposit was included.\n * @param _logIndex The index of the log that created the deposit transaction.\n *\n * @return Hash of the deposit transaction's \"source hash\".\n */\n function hashDepositSource(bytes32 _l1BlockHash, uint256 _logIndex)\n internal\n pure\n returns (bytes32)\n {\n bytes32 depositId = keccak256(abi.encode(_l1BlockHash, _logIndex));\n return keccak256(abi.encode(bytes32(0), depositId));\n }\n\n /**\n * @notice Hashes the cross domain message based on the version that is encoded into the\n * message nonce.\n *\n * @param _nonce Message nonce with version encoded into the first two bytes.\n * @param _sender Address of the sender of the message.\n * @param _target Address of the target of the message.\n * @param _value ETH value to send to the target.\n * @param _gasLimit Gas limit to use for the message.\n * @param _data Data to send with the message.\n *\n * @return Hashed cross domain message.\n */\n function hashCrossDomainMessage(\n uint256 _nonce,\n address _sender,\n address _target,\n uint256 _value,\n uint256 _gasLimit,\n bytes memory _data\n ) internal pure returns (bytes32) {\n (, uint16 version) = Encoding.decodeVersionedNonce(_nonce);\n if (version == 0) {\n return hashCrossDomainMessageV0(_target, _sender, _data, _nonce);\n } else if (version == 1) {\n return hashCrossDomainMessageV1(_nonce, _sender, _target, _value, _gasLimit, _data);\n } else {\n revert(\"Hashing: unknown cross domain message version\");\n }\n }\n\n /**\n * @notice Hashes a cross domain message based on the V0 (legacy) encoding.\n *\n * @param _target Address of the target of the message.\n * @param _sender Address of the sender of the message.\n * @param _data Data to send with the message.\n * @param _nonce Message nonce.\n *\n * @return Hashed cross domain message.\n */\n function hashCrossDomainMessageV0(\n address _target,\n address _sender,\n bytes memory _data,\n uint256 _nonce\n ) internal pure returns (bytes32) {\n return keccak256(Encoding.encodeCrossDomainMessageV0(_target, _sender, _data, _nonce));\n }\n\n /**\n * @notice Hashes a cross domain message based on the V1 (current) encoding.\n *\n * @param _nonce Message nonce.\n * @param _sender Address of the sender of the message.\n * @param _target Address of the target of the message.\n * @param _value ETH value to send to the target.\n * @param _gasLimit Gas limit to use for the message.\n * @param _data Data to send with the message.\n *\n * @return Hashed cross domain message.\n */\n function hashCrossDomainMessageV1(\n uint256 _nonce,\n address _sender,\n address _target,\n uint256 _value,\n uint256 _gasLimit,\n bytes memory _data\n ) internal pure returns (bytes32) {\n return\n keccak256(\n Encoding.encodeCrossDomainMessageV1(\n _nonce,\n _sender,\n _target,\n _value,\n _gasLimit,\n _data\n )\n );\n }\n\n /**\n * @notice Derives the withdrawal hash according to the encoding in the L2 Withdrawer contract\n *\n * @param _tx Withdrawal transaction to hash.\n *\n * @return Hashed withdrawal transaction.\n */\n function hashWithdrawal(Types.WithdrawalTransaction memory _tx)\n internal\n pure\n returns (bytes32)\n {\n return\n keccak256(\n abi.encode(_tx.nonce, _tx.sender, _tx.target, _tx.value, _tx.gasLimit, _tx.data)\n );\n }\n\n /**\n * @notice Hashes the various elements of an output root proof into an output root hash which\n * can be used to check if the proof is valid.\n *\n * @param _outputRootProof Output root proof which should hash to an output root.\n *\n * @return Hashed output root proof.\n */\n function hashOutputRootProof(Types.OutputRootProof memory _outputRootProof)\n internal\n pure\n returns (bytes32)\n {\n return\n keccak256(\n abi.encode(\n _outputRootProof.version,\n _outputRootProof.stateRoot,\n _outputRootProof.withdrawerStorageRoot,\n _outputRootProof.latestBlockhash\n )\n );\n }\n}\n" }, "contracts/libraries/Predeploys.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/**\n * @title Predeploys\n * @notice Contains constant addresses for contracts that are pre-deployed to the L2 system.\n */\nlibrary Predeploys {\n /**\n * @notice Address of the L2ToL1MessagePasser predeploy.\n */\n address internal constant L2_TO_L1_MESSAGE_PASSER = 0x4200000000000000000000000000000000000000;\n\n /**\n * @notice Address of the L2CrossDomainMessenger predeploy.\n */\n address internal constant L2_CROSS_DOMAIN_MESSENGER =\n 0x4200000000000000000000000000000000000007;\n\n /**\n * @notice Address of the L2StandardBridge predeploy.\n */\n address internal constant L2_STANDARD_BRIDGE = 0x4200000000000000000000000000000000000010;\n\n /**\n * @notice Address of the SequencerFeeWallet predeploy.\n */\n address internal constant SEQUENCER_FEE_WALLET = 0x4200000000000000000000000000000000000011;\n\n /**\n * @notice Address of the OptimismMintableERC20Factory predeploy.\n */\n address internal constant OPTIMISM_MINTABLE_ERC20_FACTORY =\n 0x4200000000000000000000000000000000000012;\n\n /**\n * @notice Address of the L1Block predeploy.\n */\n address internal constant L1_BLOCK_ATTRIBUTES = 0x4200000000000000000000000000000000000015;\n\n /**\n * @custom:legacy\n * @notice Address of the L1MessageSender predeploy. Deprecated. Use L2CrossDomainMessenger\n * or access tx.origin (or msg.sender) in a L1 to L2 transaction instead.\n */\n address internal constant L1_MESSAGE_SENDER = 0x4200000000000000000000000000000000000001;\n\n /**\n * @custom:legacy\n * @notice Address of the DeployerWhitelist predeploy. No longer active.\n */\n address internal constant DEPLOYER_WHITELIST = 0x4200000000000000000000000000000000000002;\n\n /**\n * @custom:legacy\n * @notice Address of the LegacyERC20ETH predeploy. Deprecated. Balances are migrated to the\n * state trie as of the Bedrock upgrade. Contract has been locked and write functions\n * can no longer be accessed.\n */\n address internal constant LEGACY_ERC20_ETH = 0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000;\n\n /**\n * @custom:legacy\n * @notice Address of the L1BlockNumber predeploy. Deprecated. Use the L1Block predeploy\n * instead, which exposes more information about the L1 state.\n */\n address internal constant L1_BLOCK_NUMBER = 0x4200000000000000000000000000000000000013;\n}\n" + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/**\n * @title Predeploys\n * @notice Contains constant addresses for contracts that are pre-deployed to the L2 system.\n */\nlibrary Predeploys {\n /**\n * @notice Address of the L2ToL1MessagePasser predeploy.\n */\n address internal constant L2_TO_L1_MESSAGE_PASSER = 0x4200000000000000000000000000000000000000;\n\n /**\n * @notice Address of the L2CrossDomainMessenger predeploy.\n */\n address internal constant L2_CROSS_DOMAIN_MESSENGER =\n 0x4200000000000000000000000000000000000007;\n\n /**\n * @notice Address of the L2StandardBridge predeploy.\n */\n address internal constant L2_STANDARD_BRIDGE = 0x4200000000000000000000000000000000000010;\n\n /**\n * @notice Address of the SequencerFeeWallet predeploy.\n */\n address internal constant SEQUENCER_FEE_WALLET = 0x4200000000000000000000000000000000000011;\n\n /**\n * @notice Address of the OptimismMintableERC20Factory predeploy.\n */\n address internal constant OPTIMISM_MINTABLE_ERC20_FACTORY =\n 0x4200000000000000000000000000000000000012;\n\n /**\n * @notice Address of the L1Block predeploy.\n */\n address internal constant L1_BLOCK_ATTRIBUTES = 0x4200000000000000000000000000000000000015;\n\n /**\n * @custom:legacy\n * @notice Address of the L1MessageSender predeploy. Deprecated. Use L2CrossDomainMessenger\n * or access tx.origin (or msg.sender) in a L1 to L2 transaction instead.\n */\n address internal constant L1_MESSAGE_SENDER = 0x4200000000000000000000000000000000000001;\n\n /**\n * @custom:legacy\n * @notice Address of the DeployerWhitelist predeploy. No longer active.\n */\n address internal constant DEPLOYER_WHITELIST = 0x4200000000000000000000000000000000000002;\n\n /**\n * @custom:legacy\n * @notice Address of the LegacyERC20ETH predeploy. Deprecated. Balances are migrated to the\n * state trie as of the Bedrock upgrade. Contract has been locked and write functions\n * can no longer be accessed.\n */\n address internal constant LEGACY_ERC20_ETH = 0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000;\n\n /**\n * @custom:legacy\n * @notice Address of the L1BlockNumber predeploy. Deprecated. Use the L1Block predeploy\n * instead, which exposes more information about the L1 state.\n */\n address internal constant L1_BLOCK_NUMBER = 0x4200000000000000000000000000000000000013;\n\n /**\n * @notice Address of the GasPriceOracle predeploy. Includes fee information\n * and helpers for computing the L1 portion of the transaction fee.\n */\n address internal constant GAS_PRICE_ORACLE = 0x420000000000000000000000000000000000000F;\n}\n" + }, + "contracts/libraries/SafeCall.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\n/**\n * @title SafeCall\n * @notice Perform low level safe calls\n */\nlibrary SafeCall {\n /**\n * @notice Perform a low level call without copying any returndata\n *\n * @param _target Address to call\n * @param _gas Amount of gas to pass to the call\n * @param _value Amount of value to pass to the call\n * @param _calldata Calldata to pass to the call\n */\n function call(\n address _target,\n uint256 _gas,\n uint256 _value,\n bytes memory _calldata\n ) internal returns (bool) {\n bool _success;\n assembly {\n _success := call(\n _gas, // gas\n _target, // recipient\n _value, // ether value\n add(_calldata, 0x20), // inloc\n mload(_calldata), // inlen\n 0, // outloc\n 0 // outlen\n )\n }\n return _success;\n }\n}\n" }, "contracts/libraries/Types.sol": { "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.9;\n\n/**\n * @title Types\n * @notice Contains various types used throughout the Optimism contract system.\n */\nlibrary Types {\n /**\n * @notice OutputProposal represents a commitment to the L2 state. The timestamp is the L1\n * timestamp that the output root is posted. This timestamp is used to verify that the\n * finalization period has passed since the output root was submitted.\n */\n struct OutputProposal {\n bytes32 outputRoot;\n uint256 timestamp;\n }\n\n /**\n * @notice Struct representing the elements that are hashed together to generate an output root\n * which itself represents a snapshot of the L2 state.\n */\n struct OutputRootProof {\n bytes32 version;\n bytes32 stateRoot;\n bytes32 withdrawerStorageRoot;\n bytes32 latestBlockhash;\n }\n\n /**\n * @notice Struct representing a deposit transaction (L1 => L2 transaction) created by an end\n * user (as opposed to a system deposit transaction generated by the system).\n */\n struct UserDepositTransaction {\n address from;\n address to;\n bool isCreation;\n uint256 value;\n uint256 mint;\n uint64 gasLimit;\n bytes data;\n bytes32 l1BlockHash;\n uint256 logIndex;\n }\n\n /**\n * @notice Struct representing a withdrawal transaction.\n */\n struct WithdrawalTransaction {\n uint256 nonce;\n address sender;\n address target;\n uint256 value;\n uint256 gasLimit;\n bytes data;\n }\n}\n" @@ -86,7 +89,7 @@ "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\n/* Testing utilities */\nimport { Test } from \"forge-std/Test.sol\";\nimport { Vm } from \"forge-std/Vm.sol\";\nimport \"./CommonTest.t.sol\";\nimport { CrossDomainMessenger } from \"../universal/CrossDomainMessenger.sol\";\nimport { ResourceMetering } from \"../L1/ResourceMetering.sol\";\n\nuint128 constant INITIAL_BASE_FEE = 1_000_000_000;\n\n// Free function for setting the prevBaseFee param in the OptimismPortal.\nfunction setPrevBaseFee(\n Vm _vm,\n address _op,\n uint128 _prevBaseFee\n) {\n _vm.store(\n address(_op),\n bytes32(uint256(1)),\n bytes32(\n abi.encode(\n ResourceMetering.ResourceParams({\n prevBaseFee: _prevBaseFee,\n prevBoughtGas: 0,\n prevBlockNum: uint64(block.number)\n })\n )\n )\n );\n}\n\n// Tests for obtaining pure gas cost estimates for commonly used functions.\n// The objective with these benchmarks is to strip down the actual test functions\n// so that they are nothing more than the call we want measure the gas cost of.\n// In order to achieve this we make no assertions, and handle everything else in the setUp()\n// function.\ncontract GasBenchMark_OptimismPortal is Portal_Initializer {\n function test_depositTransaction_benchmark() external {\n op.depositTransaction{ value: NON_ZERO_VALUE }(\n NON_ZERO_ADDRESS,\n ZERO_VALUE,\n NON_ZERO_GASLIMIT,\n false,\n NON_ZERO_DATA\n );\n }\n\n function test_depositTransaction_benchmark_1() external {\n setPrevBaseFee(vm, address(op), INITIAL_BASE_FEE);\n op.depositTransaction{ value: NON_ZERO_VALUE }(\n NON_ZERO_ADDRESS,\n ZERO_VALUE,\n NON_ZERO_GASLIMIT,\n false,\n NON_ZERO_DATA\n );\n }\n}\n\ncontract GasBenchMark_L1CrossDomainMessenger is Messenger_Initializer {\n function test_L1MessengerSendMessage_benchmark_0() external {\n // The amount of data typically sent during a bridge deposit.\n bytes\n memory data = hex\"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\";\n L1Messenger.sendMessage(bob, data, uint32(100));\n }\n\n function test_L1MessengerSendMessage_benchmark_1() external {\n setPrevBaseFee(vm, address(op), INITIAL_BASE_FEE);\n // The amount of data typically sent during a bridge deposit.\n bytes\n memory data = hex\"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\";\n L1Messenger.sendMessage(bob, data, uint32(100));\n }\n}\n\ncontract GasBenchMark_L1StandardBridge_Deposit is Bridge_Initializer {\n function setUp() public virtual override {\n super.setUp();\n deal(address(L1Token), alice, 100000, true);\n vm.startPrank(alice, alice);\n }\n\n function test_depositETH_benchmark_0() external {\n L1Bridge.depositETH{ value: 500 }(50000, hex\"\");\n }\n\n function test_depositETH_benchmark_1() external {\n setPrevBaseFee(vm, address(op), INITIAL_BASE_FEE);\n L1Bridge.depositETH{ value: 500 }(50000, hex\"\");\n }\n\n function test_depositERC20_benchmark_0() external {\n L1Bridge.depositETH{ value: 500 }(50000, hex\"\");\n }\n\n function test_depositERC20_benchmark_1() external {\n setPrevBaseFee(vm, address(op), INITIAL_BASE_FEE);\n L1Bridge.depositETH{ value: 500 }(50000, hex\"\");\n }\n}\n\ncontract GasBenchMark_L1StandardBridge_Finalize is Bridge_Initializer {\n function setUp() public virtual override {\n super.setUp();\n deal(address(L1Token), address(L1Bridge), 100, true);\n vm.mockCall(\n address(L1Bridge.messenger()),\n abi.encodeWithSelector(CrossDomainMessenger.xDomainMessageSender.selector),\n abi.encode(address(L1Bridge.otherBridge()))\n );\n vm.startPrank(address(L1Bridge.messenger()));\n vm.deal(address(L1Bridge.messenger()), 100);\n }\n\n function test_finalizeETHWithdrawal_benchmark() external {\n // TODO: Make this more accurate. It is underestimating the cost because it pranks\n // the call coming from the messenger, which bypasses the portal\n // and oracle.\n L1Bridge.finalizeETHWithdrawal{ value: 100 }(alice, alice, 100, hex\"\");\n }\n}\n\ncontract GasBenchMark_L2OutputOracle is L2OutputOracle_Initializer {\n uint256 nextBlockNumber;\n\n function setUp() public override {\n super.setUp();\n nextBlockNumber = oracle.nextBlockNumber();\n warpToProposeTime(nextBlockNumber);\n vm.startPrank(proposer);\n }\n\n function test_proposeL2Output_benchmark() external {\n oracle.proposeL2Output(nonZeroHash, nextBlockNumber, 0, 0);\n }\n}\n" }, "contracts/test/CommonTest.t.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\n/* Testing utilities */\nimport { Test } from \"forge-std/Test.sol\";\nimport { L2OutputOracle } from \"../L1/L2OutputOracle.sol\";\nimport { L2ToL1MessagePasser } from \"../L2/L2ToL1MessagePasser.sol\";\nimport { L1StandardBridge } from \"../L1/L1StandardBridge.sol\";\nimport { L2StandardBridge } from \"../L2/L2StandardBridge.sol\";\nimport { OptimismMintableERC20Factory } from \"../universal/OptimismMintableERC20Factory.sol\";\nimport { OptimismMintableERC20 } from \"../universal/OptimismMintableERC20.sol\";\nimport { OptimismPortal } from \"../L1/OptimismPortal.sol\";\nimport { L1CrossDomainMessenger } from \"../L1/L1CrossDomainMessenger.sol\";\nimport { L2CrossDomainMessenger } from \"../L2/L2CrossDomainMessenger.sol\";\nimport { AddressAliasHelper } from \"../vendor/AddressAliasHelper.sol\";\nimport { LegacyERC20ETH } from \"../legacy/LegacyERC20ETH.sol\";\nimport { Predeploys } from \"../libraries/Predeploys.sol\";\nimport { Types } from \"../libraries/Types.sol\";\nimport { ERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport { Proxy } from \"../universal/Proxy.sol\";\nimport { Initializable } from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport { ResolvedDelegateProxy } from \"../legacy/ResolvedDelegateProxy.sol\";\nimport { AddressManager } from \"../legacy/AddressManager.sol\";\nimport { L1ChugSplashProxy } from \"../legacy/L1ChugSplashProxy.sol\";\nimport { IL1ChugSplashDeployer } from \"../legacy/L1ChugSplashProxy.sol\";\nimport { Strings } from \"@openzeppelin/contracts/utils/Strings.sol\";\n\ncontract CommonTest is Test {\n address alice = address(128);\n address bob = address(256);\n address multisig = address(512);\n\n address immutable ZERO_ADDRESS = address(0);\n address immutable NON_ZERO_ADDRESS = address(1);\n uint256 immutable NON_ZERO_VALUE = 100;\n uint256 immutable ZERO_VALUE = 0;\n uint64 immutable NON_ZERO_GASLIMIT = 50000;\n bytes32 nonZeroHash = keccak256(abi.encode(\"NON_ZERO\"));\n bytes NON_ZERO_DATA = hex\"0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff0000\";\n\n event TransactionDeposited(\n address indexed from,\n address indexed to,\n uint256 indexed version,\n bytes opaqueData\n );\n\n FFIInterface ffi;\n\n function _setUp() public {\n // Give alice and bob some ETH\n vm.deal(alice, 1 << 16);\n vm.deal(bob, 1 << 16);\n vm.deal(multisig, 1 << 16);\n\n vm.label(alice, \"alice\");\n vm.label(bob, \"bob\");\n vm.label(multisig, \"multisig\");\n\n // Make sure we have a non-zero base fee\n vm.fee(1000000000);\n\n ffi = new FFIInterface();\n }\n\n function emitTransactionDeposited(\n address _from,\n address _to,\n uint256 _mint,\n uint256 _value,\n uint64 _gasLimit,\n bool _isCreation,\n bytes memory _data\n ) internal {\n emit TransactionDeposited(\n _from,\n _to,\n 0,\n abi.encodePacked(_mint, _value, _gasLimit, _isCreation, _data)\n );\n }\n}\n\ncontract L2OutputOracle_Initializer is CommonTest {\n // Test target\n L2OutputOracle oracle;\n L2OutputOracle oracleImpl;\n\n L2ToL1MessagePasser messagePasser =\n L2ToL1MessagePasser(payable(Predeploys.L2_TO_L1_MESSAGE_PASSER));\n\n // Constructor arguments\n address proposer = 0x000000000000000000000000000000000000AbBa;\n address owner = 0x000000000000000000000000000000000000ACDC;\n uint256 submissionInterval = 1800;\n uint256 l2BlockTime = 2;\n bytes32 genesisL2Output = keccak256(abi.encode(0));\n uint256 historicalTotalBlocks = 199;\n uint256 startingBlockNumber = 200;\n uint256 startingTimestamp = 1000;\n\n // Test data\n uint256 initL1Time;\n\n // Advance the evm's time to meet the L2OutputOracle's requirements for proposeL2Output\n function warpToProposeTime(uint256 _nextBlockNumber) public {\n vm.warp(oracle.computeL2Timestamp(_nextBlockNumber) + 1);\n }\n\n function setUp() public virtual {\n _setUp();\n\n // By default the first block has timestamp and number zero, which will cause underflows in the\n // tests, so we'll move forward to these block values.\n initL1Time = startingTimestamp + 1;\n vm.warp(initL1Time);\n vm.roll(startingBlockNumber);\n // Deploy the L2OutputOracle and transfer owernship to the proposer\n oracleImpl = new L2OutputOracle(\n submissionInterval,\n genesisL2Output,\n historicalTotalBlocks,\n startingBlockNumber,\n startingTimestamp,\n l2BlockTime,\n proposer,\n owner\n );\n Proxy proxy = new Proxy(multisig);\n vm.prank(multisig);\n proxy.upgradeToAndCall(\n address(oracleImpl),\n abi.encodeWithSelector(\n L2OutputOracle.initialize.selector,\n genesisL2Output,\n startingBlockNumber,\n proposer,\n owner\n )\n );\n oracle = L2OutputOracle(address(proxy));\n vm.label(address(oracle), \"L2OutputOracle\");\n\n // Set the L2ToL1MessagePasser at the correct address\n vm.etch(\n Predeploys.L2_TO_L1_MESSAGE_PASSER,\n address(new L2ToL1MessagePasser()).code\n );\n\n vm.label(Predeploys.L2_TO_L1_MESSAGE_PASSER, \"L2ToL1MessagePasser\");\n }\n}\n\ncontract Portal_Initializer is L2OutputOracle_Initializer {\n // Test target\n OptimismPortal opImpl;\n OptimismPortal op;\n\n function setUp() public virtual override {\n L2OutputOracle_Initializer.setUp();\n\n opImpl = new OptimismPortal(oracle, 7 days);\n Proxy proxy = new Proxy(multisig);\n vm.prank(multisig);\n proxy.upgradeToAndCall(\n address(opImpl),\n abi.encodeWithSelector(OptimismPortal.initialize.selector)\n );\n op = OptimismPortal(payable(address(proxy)));\n }\n}\n\ncontract Messenger_Initializer is L2OutputOracle_Initializer {\n OptimismPortal op;\n AddressManager addressManager;\n L1CrossDomainMessenger L1Messenger;\n L2CrossDomainMessenger L2Messenger =\n L2CrossDomainMessenger(Predeploys.L2_CROSS_DOMAIN_MESSENGER);\n\n event SentMessage(\n address indexed target,\n address sender,\n bytes message,\n uint256 messageNonce,\n uint256 gasLimit\n );\n\n event SentMessageExtension1(\n address indexed sender,\n uint256 value\n );\n\n event WithdrawalInitiated(\n uint256 indexed nonce,\n address indexed sender,\n address indexed target,\n uint256 value,\n uint256 gasLimit,\n bytes data\n );\n\n event RelayedMessage(bytes32 indexed msgHash);\n\n event TransactionDeposited(\n address indexed from,\n address indexed to,\n uint256 mint,\n uint256 value,\n uint64 gasLimit,\n bool isCreation,\n bytes data\n );\n\n event WithdrawalFinalized(bytes32 indexed, bool success);\n\n event WhatHappened(bool success, bytes returndata);\n\n function setUp() public virtual override {\n super.setUp();\n\n // Deploy the OptimismPortal\n op = new OptimismPortal(oracle, 7 days);\n vm.label(address(op), \"OptimismPortal\");\n\n // Deploy the address manager\n vm.prank(multisig);\n addressManager = new AddressManager();\n\n // Setup implementation\n L1CrossDomainMessenger L1MessengerImpl = new L1CrossDomainMessenger(op);\n\n // Setup the address manager and proxy\n vm.prank(multisig);\n addressManager.setAddress(\"OVM_L1CrossDomainMessenger\", address(L1MessengerImpl));\n ResolvedDelegateProxy proxy = new ResolvedDelegateProxy(\n addressManager,\n \"OVM_L1CrossDomainMessenger\"\n );\n L1Messenger = L1CrossDomainMessenger(address(proxy));\n L1Messenger.initialize();\n\n vm.etch(\n Predeploys.L2_CROSS_DOMAIN_MESSENGER,\n address(new L2CrossDomainMessenger(address(L1Messenger))).code\n );\n\n L2Messenger.initialize(address(L1Messenger));\n\n // Label addresses\n vm.label(address(addressManager), \"AddressManager\");\n vm.label(address(L1MessengerImpl), \"L1CrossDomainMessenger_Impl\");\n vm.label(address(L1Messenger), \"L1CrossDomainMessenger_Proxy\");\n vm.label(Predeploys.LEGACY_ERC20_ETH, \"LegacyERC20ETH\");\n vm.label(Predeploys.L2_CROSS_DOMAIN_MESSENGER, \"L2CrossDomainMessenger\");\n\n vm.label(\n AddressAliasHelper.applyL1ToL2Alias(address(L1Messenger)),\n \"L1CrossDomainMessenger_aliased\"\n );\n }\n}\n\ncontract Bridge_Initializer is Messenger_Initializer {\n L1StandardBridge L1Bridge;\n L2StandardBridge L2Bridge;\n OptimismMintableERC20Factory L2TokenFactory;\n OptimismMintableERC20Factory L1TokenFactory;\n ERC20 L1Token;\n ERC20 BadL1Token;\n OptimismMintableERC20 L2Token;\n ERC20 NativeL2Token;\n ERC20 BadL2Token;\n OptimismMintableERC20 RemoteL1Token;\n\n event ETHDepositInitiated(\n address indexed from,\n address indexed to,\n uint256 amount,\n bytes data\n );\n\n event ETHWithdrawalFinalized(\n address indexed from,\n address indexed to,\n uint256 amount,\n bytes data\n );\n\n event ERC20DepositInitiated(\n address indexed l1Token,\n address indexed l2Token,\n address indexed from,\n address to,\n uint256 amount,\n bytes data\n );\n\n event ERC20WithdrawalFinalized(\n address indexed l1Token,\n address indexed l2Token,\n address indexed from,\n address to,\n uint256 amount,\n bytes data\n );\n\n event WithdrawalInitiated(\n address indexed l1Token,\n address indexed l2Token,\n address indexed from,\n address to,\n uint256 amount,\n bytes data\n );\n\n event DepositFinalized(\n address indexed l1Token,\n address indexed l2Token,\n address indexed from,\n address to,\n uint256 amount,\n bytes data\n );\n\n event DepositFailed(\n address indexed l1Token,\n address indexed l2Token,\n address indexed from,\n address to,\n uint256 amount,\n bytes data\n );\n\n event ETHBridgeInitiated(\n address indexed from,\n address indexed to,\n uint256 amount,\n bytes data\n );\n\n event ETHBridgeFinalized(\n address indexed from,\n address indexed to,\n uint256 amount,\n bytes data\n );\n\n event ERC20BridgeInitiated(\n address indexed localToken,\n address indexed remoteToken,\n address indexed from,\n address to,\n uint256 amount,\n bytes data\n );\n\n event ERC20BridgeFinalized(\n address indexed localToken,\n address indexed remoteToken,\n address indexed from,\n address to,\n uint256 amount,\n bytes data\n );\n\n event ERC20BridgeFailed(\n address indexed localToken,\n address indexed remoteToken,\n address indexed from,\n address to,\n uint256 amount,\n bytes data\n );\n\n function setUp() public virtual override {\n super.setUp();\n\n vm.label(Predeploys.L2_STANDARD_BRIDGE, \"L2StandardBridge\");\n vm.label(Predeploys.OPTIMISM_MINTABLE_ERC20_FACTORY, \"OptimismMintableERC20Factory\");\n\n // Deploy the L1 bridge and initialize it with the address of the\n // L1CrossDomainMessenger\n L1ChugSplashProxy proxy = new L1ChugSplashProxy(multisig);\n vm.mockCall(\n multisig,\n abi.encodeWithSelector(IL1ChugSplashDeployer.isUpgrading.selector),\n abi.encode(true)\n );\n vm.startPrank(multisig);\n proxy.setCode(address(new L1StandardBridge(payable(address(L1Messenger)))).code);\n vm.clearMockedCalls();\n address L1Bridge_Impl = proxy.getImplementation();\n vm.stopPrank();\n\n L1Bridge = L1StandardBridge(payable(address(proxy)));\n L1Bridge.initialize(payable(address(L1Messenger)));\n\n vm.label(address(proxy), \"L1StandardBridge_Proxy\");\n vm.label(address(L1Bridge_Impl), \"L1StandardBridge_Impl\");\n\n // Deploy the L2StandardBridge, move it to the correct predeploy\n // address and then initialize it\n L2StandardBridge l2B = new L2StandardBridge(payable(Predeploys.L2_STANDARD_BRIDGE));\n vm.etch(Predeploys.L2_STANDARD_BRIDGE, address(l2B).code);\n L2Bridge = L2StandardBridge(payable(Predeploys.L2_STANDARD_BRIDGE));\n L2Bridge.initialize(payable(address(L1Bridge)));\n\n // Set up the L2 mintable token factory\n OptimismMintableERC20Factory factory = new OptimismMintableERC20Factory(\n Predeploys.L2_STANDARD_BRIDGE\n );\n vm.etch(Predeploys.OPTIMISM_MINTABLE_ERC20_FACTORY, address(factory).code);\n L2TokenFactory = OptimismMintableERC20Factory(\n Predeploys.OPTIMISM_MINTABLE_ERC20_FACTORY\n );\n\n vm.etch(Predeploys.LEGACY_ERC20_ETH, address(new LegacyERC20ETH()).code);\n\n L1Token = new ERC20(\"Native L1 Token\", \"L1T\");\n\n // Deploy the L2 ERC20 now\n L2Token = OptimismMintableERC20(\n L2TokenFactory.createStandardL2Token(\n address(L1Token),\n string(abi.encodePacked(\"L2-\", L1Token.name())),\n string(abi.encodePacked(\"L2-\", L1Token.symbol()))\n )\n );\n\n BadL2Token = OptimismMintableERC20(\n L2TokenFactory.createStandardL2Token(\n address(1),\n string(abi.encodePacked(\"L2-\", L1Token.name())),\n string(abi.encodePacked(\"L2-\", L1Token.symbol()))\n )\n );\n\n NativeL2Token = new ERC20(\"Native L2 Token\", \"L2T\");\n L1TokenFactory = new OptimismMintableERC20Factory(address(L1Bridge));\n\n RemoteL1Token = OptimismMintableERC20(\n L1TokenFactory.createStandardL2Token(\n address(NativeL2Token),\n string(abi.encodePacked(\"L1-\", NativeL2Token.name())),\n string(abi.encodePacked(\"L1-\", NativeL2Token.symbol()))\n )\n );\n\n BadL1Token = OptimismMintableERC20(\n L1TokenFactory.createStandardL2Token(\n address(1),\n string(abi.encodePacked(\"L1-\", NativeL2Token.name())),\n string(abi.encodePacked(\"L1-\", NativeL2Token.symbol()))\n )\n );\n }\n}\n\ncontract FFIInterface is Test {\n function getFinalizeWithdrawalTransactionInputs(Types.WithdrawalTransaction memory _tx)\n external\n returns (\n bytes32,\n bytes32,\n bytes32,\n bytes32,\n bytes memory\n )\n {\n string[] memory cmds = new string[](9);\n cmds[0] = \"node\";\n cmds[1] = \"dist/scripts/differential-testing.js\";\n cmds[2] = \"getFinalizeWithdrawalTransactionInputs\";\n cmds[3] = vm.toString(_tx.nonce);\n cmds[4] = vm.toString(_tx.sender);\n cmds[5] = vm.toString(_tx.target);\n cmds[6] = vm.toString(_tx.value);\n cmds[7] = vm.toString(_tx.gasLimit);\n cmds[8] = vm.toString(_tx.data);\n\n bytes memory result = vm.ffi(cmds);\n (\n bytes32 stateRoot,\n bytes32 storageRoot,\n bytes32 outputRoot,\n bytes32 withdrawalHash,\n bytes memory withdrawalProof\n ) = abi.decode(result, (bytes32, bytes32, bytes32, bytes32, bytes));\n\n return (stateRoot, storageRoot, outputRoot, withdrawalHash, withdrawalProof);\n }\n\n function hashCrossDomainMessage(\n uint256 _nonce,\n address _sender,\n address _target,\n uint256 _value,\n uint256 _gasLimit,\n bytes memory _data\n ) external returns (bytes32) {\n string[] memory cmds = new string[](9);\n cmds[0] = \"node\";\n cmds[1] = \"dist/scripts/differential-testing.js\";\n cmds[2] = \"hashCrossDomainMessage\";\n cmds[3] = vm.toString(_nonce);\n cmds[4] = vm.toString(_sender);\n cmds[5] = vm.toString(_target);\n cmds[6] = vm.toString(_value);\n cmds[7] = vm.toString(_gasLimit);\n cmds[8] = vm.toString(_data);\n\n bytes memory result = vm.ffi(cmds);\n return abi.decode(result, (bytes32));\n }\n\n function hashWithdrawal(\n uint256 _nonce,\n address _sender,\n address _target,\n uint256 _value,\n uint256 _gasLimit,\n bytes memory _data\n ) external returns (bytes32) {\n string[] memory cmds = new string[](9);\n cmds[0] = \"node\";\n cmds[1] = \"dist/scripts/differential-testing.js\";\n cmds[2] = \"hashWithdrawal\";\n cmds[3] = vm.toString(_nonce);\n cmds[4] = vm.toString(_sender);\n cmds[5] = vm.toString(_target);\n cmds[6] = vm.toString(_value);\n cmds[7] = vm.toString(_gasLimit);\n cmds[8] = vm.toString(_data);\n\n bytes memory result = vm.ffi(cmds);\n return abi.decode(result, (bytes32));\n }\n\n function hashOutputRootProof(\n bytes32 _version,\n bytes32 _stateRoot,\n bytes32 _withdrawerStorageRoot,\n bytes32 _latestBlockhash\n ) external returns (bytes32) {\n string[] memory cmds = new string[](7);\n cmds[0] = \"node\";\n cmds[1] = \"dist/scripts/differential-testing.js\";\n cmds[2] = \"hashOutputRootProof\";\n cmds[3] = Strings.toHexString(uint256(_version));\n cmds[4] = Strings.toHexString(uint256(_stateRoot));\n cmds[5] = Strings.toHexString(uint256(_withdrawerStorageRoot));\n cmds[6] = Strings.toHexString(uint256(_latestBlockhash));\n\n bytes memory result = vm.ffi(cmds);\n return abi.decode(result, (bytes32));\n }\n\n function hashDepositTransaction(\n address _from,\n address _to,\n uint256 _mint,\n uint256 _value,\n uint64 _gas,\n bytes memory _data,\n uint256 _logIndex\n ) external returns (bytes32) {\n string[] memory cmds = new string[](11);\n cmds[0] = \"node\";\n cmds[1] = \"dist/scripts/differential-testing.js\";\n cmds[2] = \"hashDepositTransaction\";\n cmds[3] = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n cmds[4] = vm.toString(_logIndex);\n cmds[5] = vm.toString(_from);\n cmds[6] = vm.toString(_to);\n cmds[7] = vm.toString(_mint);\n cmds[8] = vm.toString(_value);\n cmds[9] = vm.toString(_gas);\n cmds[10] = vm.toString(_data);\n\n bytes memory result = vm.ffi(cmds);\n return abi.decode(result, (bytes32));\n }\n\n function encodeDepositTransaction(\n Types.UserDepositTransaction calldata txn\n ) external returns (bytes memory) {\n string[] memory cmds = new string[](12);\n cmds[0] = \"node\";\n cmds[1] = \"dist/scripts/differential-testing.js\";\n cmds[2] = \"encodeDepositTransaction\";\n cmds[3] = vm.toString(txn.from);\n cmds[4] = vm.toString(txn.to);\n cmds[5] = vm.toString(txn.value);\n cmds[6] = vm.toString(txn.mint);\n cmds[7] = vm.toString(txn.gasLimit);\n cmds[8] = vm.toString(txn.isCreation);\n cmds[9] = vm.toString(txn.data);\n cmds[10] = vm.toString(txn.l1BlockHash);\n cmds[11] = vm.toString(txn.logIndex);\n\n bytes memory result = vm.ffi(cmds);\n return abi.decode(result, (bytes));\n }\n\n function encodeCrossDomainMessage(\n uint256 _nonce,\n address _sender,\n address _target,\n uint256 _value,\n uint256 _gasLimit,\n bytes memory _data\n ) external returns (bytes memory) {\n string[] memory cmds = new string[](9);\n cmds[0] = \"node\";\n cmds[1] = \"dist/scripts/differential-testing.js\";\n cmds[2] = \"encodeCrossDomainMessage\";\n cmds[3] = vm.toString(_nonce);\n cmds[4] = vm.toString(_sender);\n cmds[5] = vm.toString(_target);\n cmds[6] = vm.toString(_value);\n cmds[7] = vm.toString(_gasLimit);\n cmds[8] = vm.toString(_data);\n\n bytes memory result = vm.ffi(cmds);\n return abi.decode(result, (bytes));\n }\n\n function decodeVersionedNonce(uint256 nonce) external returns (uint256, uint256) {\n string[] memory cmds = new string[](4);\n cmds[0] = \"node\";\n cmds[1] = \"dist/scripts/differential-testing.js\";\n cmds[2] = \"decodeVersionedNonce\";\n cmds[3] = vm.toString(nonce);\n\n bytes memory result = vm.ffi(cmds);\n return abi.decode(result, (uint256, uint256));\n }\n}\n\n// Used for testing a future upgrade beyond the current implementations.\n// We include some variables so that we can sanity check accessing storage values after an upgrade.\ncontract NextImpl is Initializable {\n // Initializable occupies the zero-th slot.\n bytes32 slot1;\n bytes32[19] __gap;\n bytes32 slot21;\n bytes32 public constant slot21Init = bytes32(hex\"1337\");\n\n function initialize() public reinitializer(2) {\n // Slot21 is unused by an of our upgradeable contracts.\n // This is used to verify that we can access this value after an upgrade.\n slot21 = slot21Init;\n }\n}\n\ncontract Reverter {\n fallback() external {\n revert();\n }\n}\n\n// Useful for testing reentrancy guards\ncontract CallerCaller {\n event WhatHappened(\n bool success,\n bytes returndata\n );\n\n fallback() external {\n (bool success, bytes memory returndata) = msg.sender.call(msg.data);\n emit WhatHappened(success, returndata);\n assembly {\n switch success\n case 0 { revert(add(returndata, 0x20), mload(returndata)) }\n default { return(add(returndata, 0x20), mload(returndata)) }\n }\n }\n}\n" + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\n/* Testing utilities */\nimport { Test } from \"forge-std/Test.sol\";\nimport { L2OutputOracle } from \"../L1/L2OutputOracle.sol\";\nimport { L2ToL1MessagePasser } from \"../L2/L2ToL1MessagePasser.sol\";\nimport { L1StandardBridge } from \"../L1/L1StandardBridge.sol\";\nimport { L2StandardBridge } from \"../L2/L2StandardBridge.sol\";\nimport { OptimismMintableERC20Factory } from \"../universal/OptimismMintableERC20Factory.sol\";\nimport { OptimismMintableERC20 } from \"../universal/OptimismMintableERC20.sol\";\nimport { OptimismPortal } from \"../L1/OptimismPortal.sol\";\nimport { L1CrossDomainMessenger } from \"../L1/L1CrossDomainMessenger.sol\";\nimport { L2CrossDomainMessenger } from \"../L2/L2CrossDomainMessenger.sol\";\nimport { AddressAliasHelper } from \"../vendor/AddressAliasHelper.sol\";\nimport { LegacyERC20ETH } from \"../legacy/LegacyERC20ETH.sol\";\nimport { Predeploys } from \"../libraries/Predeploys.sol\";\nimport { Types } from \"../libraries/Types.sol\";\nimport { ERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport { Proxy } from \"../universal/Proxy.sol\";\nimport { Initializable } from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport { ResolvedDelegateProxy } from \"../legacy/ResolvedDelegateProxy.sol\";\nimport { AddressManager } from \"../legacy/AddressManager.sol\";\nimport { L1ChugSplashProxy } from \"../legacy/L1ChugSplashProxy.sol\";\nimport { IL1ChugSplashDeployer } from \"../legacy/L1ChugSplashProxy.sol\";\nimport { Strings } from \"@openzeppelin/contracts/utils/Strings.sol\";\n\ncontract CommonTest is Test {\n address alice = address(128);\n address bob = address(256);\n address multisig = address(512);\n\n address immutable ZERO_ADDRESS = address(0);\n address immutable NON_ZERO_ADDRESS = address(1);\n uint256 immutable NON_ZERO_VALUE = 100;\n uint256 immutable ZERO_VALUE = 0;\n uint64 immutable NON_ZERO_GASLIMIT = 50000;\n bytes32 nonZeroHash = keccak256(abi.encode(\"NON_ZERO\"));\n bytes NON_ZERO_DATA = hex\"0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff0000\";\n\n event TransactionDeposited(\n address indexed from,\n address indexed to,\n uint256 indexed version,\n bytes opaqueData\n );\n\n FFIInterface ffi;\n\n function _setUp() public {\n // Give alice and bob some ETH\n vm.deal(alice, 1 << 16);\n vm.deal(bob, 1 << 16);\n vm.deal(multisig, 1 << 16);\n\n vm.label(alice, \"alice\");\n vm.label(bob, \"bob\");\n vm.label(multisig, \"multisig\");\n\n // Make sure we have a non-zero base fee\n vm.fee(1000000000);\n\n ffi = new FFIInterface();\n }\n\n function emitTransactionDeposited(\n address _from,\n address _to,\n uint256 _mint,\n uint256 _value,\n uint64 _gasLimit,\n bool _isCreation,\n bytes memory _data\n ) internal {\n emit TransactionDeposited(\n _from,\n _to,\n 0,\n abi.encodePacked(_mint, _value, _gasLimit, _isCreation, _data)\n );\n }\n}\n\ncontract L2OutputOracle_Initializer is CommonTest {\n // Test target\n L2OutputOracle oracle;\n L2OutputOracle oracleImpl;\n\n L2ToL1MessagePasser messagePasser =\n L2ToL1MessagePasser(payable(Predeploys.L2_TO_L1_MESSAGE_PASSER));\n\n // Constructor arguments\n address proposer = 0x000000000000000000000000000000000000AbBa;\n address owner = 0x000000000000000000000000000000000000ACDC;\n uint256 submissionInterval = 1800;\n uint256 l2BlockTime = 2;\n bytes32 genesisL2Output = keccak256(abi.encode(0));\n uint256 historicalTotalBlocks = 199;\n uint256 startingBlockNumber = 200;\n uint256 startingTimestamp = 1000;\n\n // Test data\n uint256 initL1Time;\n\n // Advance the evm's time to meet the L2OutputOracle's requirements for proposeL2Output\n function warpToProposeTime(uint256 _nextBlockNumber) public {\n vm.warp(oracle.computeL2Timestamp(_nextBlockNumber) + 1);\n }\n\n function setUp() public virtual {\n _setUp();\n\n // By default the first block has timestamp and number zero, which will cause underflows in the\n // tests, so we'll move forward to these block values.\n initL1Time = startingTimestamp + 1;\n vm.warp(initL1Time);\n vm.roll(startingBlockNumber);\n // Deploy the L2OutputOracle and transfer owernship to the proposer\n oracleImpl = new L2OutputOracle(\n submissionInterval,\n genesisL2Output,\n historicalTotalBlocks,\n startingBlockNumber,\n startingTimestamp,\n l2BlockTime,\n proposer,\n owner\n );\n Proxy proxy = new Proxy(multisig);\n vm.prank(multisig);\n proxy.upgradeToAndCall(\n address(oracleImpl),\n abi.encodeWithSelector(\n L2OutputOracle.initialize.selector,\n genesisL2Output,\n startingBlockNumber,\n proposer,\n owner\n )\n );\n oracle = L2OutputOracle(address(proxy));\n vm.label(address(oracle), \"L2OutputOracle\");\n\n // Set the L2ToL1MessagePasser at the correct address\n vm.etch(\n Predeploys.L2_TO_L1_MESSAGE_PASSER,\n address(new L2ToL1MessagePasser()).code\n );\n\n vm.label(Predeploys.L2_TO_L1_MESSAGE_PASSER, \"L2ToL1MessagePasser\");\n }\n}\n\ncontract Portal_Initializer is L2OutputOracle_Initializer {\n // Test target\n OptimismPortal opImpl;\n OptimismPortal op;\n\n function setUp() public virtual override {\n L2OutputOracle_Initializer.setUp();\n\n opImpl = new OptimismPortal(oracle, 7 days);\n Proxy proxy = new Proxy(multisig);\n vm.prank(multisig);\n proxy.upgradeToAndCall(\n address(opImpl),\n abi.encodeWithSelector(OptimismPortal.initialize.selector)\n );\n op = OptimismPortal(payable(address(proxy)));\n }\n}\n\ncontract Messenger_Initializer is L2OutputOracle_Initializer {\n OptimismPortal op;\n AddressManager addressManager;\n L1CrossDomainMessenger L1Messenger;\n L2CrossDomainMessenger L2Messenger =\n L2CrossDomainMessenger(Predeploys.L2_CROSS_DOMAIN_MESSENGER);\n\n event SentMessage(\n address indexed target,\n address sender,\n bytes message,\n uint256 messageNonce,\n uint256 gasLimit\n );\n\n event SentMessageExtension1(\n address indexed sender,\n uint256 value\n );\n\n event WithdrawalInitiated(\n uint256 indexed nonce,\n address indexed sender,\n address indexed target,\n uint256 value,\n uint256 gasLimit,\n bytes data\n );\n\n event RelayedMessage(bytes32 indexed msgHash);\n\n event TransactionDeposited(\n address indexed from,\n address indexed to,\n uint256 mint,\n uint256 value,\n uint64 gasLimit,\n bool isCreation,\n bytes data\n );\n\n event WithdrawalFinalized(bytes32 indexed, bool success);\n\n event WhatHappened(bool success, bytes returndata);\n\n function setUp() public virtual override {\n super.setUp();\n\n // Deploy the OptimismPortal\n op = new OptimismPortal(oracle, 7 days);\n vm.label(address(op), \"OptimismPortal\");\n\n // Deploy the address manager\n vm.prank(multisig);\n addressManager = new AddressManager();\n\n // Setup implementation\n L1CrossDomainMessenger L1MessengerImpl = new L1CrossDomainMessenger(op);\n\n // Setup the address manager and proxy\n vm.prank(multisig);\n addressManager.setAddress(\"OVM_L1CrossDomainMessenger\", address(L1MessengerImpl));\n ResolvedDelegateProxy proxy = new ResolvedDelegateProxy(\n addressManager,\n \"OVM_L1CrossDomainMessenger\"\n );\n L1Messenger = L1CrossDomainMessenger(address(proxy));\n L1Messenger.initialize();\n\n vm.etch(\n Predeploys.L2_CROSS_DOMAIN_MESSENGER,\n address(new L2CrossDomainMessenger(address(L1Messenger))).code\n );\n\n L2Messenger.initialize(address(L1Messenger));\n\n // Label addresses\n vm.label(address(addressManager), \"AddressManager\");\n vm.label(address(L1MessengerImpl), \"L1CrossDomainMessenger_Impl\");\n vm.label(address(L1Messenger), \"L1CrossDomainMessenger_Proxy\");\n vm.label(Predeploys.LEGACY_ERC20_ETH, \"LegacyERC20ETH\");\n vm.label(Predeploys.L2_CROSS_DOMAIN_MESSENGER, \"L2CrossDomainMessenger\");\n\n vm.label(\n AddressAliasHelper.applyL1ToL2Alias(address(L1Messenger)),\n \"L1CrossDomainMessenger_aliased\"\n );\n }\n}\n\ncontract Bridge_Initializer is Messenger_Initializer {\n L1StandardBridge L1Bridge;\n L2StandardBridge L2Bridge;\n OptimismMintableERC20Factory L2TokenFactory;\n OptimismMintableERC20Factory L1TokenFactory;\n ERC20 L1Token;\n ERC20 BadL1Token;\n OptimismMintableERC20 L2Token;\n ERC20 NativeL2Token;\n ERC20 BadL2Token;\n OptimismMintableERC20 RemoteL1Token;\n\n event ETHDepositInitiated(\n address indexed from,\n address indexed to,\n uint256 amount,\n bytes data\n );\n\n event ETHWithdrawalFinalized(\n address indexed from,\n address indexed to,\n uint256 amount,\n bytes data\n );\n\n event ERC20DepositInitiated(\n address indexed l1Token,\n address indexed l2Token,\n address indexed from,\n address to,\n uint256 amount,\n bytes data\n );\n\n event ERC20WithdrawalFinalized(\n address indexed l1Token,\n address indexed l2Token,\n address indexed from,\n address to,\n uint256 amount,\n bytes data\n );\n\n event WithdrawalInitiated(\n address indexed l1Token,\n address indexed l2Token,\n address indexed from,\n address to,\n uint256 amount,\n bytes data\n );\n\n event DepositFinalized(\n address indexed l1Token,\n address indexed l2Token,\n address indexed from,\n address to,\n uint256 amount,\n bytes data\n );\n\n event DepositFailed(\n address indexed l1Token,\n address indexed l2Token,\n address indexed from,\n address to,\n uint256 amount,\n bytes data\n );\n\n event ETHBridgeInitiated(\n address indexed from,\n address indexed to,\n uint256 amount,\n bytes data\n );\n\n event ETHBridgeFinalized(\n address indexed from,\n address indexed to,\n uint256 amount,\n bytes data\n );\n\n event ERC20BridgeInitiated(\n address indexed localToken,\n address indexed remoteToken,\n address indexed from,\n address to,\n uint256 amount,\n bytes data\n );\n\n event ERC20BridgeFinalized(\n address indexed localToken,\n address indexed remoteToken,\n address indexed from,\n address to,\n uint256 amount,\n bytes data\n );\n\n event ERC20BridgeFailed(\n address indexed localToken,\n address indexed remoteToken,\n address indexed from,\n address to,\n uint256 amount,\n bytes data\n );\n\n function setUp() public virtual override {\n super.setUp();\n\n vm.label(Predeploys.L2_STANDARD_BRIDGE, \"L2StandardBridge\");\n vm.label(Predeploys.OPTIMISM_MINTABLE_ERC20_FACTORY, \"OptimismMintableERC20Factory\");\n\n // Deploy the L1 bridge and initialize it with the address of the\n // L1CrossDomainMessenger\n L1ChugSplashProxy proxy = new L1ChugSplashProxy(multisig);\n vm.mockCall(\n multisig,\n abi.encodeWithSelector(IL1ChugSplashDeployer.isUpgrading.selector),\n abi.encode(true)\n );\n vm.startPrank(multisig);\n proxy.setCode(address(new L1StandardBridge(payable(address(L1Messenger)))).code);\n vm.clearMockedCalls();\n address L1Bridge_Impl = proxy.getImplementation();\n vm.stopPrank();\n\n L1Bridge = L1StandardBridge(payable(address(proxy)));\n\n vm.label(address(proxy), \"L1StandardBridge_Proxy\");\n vm.label(address(L1Bridge_Impl), \"L1StandardBridge_Impl\");\n\n // Deploy the L2StandardBridge, move it to the correct predeploy\n // address and then initialize it\n L2StandardBridge l2B = new L2StandardBridge(payable(proxy));\n vm.etch(Predeploys.L2_STANDARD_BRIDGE, address(l2B).code);\n L2Bridge = L2StandardBridge(payable(Predeploys.L2_STANDARD_BRIDGE));\n\n // Set up the L2 mintable token factory\n OptimismMintableERC20Factory factory = new OptimismMintableERC20Factory(\n Predeploys.L2_STANDARD_BRIDGE\n );\n vm.etch(Predeploys.OPTIMISM_MINTABLE_ERC20_FACTORY, address(factory).code);\n L2TokenFactory = OptimismMintableERC20Factory(\n Predeploys.OPTIMISM_MINTABLE_ERC20_FACTORY\n );\n\n vm.etch(Predeploys.LEGACY_ERC20_ETH, address(new LegacyERC20ETH()).code);\n\n L1Token = new ERC20(\"Native L1 Token\", \"L1T\");\n\n // Deploy the L2 ERC20 now\n L2Token = OptimismMintableERC20(\n L2TokenFactory.createStandardL2Token(\n address(L1Token),\n string(abi.encodePacked(\"L2-\", L1Token.name())),\n string(abi.encodePacked(\"L2-\", L1Token.symbol()))\n )\n );\n\n BadL2Token = OptimismMintableERC20(\n L2TokenFactory.createStandardL2Token(\n address(1),\n string(abi.encodePacked(\"L2-\", L1Token.name())),\n string(abi.encodePacked(\"L2-\", L1Token.symbol()))\n )\n );\n\n NativeL2Token = new ERC20(\"Native L2 Token\", \"L2T\");\n L1TokenFactory = new OptimismMintableERC20Factory(address(L1Bridge));\n\n RemoteL1Token = OptimismMintableERC20(\n L1TokenFactory.createStandardL2Token(\n address(NativeL2Token),\n string(abi.encodePacked(\"L1-\", NativeL2Token.name())),\n string(abi.encodePacked(\"L1-\", NativeL2Token.symbol()))\n )\n );\n\n BadL1Token = OptimismMintableERC20(\n L1TokenFactory.createStandardL2Token(\n address(1),\n string(abi.encodePacked(\"L1-\", NativeL2Token.name())),\n string(abi.encodePacked(\"L1-\", NativeL2Token.symbol()))\n )\n );\n }\n}\n\ncontract FFIInterface is Test {\n function getFinalizeWithdrawalTransactionInputs(Types.WithdrawalTransaction memory _tx)\n external\n returns (\n bytes32,\n bytes32,\n bytes32,\n bytes32,\n bytes memory\n )\n {\n string[] memory cmds = new string[](9);\n cmds[0] = \"node\";\n cmds[1] = \"dist/scripts/differential-testing.js\";\n cmds[2] = \"getFinalizeWithdrawalTransactionInputs\";\n cmds[3] = vm.toString(_tx.nonce);\n cmds[4] = vm.toString(_tx.sender);\n cmds[5] = vm.toString(_tx.target);\n cmds[6] = vm.toString(_tx.value);\n cmds[7] = vm.toString(_tx.gasLimit);\n cmds[8] = vm.toString(_tx.data);\n\n bytes memory result = vm.ffi(cmds);\n (\n bytes32 stateRoot,\n bytes32 storageRoot,\n bytes32 outputRoot,\n bytes32 withdrawalHash,\n bytes memory withdrawalProof\n ) = abi.decode(result, (bytes32, bytes32, bytes32, bytes32, bytes));\n\n return (stateRoot, storageRoot, outputRoot, withdrawalHash, withdrawalProof);\n }\n\n function hashCrossDomainMessage(\n uint256 _nonce,\n address _sender,\n address _target,\n uint256 _value,\n uint256 _gasLimit,\n bytes memory _data\n ) external returns (bytes32) {\n string[] memory cmds = new string[](9);\n cmds[0] = \"node\";\n cmds[1] = \"dist/scripts/differential-testing.js\";\n cmds[2] = \"hashCrossDomainMessage\";\n cmds[3] = vm.toString(_nonce);\n cmds[4] = vm.toString(_sender);\n cmds[5] = vm.toString(_target);\n cmds[6] = vm.toString(_value);\n cmds[7] = vm.toString(_gasLimit);\n cmds[8] = vm.toString(_data);\n\n bytes memory result = vm.ffi(cmds);\n return abi.decode(result, (bytes32));\n }\n\n function hashWithdrawal(\n uint256 _nonce,\n address _sender,\n address _target,\n uint256 _value,\n uint256 _gasLimit,\n bytes memory _data\n ) external returns (bytes32) {\n string[] memory cmds = new string[](9);\n cmds[0] = \"node\";\n cmds[1] = \"dist/scripts/differential-testing.js\";\n cmds[2] = \"hashWithdrawal\";\n cmds[3] = vm.toString(_nonce);\n cmds[4] = vm.toString(_sender);\n cmds[5] = vm.toString(_target);\n cmds[6] = vm.toString(_value);\n cmds[7] = vm.toString(_gasLimit);\n cmds[8] = vm.toString(_data);\n\n bytes memory result = vm.ffi(cmds);\n return abi.decode(result, (bytes32));\n }\n\n function hashOutputRootProof(\n bytes32 _version,\n bytes32 _stateRoot,\n bytes32 _withdrawerStorageRoot,\n bytes32 _latestBlockhash\n ) external returns (bytes32) {\n string[] memory cmds = new string[](7);\n cmds[0] = \"node\";\n cmds[1] = \"dist/scripts/differential-testing.js\";\n cmds[2] = \"hashOutputRootProof\";\n cmds[3] = Strings.toHexString(uint256(_version));\n cmds[4] = Strings.toHexString(uint256(_stateRoot));\n cmds[5] = Strings.toHexString(uint256(_withdrawerStorageRoot));\n cmds[6] = Strings.toHexString(uint256(_latestBlockhash));\n\n bytes memory result = vm.ffi(cmds);\n return abi.decode(result, (bytes32));\n }\n\n function hashDepositTransaction(\n address _from,\n address _to,\n uint256 _mint,\n uint256 _value,\n uint64 _gas,\n bytes memory _data,\n uint256 _logIndex\n ) external returns (bytes32) {\n string[] memory cmds = new string[](11);\n cmds[0] = \"node\";\n cmds[1] = \"dist/scripts/differential-testing.js\";\n cmds[2] = \"hashDepositTransaction\";\n cmds[3] = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n cmds[4] = vm.toString(_logIndex);\n cmds[5] = vm.toString(_from);\n cmds[6] = vm.toString(_to);\n cmds[7] = vm.toString(_mint);\n cmds[8] = vm.toString(_value);\n cmds[9] = vm.toString(_gas);\n cmds[10] = vm.toString(_data);\n\n bytes memory result = vm.ffi(cmds);\n return abi.decode(result, (bytes32));\n }\n\n function encodeDepositTransaction(\n Types.UserDepositTransaction calldata txn\n ) external returns (bytes memory) {\n string[] memory cmds = new string[](12);\n cmds[0] = \"node\";\n cmds[1] = \"dist/scripts/differential-testing.js\";\n cmds[2] = \"encodeDepositTransaction\";\n cmds[3] = vm.toString(txn.from);\n cmds[4] = vm.toString(txn.to);\n cmds[5] = vm.toString(txn.value);\n cmds[6] = vm.toString(txn.mint);\n cmds[7] = vm.toString(txn.gasLimit);\n cmds[8] = vm.toString(txn.isCreation);\n cmds[9] = vm.toString(txn.data);\n cmds[10] = vm.toString(txn.l1BlockHash);\n cmds[11] = vm.toString(txn.logIndex);\n\n bytes memory result = vm.ffi(cmds);\n return abi.decode(result, (bytes));\n }\n\n function encodeCrossDomainMessage(\n uint256 _nonce,\n address _sender,\n address _target,\n uint256 _value,\n uint256 _gasLimit,\n bytes memory _data\n ) external returns (bytes memory) {\n string[] memory cmds = new string[](9);\n cmds[0] = \"node\";\n cmds[1] = \"dist/scripts/differential-testing.js\";\n cmds[2] = \"encodeCrossDomainMessage\";\n cmds[3] = vm.toString(_nonce);\n cmds[4] = vm.toString(_sender);\n cmds[5] = vm.toString(_target);\n cmds[6] = vm.toString(_value);\n cmds[7] = vm.toString(_gasLimit);\n cmds[8] = vm.toString(_data);\n\n bytes memory result = vm.ffi(cmds);\n return abi.decode(result, (bytes));\n }\n\n function decodeVersionedNonce(uint256 nonce) external returns (uint256, uint256) {\n string[] memory cmds = new string[](4);\n cmds[0] = \"node\";\n cmds[1] = \"dist/scripts/differential-testing.js\";\n cmds[2] = \"decodeVersionedNonce\";\n cmds[3] = vm.toString(nonce);\n\n bytes memory result = vm.ffi(cmds);\n return abi.decode(result, (uint256, uint256));\n }\n}\n\n// Used for testing a future upgrade beyond the current implementations.\n// We include some variables so that we can sanity check accessing storage values after an upgrade.\ncontract NextImpl is Initializable {\n // Initializable occupies the zero-th slot.\n bytes32 slot1;\n bytes32[19] __gap;\n bytes32 slot21;\n bytes32 public constant slot21Init = bytes32(hex\"1337\");\n\n function initialize() public reinitializer(2) {\n // Slot21 is unused by an of our upgradeable contracts.\n // This is used to verify that we can access this value after an upgrade.\n slot21 = slot21Init;\n }\n}\n\ncontract Reverter {\n fallback() external {\n revert();\n }\n}\n\n// Useful for testing reentrancy guards\ncontract CallerCaller {\n event WhatHappened(\n bool success,\n bytes returndata\n );\n\n fallback() external {\n (bool success, bytes memory returndata) = msg.sender.call(msg.data);\n emit WhatHappened(success, returndata);\n assembly {\n switch success\n case 0 { revert(add(returndata, 0x20), mload(returndata)) }\n default { return(add(returndata, 0x20), mload(returndata)) }\n }\n }\n}\n" }, "contracts/test/DeployerWhitelist.t.sol": { "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport { CommonTest } from \"./CommonTest.t.sol\";\nimport { DeployerWhitelist } from \"../legacy/DeployerWhitelist.sol\";\n\ncontract DeployerWhitelist_Test is CommonTest {\n DeployerWhitelist list;\n\n function setUp() external {\n list = new DeployerWhitelist();\n }\n\n // The owner should be address(0)\n function test_owner() external {\n assertEq(list.owner(), address(0));\n }\n\n // The storage slot for the owner must be the same\n function test_storageSlots() external {\n vm.prank(list.owner());\n list.setOwner(address(1));\n\n assertEq(\n bytes32(uint256(1)),\n vm.load(address(list), bytes32(uint256(0)))\n );\n }\n}\n" @@ -143,7 +146,7 @@ "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport { Test } from \"forge-std/Test.sol\";\nimport { Proxy } from \"../universal/Proxy.sol\";\nimport { ProxyAdmin } from \"../universal/ProxyAdmin.sol\";\nimport { SimpleStorage } from \"./Proxy.t.sol\";\nimport { L1ChugSplashProxy } from \"../legacy/L1ChugSplashProxy.sol\";\nimport { ResolvedDelegateProxy } from \"../legacy/ResolvedDelegateProxy.sol\";\nimport { AddressManager } from \"../legacy/AddressManager.sol\";\n\ncontract ProxyAdmin_Test is Test {\n address alice = address(64);\n\n Proxy proxy;\n L1ChugSplashProxy chugsplash;\n ResolvedDelegateProxy resolved;\n\n AddressManager addressManager;\n\n ProxyAdmin admin;\n\n SimpleStorage implementation;\n\n function setUp() external {\n // Deploy the proxy admin\n admin = new ProxyAdmin(alice);\n // Deploy the standard proxy\n proxy = new Proxy(address(admin));\n\n // Deploy the legacy L1ChugSplashProxy with the admin as the owner\n chugsplash = new L1ChugSplashProxy(address(admin));\n\n // Deploy the legacy AddressManager\n addressManager = new AddressManager();\n // The proxy admin must be the new owner of the address manager\n addressManager.transferOwnership(address(admin));\n // Deploy a legacy ResolvedDelegateProxy with the name `a`.\n // Whatever `a` is set to in AddressManager will be the address\n // that is used for the implementation.\n resolved = new ResolvedDelegateProxy(addressManager, \"a\");\n\n // Impersonate alice for setting up the admin.\n vm.startPrank(alice);\n // Set the address of the address manager in the admin so that it\n // can resolve the implementation address of legacy\n // ResolvedDelegateProxy based proxies.\n admin.setAddressManager(addressManager);\n // Set the reverse lookup of the ResolvedDelegateProxy\n // proxy\n admin.setImplementationName(address(resolved), \"a\");\n\n // Set the proxy types\n admin.setProxyType(address(proxy), ProxyAdmin.ProxyType.ERC1967);\n admin.setProxyType(address(chugsplash), ProxyAdmin.ProxyType.CHUGSPLASH);\n admin.setProxyType(address(resolved), ProxyAdmin.ProxyType.RESOLVED);\n vm.stopPrank();\n\n implementation = new SimpleStorage();\n }\n\n function test_setImplementationName() external {\n vm.prank(alice);\n admin.setImplementationName(address(1), \"foo\");\n assertEq(\n admin.implementationName(address(1)),\n \"foo\"\n );\n }\n\n function test_onlyOwnerSetAddressManager() external {\n vm.expectRevert(\"UNAUTHORIZED\");\n admin.setAddressManager(AddressManager((address(0))));\n }\n\n function test_onlyOwnerSetImplementationName() external {\n vm.expectRevert(\"UNAUTHORIZED\");\n admin.setImplementationName(address(0), \"foo\");\n }\n\n function test_onlyOwnerSetProxyType() external {\n vm.expectRevert(\"UNAUTHORIZED\");\n admin.setProxyType(address(0), ProxyAdmin.ProxyType.CHUGSPLASH);\n }\n\n function test_owner() external {\n assertEq(admin.owner(), alice);\n }\n\n function test_proxyType() external {\n assertEq(\n uint256(admin.proxyType(address(proxy))),\n uint256(ProxyAdmin.ProxyType.ERC1967)\n );\n assertEq(\n uint256(admin.proxyType(address(chugsplash))),\n uint256(ProxyAdmin.ProxyType.CHUGSPLASH)\n );\n assertEq(\n uint256(admin.proxyType(address(resolved))),\n uint256(ProxyAdmin.ProxyType.RESOLVED)\n );\n }\n\n function test_erc1967GetProxyImplementation() external {\n getProxyImplementation(payable(proxy));\n }\n\n function test_chugsplashGetProxyImplementation() external {\n getProxyImplementation(payable(chugsplash));\n }\n\n function test_delegateResolvedGetProxyImplementation() external {\n getProxyImplementation(payable(resolved));\n }\n\n function getProxyImplementation(address payable _proxy) internal {\n {\n address impl = admin.getProxyImplementation(_proxy);\n assertEq(impl, address(0));\n }\n\n vm.prank(alice);\n admin.upgrade(_proxy, address(implementation));\n\n {\n address impl = admin.getProxyImplementation(_proxy);\n assertEq(impl, address(implementation));\n }\n }\n\n function test_erc1967GetProxyAdmin() external {\n getProxyAdmin(payable(proxy));\n }\n\n function test_chugsplashGetProxyAdmin() external {\n getProxyAdmin(payable(chugsplash));\n }\n\n function test_delegateResolvedGetProxyAdmin() external {\n getProxyAdmin(payable(resolved));\n }\n\n function getProxyAdmin(address payable _proxy) internal {\n address owner = admin.getProxyAdmin(_proxy);\n assertEq(owner, address(admin));\n }\n\n function test_erc1967ChangeProxyAdmin() external {\n changeProxyAdmin(payable(proxy));\n }\n\n function test_chugsplashChangeProxyAdmin() external {\n changeProxyAdmin(payable(chugsplash));\n }\n\n function test_delegateResolvedChangeProxyAdmin() external {\n changeProxyAdmin(payable(resolved));\n }\n\n function changeProxyAdmin(address payable _proxy) internal {\n ProxyAdmin.ProxyType proxyType = admin.proxyType(address(_proxy));\n\n vm.prank(alice);\n admin.changeProxyAdmin(_proxy, address(128));\n\n // The proxy is no longer the admin and can\n // no longer call the proxy interface except for\n // the ResolvedDelegate type on which anybody can\n // call the admin interface.\n if (proxyType == ProxyAdmin.ProxyType.ERC1967) {\n vm.expectRevert(\"Proxy: implementation not initialized\");\n admin.getProxyAdmin(_proxy);\n } else if (proxyType == ProxyAdmin.ProxyType.CHUGSPLASH) {\n vm.expectRevert(\"L1ChugSplashProxy: implementation is not set yet\");\n admin.getProxyAdmin(_proxy);\n } else if (proxyType == ProxyAdmin.ProxyType.RESOLVED) {\n // Just an empty block to show that all cases are covered\n } else {\n vm.expectRevert(\"ProxyAdmin: unknown proxy type\");\n }\n\n // Call the proxy contract directly to get the admin.\n // Different proxy types have different interfaces.\n vm.prank(address(128));\n if (proxyType == ProxyAdmin.ProxyType.ERC1967) {\n assertEq(Proxy(payable(_proxy)).admin(), address(128));\n } else if (proxyType == ProxyAdmin.ProxyType.CHUGSPLASH) {\n assertEq(\n L1ChugSplashProxy(payable(_proxy)).getOwner(),\n address(128)\n );\n } else if (proxyType == ProxyAdmin.ProxyType.RESOLVED) {\n assertEq(\n addressManager.owner(),\n address(128)\n );\n } else {\n assert(false);\n }\n }\n\n function test_erc1967Upgrade() external {\n upgrade(payable(proxy));\n }\n\n function test_chugsplashUpgrade() external {\n upgrade(payable(chugsplash));\n }\n\n function test_delegateResolvedUpgrade() external {\n upgrade(payable(resolved));\n }\n\n function upgrade(address payable _proxy) internal {\n vm.prank(alice);\n admin.upgrade(_proxy, address(implementation));\n\n address impl = admin.getProxyImplementation(_proxy);\n assertEq(impl, address(implementation));\n }\n\n function test_erc1967UpgradeAndCall() external {\n upgradeAndCall(payable(proxy));\n }\n\n function test_chugsplashUpgradeAndCall() external {\n upgradeAndCall(payable(chugsplash));\n }\n\n function test_delegateResolvedUpgradeAndCall() external {\n upgradeAndCall(payable(resolved));\n }\n\n function upgradeAndCall(address payable _proxy) internal {\n vm.prank(alice);\n admin.upgradeAndCall(\n _proxy,\n address(implementation),\n abi.encodeWithSelector(SimpleStorage.set.selector, 1, 1)\n );\n\n address impl = admin.getProxyImplementation(_proxy);\n assertEq(impl, address(implementation));\n\n uint256 got = SimpleStorage(address(_proxy)).get(1);\n assertEq(got, 1);\n }\n\n function test_onlyOwner() external {\n vm.expectRevert(\"UNAUTHORIZED\");\n admin.changeProxyAdmin(payable(proxy), address(0));\n\n vm.expectRevert(\"UNAUTHORIZED\");\n admin.upgrade(payable(proxy), address(implementation));\n\n vm.expectRevert(\"UNAUTHORIZED\");\n admin.upgradeAndCall(payable(proxy), address(implementation), hex\"\");\n }\n\n function test_isUpgrading() external {\n assertEq(false, admin.isUpgrading());\n\n vm.prank(alice);\n admin.setUpgrading(true);\n assertEq(true, admin.isUpgrading());\n }\n}\n" }, "contracts/test/RLP.t.sol": { - "content": "// SPDX-License-Identifier: Unlicense\npragma solidity ^0.8.0;\n\nimport { Bytes32AddressLib } from \"@rari-capital/solmate/src/utils/Bytes32AddressLib.sol\";\n\n/**\n * @title LibRLP\n * @notice Via https://github.com/Rari-Capital/solmate/issues/207.\n */\nlibrary LibRLP {\n using Bytes32AddressLib for bytes32;\n\n function computeAddress(address deployer, uint256 nonce) public pure returns (address) {\n // The integer zero is treated as an empty byte string, and as a result it only has a length prefix, 0x80, computed via 0x80 + 0.\n // A one byte integer uses its own value as its length prefix, there is no additional \"0x80 + length\" prefix that comes before it.\n if (nonce == 0x00) return keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, bytes1(0x80))).fromLast20Bytes();\n if (nonce <= 0x7f) return keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, uint8(nonce))).fromLast20Bytes();\n\n // Nonces greater than 1 byte all follow a consistent encoding scheme, where each value is preceded by a prefix of 0x80 + length.\n if (nonce <= type(uint8).max) return keccak256(abi.encodePacked(bytes1(0xd7), bytes1(0x94), deployer, bytes1(0x81), uint8(nonce))).fromLast20Bytes();\n if (nonce <= type(uint16).max) return keccak256(abi.encodePacked(bytes1(0xd8), bytes1(0x94), deployer, bytes1(0x82), uint16(nonce))).fromLast20Bytes();\n if (nonce <= type(uint24).max) return keccak256(abi.encodePacked(bytes1(0xd9), bytes1(0x94), deployer, bytes1(0x83), uint24(nonce))).fromLast20Bytes();\n\n // More details about RLP encoding can be found here: https://eth.wiki/fundamentals/rlp\n // 0xda = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x84 ++ nonce)\n // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)\n // 0x84 = 0x80 + 0x04 (0x04 = the bytes length of the nonce, 4 bytes, in hex)\n // We assume nobody can have a nonce large enough to require more than 32 bytes.\n return keccak256(abi.encodePacked(bytes1(0xda), bytes1(0x94), deployer, bytes1(0x84), uint32(nonce))).fromLast20Bytes();\n }\n}\n" + "content": "// SPDX-License-Identifier: Unlicense\npragma solidity ^0.8.0;\n\nimport { Bytes32AddressLib } from \"@rari-capital/solmate/src/utils/Bytes32AddressLib.sol\";\n\n/**\n * @title LibRLP\n * @notice Via https://github.com/Rari-Capital/solmate/issues/207.\n */\nlibrary LibRLP {\n using Bytes32AddressLib for bytes32;\n\n function computeAddress(address deployer, uint256 nonce) internal pure returns (address) {\n // The integer zero is treated as an empty byte string, and as a result it only has a length prefix, 0x80, computed via 0x80 + 0.\n // A one byte integer uses its own value as its length prefix, there is no additional \"0x80 + length\" prefix that comes before it.\n if (nonce == 0x00) return keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, bytes1(0x80))).fromLast20Bytes();\n if (nonce <= 0x7f) return keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, uint8(nonce))).fromLast20Bytes();\n\n // Nonces greater than 1 byte all follow a consistent encoding scheme, where each value is preceded by a prefix of 0x80 + length.\n if (nonce <= type(uint8).max) return keccak256(abi.encodePacked(bytes1(0xd7), bytes1(0x94), deployer, bytes1(0x81), uint8(nonce))).fromLast20Bytes();\n if (nonce <= type(uint16).max) return keccak256(abi.encodePacked(bytes1(0xd8), bytes1(0x94), deployer, bytes1(0x82), uint16(nonce))).fromLast20Bytes();\n if (nonce <= type(uint24).max) return keccak256(abi.encodePacked(bytes1(0xd9), bytes1(0x94), deployer, bytes1(0x83), uint24(nonce))).fromLast20Bytes();\n\n // More details about RLP encoding can be found here: https://eth.wiki/fundamentals/rlp\n // 0xda = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x84 ++ nonce)\n // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)\n // 0x84 = 0x80 + 0x04 (0x04 = the bytes length of the nonce, 4 bytes, in hex)\n // We assume nobody can have a nonce large enough to require more than 32 bytes.\n return keccak256(abi.encodePacked(bytes1(0xda), bytes1(0x94), deployer, bytes1(0x84), uint32(nonce))).fromLast20Bytes();\n }\n}\n" }, "contracts/test/RLPReader.t.sol": { "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport { RLPReader } from \"../libraries/rlp/RLPReader.sol\";\nimport { CommonTest } from \"./CommonTest.t.sol\";\n\ncontract RLPReader_Test is CommonTest {\n function testReadBool() external {\n assertEq(\n RLPReader.readBool(hex\"01\"),\n true\n );\n\n assertEq(\n RLPReader.readBool(hex\"00\"),\n false\n );\n }\n\n function test_readBoolInvalidValue() external {\n vm.expectRevert(\"RLPReader: invalid RLP boolean value, must be 0 or 1\");\n RLPReader.readBool(hex\"02\");\n }\n\n function test_readBoolLargeInput() external {\n vm.expectRevert(\"RLPReader: invalid RLP boolean value\");\n RLPReader.readBool(hex\"0101\");\n }\n\n function test_readAddress() external {\n assertEq(\n RLPReader.readAddress(hex\"941212121212121212121212121212121212121212\"),\n address(0x1212121212121212121212121212121212121212)\n );\n }\n\n function test_readAddressSmall() external {\n assertEq(\n RLPReader.readAddress(hex\"12\"),\n address(0)\n );\n }\n\n function test_readAddressTooLarge() external {\n vm.expectRevert(\"RLPReader: invalid RLP address value\");\n RLPReader.readAddress(hex\"94121212121212121212121212121212121212121212121212\");\n }\n\n function test_readAddressTooShort() external {\n vm.expectRevert(\"RLPReader: invalid RLP address value\");\n RLPReader.readAddress(hex\"94121212121212121212121212\");\n }\n\n function test_readBytes_bytestring00() external {\n assertEq(\n RLPReader.readBytes(hex\"00\"),\n hex\"00\"\n );\n }\n\n function test_readBytes_bytestring01() external {\n assertEq(\n RLPReader.readBytes(hex\"01\"),\n hex\"01\"\n );\n }\n\n function test_readBytes_bytestring7f() external {\n assertEq(\n RLPReader.readBytes(hex\"7f\"),\n hex\"7f\"\n );\n }\n\n function test_readBytes_revertListItem() external {\n vm.expectRevert(\"RLPReader: invalid RLP bytes value\");\n RLPReader.readBytes(hex\"c7c0c1c0c3c0c1c0\");\n }\n\n function test_readBytes_invalidStringLength() external {\n vm.expectRevert(\"RLPReader: invalid RLP long string length\");\n RLPReader.readBytes(hex\"b9\");\n }\n\n function test_readBytes_invalidListLength() external {\n vm.expectRevert(\"RLPReader: invalid RLP long list length\");\n RLPReader.readBytes(hex\"ff\");\n }\n\n function test_readBytes32_revertOnList() external {\n vm.expectRevert(\"RLPReader: invalid RLP bytes32 value\");\n RLPReader.readBytes32(hex\"c7c0c1c0c3c0c1c0\");\n }\n\n function test_readBytes32_revertOnTooLong() external {\n vm.expectRevert(\"RLPReader: invalid RLP bytes32 value\");\n RLPReader.readBytes32(hex\"11110000000000000000000000000000000000000000000000000000000000000000\");\n }\n\n function test_readString_emptyString() external {\n assertEq(\n RLPReader.readString(hex\"80\"),\n hex\"\"\n );\n }\n\n function test_readString_shortString() external {\n assertEq(\n RLPReader.readString(hex\"83646f67\"),\n \"dog\"\n );\n }\n\n function test_readString_shortString2() external {\n assertEq(\n RLPReader.readString(hex\"b74c6f72656d20697073756d20646f6c6f722073697420616d65742c20636f6e7365637465747572206164697069736963696e6720656c69\"),\n \"Lorem ipsum dolor sit amet, consectetur adipisicing eli\"\n );\n }\n\n function test_readString_longString() external {\n assertEq(\n RLPReader.readString(hex\"b8384c6f72656d20697073756d20646f6c6f722073697420616d65742c20636f6e7365637465747572206164697069736963696e6720656c6974\"),\n \"Lorem ipsum dolor sit amet, consectetur adipisicing elit\"\n );\n }\n\n function test_readString_longString2() external {\n assertEq(\n RLPReader.readString(hex\"b904004c6f72656d20697073756d20646f6c6f722073697420616d65742c20636f6e73656374657475722061646970697363696e6720656c69742e20437572616269747572206d6175726973206d61676e612c20737573636970697420736564207665686963756c61206e6f6e2c20696163756c697320666175636962757320746f72746f722e2050726f696e20737573636970697420756c74726963696573206d616c6573756164612e204475697320746f72746f7220656c69742c2064696374756d2071756973207472697374697175652065752c20756c7472696365732061742072697375732e204d6f72626920612065737420696d70657264696574206d6920756c6c616d636f7270657220616c6971756574207375736369706974206e6563206c6f72656d2e2041656e65616e2071756973206c656f206d6f6c6c69732c2076756c70757461746520656c6974207661726975732c20636f6e73657175617420656e696d2e204e756c6c6120756c74726963657320747572706973206a7573746f2c20657420706f73756572652075726e6120636f6e7365637465747572206e65632e2050726f696e206e6f6e20636f6e76616c6c6973206d657475732e20446f6e65632074656d706f7220697073756d20696e206d617572697320636f6e67756520736f6c6c696369747564696e2e20566573746962756c756d20616e746520697073756d207072696d697320696e206661756369627573206f726369206c756374757320657420756c74726963657320706f737565726520637562696c69612043757261653b2053757370656e646973736520636f6e76616c6c69732073656d2076656c206d617373612066617563696275732c2065676574206c6163696e6961206c616375732074656d706f722e204e756c6c61207175697320756c747269636965732070757275732e2050726f696e20617563746f722072686f6e637573206e69626820636f6e64696d656e74756d206d6f6c6c69732e20416c697175616d20636f6e73657175617420656e696d206174206d65747573206c75637475732c206120656c656966656e6420707572757320656765737461732e20437572616269747572206174206e696268206d657475732e204e616d20626962656e64756d2c206e6571756520617420617563746f72207472697374697175652c206c6f72656d206c696265726f20616c697175657420617263752c206e6f6e20696e74657264756d2074656c6c7573206c65637475732073697420616d65742065726f732e20437261732072686f6e6375732c206d65747573206163206f726e617265206375727375732c20646f6c6f72206a7573746f20756c747269636573206d657475732c20617420756c6c616d636f7270657220766f6c7574706174\"),\n \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur mauris magna, suscipit sed vehicula non, iaculis faucibus tortor. Proin suscipit ultricies malesuada. Duis tortor elit, dictum quis tristique eu, ultrices at risus. Morbi a est imperdiet mi ullamcorper aliquet suscipit nec lorem. Aenean quis leo mollis, vulputate elit varius, consequat enim. Nulla ultrices turpis justo, et posuere urna consectetur nec. Proin non convallis metus. Donec tempor ipsum in mauris congue sollicitudin. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse convallis sem vel massa faucibus, eget lacinia lacus tempor. Nulla quis ultricies purus. Proin auctor rhoncus nibh condimentum mollis. Aliquam consequat enim at metus luctus, a eleifend purus egestas. Curabitur at nibh metus. Nam bibendum, neque at auctor tristique, lorem libero aliquet arcu, non interdum tellus lectus sit amet eros. Cras rhoncus, metus ac ornare cursus, dolor justo ultrices metus, at ullamcorper volutpat\"\n );\n }\n\n function test_readUint256_zero() external {\n assertEq(\n RLPReader.readUint256(hex\"80\"),\n 0\n );\n }\n\n function test_readUint256_smallInt() external {\n assertEq(\n RLPReader.readUint256(hex\"01\"),\n 1\n );\n }\n\n function test_readUint256_smallInt2() external {\n assertEq(\n RLPReader.readUint256(hex\"10\"),\n 16\n );\n }\n\n function test_readUint256_smallInt3() external {\n assertEq(\n RLPReader.readUint256(hex\"4f\"),\n 79\n );\n }\n\n function test_readUint256_smallInt4() external {\n assertEq(\n RLPReader.readUint256(hex\"7f\"),\n 127\n );\n }\n\n function test_readUint256_mediumInt1() external {\n assertEq(\n RLPReader.readUint256(hex\"8180\"),\n 128\n );\n }\n\n function test_readUint256_mediumInt2() external {\n assertEq(\n RLPReader.readUint256(hex\"8203e8\"),\n 1000\n );\n }\n\n function test_readUint256_mediumInt3() external {\n assertEq(\n RLPReader.readUint256(hex\"830186a0\"),\n 100000\n );\n }\n\n function test_readList_empty() external {\n RLPReader.RLPItem[] memory list = RLPReader.readList(hex\"c0\");\n assertEq(list.length, 0);\n }\n\n function test_readList_stringList() external {\n RLPReader.RLPItem[] memory list = RLPReader.readList(hex\"cc83646f6783676f6483636174\");\n assertEq(list.length, 3);\n assertEq(RLPReader.readString(list[0]), RLPReader.readString(hex\"83646f67\"));\n assertEq(RLPReader.readString(list[1]), RLPReader.readString(hex\"83676f64\"));\n assertEq(RLPReader.readString(list[2]), RLPReader.readString(hex\"83636174\"));\n }\n\n function test_readList_multiList() external {\n RLPReader.RLPItem[] memory list = RLPReader.readList(hex\"c6827a77c10401\");\n assertEq(list.length, 3);\n\n assertEq(RLPReader.readRawBytes(list[0]), hex\"827a77\");\n assertEq(RLPReader.readRawBytes(list[1]), hex\"c104\");\n assertEq(RLPReader.readRawBytes(list[2]), hex\"01\");\n }\n\n function test_readList_shortListMax1() external {\n RLPReader.RLPItem[] memory list = RLPReader.readList(hex\"f784617364668471776572847a78637684617364668471776572847a78637684617364668471776572847a78637684617364668471776572\");\n\n assertEq(list.length, 11);\n assertEq(RLPReader.readRawBytes(list[0]), hex\"8461736466\");\n assertEq(RLPReader.readRawBytes(list[1]), hex\"8471776572\");\n assertEq(RLPReader.readRawBytes(list[2]), hex\"847a786376\");\n assertEq(RLPReader.readRawBytes(list[3]), hex\"8461736466\");\n assertEq(RLPReader.readRawBytes(list[4]), hex\"8471776572\");\n assertEq(RLPReader.readRawBytes(list[5]), hex\"847a786376\");\n assertEq(RLPReader.readRawBytes(list[6]), hex\"8461736466\");\n assertEq(RLPReader.readRawBytes(list[7]), hex\"8471776572\");\n assertEq(RLPReader.readRawBytes(list[8]), hex\"847a786376\");\n assertEq(RLPReader.readRawBytes(list[9]), hex\"8461736466\");\n assertEq(RLPReader.readRawBytes(list[10]), hex\"8471776572\");\n }\n\n function test_readList_longList1() external {\n RLPReader.RLPItem[] memory list = RLPReader.readList(hex\"f840cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376\");\n\n assertEq(list.length, 4);\n assertEq(RLPReader.readRawBytes(list[0]), hex\"cf84617364668471776572847a786376\");\n assertEq(RLPReader.readRawBytes(list[1]), hex\"cf84617364668471776572847a786376\");\n assertEq(RLPReader.readRawBytes(list[2]), hex\"cf84617364668471776572847a786376\");\n assertEq(RLPReader.readRawBytes(list[3]), hex\"cf84617364668471776572847a786376\");\n }\n\n function test_readList_longList2() external {\n RLPReader.RLPItem[] memory list = RLPReader.readList(hex\"f90200cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376cf84617364668471776572847a786376\");\n assertEq(list.length, 32);\n\n for (uint256 i = 0; i < 32; i++) {\n assertEq(RLPReader.readRawBytes(list[i]), hex\"cf84617364668471776572847a786376\");\n }\n }\n\n function test_readList_listOfLists() external {\n RLPReader.RLPItem[] memory list = RLPReader.readList(hex\"c4c2c0c0c0\");\n assertEq(list.length, 2);\n assertEq(RLPReader.readRawBytes(list[0]), hex\"c2c0c0\");\n assertEq(RLPReader.readRawBytes(list[1]), hex\"c0\");\n }\n\n function test_readList_listOfLists2() external {\n RLPReader.RLPItem[] memory list = RLPReader.readList(hex\"c7c0c1c0c3c0c1c0\");\n assertEq(list.length, 3);\n\n assertEq(RLPReader.readRawBytes(list[0]), hex\"c0\");\n assertEq(RLPReader.readRawBytes(list[1]), hex\"c1c0\");\n assertEq(RLPReader.readRawBytes(list[2]), hex\"c3c0c1c0\");\n }\n\n function test_readList_dictTest1() external {\n RLPReader.RLPItem[] memory list = RLPReader.readList(hex\"ecca846b6579318476616c31ca846b6579328476616c32ca846b6579338476616c33ca846b6579348476616c34\");\n assertEq(list.length, 4);\n\n assertEq(RLPReader.readRawBytes(list[0]), hex\"ca846b6579318476616c31\");\n assertEq(RLPReader.readRawBytes(list[1]), hex\"ca846b6579328476616c32\");\n assertEq(RLPReader.readRawBytes(list[2]), hex\"ca846b6579338476616c33\");\n assertEq(RLPReader.readRawBytes(list[3]), hex\"ca846b6579348476616c34\");\n }\n\n function test_readList_invalidShortList() external {\n vm.expectRevert(\"RLPReader: invalid RLP short list\");\n RLPReader.readList(hex\"efdebd\");\n }\n\n function test_readList_longStringLength() external {\n vm.expectRevert(\"RLPReader: invalid RLP short list\");\n RLPReader.readList(hex\"efb83600\");\n }\n\n function test_readList_notLongEnough() external {\n vm.expectRevert(\"RLPReader: invalid RLP short list\");\n RLPReader.readList(hex\"efdebdaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\");\n }\n\n function test_readList_int32Overflow() external {\n vm.expectRevert(\"RLPReader: invalid RLP long string\");\n RLPReader.readList(hex\"bf0f000000000000021111\");\n }\n\n function test_readList_int32Overflow2() external {\n vm.expectRevert(\"RLPReader: invalid RLP long list\");\n RLPReader.readList(hex\"ff0f000000000000021111\");\n }\n\n function test_readList_incorrectLengthInArray() external {\n vm.expectRevert(\"RLPReader: invalid RLP list value\");\n RLPReader.readList(hex\"b9002100dc2b275d0f74e8a53e6f4ec61b27f24278820be3f82ea2110e582081b0565df0\");\n }\n\n function test_readList_leadingZerosInLongLengthArray1() external {\n vm.expectRevert(\"RLPReader: invalid RLP list value\");\n RLPReader.readList(hex\"b90040000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f\");\n }\n\n function test_readList_leadingZerosInLongLengthArray2() external {\n vm.expectRevert(\"RLPReader: invalid RLP list value\");\n RLPReader.readList(hex\"b800\");\n }\n\n function test_readList_leadingZerosInLongLengthList1() external {\n vm.expectRevert(\"RLPReader: provided RLP list exceeds max list length\");\n RLPReader.readList(hex\"fb00000040000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f\");\n }\n\n function test_readList_nonOptimalLongLengthArray1() external {\n vm.expectRevert(\"RLPReader: invalid RLP list value\");\n RLPReader.readList(hex\"b81000112233445566778899aabbccddeeff\");\n }\n\n function test_readList_nonOptimalLongLengthArray2() external {\n vm.expectRevert(\"RLPReader: invalid RLP list value\");\n RLPReader.readList(hex\"b801ff\");\n }\n\n function test_readList_invalidValue() external {\n vm.expectRevert(\"RLPReader: invalid RLP short string\");\n RLPReader.readList(hex\"91\");\n }\n}\n" @@ -154,6 +157,9 @@ "contracts/test/ResourceMetering.t.sol": { "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport { CommonTest } from \"./CommonTest.t.sol\";\nimport { ResourceMetering } from \"../L1/ResourceMetering.sol\";\nimport { Proxy } from \"../universal/Proxy.sol\";\n\ncontract MeterUser is ResourceMetering {\n constructor() {\n initialize();\n }\n\n function initialize() public initializer {\n __ResourceMetering_init();\n }\n\n function use(uint64 _amount) public metered(_amount) {}\n}\n\ncontract ResourceMetering_Test is CommonTest {\n MeterUser internal meter;\n uint64 initialBlockNum;\n\n function setUp() external {\n _setUp();\n meter = new MeterUser();\n initialBlockNum = uint64(block.number);\n }\n\n function test_initialResourceParams() external {\n (uint128 prevBaseFee, uint64 prevBoughtGas, uint64 prevBlockNum) = meter.params();\n\n assertEq(prevBaseFee, meter.INITIAL_BASE_FEE());\n assertEq(prevBoughtGas, 0);\n assertEq(prevBlockNum, initialBlockNum);\n }\n\n function test_updateParamsNoChange() external {\n meter.use(0); // equivalent to just updating the base fee and block number\n (uint128 prevBaseFee, uint64 prevBoughtGas, uint64 prevBlockNum) = meter.params();\n meter.use(0);\n (uint128 postBaseFee, uint64 postBoughtGas, uint64 postBlockNum) = meter.params();\n\n assertEq(postBaseFee, prevBaseFee);\n assertEq(postBoughtGas, prevBoughtGas);\n assertEq(postBlockNum, prevBlockNum);\n }\n\n function test_updateOneEmptyBlock() external {\n vm.roll(initialBlockNum + 1);\n meter.use(0);\n (uint128 prevBaseFee, uint64 prevBoughtGas, uint64 prevBlockNum) = meter.params();\n\n // Base fee decreases by 12.5%\n assertEq(prevBaseFee, 875000000);\n assertEq(prevBoughtGas, 0);\n assertEq(prevBlockNum, initialBlockNum + 1);\n }\n\n function test_updateTwoEmptyBlocks() external {\n vm.roll(initialBlockNum + 2);\n meter.use(0);\n (uint128 prevBaseFee, uint64 prevBoughtGas, uint64 prevBlockNum) = meter.params();\n\n assertEq(prevBaseFee, 765624999);\n assertEq(prevBoughtGas, 0);\n assertEq(prevBlockNum, initialBlockNum + 2);\n }\n\n function test_updateTenEmptyBlocks() external {\n vm.roll(initialBlockNum + 10);\n meter.use(0);\n (uint128 prevBaseFee, uint64 prevBoughtGas, uint64 prevBlockNum) = meter.params();\n\n assertEq(prevBaseFee, 263075576);\n assertEq(prevBoughtGas, 0);\n assertEq(prevBlockNum, initialBlockNum + 10);\n }\n\n function test_updateNoGasDelta() external {\n uint64 target = uint64(uint256(meter.TARGET_RESOURCE_LIMIT()));\n meter.use(target);\n (uint128 prevBaseFee, uint64 prevBoughtGas, uint64 prevBlockNum) = meter.params();\n\n assertEq(prevBaseFee, 1000000000);\n assertEq(prevBoughtGas, target);\n assertEq(prevBlockNum, initialBlockNum);\n }\n\n function test_useMaxSucceeds() external {\n uint64 target = uint64(uint256(meter.TARGET_RESOURCE_LIMIT()));\n uint64 elasticity = uint64(uint256(meter.ELASTICITY_MULTIPLIER()));\n meter.use(target * elasticity);\n\n (, uint64 prevBoughtGas, ) = meter.params();\n assertEq(prevBoughtGas, target * elasticity);\n\n vm.roll(initialBlockNum + 1);\n meter.use(0);\n (uint128 postBaseFee,,) = meter.params();\n // Base fee increases by 1/8 the difference\n assertEq(postBaseFee, 1375000000);\n }\n\n function test_useMoreThanMaxReverts() external {\n uint64 target = uint64(uint256(meter.TARGET_RESOURCE_LIMIT()));\n uint64 elasticity = uint64(uint256(meter.ELASTICITY_MULTIPLIER()));\n vm.expectRevert(\"ResourceMetering: cannot buy more gas than available gas limit\");\n meter.use(target * elasticity + 1);\n }\n}\n" }, + "contracts/test/SafeCall.t.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport { CommonTest } from \"./CommonTest.t.sol\";\nimport { SafeCall } from \"../libraries/SafeCall.sol\";\n\ncontract SafeCall_Test is CommonTest {\n function test_safeCall(\n address from,\n address to,\n uint256 gas,\n uint64 value,\n bytes memory data\n ) external {\n vm.assume(from.balance == 0);\n vm.assume(to.balance == 0);\n // no precompiles\n vm.assume(uint160(to) > 10);\n // don't call the vm\n vm.assume(to != address(vm));\n vm.assume(from != address(vm));\n // don't call the console\n vm.assume(\n to != address(0x000000000000000000636F6e736F6c652e6c6f67)\n );\n // don't call the create2 deployer\n vm.assume(\n to != address(0x4e59b44847b379578588920cA78FbF26c0B4956C)\n );\n // don't send funds to self\n vm.assume(from != to);\n\n assertEq(from.balance, 0, \"from balance is 0\");\n vm.deal(from, value);\n assertEq(from.balance, value, \"from balance not dealt\");\n\n vm.expectCall(\n to,\n value,\n data\n );\n\n vm.prank(from);\n bool success = SafeCall.call(\n to,\n gas,\n value,\n data\n );\n\n assertEq(success, true, \"call not successful\");\n assertEq(to.balance, value, \"to balance received\");\n assertEq(from.balance, 0, \"from balance not drained\");\n }\n}\n" + }, "contracts/test/Semver.t.sol": { "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport { CommonTest } from \"./CommonTest.t.sol\";\nimport { Semver } from \"../universal/Semver.sol\";\nimport { Proxy } from \"../universal/Proxy.sol\";\n\n/**\n * @notice Test the Semver contract that is used for semantic versioning\n * of various contracts.\n */\ncontract Semver_Test is CommonTest {\n /**\n * @notice Global semver contract deployed in setUp. This is used in\n * the test cases.\n */\n Semver semver;\n\n /**\n * @notice Deploy a Semver contract\n */\n function setUp() external {\n semver = new Semver(7, 8, 0);\n }\n\n /**\n * @notice Test the version getter\n */\n function test_version() external {\n assertEq(\n semver.version(),\n \"7.8.0\"\n );\n }\n\n /**\n * @notice Since the versions are all immutable, they should\n * be able to be accessed from behind a proxy without needing\n * to initialize the contract.\n */\n function test_behindProxy() external {\n Proxy proxy = new Proxy(alice);\n vm.prank(alice);\n proxy.upgradeTo(address(semver));\n\n assertEq(\n Semver(address(proxy)).version(),\n \"7.8.0\"\n );\n }\n}\n" }, @@ -161,7 +167,7 @@ "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport { Bridge_Initializer } from \"./CommonTest.t.sol\";\n\nimport { SequencerFeeVault } from \"../L2/SequencerFeeVault.sol\";\nimport { L2StandardBridge } from \"../L2/L2StandardBridge.sol\";\nimport { Predeploys } from \"../libraries/Predeploys.sol\";\n\ncontract SequencerFeeVault_Test is Bridge_Initializer {\n SequencerFeeVault vault =\n SequencerFeeVault(payable(Predeploys.SEQUENCER_FEE_WALLET));\n address constant recipient = address(256);\n\n function setUp() public override {\n super.setUp();\n\n vm.etch(\n Predeploys.SEQUENCER_FEE_WALLET,\n address(new SequencerFeeVault()).code\n );\n\n vm.store(\n Predeploys.SEQUENCER_FEE_WALLET,\n bytes32(uint256(0)),\n bytes32(uint256(uint160(recipient)))\n );\n }\n\n function test_minWithdrawalAmount() external {\n assertEq(\n vault.MIN_WITHDRAWAL_AMOUNT(),\n 15 ether\n );\n }\n\n function test_constructor() external {\n assertEq(\n vault.l1FeeWallet(),\n recipient\n );\n }\n\n function test_receive() external {\n assertEq(\n address(vault).balance,\n 0\n );\n\n vm.prank(alice);\n (bool success,) = address(vault).call{ value: 100 }(hex\"\");\n\n assertEq(success, true);\n assertEq(\n address(vault).balance,\n 100\n );\n }\n\n function test_revertWithdraw() external {\n assert(address(vault).balance < vault.MIN_WITHDRAWAL_AMOUNT());\n\n vm.expectRevert(\n \"SequencerFeeVault: withdrawal amount must be greater than minimum withdrawal amount\"\n );\n vault.withdraw();\n }\n\n function test_withdraw() external {\n vm.deal(address(vault), vault.MIN_WITHDRAWAL_AMOUNT() + 1);\n\n vm.expectCall(\n Predeploys.L2_STANDARD_BRIDGE,\n abi.encodeWithSelector(\n L2StandardBridge.withdrawTo.selector,\n Predeploys.LEGACY_ERC20_ETH,\n vault.l1FeeWallet(),\n address(vault).balance,\n 0,\n bytes(\"\")\n )\n );\n\n vault.withdraw();\n }\n}\n" }, "contracts/universal/CrossDomainMessenger.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport {\n OwnableUpgradeable\n} from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport {\n PausableUpgradeable\n} from \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport {\n ReentrancyGuardUpgradeable\n} from \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport { ExcessivelySafeCall } from \"excessively-safe-call/src/ExcessivelySafeCall.sol\";\nimport { Hashing } from \"../libraries/Hashing.sol\";\nimport { Encoding } from \"../libraries/Encoding.sol\";\n\n/**\n * @title CrossDomainMessenger\n * @notice CrossDomainMessenger is a base contract that provides the core logic for the L1 and L2\n * cross-chain messenger contracts. It's designed to be a universal interface that only\n * needs to be extended slightly to provide low-level message passing functionality on each\n * chain it's deployed on. Currently only designed for message passing between two paired\n * chains and does not support one-to-many interactions.\n */\nabstract contract CrossDomainMessenger is\n OwnableUpgradeable,\n PausableUpgradeable,\n ReentrancyGuardUpgradeable\n{\n /**\n * @notice Current message version identifier.\n */\n uint16 public constant MESSAGE_VERSION = 1;\n\n /**\n * @notice Constant overhead added to the base gas for a message.\n */\n uint32 public constant MIN_GAS_CONSTANT_OVERHEAD = 200_000;\n\n /**\n * @notice Numerator for dynamic overhead added to the base gas for a message.\n */\n uint32 public constant MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR = 1016;\n\n /**\n * @notice Denominator for dynamic overhead added to the base gas for a message.\n */\n uint32 public constant MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR = 1000;\n\n /**\n * @notice Extra gas added to base gas for each byte of calldata in a message.\n */\n uint32 public constant MIN_GAS_CALLDATA_OVERHEAD = 16;\n\n /**\n * @notice Minimum amount of gas required to relay a message.\n */\n uint256 internal constant RELAY_GAS_REQUIRED = 45_000;\n\n /**\n * @notice Amount of gas held in reserve to guarantee that relay execution completes.\n */\n uint256 internal constant RELAY_GAS_BUFFER = RELAY_GAS_REQUIRED - 5000;\n\n /**\n * @notice Initial value for the xDomainMsgSender variable. We set this to a non-zero value\n * because performing an SSTORE on a non-zero value is significantly cheaper than on a\n * zero value.\n */\n address internal constant DEFAULT_XDOMAIN_SENDER = 0x000000000000000000000000000000000000dEaD;\n\n /**\n * @notice Mapping of message hashes to boolean receipt values. Note that a message will only\n * be present in this mapping if it failed to be relayed on this chain at least once.\n * If a message is successfully relayed on the first attempt, then it will only be\n * present within the successfulMessages mapping.\n */\n mapping(bytes32 => bool) public successfulMessages;\n\n /**\n * @notice Address of the sender of the currently executing message on the other chain. If the\n * value of this variable is the default value (0x00000000...dead) then no message is\n * currently being executed. Use the xDomainMessageSender getter which will throw an\n * error if this is the case.\n */\n address internal xDomainMsgSender;\n\n /**\n * @notice Nonce for the next message to be sent, without the message version applied. Use the\n * messageNonce getter which will insert the message version into the nonce to give you\n * the actual nonce to be used for the message.\n */\n uint240 internal msgNonce;\n\n /**\n * @notice Address of the paired CrossDomainMessenger contract on the other chain.\n */\n address public otherMessenger;\n\n /**\n * @notice Mapping of message hashes to boolean receipt values. Note that a message will only\n * be present in this mapping if it failed to be relayed on this chain at least once.\n * If a message is successfully relayed on the first attempt, then it will only be\n * present within the successfulMessages mapping.\n */\n mapping(bytes32 => bool) public receivedMessages;\n\n /**\n * @notice Mapping of blocked system addresses. Note that this is NOT a mapping of blocked user\n * addresses and cannot be used to prevent users from sending or receiving messages.\n * This is ONLY used to prevent the execution of messages to specific system addresses\n * that could cause security issues, e.g., having the CrossDomainMessenger send\n * messages to itself.\n */\n mapping(address => bool) public blockedSystemAddresses;\n\n /**\n * @notice Emitted whenever a message is sent to the other chain.\n *\n * @param target Address of the recipient of the message.\n * @param sender Address of the sender of the message.\n * @param message Message to trigger the recipient address with.\n * @param messageNonce Unique nonce attached to the message.\n * @param gasLimit Minimum gas limit that the message can be executed with.\n */\n event SentMessage(\n address indexed target,\n address sender,\n bytes message,\n uint256 messageNonce,\n uint256 gasLimit\n );\n\n /**\n * @notice Additional event data to emit, required as of Bedrock. Cannot be merged with the\n * SentMessage event without breaking the ABI of this contract, this is good enough.\n *\n * @param sender Address of the sender of the message.\n * @param value ETH value sent along with the message to the recipient.\n */\n event SentMessageExtension1(address indexed sender, uint256 value);\n\n /**\n * @notice Emitted whenever a message is successfully relayed on this chain.\n *\n * @param msgHash Hash of the message that was relayed.\n */\n event RelayedMessage(bytes32 indexed msgHash);\n\n /**\n * @notice Emitted whenever a message fails to be relayed on this chain.\n *\n * @param msgHash Hash of the message that failed to be relayed.\n */\n event FailedRelayedMessage(bytes32 indexed msgHash);\n\n /**\n * @notice Allows the owner of this contract to temporarily pause message relaying. Backup\n * security mechanism just in case. Owner should be the same as the upgrade wallet to\n * maintain the security model of the system as a whole.\n */\n function pause() external onlyOwner {\n _pause();\n }\n\n /**\n * @notice Allows the owner of this contract to resume message relaying once paused.\n */\n function unpause() external onlyOwner {\n _unpause();\n }\n\n /**\n * @notice Sends a message to some target address on the other chain.\n *\n * @param _target Target contract or wallet address.\n * @param _message Message to trigger the target address with.\n * @param _minGasLimit Minimum gas limit that the message can be executed with.\n */\n function sendMessage(\n address _target,\n bytes calldata _message,\n uint32 _minGasLimit\n ) external payable {\n // Triggers a message to the other messenger. Note that the amount of gas provided to the\n // message is the amount of gas requested by the user PLUS the base gas value. We want to\n // guarantee the property that the call to the target contract will always have at least\n // the minimum gas limit specified by the user.\n _sendMessage(\n otherMessenger,\n baseGas(_message, _minGasLimit),\n msg.value,\n abi.encodeWithSelector(\n this.relayMessage.selector,\n messageNonce(),\n msg.sender,\n _target,\n msg.value,\n _minGasLimit,\n _message\n )\n );\n\n emit SentMessage(_target, msg.sender, _message, messageNonce(), _minGasLimit);\n emit SentMessageExtension1(msg.sender, msg.value);\n\n unchecked {\n ++msgNonce;\n }\n }\n\n /**\n * @notice Relays a message that was sent by the other CrossDomainMessenger contract. Can only\n * be executed via cross-chain call from the other messenger OR if the message was\n * already received once and is currently being replayed.\n *\n * @param _nonce Nonce of the message being relayed.\n * @param _sender Address of the user who sent the message.\n * @param _target Address that the message is targeted at.\n * @param _value ETH value to send with the message.\n * @param _minGasLimit Minimum amount of gas that the message can be executed with.\n * @param _message Message to send to the target.\n */\n function relayMessage(\n uint256 _nonce,\n address _sender,\n address _target,\n uint256 _value,\n uint256 _minGasLimit,\n bytes calldata _message\n ) external payable nonReentrant whenNotPaused {\n bytes32 versionedHash = Hashing.hashCrossDomainMessage(\n _nonce,\n _sender,\n _target,\n _value,\n _minGasLimit,\n _message\n );\n\n if (_isOtherMessenger()) {\n // Should never happen.\n require(msg.value == _value, \"CrossDomainMessenger: mismatched message value\");\n } else {\n require(\n msg.value == 0,\n \"CrossDomainMessenger: value must be zero unless message is from a system address\"\n );\n\n require(\n receivedMessages[versionedHash],\n \"CrossDomainMessenger: message cannot be replayed\"\n );\n }\n\n require(\n blockedSystemAddresses[_target] == false,\n \"CrossDomainMessenger: cannot send message to blocked system address\"\n );\n\n require(\n successfulMessages[versionedHash] == false,\n \"CrossDomainMessenger: message has already been relayed\"\n );\n\n require(\n gasleft() >= _minGasLimit + RELAY_GAS_REQUIRED,\n \"CrossDomainMessenger: insufficient gas to relay message\"\n );\n\n xDomainMsgSender = _sender;\n (bool success, ) = ExcessivelySafeCall.excessivelySafeCall(\n _target,\n gasleft() - RELAY_GAS_BUFFER,\n _value,\n 0,\n _message\n );\n xDomainMsgSender = DEFAULT_XDOMAIN_SENDER;\n\n if (success == true) {\n successfulMessages[versionedHash] = true;\n emit RelayedMessage(versionedHash);\n } else {\n receivedMessages[versionedHash] = true;\n emit FailedRelayedMessage(versionedHash);\n }\n }\n\n /**\n * @notice Retrieves the address of the contract or wallet that initiated the currently\n * executing message on the other chain. Will throw an error if there is no message\n * currently being executed. Allows the recipient of a call to see who triggered it.\n *\n * @return Address of the sender of the currently executing message on the other chain.\n */\n function xDomainMessageSender() external view returns (address) {\n require(\n xDomainMsgSender != DEFAULT_XDOMAIN_SENDER,\n \"CrossDomainMessenger: xDomainMessageSender is not set\"\n );\n\n return xDomainMsgSender;\n }\n\n /**\n * @notice Retrieves the next message nonce. Message version will be added to the upper two\n * bytes of the message nonce. Message version allows us to treat messages as having\n * different structures.\n *\n * @return Nonce of the next message to be sent, with added message version.\n */\n function messageNonce() public view returns (uint256) {\n return Encoding.encodeVersionedNonce(msgNonce, MESSAGE_VERSION);\n }\n\n /**\n * @notice Computes the amount of gas required to guarantee that a given message will be\n * received on the other chain without running out of gas. Guaranteeing that a message\n * will not run out of gas is important because this ensures that a message can always\n * be replayed on the other chain if it fails to execute completely.\n *\n * @param _message Message to compute the amount of required gas for.\n * @param _minGasLimit Minimum desired gas limit when message goes to target.\n *\n * @return Amount of gas required to guarantee message receipt.\n */\n function baseGas(bytes calldata _message, uint32 _minGasLimit) public pure returns (uint32) {\n return\n // Dynamic overhead\n ((_minGasLimit * MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR) /\n MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR) +\n // Calldata overhead\n (uint32(_message.length) * MIN_GAS_CALLDATA_OVERHEAD) +\n // Constant overhead\n MIN_GAS_CONSTANT_OVERHEAD;\n }\n\n /**\n * @notice Intializer.\n *\n * @param _otherMessenger Address of the CrossDomainMessenger on the paired chain.\n * @param _blockedSystemAddresses List of system addresses that need to be blocked to prevent\n * certain security issues. Exact list depends on the network\n * where this contract is deployed. See note attached to the\n * blockedSystemAddresses variable in this contract for more\n * detailed information about what this block list can and\n * cannot be used for.\n */\n // solhint-disable-next-line func-name-mixedcase\n function __CrossDomainMessenger_init(\n address _otherMessenger,\n address[] memory _blockedSystemAddresses\n ) internal onlyInitializing {\n xDomainMsgSender = DEFAULT_XDOMAIN_SENDER;\n otherMessenger = _otherMessenger;\n for (uint256 i = 0; i < _blockedSystemAddresses.length; i++) {\n blockedSystemAddresses[_blockedSystemAddresses[i]] = true;\n }\n\n __Context_init_unchained();\n __Ownable_init_unchained();\n __Pausable_init_unchained();\n __ReentrancyGuard_init_unchained();\n }\n\n /**\n * @notice Sends a low-level message to the other messenger. Needs to be implemented by child\n * contracts because the logic for this depends on the network where the messenger is\n * being deployed.\n */\n function _sendMessage(\n address _to,\n uint64 _gasLimit,\n uint256 _value,\n bytes memory _data\n ) internal virtual;\n\n /**\n * @notice Checks whether the message is coming from the other messenger. Implemented by child\n * contracts because the logic for this depends on the network where the messenger is\n * being deployed.\n */\n function _isOtherMessenger() internal view virtual returns (bool);\n}\n" + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport {\n OwnableUpgradeable\n} from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport {\n PausableUpgradeable\n} from \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport {\n ReentrancyGuardUpgradeable\n} from \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport { SafeCall } from \"../libraries/SafeCall.sol\";\nimport { Hashing } from \"../libraries/Hashing.sol\";\nimport { Encoding } from \"../libraries/Encoding.sol\";\n\n/**\n * @custom:legacy\n * @title CrossDomainMessengerLegacySpacer\n * @notice Contract only exists to add a spacer to the CrossDomainMessenger where the\n * libAddressManager variable used to exist. Must be the first contract in the inheritance\n * tree of the CrossDomainMessenger\n */\ncontract CrossDomainMessengerLegacySpacer {\n /**\n * @custom:legacy\n * @custom:spacer libAddressManager\n * @notice Spacer for backwards compatibility.\n */\n address internal spacer0;\n}\n\n/**\n * @title CrossDomainMessenger\n * @notice CrossDomainMessenger is a base contract that provides the core logic for the L1 and L2\n * cross-chain messenger contracts. It's designed to be a universal interface that only\n * needs to be extended slightly to provide low-level message passing functionality on each\n * chain it's deployed on. Currently only designed for message passing between two paired\n * chains and does not support one-to-many interactions.\n */\nabstract contract CrossDomainMessenger is\n CrossDomainMessengerLegacySpacer,\n OwnableUpgradeable,\n PausableUpgradeable,\n ReentrancyGuardUpgradeable\n{\n /**\n * @notice Current message version identifier.\n */\n uint16 public constant MESSAGE_VERSION = 1;\n\n /**\n * @notice Constant overhead added to the base gas for a message.\n */\n uint32 public constant MIN_GAS_CONSTANT_OVERHEAD = 200_000;\n\n /**\n * @notice Numerator for dynamic overhead added to the base gas for a message.\n */\n uint32 public constant MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR = 1016;\n\n /**\n * @notice Denominator for dynamic overhead added to the base gas for a message.\n */\n uint32 public constant MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR = 1000;\n\n /**\n * @notice Extra gas added to base gas for each byte of calldata in a message.\n */\n uint32 public constant MIN_GAS_CALLDATA_OVERHEAD = 16;\n\n /**\n * @notice Minimum amount of gas required to relay a message.\n */\n uint256 internal constant RELAY_GAS_REQUIRED = 45_000;\n\n /**\n * @notice Amount of gas held in reserve to guarantee that relay execution completes.\n */\n uint256 internal constant RELAY_GAS_BUFFER = RELAY_GAS_REQUIRED - 5000;\n\n /**\n * @notice Initial value for the xDomainMsgSender variable. We set this to a non-zero value\n * because performing an SSTORE on a non-zero value is significantly cheaper than on a\n * zero value.\n */\n address internal constant DEFAULT_XDOMAIN_SENDER = 0x000000000000000000000000000000000000dEaD;\n\n /**\n * @custom:legacy\n * @custom:spacer blockedMessages\n * @notice Spacer for backwards compatibility.\n */\n uint256 internal spacer1;\n\n /**\n * @custom:legacy\n * @custom:spacer relayedMessages\n * @notice Spacer for backwards compatibility.\n */\n uint256 internal spacer2;\n\n /**\n * @notice Mapping of message hashes to boolean receipt values. Note that a message will only\n * be present in this mapping if it failed to be relayed on this chain at least once.\n * If a message is successfully relayed on the first attempt, then it will only be\n * present within the successfulMessages mapping.\n */\n mapping(bytes32 => bool) public successfulMessages;\n\n /**\n * @notice Address of the sender of the currently executing message on the other chain. If the\n * value of this variable is the default value (0x00000000...dead) then no message is\n * currently being executed. Use the xDomainMessageSender getter which will throw an\n * error if this is the case.\n */\n address internal xDomainMsgSender;\n\n /**\n * @notice Nonce for the next message to be sent, without the message version applied. Use the\n * messageNonce getter which will insert the message version into the nonce to give you\n * the actual nonce to be used for the message.\n */\n uint240 internal msgNonce;\n\n /**\n * @notice Address of the paired CrossDomainMessenger contract on the other chain.\n */\n address public otherMessenger;\n\n /**\n * @notice Mapping of message hashes to boolean receipt values. Note that a message will only\n * be present in this mapping if it failed to be relayed on this chain at least once.\n * If a message is successfully relayed on the first attempt, then it will only be\n * present within the successfulMessages mapping.\n */\n mapping(bytes32 => bool) public receivedMessages;\n\n /**\n * @notice Mapping of blocked system addresses. Note that this is NOT a mapping of blocked user\n * addresses and cannot be used to prevent users from sending or receiving messages.\n * This is ONLY used to prevent the execution of messages to specific system addresses\n * that could cause security issues, e.g., having the CrossDomainMessenger send\n * messages to itself.\n */\n mapping(address => bool) public blockedSystemAddresses;\n\n /**\n * @notice Emitted whenever a message is sent to the other chain.\n *\n * @param target Address of the recipient of the message.\n * @param sender Address of the sender of the message.\n * @param message Message to trigger the recipient address with.\n * @param messageNonce Unique nonce attached to the message.\n * @param gasLimit Minimum gas limit that the message can be executed with.\n */\n event SentMessage(\n address indexed target,\n address sender,\n bytes message,\n uint256 messageNonce,\n uint256 gasLimit\n );\n\n /**\n * @notice Additional event data to emit, required as of Bedrock. Cannot be merged with the\n * SentMessage event without breaking the ABI of this contract, this is good enough.\n *\n * @param sender Address of the sender of the message.\n * @param value ETH value sent along with the message to the recipient.\n */\n event SentMessageExtension1(address indexed sender, uint256 value);\n\n /**\n * @notice Emitted whenever a message is successfully relayed on this chain.\n *\n * @param msgHash Hash of the message that was relayed.\n */\n event RelayedMessage(bytes32 indexed msgHash);\n\n /**\n * @notice Emitted whenever a message fails to be relayed on this chain.\n *\n * @param msgHash Hash of the message that failed to be relayed.\n */\n event FailedRelayedMessage(bytes32 indexed msgHash);\n\n /**\n * @notice Allows the owner of this contract to temporarily pause message relaying. Backup\n * security mechanism just in case. Owner should be the same as the upgrade wallet to\n * maintain the security model of the system as a whole.\n */\n function pause() external onlyOwner {\n _pause();\n }\n\n /**\n * @notice Allows the owner of this contract to resume message relaying once paused.\n */\n function unpause() external onlyOwner {\n _unpause();\n }\n\n /**\n * @notice Sends a message to some target address on the other chain.\n *\n * @param _target Target contract or wallet address.\n * @param _message Message to trigger the target address with.\n * @param _minGasLimit Minimum gas limit that the message can be executed with.\n */\n function sendMessage(\n address _target,\n bytes calldata _message,\n uint32 _minGasLimit\n ) external payable {\n // Triggers a message to the other messenger. Note that the amount of gas provided to the\n // message is the amount of gas requested by the user PLUS the base gas value. We want to\n // guarantee the property that the call to the target contract will always have at least\n // the minimum gas limit specified by the user.\n _sendMessage(\n otherMessenger,\n baseGas(_message, _minGasLimit),\n msg.value,\n abi.encodeWithSelector(\n this.relayMessage.selector,\n messageNonce(),\n msg.sender,\n _target,\n msg.value,\n _minGasLimit,\n _message\n )\n );\n\n emit SentMessage(_target, msg.sender, _message, messageNonce(), _minGasLimit);\n emit SentMessageExtension1(msg.sender, msg.value);\n\n unchecked {\n ++msgNonce;\n }\n }\n\n /**\n * @notice Relays a message that was sent by the other CrossDomainMessenger contract. Can only\n * be executed via cross-chain call from the other messenger OR if the message was\n * already received once and is currently being replayed.\n *\n * @param _nonce Nonce of the message being relayed.\n * @param _sender Address of the user who sent the message.\n * @param _target Address that the message is targeted at.\n * @param _value ETH value to send with the message.\n * @param _minGasLimit Minimum amount of gas that the message can be executed with.\n * @param _message Message to send to the target.\n */\n function relayMessage(\n uint256 _nonce,\n address _sender,\n address _target,\n uint256 _value,\n uint256 _minGasLimit,\n bytes calldata _message\n ) external payable nonReentrant whenNotPaused {\n bytes32 versionedHash = Hashing.hashCrossDomainMessage(\n _nonce,\n _sender,\n _target,\n _value,\n _minGasLimit,\n _message\n );\n\n if (_isOtherMessenger()) {\n // Should never happen.\n require(msg.value == _value, \"CrossDomainMessenger: mismatched message value\");\n } else {\n require(\n msg.value == 0,\n \"CrossDomainMessenger: value must be zero unless message is from a system address\"\n );\n\n require(\n receivedMessages[versionedHash],\n \"CrossDomainMessenger: message cannot be replayed\"\n );\n }\n\n require(\n blockedSystemAddresses[_target] == false,\n \"CrossDomainMessenger: cannot send message to blocked system address\"\n );\n\n require(\n successfulMessages[versionedHash] == false,\n \"CrossDomainMessenger: message has already been relayed\"\n );\n\n require(\n gasleft() >= _minGasLimit + RELAY_GAS_REQUIRED,\n \"CrossDomainMessenger: insufficient gas to relay message\"\n );\n\n xDomainMsgSender = _sender;\n bool success = SafeCall.call(_target, gasleft() - RELAY_GAS_BUFFER, _value, _message);\n xDomainMsgSender = DEFAULT_XDOMAIN_SENDER;\n\n if (success == true) {\n successfulMessages[versionedHash] = true;\n emit RelayedMessage(versionedHash);\n } else {\n receivedMessages[versionedHash] = true;\n emit FailedRelayedMessage(versionedHash);\n }\n }\n\n /**\n * @notice Retrieves the address of the contract or wallet that initiated the currently\n * executing message on the other chain. Will throw an error if there is no message\n * currently being executed. Allows the recipient of a call to see who triggered it.\n *\n * @return Address of the sender of the currently executing message on the other chain.\n */\n function xDomainMessageSender() external view returns (address) {\n require(\n xDomainMsgSender != DEFAULT_XDOMAIN_SENDER,\n \"CrossDomainMessenger: xDomainMessageSender is not set\"\n );\n\n return xDomainMsgSender;\n }\n\n /**\n * @notice Retrieves the next message nonce. Message version will be added to the upper two\n * bytes of the message nonce. Message version allows us to treat messages as having\n * different structures.\n *\n * @return Nonce of the next message to be sent, with added message version.\n */\n function messageNonce() public view returns (uint256) {\n return Encoding.encodeVersionedNonce(msgNonce, MESSAGE_VERSION);\n }\n\n /**\n * @notice Computes the amount of gas required to guarantee that a given message will be\n * received on the other chain without running out of gas. Guaranteeing that a message\n * will not run out of gas is important because this ensures that a message can always\n * be replayed on the other chain if it fails to execute completely.\n *\n * @param _message Message to compute the amount of required gas for.\n * @param _minGasLimit Minimum desired gas limit when message goes to target.\n *\n * @return Amount of gas required to guarantee message receipt.\n */\n function baseGas(bytes calldata _message, uint32 _minGasLimit) public pure returns (uint32) {\n return\n // Dynamic overhead\n ((_minGasLimit * MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR) /\n MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR) +\n // Calldata overhead\n (uint32(_message.length) * MIN_GAS_CALLDATA_OVERHEAD) +\n // Constant overhead\n MIN_GAS_CONSTANT_OVERHEAD;\n }\n\n /**\n * @notice Intializer.\n *\n * @param _otherMessenger Address of the CrossDomainMessenger on the paired chain.\n * @param _blockedSystemAddresses List of system addresses that need to be blocked to prevent\n * certain security issues. Exact list depends on the network\n * where this contract is deployed. See note attached to the\n * blockedSystemAddresses variable in this contract for more\n * detailed information about what this block list can and\n * cannot be used for.\n */\n // solhint-disable-next-line func-name-mixedcase\n function __CrossDomainMessenger_init(\n address _otherMessenger,\n address[] memory _blockedSystemAddresses\n ) internal onlyInitializing {\n xDomainMsgSender = DEFAULT_XDOMAIN_SENDER;\n otherMessenger = _otherMessenger;\n for (uint256 i = 0; i < _blockedSystemAddresses.length; i++) {\n blockedSystemAddresses[_blockedSystemAddresses[i]] = true;\n }\n\n __Context_init_unchained();\n __Ownable_init_unchained();\n __Pausable_init_unchained();\n __ReentrancyGuard_init_unchained();\n }\n\n /**\n * @notice Sends a low-level message to the other messenger. Needs to be implemented by child\n * contracts because the logic for this depends on the network where the messenger is\n * being deployed.\n */\n function _sendMessage(\n address _to,\n uint64 _gasLimit,\n uint256 _value,\n bytes memory _data\n ) internal virtual;\n\n /**\n * @notice Checks whether the message is coming from the other messenger. Implemented by child\n * contracts because the logic for this depends on the network where the messenger is\n * being deployed.\n */\n function _isOtherMessenger() internal view virtual returns (bool);\n}\n" }, "contracts/universal/OptimismMintableERC20.sol": { "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport { ERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"./SupportedInterfaces.sol\";\n\n/**\n * @title OptimismMintableERC20\n * @notice OptimismMintableERC20 is a standard extension of the base ERC20 token contract designed\n * to allow the StandardBridge contracts to mint and burn tokens. This makes it possible to\n * use an OptimismMintablERC20 as the L2 representation of an L1 token, or vice-versa.\n * Designed to be backwards compatible with the older StandardL2ERC20 token which was only\n * meant for use on L2.\n */\ncontract OptimismMintableERC20 is ERC20 {\n /**\n * @notice Address of the corresponding version of this token on the remote chain.\n */\n address public remoteToken;\n\n /**\n * @notice Address of the StandardBridge on this network.\n */\n address public bridge;\n\n /**\n * @notice Emitted whenever tokens are minted for an account.\n *\n * @param account Address of the account tokens are being minted for.\n * @param amount Amount of tokens minted.\n */\n event Mint(address indexed account, uint256 amount);\n\n /**\n * @notice Emitted whenever tokens are burned from an account.\n *\n * @param account Address of the account tokens are being burned from.\n * @param amount Amount of tokens burned.\n */\n event Burn(address indexed account, uint256 amount);\n\n /**\n * @notice A modifier that only allows the bridge to call\n */\n modifier onlyBridge() {\n require(msg.sender == bridge, \"OptimismMintableERC20: only bridge can mint and burn\");\n _;\n }\n\n /**\n * @param _bridge Address of the L2 standard bridge.\n * @param _remoteToken Address of the corresponding L1 token.\n * @param _name ERC20 name.\n * @param _symbol ERC20 symbol.\n */\n constructor(\n address _bridge,\n address _remoteToken,\n string memory _name,\n string memory _symbol\n ) ERC20(_name, _symbol) {\n remoteToken = _remoteToken;\n bridge = _bridge;\n }\n\n /**\n * @notice Allows the StandardBridge on this network to mint tokens.\n *\n * @param _to Address to mint tokens to.\n * @param _amount Amount of tokens to mint.\n */\n function mint(address _to, uint256 _amount) external virtual onlyBridge {\n _mint(_to, _amount);\n emit Mint(_to, _amount);\n }\n\n /**\n * @notice Allows the StandardBridge on this network to burn tokens.\n *\n * @param _from Address to burn tokens from.\n * @param _amount Amount of tokens to burn.\n */\n function burn(address _from, uint256 _amount) external virtual onlyBridge {\n _burn(_from, _amount);\n emit Burn(_from, _amount);\n }\n\n /**\n * @notice ERC165 interface check function.\n *\n * @param _interfaceId Interface ID to check.\n *\n * @return Whether or not the interface is supported by this contract.\n */\n function supportsInterface(bytes4 _interfaceId) external pure returns (bool) {\n bytes4 iface1 = type(IERC165).interfaceId;\n bytes4 iface2 = type(IL1Token).interfaceId;\n bytes4 iface3 = type(IRemoteToken).interfaceId;\n return _interfaceId == iface1 || _interfaceId == iface2 || _interfaceId == iface3;\n }\n\n /**\n * @custom:legacy\n * @notice Legacy getter for the remote token. Use remoteToken going forward.\n */\n function l1Token() public view returns (address) {\n return remoteToken;\n }\n\n /**\n * @custom:legacy\n * @notice Legacy getter for the bridge. Use bridge going forward.\n */\n function l2Bridge() public view returns (address) {\n return bridge;\n }\n}\n" @@ -179,7 +185,7 @@ "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.15;\n\nimport { Strings } from \"@openzeppelin/contracts/utils/Strings.sol\";\n\n/**\n * @title Semver\n * @notice Semver is a simple contract for managing contract versions.\n */\ncontract Semver {\n /**\n * @notice Contract version number (major).\n */\n // solhint-disable-next-line var-name-mixedcase\n uint256 private immutable MAJOR_VERSION;\n\n /**\n * @notice Contract version number (minor).\n */\n // solhint-disable-next-line var-name-mixedcase\n uint256 private immutable MINOR_VERSION;\n\n /**\n * @notice Contract version number (patch).\n */\n // solhint-disable-next-line var-name-mixedcase\n uint256 private immutable PATCH_VERSION;\n\n /**\n * @param _major Version number (major).\n * @param _minor Version number (minor).\n * @param _patch Version number (patch).\n */\n constructor(\n uint256 _major,\n uint256 _minor,\n uint256 _patch\n ) {\n MAJOR_VERSION = _major;\n MINOR_VERSION = _minor;\n PATCH_VERSION = _patch;\n }\n\n /**\n * @notice Returns the full semver contract version.\n *\n * @return Semver contract version as a string.\n */\n function version() public view returns (string memory) {\n return\n string(\n abi.encodePacked(\n Strings.toString(MAJOR_VERSION),\n \".\",\n Strings.toString(MINOR_VERSION),\n \".\",\n Strings.toString(PATCH_VERSION)\n )\n );\n }\n}\n" }, "contracts/universal/StandardBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport { ERC165Checker } from \"@openzeppelin/contracts/utils/introspection/ERC165Checker.sol\";\nimport { Address } from \"@openzeppelin/contracts/utils/Address.sol\";\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport { Initializable } from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport { IRemoteToken, IL1Token } from \"./SupportedInterfaces.sol\";\nimport { CrossDomainMessenger } from \"./CrossDomainMessenger.sol\";\nimport { OptimismMintableERC20 } from \"./OptimismMintableERC20.sol\";\n\n/**\n * @title StandardBridge\n * @notice StandardBridge is a base contract for the L1 and L2 standard ERC20 bridges.\n */\nabstract contract StandardBridge is Initializable {\n using SafeERC20 for IERC20;\n\n /**\n * @notice The L2 gas limit set when eth is depoisited using the receive() function.\n */\n uint32 internal constant RECEIVE_DEFAULT_GAS_LIMIT = 200_000;\n\n /**\n * @notice Messenger contract on this domain.\n */\n CrossDomainMessenger public messenger;\n\n /**\n * @notice Corresponding bridge on the other domain.\n */\n StandardBridge public otherBridge;\n\n /**\n * @notice Mapping that stores deposits for a given pair of local and remote tokens.\n */\n mapping(address => mapping(address => uint256)) public deposits;\n\n /**\n * @notice Emitted when an ETH bridge is initiated to the other chain.\n *\n * @param from Address of the sender.\n * @param to Address of the receiver.\n * @param amount Amount of ETH sent.\n * @param extraData Extra data sent with the transaction.\n */\n event ETHBridgeInitiated(\n address indexed from,\n address indexed to,\n uint256 amount,\n bytes extraData\n );\n\n /**\n * @notice Emitted when an ETH bridge is finalized on this chain.\n *\n * @param from Address of the sender.\n * @param to Address of the receiver.\n * @param amount Amount of ETH sent.\n * @param extraData Extra data sent with the transaction.\n */\n event ETHBridgeFinalized(\n address indexed from,\n address indexed to,\n uint256 amount,\n bytes extraData\n );\n\n /**\n * @notice Emitted when an ERC20 bridge is initiated to the other chain.\n *\n * @param localToken Address of the ERC20 on this chain.\n * @param remoteToken Address of the ERC20 on the remote chain.\n * @param from Address of the sender.\n * @param to Address of the receiver.\n * @param amount Amount of ETH sent.\n * @param extraData Extra data sent with the transaction.\n */\n event ERC20BridgeInitiated(\n address indexed localToken,\n address indexed remoteToken,\n address indexed from,\n address to,\n uint256 amount,\n bytes extraData\n );\n\n /**\n * @notice Emitted when an ERC20 bridge is finalized on this chain.\n *\n * @param localToken Address of the ERC20 on this chain.\n * @param remoteToken Address of the ERC20 on the remote chain.\n * @param from Address of the sender.\n * @param to Address of the receiver.\n * @param amount Amount of ETH sent.\n * @param extraData Extra data sent with the transaction.\n */\n event ERC20BridgeFinalized(\n address indexed localToken,\n address indexed remoteToken,\n address indexed from,\n address to,\n uint256 amount,\n bytes extraData\n );\n\n /**\n * @notice Emitted when an ERC20 bridge to this chain fails.\n *\n * @param localToken Address of the ERC20 on this chain.\n * @param remoteToken Address of the ERC20 on the remote chain.\n * @param from Address of the sender.\n * @param to Address of the receiver.\n * @param amount Amount of ETH sent.\n * @param extraData Extra data sent with the transaction.\n */\n event ERC20BridgeFailed(\n address indexed localToken,\n address indexed remoteToken,\n address indexed from,\n address to,\n uint256 amount,\n bytes extraData\n );\n\n /**\n * @notice Only allow EOAs to call the functions. Note that this is not safe against contracts\n * calling code within their constructors, but also doesn't really matter since we're\n * just trying to prevent users accidentally depositing with smart contract wallets.\n */\n modifier onlyEOA() {\n require(\n !Address.isContract(msg.sender),\n \"StandardBridge: function can only be called from an EOA\"\n );\n _;\n }\n\n /**\n * @notice Ensures that the caller is a cross-chain message from the other bridge.\n */\n modifier onlyOtherBridge() {\n require(\n msg.sender == address(messenger) &&\n messenger.xDomainMessageSender() == address(otherBridge),\n \"StandardBridge: function can only be called from the other bridge\"\n );\n _;\n }\n\n /**\n * @notice Ensures that the caller is this contract.\n */\n modifier onlySelf() {\n require(msg.sender == address(this), \"StandardBridge: function can only be called by self\");\n _;\n }\n\n /**\n * @notice Allows EOAs to deposit ETH by sending directly to the bridge.\n */\n receive() external payable onlyEOA {\n _initiateBridgeETH(msg.sender, msg.sender, msg.value, RECEIVE_DEFAULT_GAS_LIMIT, bytes(\"\"));\n }\n\n /**\n * @notice Sends ETH to the sender's address on the other chain.\n *\n * @param _minGasLimit Minimum amount of gas that the bridge can be relayed with.\n * @param _extraData Extra data to be sent with the transaction. Note that the recipient will\n * not be triggered with this data, but it will be emitted and can be used\n * to identify the transaction.\n */\n function bridgeETH(uint32 _minGasLimit, bytes calldata _extraData) public payable onlyEOA {\n _initiateBridgeETH(msg.sender, msg.sender, msg.value, _minGasLimit, _extraData);\n }\n\n /**\n * @notice Sends ETH to a receiver's address on the other chain. Note that if ETH is sent to a\n * smart contract and the call fails, the ETH will be temporarily locked in the\n * StandardBridge on the other chain until the call is replayed. If the call cannot be\n * replayed with any amount of gas (call always reverts), then the ETH will be\n * permanently locked in the StandardBridge on the other chain.\n *\n * @param _to Address of the receiver.\n * @param _minGasLimit Minimum amount of gas that the bridge can be relayed with.\n * @param _extraData Extra data to be sent with the transaction. Note that the recipient will\n * not be triggered with this data, but it will be emitted and can be used\n * to identify the transaction.\n */\n function bridgeETHTo(\n address _to,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) public payable {\n _initiateBridgeETH(msg.sender, _to, msg.value, _minGasLimit, _extraData);\n }\n\n /**\n * @notice Sends ERC20 tokens to the sender's address on the other chain. Note that if the\n * ERC20 token on the other chain does not recognize the local token as the correct\n * pair token, the ERC20 bridge will fail and the tokens will be returned to sender on\n * this chain.\n *\n * @param _localToken Address of the ERC20 on this chain.\n * @param _remoteToken Address of the corresponding token on the remote chain.\n * @param _amount Amount of local tokens to deposit.\n * @param _minGasLimit Minimum amount of gas that the bridge can be relayed with.\n * @param _extraData Extra data to be sent with the transaction. Note that the recipient will\n * not be triggered with this data, but it will be emitted and can be used\n * to identify the transaction.\n */\n function bridgeERC20(\n address _localToken,\n address _remoteToken,\n uint256 _amount,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) public virtual onlyEOA {\n _initiateBridgeERC20(\n _localToken,\n _remoteToken,\n msg.sender,\n msg.sender,\n _amount,\n _minGasLimit,\n _extraData\n );\n }\n\n /**\n * @notice Sends ERC20 tokens to a receiver's address on the other chain. Note that if the\n * ERC20 token on the other chain does not recognize the local token as the correct\n * pair token, the ERC20 bridge will fail and the tokens will be returned to sender on\n * this chain.\n *\n * @param _localToken Address of the ERC20 on this chain.\n * @param _remoteToken Address of the corresponding token on the remote chain.\n * @param _to Address of the receiver.\n * @param _amount Amount of local tokens to deposit.\n * @param _minGasLimit Minimum amount of gas that the bridge can be relayed with.\n * @param _extraData Extra data to be sent with the transaction. Note that the recipient will\n * not be triggered with this data, but it will be emitted and can be used\n * to identify the transaction.\n */\n function bridgeERC20To(\n address _localToken,\n address _remoteToken,\n address _to,\n uint256 _amount,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) public virtual {\n _initiateBridgeERC20(\n _localToken,\n _remoteToken,\n msg.sender,\n _to,\n _amount,\n _minGasLimit,\n _extraData\n );\n }\n\n /**\n * @notice Finalizes an ETH bridge on this chain. Can only be triggered by the other\n * StandardBridge contract on the remote chain.\n *\n * @param _from Address of the sender.\n * @param _to Address of the receiver.\n * @param _amount Amount of ETH being bridged.\n * @param _extraData Extra data to be sent with the transaction. Note that the recipient will\n * not be triggered with this data, but it will be emitted and can be used\n * to identify the transaction.\n */\n function finalizeBridgeETH(\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _extraData\n ) public payable onlyOtherBridge {\n require(msg.value == _amount, \"StandardBridge: amount sent does not match amount required\");\n require(_to != address(this), \"StandardBridge: cannot send to self\");\n\n emit ETHBridgeFinalized(_from, _to, _amount, _extraData);\n (bool success, ) = _to.call{ value: _amount }(new bytes(0));\n require(success, \"StandardBridge: ETH transfer failed\");\n }\n\n /**\n * @notice Finalizes an ERC20 bridge on this chain. Can only be triggered by the other\n * StandardBridge contract on the remote chain.\n *\n *\n * @param _localToken Address of the ERC20 on this chain.\n * @param _remoteToken Address of the corresponding token on the remote chain.\n * @param _from Address of the sender.\n * @param _to Address of the receiver.\n * @param _amount Amount of ETH being bridged.\n * @param _extraData Extra data to be sent with the transaction. Note that the recipient will\n * not be triggered with this data, but it will be emitted and can be used\n * to identify the transaction.\n */\n function finalizeBridgeERC20(\n address _localToken,\n address _remoteToken,\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _extraData\n ) public onlyOtherBridge {\n try this.completeOutboundTransfer(_localToken, _remoteToken, _to, _amount) {\n emit ERC20BridgeFinalized(_localToken, _remoteToken, _from, _to, _amount, _extraData);\n } catch {\n // Something went wrong during the bridging process, return to sender.\n // Can happen if a bridge UI specifies the wrong L2 token.\n // We reverse the to and from addresses to make sure the tokens are returned to the\n // sender on the other chain and preserve the accuracy of accounting based on emitted\n // events.\n _initiateBridgeERC20Unchecked(\n _localToken,\n _remoteToken,\n _to,\n _from,\n _amount,\n 0, // _minGasLimit, 0 is fine here\n _extraData\n );\n emit ERC20BridgeFailed(_localToken, _remoteToken, _from, _to, _amount, _extraData);\n }\n }\n\n /**\n * @notice Completes an outbound token transfer. Public function, but can only be called by\n * this contract. It's security critical that there be absolutely no way for anyone to\n * trigger this function, except by explicit trigger within this contract. Used as a\n * simple way to be able to try/catch any type of revert that could occur during an\n * ERC20 mint/transfer.\n *\n * @param _localToken Address of the ERC20 on this chain.\n * @param _remoteToken Address of the corresponding token on the remote chain.\n * @param _to Address of the receiver.\n * @param _amount Amount of ETH being bridged.\n */\n function completeOutboundTransfer(\n address _localToken,\n address _remoteToken,\n address _to,\n uint256 _amount\n ) public onlySelf {\n // Make sure external function calls can't be used to trigger calls to\n // completeOutboundTransfer. We only make external (write) calls to _localToken.\n require(_localToken != address(this), \"StandardBridge: local token cannot be self\");\n\n if (_isOptimismMintableERC20(_localToken)) {\n require(\n _isCorrectTokenPair(_localToken, _remoteToken),\n \"StandardBridge: wrong remote token for Optimism Mintable ERC20 local token\"\n );\n\n OptimismMintableERC20(_localToken).mint(_to, _amount);\n } else {\n deposits[_localToken][_remoteToken] = deposits[_localToken][_remoteToken] - _amount;\n IERC20(_localToken).safeTransfer(_to, _amount);\n }\n }\n\n /**\n * @notice Initializer.\n *\n * @param _messenger Address of CrossDomainMessenger on this network.\n * @param _otherBridge Address of the other StandardBridge contract.\n */\n // solhint-disable-next-line func-name-mixedcase\n function __StandardBridge_init(address payable _messenger, address payable _otherBridge)\n internal\n onlyInitializing\n {\n messenger = CrossDomainMessenger(_messenger);\n otherBridge = StandardBridge(_otherBridge);\n }\n\n /**\n * @notice Initiates a bridge of ETH through the CrossDomainMessenger.\n *\n * @param _from Address of the sender.\n * @param _to Address of the receiver.\n * @param _amount Amount of ETH being bridged.\n * @param _minGasLimit Minimum amount of gas that the bridge can be relayed with.\n * @param _extraData Extra data to be sent with the transaction. Note that the recipient will\n * not be triggered with this data, but it will be emitted and can be used\n * to identify the transaction.\n */\n function _initiateBridgeETH(\n address _from,\n address _to,\n uint256 _amount,\n uint32 _minGasLimit,\n bytes memory _extraData\n ) internal {\n emit ETHBridgeInitiated(_from, _to, _amount, _extraData);\n\n messenger.sendMessage{ value: _amount }(\n address(otherBridge),\n abi.encodeWithSelector(\n this.finalizeBridgeETH.selector,\n _from,\n _to,\n _amount,\n _extraData\n ),\n _minGasLimit\n );\n }\n\n /**\n * @notice Sends ERC20 tokens to a receiver's address on the other chain.\n *\n * @param _localToken Address of the ERC20 on this chain.\n * @param _remoteToken Address of the corresponding token on the remote chain.\n * @param _to Address of the receiver.\n * @param _amount Amount of local tokens to deposit.\n * @param _minGasLimit Minimum amount of gas that the bridge can be relayed with.\n * @param _extraData Extra data to be sent with the transaction. Note that the recipient will\n * not be triggered with this data, but it will be emitted and can be used\n * to identify the transaction.\n */\n function _initiateBridgeERC20(\n address _localToken,\n address _remoteToken,\n address _from,\n address _to,\n uint256 _amount,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) internal {\n // Make sure external function calls can't be used to trigger calls to\n // completeOutboundTransfer. We only make external (write) calls to _localToken.\n require(_localToken != address(this), \"StandardBridge: local token cannot be self\");\n\n if (_isOptimismMintableERC20(_localToken)) {\n require(\n _isCorrectTokenPair(_localToken, _remoteToken),\n \"StandardBridge: wrong remote token for Optimism Mintable ERC20 local token\"\n );\n\n OptimismMintableERC20(_localToken).burn(_from, _amount);\n } else {\n IERC20(_localToken).safeTransferFrom(_from, address(this), _amount);\n deposits[_localToken][_remoteToken] = deposits[_localToken][_remoteToken] + _amount;\n }\n\n _initiateBridgeERC20Unchecked(\n _localToken,\n _remoteToken,\n _from,\n _to,\n _amount,\n _minGasLimit,\n _extraData\n );\n }\n\n /**\n * @notice Sends ERC20 tokens to a receiver's address on the other chain WITHOUT doing any\n * validation. Be EXTREMELY careful when using this function.\n *\n * @param _localToken Address of the ERC20 on this chain.\n * @param _remoteToken Address of the corresponding token on the remote chain.\n * @param _to Address of the receiver.\n * @param _amount Amount of local tokens to deposit.\n * @param _minGasLimit Minimum amount of gas that the bridge can be relayed with.\n * @param _extraData Extra data to be sent with the transaction. Note that the recipient will\n * not be triggered with this data, but it will be emitted and can be used\n * to identify the transaction.\n */\n function _initiateBridgeERC20Unchecked(\n address _localToken,\n address _remoteToken,\n address _from,\n address _to,\n uint256 _amount,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) internal {\n messenger.sendMessage(\n address(otherBridge),\n abi.encodeWithSelector(\n this.finalizeBridgeERC20.selector,\n // Because this call will be executed on the remote chain, we reverse the order of\n // the remote and local token addresses relative to their order in the\n // finalizeBridgeERC20 function.\n _remoteToken,\n _localToken,\n _from,\n _to,\n _amount,\n _extraData\n ),\n _minGasLimit\n );\n\n emit ERC20BridgeInitiated(_localToken, _remoteToken, _from, _to, _amount, _extraData);\n }\n\n /**\n * @notice Checks if a given address is an OptimismMintableERC20. Not perfect, but good enough.\n * Just the way we like it.\n *\n * @param _token Address of the token to check.\n *\n * @return True if the token is an OptimismMintableERC20.\n */\n function _isOptimismMintableERC20(address _token) internal view returns (bool) {\n return ERC165Checker.supportsInterface(_token, type(IL1Token).interfaceId);\n }\n\n /**\n * @notice Checks if the \"other token\" is the correct pair token for the OptimismMintableERC20.\n *\n * @param _mintableToken OptimismMintableERC20 to check against.\n * @param _otherToken Pair token to check.\n *\n * @return True if the other token is the correct pair token for the OptimismMintableERC20.\n */\n function _isCorrectTokenPair(address _mintableToken, address _otherToken)\n internal\n view\n returns (bool)\n {\n return _otherToken == OptimismMintableERC20(_mintableToken).l1Token();\n }\n}\n" + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.15;\n\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport { ERC165Checker } from \"@openzeppelin/contracts/utils/introspection/ERC165Checker.sol\";\nimport { Address } from \"@openzeppelin/contracts/utils/Address.sol\";\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport { SafeCall } from \"../libraries/SafeCall.sol\";\nimport { IRemoteToken, IL1Token } from \"./SupportedInterfaces.sol\";\nimport { CrossDomainMessenger } from \"./CrossDomainMessenger.sol\";\nimport { OptimismMintableERC20 } from \"./OptimismMintableERC20.sol\";\n\n/**\n * @title StandardBridge\n * @notice StandardBridge is a base contract for the L1 and L2 standard ERC20 bridges.\n */\nabstract contract StandardBridge {\n using SafeERC20 for IERC20;\n\n /**\n * @notice The L2 gas limit set when eth is depoisited using the receive() function.\n */\n uint32 internal constant RECEIVE_DEFAULT_GAS_LIMIT = 200_000;\n\n /**\n * @notice Messenger contract on this domain.\n */\n CrossDomainMessenger public immutable messenger;\n\n /**\n * @notice Corresponding bridge on the other domain.\n */\n StandardBridge public immutable otherBridge;\n\n /**\n * @custom:legacy\n * @notice Spacer for backwards compatibility.\n */\n uint256 internal spacer0;\n\n /**\n * @custom:legacy\n * @notice Spacer for backwards compatibility.\n */\n uint256 internal spacer1;\n\n /**\n * @notice Mapping that stores deposits for a given pair of local and remote tokens.\n */\n mapping(address => mapping(address => uint256)) public deposits;\n\n /**\n * @notice Emitted when an ETH bridge is initiated to the other chain.\n *\n * @param from Address of the sender.\n * @param to Address of the receiver.\n * @param amount Amount of ETH sent.\n * @param extraData Extra data sent with the transaction.\n */\n event ETHBridgeInitiated(\n address indexed from,\n address indexed to,\n uint256 amount,\n bytes extraData\n );\n\n /**\n * @notice Emitted when an ETH bridge is finalized on this chain.\n *\n * @param from Address of the sender.\n * @param to Address of the receiver.\n * @param amount Amount of ETH sent.\n * @param extraData Extra data sent with the transaction.\n */\n event ETHBridgeFinalized(\n address indexed from,\n address indexed to,\n uint256 amount,\n bytes extraData\n );\n\n /**\n * @notice Emitted when an ERC20 bridge is initiated to the other chain.\n *\n * @param localToken Address of the ERC20 on this chain.\n * @param remoteToken Address of the ERC20 on the remote chain.\n * @param from Address of the sender.\n * @param to Address of the receiver.\n * @param amount Amount of ETH sent.\n * @param extraData Extra data sent with the transaction.\n */\n event ERC20BridgeInitiated(\n address indexed localToken,\n address indexed remoteToken,\n address indexed from,\n address to,\n uint256 amount,\n bytes extraData\n );\n\n /**\n * @notice Emitted when an ERC20 bridge is finalized on this chain.\n *\n * @param localToken Address of the ERC20 on this chain.\n * @param remoteToken Address of the ERC20 on the remote chain.\n * @param from Address of the sender.\n * @param to Address of the receiver.\n * @param amount Amount of ETH sent.\n * @param extraData Extra data sent with the transaction.\n */\n event ERC20BridgeFinalized(\n address indexed localToken,\n address indexed remoteToken,\n address indexed from,\n address to,\n uint256 amount,\n bytes extraData\n );\n\n /**\n * @notice Emitted when an ERC20 bridge to this chain fails.\n *\n * @param localToken Address of the ERC20 on this chain.\n * @param remoteToken Address of the ERC20 on the remote chain.\n * @param from Address of the sender.\n * @param to Address of the receiver.\n * @param amount Amount of ETH sent.\n * @param extraData Extra data sent with the transaction.\n */\n event ERC20BridgeFailed(\n address indexed localToken,\n address indexed remoteToken,\n address indexed from,\n address to,\n uint256 amount,\n bytes extraData\n );\n\n /**\n * @notice Only allow EOAs to call the functions. Note that this is not safe against contracts\n * calling code within their constructors, but also doesn't really matter since we're\n * just trying to prevent users accidentally depositing with smart contract wallets.\n */\n modifier onlyEOA() {\n require(\n !Address.isContract(msg.sender),\n \"StandardBridge: function can only be called from an EOA\"\n );\n _;\n }\n\n /**\n * @notice Ensures that the caller is a cross-chain message from the other bridge.\n */\n modifier onlyOtherBridge() {\n require(\n msg.sender == address(messenger) &&\n messenger.xDomainMessageSender() == address(otherBridge),\n \"StandardBridge: function can only be called from the other bridge\"\n );\n _;\n }\n\n /**\n * @notice Ensures that the caller is this contract.\n */\n modifier onlySelf() {\n require(msg.sender == address(this), \"StandardBridge: function can only be called by self\");\n _;\n }\n\n /**\n * @param _messenger Address of CrossDomainMessenger on this network.\n * @param _otherBridge Address of the other StandardBridge contract.\n */\n constructor(address payable _messenger, address payable _otherBridge) {\n messenger = CrossDomainMessenger(_messenger);\n otherBridge = StandardBridge(_otherBridge);\n }\n\n /**\n * @notice Allows EOAs to deposit ETH by sending directly to the bridge.\n */\n receive() external payable onlyEOA {\n _initiateBridgeETH(msg.sender, msg.sender, msg.value, RECEIVE_DEFAULT_GAS_LIMIT, bytes(\"\"));\n }\n\n /**\n * @notice Sends ETH to the sender's address on the other chain.\n *\n * @param _minGasLimit Minimum amount of gas that the bridge can be relayed with.\n * @param _extraData Extra data to be sent with the transaction. Note that the recipient will\n * not be triggered with this data, but it will be emitted and can be used\n * to identify the transaction.\n */\n function bridgeETH(uint32 _minGasLimit, bytes calldata _extraData) public payable onlyEOA {\n _initiateBridgeETH(msg.sender, msg.sender, msg.value, _minGasLimit, _extraData);\n }\n\n /**\n * @notice Sends ETH to a receiver's address on the other chain. Note that if ETH is sent to a\n * smart contract and the call fails, the ETH will be temporarily locked in the\n * StandardBridge on the other chain until the call is replayed. If the call cannot be\n * replayed with any amount of gas (call always reverts), then the ETH will be\n * permanently locked in the StandardBridge on the other chain.\n *\n * @param _to Address of the receiver.\n * @param _minGasLimit Minimum amount of gas that the bridge can be relayed with.\n * @param _extraData Extra data to be sent with the transaction. Note that the recipient will\n * not be triggered with this data, but it will be emitted and can be used\n * to identify the transaction.\n */\n function bridgeETHTo(\n address _to,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) public payable {\n _initiateBridgeETH(msg.sender, _to, msg.value, _minGasLimit, _extraData);\n }\n\n /**\n * @notice Sends ERC20 tokens to the sender's address on the other chain. Note that if the\n * ERC20 token on the other chain does not recognize the local token as the correct\n * pair token, the ERC20 bridge will fail and the tokens will be returned to sender on\n * this chain.\n *\n * @param _localToken Address of the ERC20 on this chain.\n * @param _remoteToken Address of the corresponding token on the remote chain.\n * @param _amount Amount of local tokens to deposit.\n * @param _minGasLimit Minimum amount of gas that the bridge can be relayed with.\n * @param _extraData Extra data to be sent with the transaction. Note that the recipient will\n * not be triggered with this data, but it will be emitted and can be used\n * to identify the transaction.\n */\n function bridgeERC20(\n address _localToken,\n address _remoteToken,\n uint256 _amount,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) public virtual onlyEOA {\n _initiateBridgeERC20(\n _localToken,\n _remoteToken,\n msg.sender,\n msg.sender,\n _amount,\n _minGasLimit,\n _extraData\n );\n }\n\n /**\n * @notice Sends ERC20 tokens to a receiver's address on the other chain. Note that if the\n * ERC20 token on the other chain does not recognize the local token as the correct\n * pair token, the ERC20 bridge will fail and the tokens will be returned to sender on\n * this chain.\n *\n * @param _localToken Address of the ERC20 on this chain.\n * @param _remoteToken Address of the corresponding token on the remote chain.\n * @param _to Address of the receiver.\n * @param _amount Amount of local tokens to deposit.\n * @param _minGasLimit Minimum amount of gas that the bridge can be relayed with.\n * @param _extraData Extra data to be sent with the transaction. Note that the recipient will\n * not be triggered with this data, but it will be emitted and can be used\n * to identify the transaction.\n */\n function bridgeERC20To(\n address _localToken,\n address _remoteToken,\n address _to,\n uint256 _amount,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) public virtual {\n _initiateBridgeERC20(\n _localToken,\n _remoteToken,\n msg.sender,\n _to,\n _amount,\n _minGasLimit,\n _extraData\n );\n }\n\n /**\n * @notice Finalizes an ETH bridge on this chain. Can only be triggered by the other\n * StandardBridge contract on the remote chain.\n *\n * @param _from Address of the sender.\n * @param _to Address of the receiver.\n * @param _amount Amount of ETH being bridged.\n * @param _extraData Extra data to be sent with the transaction. Note that the recipient will\n * not be triggered with this data, but it will be emitted and can be used\n * to identify the transaction.\n */\n function finalizeBridgeETH(\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _extraData\n ) public payable onlyOtherBridge {\n require(msg.value == _amount, \"StandardBridge: amount sent does not match amount required\");\n require(_to != address(this), \"StandardBridge: cannot send to self\");\n\n emit ETHBridgeFinalized(_from, _to, _amount, _extraData);\n bool success = SafeCall.call(_to, gasleft(), _amount, hex\"\");\n require(success, \"StandardBridge: ETH transfer failed\");\n }\n\n /**\n * @notice Finalizes an ERC20 bridge on this chain. Can only be triggered by the other\n * StandardBridge contract on the remote chain.\n *\n *\n * @param _localToken Address of the ERC20 on this chain.\n * @param _remoteToken Address of the corresponding token on the remote chain.\n * @param _from Address of the sender.\n * @param _to Address of the receiver.\n * @param _amount Amount of ETH being bridged.\n * @param _extraData Extra data to be sent with the transaction. Note that the recipient will\n * not be triggered with this data, but it will be emitted and can be used\n * to identify the transaction.\n */\n function finalizeBridgeERC20(\n address _localToken,\n address _remoteToken,\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _extraData\n ) public onlyOtherBridge {\n try this.completeOutboundTransfer(_localToken, _remoteToken, _to, _amount) {\n emit ERC20BridgeFinalized(_localToken, _remoteToken, _from, _to, _amount, _extraData);\n } catch {\n // Something went wrong during the bridging process, return to sender.\n // Can happen if a bridge UI specifies the wrong L2 token.\n // We reverse the to and from addresses to make sure the tokens are returned to the\n // sender on the other chain and preserve the accuracy of accounting based on emitted\n // events.\n _initiateBridgeERC20Unchecked(\n _localToken,\n _remoteToken,\n _to,\n _from,\n _amount,\n 0, // _minGasLimit, 0 is fine here\n _extraData\n );\n emit ERC20BridgeFailed(_localToken, _remoteToken, _from, _to, _amount, _extraData);\n }\n }\n\n /**\n * @notice Completes an outbound token transfer. Public function, but can only be called by\n * this contract. It's security critical that there be absolutely no way for anyone to\n * trigger this function, except by explicit trigger within this contract. Used as a\n * simple way to be able to try/catch any type of revert that could occur during an\n * ERC20 mint/transfer.\n *\n * @param _localToken Address of the ERC20 on this chain.\n * @param _remoteToken Address of the corresponding token on the remote chain.\n * @param _to Address of the receiver.\n * @param _amount Amount of ETH being bridged.\n */\n function completeOutboundTransfer(\n address _localToken,\n address _remoteToken,\n address _to,\n uint256 _amount\n ) public onlySelf {\n // Make sure external function calls can't be used to trigger calls to\n // completeOutboundTransfer. We only make external (write) calls to _localToken.\n require(_localToken != address(this), \"StandardBridge: local token cannot be self\");\n\n if (_isOptimismMintableERC20(_localToken)) {\n require(\n _isCorrectTokenPair(_localToken, _remoteToken),\n \"StandardBridge: wrong remote token for Optimism Mintable ERC20 local token\"\n );\n\n OptimismMintableERC20(_localToken).mint(_to, _amount);\n } else {\n deposits[_localToken][_remoteToken] = deposits[_localToken][_remoteToken] - _amount;\n IERC20(_localToken).safeTransfer(_to, _amount);\n }\n }\n\n /**\n * @notice Initiates a bridge of ETH through the CrossDomainMessenger.\n *\n * @param _from Address of the sender.\n * @param _to Address of the receiver.\n * @param _amount Amount of ETH being bridged.\n * @param _minGasLimit Minimum amount of gas that the bridge can be relayed with.\n * @param _extraData Extra data to be sent with the transaction. Note that the recipient will\n * not be triggered with this data, but it will be emitted and can be used\n * to identify the transaction.\n */\n function _initiateBridgeETH(\n address _from,\n address _to,\n uint256 _amount,\n uint32 _minGasLimit,\n bytes memory _extraData\n ) internal {\n emit ETHBridgeInitiated(_from, _to, _amount, _extraData);\n\n messenger.sendMessage{ value: _amount }(\n address(otherBridge),\n abi.encodeWithSelector(\n this.finalizeBridgeETH.selector,\n _from,\n _to,\n _amount,\n _extraData\n ),\n _minGasLimit\n );\n }\n\n /**\n * @notice Sends ERC20 tokens to a receiver's address on the other chain.\n *\n * @param _localToken Address of the ERC20 on this chain.\n * @param _remoteToken Address of the corresponding token on the remote chain.\n * @param _to Address of the receiver.\n * @param _amount Amount of local tokens to deposit.\n * @param _minGasLimit Minimum amount of gas that the bridge can be relayed with.\n * @param _extraData Extra data to be sent with the transaction. Note that the recipient will\n * not be triggered with this data, but it will be emitted and can be used\n * to identify the transaction.\n */\n function _initiateBridgeERC20(\n address _localToken,\n address _remoteToken,\n address _from,\n address _to,\n uint256 _amount,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) internal {\n // Make sure external function calls can't be used to trigger calls to\n // completeOutboundTransfer. We only make external (write) calls to _localToken.\n require(_localToken != address(this), \"StandardBridge: local token cannot be self\");\n\n if (_isOptimismMintableERC20(_localToken)) {\n require(\n _isCorrectTokenPair(_localToken, _remoteToken),\n \"StandardBridge: wrong remote token for Optimism Mintable ERC20 local token\"\n );\n\n OptimismMintableERC20(_localToken).burn(_from, _amount);\n } else {\n IERC20(_localToken).safeTransferFrom(_from, address(this), _amount);\n deposits[_localToken][_remoteToken] = deposits[_localToken][_remoteToken] + _amount;\n }\n\n _initiateBridgeERC20Unchecked(\n _localToken,\n _remoteToken,\n _from,\n _to,\n _amount,\n _minGasLimit,\n _extraData\n );\n }\n\n /**\n * @notice Sends ERC20 tokens to a receiver's address on the other chain WITHOUT doing any\n * validation. Be EXTREMELY careful when using this function.\n *\n * @param _localToken Address of the ERC20 on this chain.\n * @param _remoteToken Address of the corresponding token on the remote chain.\n * @param _to Address of the receiver.\n * @param _amount Amount of local tokens to deposit.\n * @param _minGasLimit Minimum amount of gas that the bridge can be relayed with.\n * @param _extraData Extra data to be sent with the transaction. Note that the recipient will\n * not be triggered with this data, but it will be emitted and can be used\n * to identify the transaction.\n */\n function _initiateBridgeERC20Unchecked(\n address _localToken,\n address _remoteToken,\n address _from,\n address _to,\n uint256 _amount,\n uint32 _minGasLimit,\n bytes calldata _extraData\n ) internal {\n messenger.sendMessage(\n address(otherBridge),\n abi.encodeWithSelector(\n this.finalizeBridgeERC20.selector,\n // Because this call will be executed on the remote chain, we reverse the order of\n // the remote and local token addresses relative to their order in the\n // finalizeBridgeERC20 function.\n _remoteToken,\n _localToken,\n _from,\n _to,\n _amount,\n _extraData\n ),\n _minGasLimit\n );\n\n emit ERC20BridgeInitiated(_localToken, _remoteToken, _from, _to, _amount, _extraData);\n }\n\n /**\n * @notice Checks if a given address is an OptimismMintableERC20. Not perfect, but good enough.\n * Just the way we like it.\n *\n * @param _token Address of the token to check.\n *\n * @return True if the token is an OptimismMintableERC20.\n */\n function _isOptimismMintableERC20(address _token) internal view returns (bool) {\n return ERC165Checker.supportsInterface(_token, type(IL1Token).interfaceId);\n }\n\n /**\n * @notice Checks if the \"other token\" is the correct pair token for the OptimismMintableERC20.\n *\n * @param _mintableToken OptimismMintableERC20 to check against.\n * @param _otherToken Pair token to check.\n *\n * @return True if the other token is the correct pair token for the OptimismMintableERC20.\n */\n function _isCorrectTokenPair(address _mintableToken, address _otherToken)\n internal\n view\n returns (bool)\n {\n return _otherToken == OptimismMintableERC20(_mintableToken).l1Token();\n }\n}\n" }, "contracts/universal/SupportedInterfaces.sol": { "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n// Import this here to make it available just by importing this file\nimport { IERC165 } from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\n\ninterface IRemoteToken {\n function mint(address _to, uint256 _amount) external;\n\n function burn(address _from, uint256 _amount) external;\n\n function remoteToken() external;\n}\n\ninterface IL1Token {\n function mint(address _to, uint256 _amount) external;\n\n function burn(address _from, uint256 _amount) external;\n\n function l1Token() external;\n}\n" @@ -187,39 +193,18 @@ "contracts/vendor/AddressAliasHelper.sol": { "content": "// SPDX-License-Identifier: Apache-2.0\n\n/*\n * Copyright 2019-2021, Offchain Labs, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity ^0.8.0;\n\nlibrary AddressAliasHelper {\n uint160 constant offset = uint160(0x1111000000000000000000000000000000001111);\n\n /// @notice Utility function that converts the address in the L1 that submitted a tx to\n /// the inbox to the msg.sender viewed in the L2\n /// @param l1Address the address in the L1 that triggered the tx to L2\n /// @return l2Address L2 address as viewed in msg.sender\n function applyL1ToL2Alias(address l1Address) internal pure returns (address l2Address) {\n unchecked {\n l2Address = address(uint160(l1Address) + offset);\n }\n }\n\n /// @notice Utility function that converts the msg.sender viewed in the L2 to the\n /// address in the L1 that submitted a tx to the inbox\n /// @param l2Address L2 address as viewed in msg.sender\n /// @return l1Address the address in the L1 that triggered the tx to L2\n function undoL1ToL2Alias(address l2Address) internal pure returns (address l1Address) {\n unchecked {\n l1Address = address(uint160(l2Address) - offset);\n }\n }\n}\n" }, - "node_modules/@openzeppelin/contracts/access/Ownable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" - }, - "node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\n * overridden;\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n }\n _balances[to] += amount;\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n _balances[account] += amount;\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _totalSupply -= amount;\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" - }, - "node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n}\n" - }, - "node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" - }, "node_modules/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n function safeTransfer(\n IERC20 token,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n uint256 newAllowance = token.allowance(address(this), spender) + value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n uint256 newAllowance = oldAllowance - value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n if (returndata.length > 0) {\n // Return data is optional\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n" + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/draft-IERC20Permit.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n function safeTransfer(\n IERC20 token,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n uint256 newAllowance = token.allowance(address(this), spender) + value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n uint256 newAllowance = oldAllowance - value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n }\n\n function safePermit(\n IERC20Permit token,\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n uint256 nonceBefore = token.nonces(owner);\n token.permit(owner, spender, value, deadline, v, r, s);\n uint256 nonceAfter = token.nonces(owner);\n require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n if (returndata.length > 0) {\n // Return data is optional\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n" }, "node_modules/@openzeppelin/contracts/utils/Address.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n" - }, - "node_modules/@openzeppelin/contracts/utils/Context.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" - }, - "node_modules/@openzeppelin/contracts/utils/Strings.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n" }, "node_modules/@openzeppelin/contracts/utils/introspection/ERC165Checker.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Checker.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Library used to query support of an interface declared via {IERC165}.\n *\n * Note that these functions return the actual result of the query: they do not\n * `revert` if an interface is not supported. It is up to the caller to decide\n * what to do in these cases.\n */\nlibrary ERC165Checker {\n // As per the EIP-165 spec, no interface should ever match 0xffffffff\n bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;\n\n /**\n * @dev Returns true if `account` supports the {IERC165} interface,\n */\n function supportsERC165(address account) internal view returns (bool) {\n // Any contract that implements ERC165 must explicitly indicate support of\n // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid\n return\n _supportsERC165Interface(account, type(IERC165).interfaceId) &&\n !_supportsERC165Interface(account, _INTERFACE_ID_INVALID);\n }\n\n /**\n * @dev Returns true if `account` supports the interface defined by\n * `interfaceId`. Support for {IERC165} itself is queried automatically.\n *\n * See {IERC165-supportsInterface}.\n */\n function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {\n // query support of both ERC165 as per the spec and support of _interfaceId\n return supportsERC165(account) && _supportsERC165Interface(account, interfaceId);\n }\n\n /**\n * @dev Returns a boolean array where each value corresponds to the\n * interfaces passed in and whether they're supported or not. This allows\n * you to batch check interfaces for a contract where your expectation\n * is that some interfaces may not be supported.\n *\n * See {IERC165-supportsInterface}.\n *\n * _Available since v3.4._\n */\n function getSupportedInterfaces(address account, bytes4[] memory interfaceIds)\n internal\n view\n returns (bool[] memory)\n {\n // an array of booleans corresponding to interfaceIds and whether they're supported or not\n bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);\n\n // query support of ERC165 itself\n if (supportsERC165(account)) {\n // query support of each interface in interfaceIds\n for (uint256 i = 0; i < interfaceIds.length; i++) {\n interfaceIdsSupported[i] = _supportsERC165Interface(account, interfaceIds[i]);\n }\n }\n\n return interfaceIdsSupported;\n }\n\n /**\n * @dev Returns true if `account` supports all the interfaces defined in\n * `interfaceIds`. Support for {IERC165} itself is queried automatically.\n *\n * Batch-querying can lead to gas savings by skipping repeated checks for\n * {IERC165} support.\n *\n * See {IERC165-supportsInterface}.\n */\n function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {\n // query support of ERC165 itself\n if (!supportsERC165(account)) {\n return false;\n }\n\n // query support of each interface in _interfaceIds\n for (uint256 i = 0; i < interfaceIds.length; i++) {\n if (!_supportsERC165Interface(account, interfaceIds[i])) {\n return false;\n }\n }\n\n // all interfaces supported\n return true;\n }\n\n /**\n * @notice Query if a contract implements an interface, does not check ERC165 support\n * @param account The address of the contract to query for support of an interface\n * @param interfaceId The interface identifier, as specified in ERC-165\n * @return true if the contract at account indicates support of the interface with\n * identifier interfaceId, false otherwise\n * @dev Assumes that account contains a contract that supports ERC165, otherwise\n * the behavior of this method is undefined. This precondition can be checked\n * with {supportsERC165}.\n * Interface identification is specified in ERC-165.\n */\n function _supportsERC165Interface(address account, bytes4 interfaceId) private view returns (bool) {\n bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId);\n (bool success, bytes memory result) = account.staticcall{gas: 30000}(encodedParams);\n if (result.length < 32) return false;\n return success && abi.decode(result, (bool));\n }\n}\n" + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.2) (utils/introspection/ERC165Checker.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Library used to query support of an interface declared via {IERC165}.\n *\n * Note that these functions return the actual result of the query: they do not\n * `revert` if an interface is not supported. It is up to the caller to decide\n * what to do in these cases.\n */\nlibrary ERC165Checker {\n // As per the EIP-165 spec, no interface should ever match 0xffffffff\n bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;\n\n /**\n * @dev Returns true if `account` supports the {IERC165} interface,\n */\n function supportsERC165(address account) internal view returns (bool) {\n // Any contract that implements ERC165 must explicitly indicate support of\n // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid\n return\n _supportsERC165Interface(account, type(IERC165).interfaceId) &&\n !_supportsERC165Interface(account, _INTERFACE_ID_INVALID);\n }\n\n /**\n * @dev Returns true if `account` supports the interface defined by\n * `interfaceId`. Support for {IERC165} itself is queried automatically.\n *\n * See {IERC165-supportsInterface}.\n */\n function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {\n // query support of both ERC165 as per the spec and support of _interfaceId\n return supportsERC165(account) && _supportsERC165Interface(account, interfaceId);\n }\n\n /**\n * @dev Returns a boolean array where each value corresponds to the\n * interfaces passed in and whether they're supported or not. This allows\n * you to batch check interfaces for a contract where your expectation\n * is that some interfaces may not be supported.\n *\n * See {IERC165-supportsInterface}.\n *\n * _Available since v3.4._\n */\n function getSupportedInterfaces(address account, bytes4[] memory interfaceIds)\n internal\n view\n returns (bool[] memory)\n {\n // an array of booleans corresponding to interfaceIds and whether they're supported or not\n bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);\n\n // query support of ERC165 itself\n if (supportsERC165(account)) {\n // query support of each interface in interfaceIds\n for (uint256 i = 0; i < interfaceIds.length; i++) {\n interfaceIdsSupported[i] = _supportsERC165Interface(account, interfaceIds[i]);\n }\n }\n\n return interfaceIdsSupported;\n }\n\n /**\n * @dev Returns true if `account` supports all the interfaces defined in\n * `interfaceIds`. Support for {IERC165} itself is queried automatically.\n *\n * Batch-querying can lead to gas savings by skipping repeated checks for\n * {IERC165} support.\n *\n * See {IERC165-supportsInterface}.\n */\n function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {\n // query support of ERC165 itself\n if (!supportsERC165(account)) {\n return false;\n }\n\n // query support of each interface in _interfaceIds\n for (uint256 i = 0; i < interfaceIds.length; i++) {\n if (!_supportsERC165Interface(account, interfaceIds[i])) {\n return false;\n }\n }\n\n // all interfaces supported\n return true;\n }\n\n /**\n * @notice Query if a contract implements an interface, does not check ERC165 support\n * @param account The address of the contract to query for support of an interface\n * @param interfaceId The interface identifier, as specified in ERC-165\n * @return true if the contract at account indicates support of the interface with\n * identifier interfaceId, false otherwise\n * @dev Assumes that account contains a contract that supports ERC165, otherwise\n * the behavior of this method is undefined. This precondition can be checked\n * with {supportsERC165}.\n * Interface identification is specified in ERC-165.\n */\n function _supportsERC165Interface(address account, bytes4 interfaceId) private view returns (bool) {\n // prepare call\n bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId);\n\n // perform static call\n bool success;\n uint256 returnSize;\n uint256 returnValue;\n assembly {\n success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20)\n returnSize := returndatasize()\n returnValue := mload(0x00)\n }\n\n return success && returnSize >= 0x20 && returnValue > 0;\n }\n}\n" }, "node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol": { "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" }, - "node_modules/@openzeppelin/contracts/utils/math/Math.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a / b + (a % b == 0 ? 0 : 1);\n }\n}\n" - }, "node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol": { "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a >= b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" }, @@ -253,9 +238,6 @@ "node_modules/ds-test/src/test.sol": { "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.5.0;\n\ncontract DSTest {\n event log (string);\n event logs (bytes);\n\n event log_address (address);\n event log_bytes32 (bytes32);\n event log_int (int);\n event log_uint (uint);\n event log_bytes (bytes);\n event log_string (string);\n\n event log_named_address (string key, address val);\n event log_named_bytes32 (string key, bytes32 val);\n event log_named_decimal_int (string key, int val, uint decimals);\n event log_named_decimal_uint (string key, uint val, uint decimals);\n event log_named_int (string key, int val);\n event log_named_uint (string key, uint val);\n event log_named_bytes (string key, bytes val);\n event log_named_string (string key, string val);\n\n bool public IS_TEST = true;\n bool private _failed;\n\n address constant HEVM_ADDRESS =\n address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n modifier mayRevert() { _; }\n modifier testopts(string memory) { _; }\n\n function failed() public returns (bool) {\n if (_failed) {\n return _failed;\n } else {\n bool globalFailed = false;\n if (hasHEVMContext()) {\n (, bytes memory retdata) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"load(address,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"))\n )\n );\n globalFailed = abi.decode(retdata, (bool));\n }\n return globalFailed;\n }\n } \n\n function fail() internal {\n if (hasHEVMContext()) {\n (bool status, ) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"store(address,bytes32,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"), bytes32(uint256(0x01)))\n )\n );\n status; // Silence compiler warnings\n }\n _failed = true;\n }\n\n function hasHEVMContext() internal view returns (bool) {\n uint256 hevmCodeSize = 0;\n assembly {\n hevmCodeSize := extcodesize(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D)\n }\n return hevmCodeSize > 0;\n }\n\n modifier logs_gas() {\n uint startGas = gasleft();\n _;\n uint endGas = gasleft();\n emit log_named_uint(\"gas\", startGas - endGas);\n }\n\n function assertTrue(bool condition) internal {\n if (!condition) {\n emit log(\"Error: Assertion Failed\");\n fail();\n }\n }\n\n function assertTrue(bool condition, string memory err) internal {\n if (!condition) {\n emit log_named_string(\"Error\", err);\n assertTrue(condition);\n }\n }\n\n function assertEq(address a, address b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [address]\");\n emit log_named_address(\" Expected\", b);\n emit log_named_address(\" Actual\", a);\n fail();\n }\n }\n function assertEq(address a, address b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes32 a, bytes32 b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Expected\", b);\n emit log_named_bytes32(\" Actual\", a);\n fail();\n }\n }\n function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq32(bytes32 a, bytes32 b) internal {\n assertEq(a, b);\n }\n function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertEq(a, b, err);\n }\n\n function assertEq(int a, int b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [int]\");\n emit log_named_int(\" Expected\", b);\n emit log_named_int(\" Actual\", a);\n fail();\n }\n }\n function assertEq(int a, int b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq(uint a, uint b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [uint]\");\n emit log_named_uint(\" Expected\", b);\n emit log_named_uint(\" Actual\", a);\n fail();\n }\n }\n function assertEq(uint a, uint b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEqDecimal(int a, int b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Expected\", b, decimals);\n emit log_named_decimal_int(\" Actual\", a, decimals);\n fail();\n }\n }\n function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Expected\", b, decimals);\n emit log_named_decimal_uint(\" Actual\", a, decimals);\n fail();\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n\n function assertGt(uint a, uint b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGt(uint a, uint b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGt(int a, int b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGt(int a, int b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGtDecimal(int a, int b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n\n function assertGe(uint a, uint b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGe(uint a, uint b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGe(int a, int b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGe(int a, int b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGeDecimal(int a, int b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n\n function assertLt(uint a, uint b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLt(uint a, uint b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLt(int a, int b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLt(int a, int b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLtDecimal(int a, int b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n\n function assertLe(uint a, uint b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLe(uint a, uint b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLe(int a, int b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLe(int a, int b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLeDecimal(int a, int b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n\n function assertEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a == b not satisfied [string]\");\n emit log_named_string(\" Expected\", b);\n emit log_named_string(\" Actual\", a);\n fail();\n }\n }\n function assertEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n ok = true;\n if (a.length == b.length) {\n for (uint i = 0; i < a.length; i++) {\n if (a[i] != b[i]) {\n ok = false;\n }\n }\n } else {\n ok = false;\n }\n }\n function assertEq0(bytes memory a, bytes memory b) internal {\n if (!checkEq0(a, b)) {\n emit log(\"Error: a == b not satisfied [bytes]\");\n emit log_named_bytes(\" Expected\", b);\n emit log_named_bytes(\" Actual\", a);\n fail();\n }\n }\n function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (!checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertEq0(a, b);\n }\n }\n}\n" }, - "node_modules/excessively-safe-call/src/ExcessivelySafeCall.sol": { - "content": "// SPDX-License-Identifier: MIT OR Apache-2.0\npragma solidity >=0.7.6;\n\nlibrary ExcessivelySafeCall {\n uint256 constant LOW_28_MASK =\n 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff;\n\n /// @notice Use when you _really_ really _really_ don't trust the called\n /// contract. This prevents the called contract from causing reversion of\n /// the caller in as many ways as we can.\n /// @dev The main difference between this and a solidity low-level call is\n /// that we limit the number of bytes that the callee can cause to be\n /// copied to caller memory. This prevents stupid things like malicious\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\n /// to memory.\n /// @param _target The address to call\n /// @param _gas The amount of gas to forward to the remote contract\n /// @param _value The value in wei to send to the remote contract\n /// @param _maxCopy The maximum number of bytes of returndata to copy\n /// to memory.\n /// @param _calldata The data to send to the remote contract\n /// @return success and returndata, as `.call()`. Returndata is capped to\n /// `_maxCopy` bytes.\n function excessivelySafeCall(\n address _target,\n uint256 _gas,\n uint256 _value,\n uint16 _maxCopy,\n bytes memory _calldata\n ) internal returns (bool, bytes memory) {\n // set up for assembly call\n uint256 _toCopy;\n bool _success;\n bytes memory _returnData = new bytes(_maxCopy);\n // dispatch message to recipient\n // by assembly calling \"handle\" function\n // we call via assembly to avoid memcopying a very large returndata\n // returned by a malicious contract\n assembly {\n _success := call(\n _gas, // gas\n _target, // recipient\n _value, // ether value\n add(_calldata, 0x20), // inloc\n mload(_calldata), // inlen\n 0, // outloc\n 0 // outlen\n )\n // limit our copy to 256 bytes\n _toCopy := returndatasize()\n if gt(_toCopy, _maxCopy) {\n _toCopy := _maxCopy\n }\n // Store the length of the copied bytes\n mstore(_returnData, _toCopy)\n // copy the bytes from returndata[0:_toCopy]\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\n }\n return (_success, _returnData);\n }\n\n /// @notice Use when you _really_ really _really_ don't trust the called\n /// contract. This prevents the called contract from causing reversion of\n /// the caller in as many ways as we can.\n /// @dev The main difference between this and a solidity low-level call is\n /// that we limit the number of bytes that the callee can cause to be\n /// copied to caller memory. This prevents stupid things like malicious\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\n /// to memory.\n /// @param _target The address to call\n /// @param _gas The amount of gas to forward to the remote contract\n /// @param _maxCopy The maximum number of bytes of returndata to copy\n /// to memory.\n /// @param _calldata The data to send to the remote contract\n /// @return success and returndata, as `.call()`. Returndata is capped to\n /// `_maxCopy` bytes.\n function excessivelySafeStaticCall(\n address _target,\n uint256 _gas,\n uint16 _maxCopy,\n bytes memory _calldata\n ) internal view returns (bool, bytes memory) {\n // set up for assembly call\n uint256 _toCopy;\n bool _success;\n bytes memory _returnData = new bytes(_maxCopy);\n // dispatch message to recipient\n // by assembly calling \"handle\" function\n // we call via assembly to avoid memcopying a very large returndata\n // returned by a malicious contract\n assembly {\n _success := staticcall(\n _gas, // gas\n _target, // recipient\n add(_calldata, 0x20), // inloc\n mload(_calldata), // inlen\n 0, // outloc\n 0 // outlen\n )\n // limit our copy to 256 bytes\n _toCopy := returndatasize()\n if gt(_toCopy, _maxCopy) {\n _toCopy := _maxCopy\n }\n // Store the length of the copied bytes\n mstore(_returnData, _toCopy)\n // copy the bytes from returndata[0:_toCopy]\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\n }\n return (_success, _returnData);\n }\n\n /**\n * @notice Swaps function selectors in encoded contract calls\n * @dev Allows reuse of encoded calldata for functions with identical\n * argument types but different names. It simply swaps out the first 4 bytes\n * for the new selector. This function modifies memory in place, and should\n * only be used with caution.\n * @param _newSelector The new 4-byte selector\n * @param _buf The encoded contract args\n */\n function swapSelector(bytes4 _newSelector, bytes memory _buf)\n internal\n pure\n {\n require(_buf.length >= 4);\n uint256 _mask = LOW_28_MASK;\n assembly {\n // load the first word of\n let _word := mload(add(_buf, 0x20))\n // mask out the top 4 bytes\n // /x\n _word := and(_word, _mask)\n _word := or(_newSelector, _word)\n mstore(add(_buf, 0x20), _word)\n }\n }\n}\n" - }, "node_modules/forge-std/src/Script.sol": { "content": "// SPDX-License-Identifier: Unlicense\npragma solidity >=0.6.0 <0.9.0;\n\nimport \"./Vm.sol\";\nimport \"./console.sol\";\nimport \"./console2.sol\";\n\nabstract contract Script {\n bool public IS_SCRIPT = true;\n address constant private VM_ADDRESS =\n address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n Vm public constant vm = Vm(VM_ADDRESS);\n\n /// @dev Compute the address a contract will be deployed at for a given deployer address and nonce\n /// @notice adapated from Solmate implementation (https://github.com/Rari-Capital/solmate/blob/main/src/utils/LibRLP.sol)\n function computeCreateAddress(address deployer, uint256 nonce) internal pure returns (address) {\n // The integer zero is treated as an empty byte string, and as a result it only has a length prefix, 0x80, computed via 0x80 + 0.\n // A one byte integer uses its own value as its length prefix, there is no additional \"0x80 + length\" prefix that comes before it.\n if (nonce == 0x00) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, bytes1(0x80))));\n if (nonce <= 0x7f) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, uint8(nonce))));\n\n // Nonces greater than 1 byte all follow a consistent encoding scheme, where each value is preceded by a prefix of 0x80 + length.\n if (nonce <= 2**8 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd7), bytes1(0x94), deployer, bytes1(0x81), uint8(nonce))));\n if (nonce <= 2**16 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd8), bytes1(0x94), deployer, bytes1(0x82), uint16(nonce))));\n if (nonce <= 2**24 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd9), bytes1(0x94), deployer, bytes1(0x83), uint24(nonce))));\n\n // More details about RLP encoding can be found here: https://eth.wiki/fundamentals/rlp\n // 0xda = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x84 ++ nonce)\n // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)\n // 0x84 = 0x80 + 0x04 (0x04 = the bytes length of the nonce, 4 bytes, in hex)\n // We assume nobody can have a nonce large enough to require more than 32 bytes.\n return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xda), bytes1(0x94), deployer, bytes1(0x84), uint32(nonce))));\n }\n\n function addressFromLast20Bytes(bytes32 bytesValue) internal pure returns (address) {\n return address(uint160(uint256(bytesValue)));\n }\n}\n" }, @@ -281,7 +263,6 @@ "@rari-capital/=node_modules/@rari-capital/", "@rari-capital/solmate/=node_modules/@rari-capital/solmate/", "ds-test/=node_modules/ds-test/src/", - "excessively-safe-call/=node_modules/excessively-safe-call/", "forge-std/=node_modules/forge-std/src/", "contracts/=contracts/" ], diff --git a/packages/contracts-bedrock/deployments/goerli/L1StandardBridge.json b/packages/contracts-bedrock/deployments/goerli/L1StandardBridge.json deleted file mode 100644 index 722a0da5df038..0000000000000 --- a/packages/contracts-bedrock/deployments/goerli/L1StandardBridge.json +++ /dev/null @@ -1,1200 +0,0 @@ -{ - "address": "0x5A5b074921BeEA087fF5a0B98457F57501267dc7", - "abi": [ - { - "inputs": [ - { - "internalType": "address payable", - "name": "_messenger", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "localToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "remoteToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "name": "ERC20BridgeFailed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "localToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "remoteToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "name": "ERC20BridgeFinalized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "localToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "remoteToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "name": "ERC20BridgeInitiated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "l1Token", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "l2Token", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "name": "ERC20DepositInitiated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "l1Token", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "l2Token", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "name": "ERC20WithdrawalFinalized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "name": "ETHBridgeFinalized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "name": "ETHBridgeInitiated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "name": "ETHDepositInitiated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "name": "ETHWithdrawalFinalized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_localToken", - "type": "address" - }, - { - "internalType": "address", - "name": "_remoteToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "_minGasLimit", - "type": "uint32" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "bridgeERC20", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_localToken", - "type": "address" - }, - { - "internalType": "address", - "name": "_remoteToken", - "type": "address" - }, - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "_minGasLimit", - "type": "uint32" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "bridgeERC20To", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "_minGasLimit", - "type": "uint32" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "bridgeETH", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint32", - "name": "_minGasLimit", - "type": "uint32" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "bridgeETHTo", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_localToken", - "type": "address" - }, - { - "internalType": "address", - "name": "_remoteToken", - "type": "address" - }, - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "completeOutboundTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_l1Token", - "type": "address" - }, - { - "internalType": "address", - "name": "_l2Token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "_minGasLimit", - "type": "uint32" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "depositERC20", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_l1Token", - "type": "address" - }, - { - "internalType": "address", - "name": "_l2Token", - "type": "address" - }, - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "_minGasLimit", - "type": "uint32" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "depositERC20To", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "_minGasLimit", - "type": "uint32" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "depositETH", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint32", - "name": "_minGasLimit", - "type": "uint32" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "depositETHTo", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "deposits", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_localToken", - "type": "address" - }, - { - "internalType": "address", - "name": "_remoteToken", - "type": "address" - }, - { - "internalType": "address", - "name": "_from", - "type": "address" - }, - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "finalizeBridgeERC20", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_from", - "type": "address" - }, - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "finalizeBridgeETH", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_l1Token", - "type": "address" - }, - { - "internalType": "address", - "name": "_l2Token", - "type": "address" - }, - { - "internalType": "address", - "name": "_from", - "type": "address" - }, - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "finalizeERC20Withdrawal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_from", - "type": "address" - }, - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "finalizeETHWithdrawal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_messenger", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "l2TokenBridge", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "messenger", - "outputs": [ - { - "internalType": "contract CrossDomainMessenger", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "otherBridge", - "outputs": [ - { - "internalType": "contract StandardBridge", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xdc55b22d09c669ef9838fd8f6a34601d4651e5c07b11d7ed8ba071e6dc62a2a8", - "receipt": { - "to": null, - "from": "0xCFf7a9856DB3C60AB546b8F43dC5D1A4336786A0", - "contractAddress": "0x5A5b074921BeEA087fF5a0B98457F57501267dc7", - "transactionIndex": 1, - "gasUsed": "2794455", - "logsBloom": "0x00000000000000000000000000000000000000000000400000000000000000000000000040000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x71c626aaad2b708fa305b05828b60f4df4813e6a3a71cee131d1d917bc234ed3", - "transactionHash": "0xdc55b22d09c669ef9838fd8f6a34601d4651e5c07b11d7ed8ba071e6dc62a2a8", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 7355253, - "transactionHash": "0xdc55b22d09c669ef9838fd8f6a34601d4651e5c07b11d7ed8ba071e6dc62a2a8", - "address": "0x5A5b074921BeEA087fF5a0B98457F57501267dc7", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 2, - "blockHash": "0x71c626aaad2b708fa305b05828b60f4df4813e6a3a71cee131d1d917bc234ed3" - } - ], - "blockNumber": 7355253, - "cumulativeGasUsed": "5726713", - "status": 1, - "byzantium": true - }, - "args": [ - "0x01023027D890148a873140f1E0628f3CD83f41f8" - ], - "numDeployments": 1, - "solcInputHash": "cd42cb04f3b6a78e5824c9f427d0a55d", - "metadata": "{\"compiler\":{\"version\":\"0.8.15+commit.e14f2714\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_messenger\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20BridgeFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20BridgeFinalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20BridgeInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20DepositInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ERC20WithdrawalFinalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ETHBridgeFinalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ETHBridgeInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ETHDepositInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"ETHWithdrawalFinalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_localToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"bridgeERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_localToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"bridgeERC20To\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"bridgeETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"bridgeETHTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_localToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"completeOutboundTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"depositERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"depositERC20To\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"depositETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_minGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"depositETHTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"deposits\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_localToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"finalizeBridgeERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"finalizeBridgeETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"finalizeERC20Withdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"finalizeETHWithdrawal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_messenger\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2TokenBridge\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"contract CrossDomainMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"otherBridge\",\"outputs\":[{\"internalType\":\"contract StandardBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"custom:proxied\":\"@title L1StandardBridge\",\"events\":{\"ERC20DepositInitiated(address,address,address,address,uint256,bytes)\":{\"custom:legacy\":\"@notice Emitted whenever an ERC20 deposit is initiated.\",\"params\":{\"amount\":\"Amount of the ERC20 deposited.\",\"extraData\":\"Extra data attached to the deposit.\",\"from\":\"Address of the depositor.\",\"l1Token\":\"Address of the token on L1.\",\"l2Token\":\"Address of the corresponding token on L2.\",\"to\":\"Address of the recipient on L2.\"}},\"ERC20WithdrawalFinalized(address,address,address,address,uint256,bytes)\":{\"custom:legacy\":\"@notice Emitted whenever an ERC20 withdrawal is finalized.\",\"params\":{\"amount\":\"Amount of the ERC20 withdrawn.\",\"extraData\":\"Extra data attached to the withdrawal.\",\"from\":\"Address of the withdrawer.\",\"l1Token\":\"Address of the token on L1.\",\"l2Token\":\"Address of the corresponding token on L2.\",\"to\":\"Address of the recipient on L1.\"}},\"ETHDepositInitiated(address,address,uint256,bytes)\":{\"custom:legacy\":\"@notice Emitted whenever a deposit of ETH from L1 into L2 is initiated.\",\"params\":{\"amount\":\"Amount of ETH deposited.\",\"extraData\":\"Extra data attached to the deposit.\",\"from\":\"Address of the depositor.\",\"to\":\"Address of the recipient on L2.\"}},\"ETHWithdrawalFinalized(address,address,uint256,bytes)\":{\"custom:legacy\":\"@notice Emitted whenever a withdrawal of ETH from L2 to L1 is finalized.\",\"params\":{\"amount\":\"Amount of ETH withdrawn.\",\"extraData\":\"Extra data attached to the withdrawal.\",\"from\":\"Address of the withdrawer.\",\"to\":\"Address of the recipient on L1.\"}}},\"kind\":\"dev\",\"methods\":{\"bridgeERC20(address,address,uint256,uint32,bytes)\":{\"params\":{\"_amount\":\"Amount of local tokens to deposit.\",\"_extraData\":\"Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.\",\"_localToken\":\"Address of the ERC20 on this chain.\",\"_minGasLimit\":\"Minimum amount of gas that the bridge can be relayed with.\",\"_remoteToken\":\"Address of the corresponding token on the remote chain.\"}},\"bridgeERC20To(address,address,address,uint256,uint32,bytes)\":{\"params\":{\"_amount\":\"Amount of local tokens to deposit.\",\"_extraData\":\"Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.\",\"_localToken\":\"Address of the ERC20 on this chain.\",\"_minGasLimit\":\"Minimum amount of gas that the bridge can be relayed with.\",\"_remoteToken\":\"Address of the corresponding token on the remote chain.\",\"_to\":\"Address of the receiver.\"}},\"bridgeETH(uint32,bytes)\":{\"params\":{\"_extraData\":\"Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.\",\"_minGasLimit\":\"Minimum amount of gas that the bridge can be relayed with.\"}},\"bridgeETHTo(address,uint32,bytes)\":{\"params\":{\"_extraData\":\"Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.\",\"_minGasLimit\":\"Minimum amount of gas that the bridge can be relayed with.\",\"_to\":\"Address of the receiver.\"}},\"completeOutboundTransfer(address,address,address,uint256)\":{\"params\":{\"_amount\":\"Amount of ETH being bridged.\",\"_localToken\":\"Address of the ERC20 on this chain.\",\"_remoteToken\":\"Address of the corresponding token on the remote chain.\",\"_to\":\"Address of the receiver.\"}},\"constructor\":{\"custom:semver\":\"0.0.1\",\"params\":{\"_messenger\":\"Address of the L1CrossDomainMessenger.\"}},\"depositERC20(address,address,uint256,uint32,bytes)\":{\"custom:legacy\":\"@notice Deposits some amount of ERC20 tokens into the sender's account on L2.\",\"params\":{\"_amount\":\"Amount of the ERC20 to deposit.\",\"_extraData\":\"Optional data to forward to L2. Data supplied here will not be used to execute any code on L2 and is only emitted as extra data for the convenience of off-chain tooling.\",\"_l1Token\":\"Address of the L1 token being deposited.\",\"_l2Token\":\"Address of the corresponding token on L2.\",\"_minGasLimit\":\"Minimum gas limit for the deposit message on L2.\"}},\"depositERC20To(address,address,address,uint256,uint32,bytes)\":{\"custom:legacy\":\"@notice Deposits some amount of ERC20 tokens into a target account on L2.\",\"params\":{\"_amount\":\"Amount of the ERC20 to deposit.\",\"_extraData\":\"Optional data to forward to L2. Data supplied here will not be used to execute any code on L2 and is only emitted as extra data for the convenience of off-chain tooling.\",\"_l1Token\":\"Address of the L1 token being deposited.\",\"_l2Token\":\"Address of the corresponding token on L2.\",\"_minGasLimit\":\"Minimum gas limit for the deposit message on L2.\",\"_to\":\"Address of the recipient on L2.\"}},\"depositETH(uint32,bytes)\":{\"custom:legacy\":\"@notice Deposits some amount of ETH into the sender's account on L2.\",\"params\":{\"_extraData\":\"Optional data to forward to L2. Data supplied here will not be used to execute any code on L2 and is only emitted as extra data for the convenience of off-chain tooling.\",\"_minGasLimit\":\"Minimum gas limit for the deposit message on L2.\"}},\"depositETHTo(address,uint32,bytes)\":{\"custom:legacy\":\"@notice Deposits some amount of ETH into a target account on L2. Note that if ETH is sent to a contract on L2 and the call fails, then that ETH will be locked in the L2StandardBridge. ETH may be recoverable if the call can be successfully replayed by increasing the amount of gas supplied to the call. If the call will fail for any amount of gas, then the ETH will be locked permanently.\",\"params\":{\"_extraData\":\"Optional data to forward to L2. Data supplied here will not be used to execute any code on L2 and is only emitted as extra data for the convenience of off-chain tooling.\",\"_minGasLimit\":\"Minimum gas limit for the deposit message on L2.\",\"_to\":\"Address of the recipient on L2.\"}},\"finalizeBridgeERC20(address,address,address,address,uint256,bytes)\":{\"params\":{\"_amount\":\"Amount of ETH being bridged.\",\"_extraData\":\"Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.\",\"_from\":\"Address of the sender.\",\"_localToken\":\"Address of the ERC20 on this chain.\",\"_remoteToken\":\"Address of the corresponding token on the remote chain.\",\"_to\":\"Address of the receiver.\"}},\"finalizeBridgeETH(address,address,uint256,bytes)\":{\"params\":{\"_amount\":\"Amount of ETH being bridged.\",\"_extraData\":\"Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.\",\"_from\":\"Address of the sender.\",\"_to\":\"Address of the receiver.\"}},\"finalizeERC20Withdrawal(address,address,address,address,uint256,bytes)\":{\"custom:legacy\":\"@notice Finalizes a withdrawal of ERC20 tokens from L2.\",\"params\":{\"_amount\":\"Amount of ETH to withdraw.\",\"_extraData\":\"Optional data forwarded from L2.\",\"_from\":\"Address of the withdrawer on L2.\",\"_l1Token\":\"Address of the token on L1.\",\"_l2Token\":\"Address of the corresponding token on L2.\",\"_to\":\"Address of the recipient on L1.\"}},\"finalizeETHWithdrawal(address,address,uint256,bytes)\":{\"custom:legacy\":\"@notice Finalizes a withdrawal of ETH from L2.\",\"params\":{\"_amount\":\"Amount of ETH to withdraw.\",\"_extraData\":\"Optional data forwarded from L2.\",\"_from\":\"Address of the withdrawer on L2.\",\"_to\":\"Address of the recipient on L1.\"}},\"initialize(address)\":{\"params\":{\"_messenger\":\"Address of the L1CrossDomainMessenger.\"}},\"l2TokenBridge()\":{\"custom:legacy\":\"@notice Retrieves the access of the corresponding L2 bridge contract.\",\"returns\":{\"_0\":\"Address of the corresponding L2 bridge contract.\"}},\"version()\":{\"returns\":{\"_0\":\"Semver contract version as a string.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"ERC20BridgeFailed(address,address,address,address,uint256,bytes)\":{\"notice\":\"Emitted when an ERC20 bridge to this chain fails.\"},\"ERC20BridgeFinalized(address,address,address,address,uint256,bytes)\":{\"notice\":\"Emitted when an ERC20 bridge is finalized on this chain.\"},\"ERC20BridgeInitiated(address,address,address,address,uint256,bytes)\":{\"notice\":\"Emitted when an ERC20 bridge is initiated to the other chain.\"},\"ETHBridgeFinalized(address,address,uint256,bytes)\":{\"notice\":\"Emitted when an ETH bridge is finalized on this chain.\"},\"ETHBridgeInitiated(address,address,uint256,bytes)\":{\"notice\":\"Emitted when an ETH bridge is initiated to the other chain.\"}},\"kind\":\"user\",\"methods\":{\"bridgeERC20(address,address,uint256,uint32,bytes)\":{\"notice\":\"Sends ERC20 tokens to the sender's address on the other chain. Note that if the ERC20 token on the other chain does not recognize the local token as the correct pair token, the ERC20 bridge will fail and the tokens will be returned to sender on this chain.\"},\"bridgeERC20To(address,address,address,uint256,uint32,bytes)\":{\"notice\":\"Sends ERC20 tokens to a receiver's address on the other chain. Note that if the ERC20 token on the other chain does not recognize the local token as the correct pair token, the ERC20 bridge will fail and the tokens will be returned to sender on this chain.\"},\"bridgeETH(uint32,bytes)\":{\"notice\":\"Sends ETH to the sender's address on the other chain.\"},\"bridgeETHTo(address,uint32,bytes)\":{\"notice\":\"Sends ETH to a receiver's address on the other chain. Note that if ETH is sent to a smart contract and the call fails, the ETH will be temporarily locked in the StandardBridge on the other chain until the call is replayed. If the call cannot be replayed with any amount of gas (call always reverts), then the ETH will be permanently locked in the StandardBridge on the other chain.\"},\"completeOutboundTransfer(address,address,address,uint256)\":{\"notice\":\"Completes an outbound token transfer. Public function, but can only be called by this contract. It's security critical that there be absolutely no way for anyone to trigger this function, except by explicit trigger within this contract. Used as a simple way to be able to try/catch any type of revert that could occur during an ERC20 mint/transfer.\"},\"deposits(address,address)\":{\"notice\":\"Mapping that stores deposits for a given pair of local and remote tokens.\"},\"finalizeBridgeERC20(address,address,address,address,uint256,bytes)\":{\"notice\":\"Finalizes an ERC20 bridge on this chain. Can only be triggered by the other StandardBridge contract on the remote chain.\"},\"finalizeBridgeETH(address,address,uint256,bytes)\":{\"notice\":\"Finalizes an ETH bridge on this chain. Can only be triggered by the other StandardBridge contract on the remote chain.\"},\"initialize(address)\":{\"notice\":\"Initializer.\"},\"messenger()\":{\"notice\":\"Messenger contract on this domain.\"},\"otherBridge()\":{\"notice\":\"Corresponding bridge on the other domain.\"},\"version()\":{\"notice\":\"Returns the full semver contract version.\"}},\"notice\":\"The L1StandardBridge is responsible for transfering ETH and ERC20 tokens between L1 and L2. ERC20 tokens deposited into L2 are escrowed within this contract until withdrawal. ETH is transferred to and escrowed within the OptimismPortal contract.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/L1/L1StandardBridge.sol\":\"L1StandardBridge\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@eth-optimism/contracts-periphery/=node_modules/@eth-optimism/contracts-periphery/contracts/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/\",\":@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/\",\":@rari-capital/=node_modules/@rari-capital/\",\":@rari-capital/solmate/=node_modules/@rari-capital/solmate/\",\":contracts/=contracts/\",\":ds-test/=node_modules/ds-test/src/\",\":excessively-safe-call/=node_modules/excessively-safe-call/\",\":forge-std/=node_modules/forge-std/src/\"]},\"sources\":{\"contracts/L1/L1StandardBridge.sol\":{\"keccak256\":\"0x6880257bb4add01352a9330beb44005dec6c72e0d79e2e13c8e1104d13cb6e2f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f1f5d07d371151ce265fdc98f2f59bd7fff469a3603aebc77f4f0133f3caca4a\",\"dweb:/ipfs/QmWKaNePsck8LKGBuUyCL1rjzcsDiYWYru7xnC6ijbkf96\"]},\"contracts/libraries/Encoding.sol\":{\"keccak256\":\"0xca8dce21b608bac08ae75d42879e90f5e7865fb29587df181a22a3b14ce21985\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://29b093d22061b4c499566cb35ce2755cce241ab9f02716cf9cdbdd81f9c47871\",\"dweb:/ipfs/QmdF4DHQUEeEeW67ugmEC3AHn6QrBBNYtwV7UaHaSTe2pa\"]},\"contracts/libraries/Hashing.sol\":{\"keccak256\":\"0xef5d0156a50f96bf32d34ef7a217872791b1b3c11baa9c13183a6388356a918d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b7790ae2e79906d26924f7b69e8a3610031db48cef4b6e306e923431def8ba86\",\"dweb:/ipfs/QmSGJEBv5XsDtsr2QTJnwGKXAXxqZafYGeZcRKKfw1yrUc\"]},\"contracts/libraries/Predeploys.sol\":{\"keccak256\":\"0xe1962e421ceb77afe52c225f43fbc1d9da832680a0c8f57c4e3ff6cf5a4b83bb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d97ce999d2d7aaa23e081d9a5bcbbb218648c2b40be51ff84138735608251f95\",\"dweb:/ipfs/QmSimBDcf7DCbLDefNnZ4xuzH1sA8t1RKZkSLCMMsh99TL\"]},\"contracts/libraries/Types.sol\":{\"keccak256\":\"0x93045c0c97287a12e1bdde0685e26f185411b81b93b9df15c8cce90bccdcf77c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0c90b59d09f92aba5ab0862264efe2beb0f77fba750867f8d686a1f39ee6af2c\",\"dweb:/ipfs/QmW7Zj5d7NgDi5Mdv6jptJgfsUj8LvGroud9p2Z7vhcKLC\"]},\"contracts/libraries/rlp/RLPWriter.sol\":{\"keccak256\":\"0x5aa9d21c5b41c9786f23153f819d561ae809a1d55c7b0d423dfeafdfbacedc78\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://921c44e6a0982b9a4011900fda1bda2c06b7a85894967de98b407a83fe9f90c0\",\"dweb:/ipfs/QmSsHLKDUQ82kpKdqB6VntVGKuPDb4W9VdotsubuqWBzio\"]},\"contracts/universal/CrossDomainMessenger.sol\":{\"keccak256\":\"0x099d1728f723c90d18fc488375e5816e487930cf337935657fe5bac7c7b5b3cc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c328855ffeeede5283fceedf6f1e9b58e18969b8e5b15289b2039e568d62e3f4\",\"dweb:/ipfs/QmbwJeXkrVKxX57Q5J1MDMBpAoonRmArKf2ZFya2gyVvLw\"]},\"contracts/universal/OptimismMintableERC20.sol\":{\"keccak256\":\"0xad261a9f7af1973f7cc3784b7c5a04682c64033eeb51ca54f714c15e1863ceca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://dc74cf0470d90168b795a01733262dbd5c6d06067738b1b3bed38c6e480a207c\",\"dweb:/ipfs/QmWAAVoyNJXBXHfMgkeSYdwMPHry8cfVc2DiMzZBqrqUG8\"]},\"contracts/universal/Semver.sol\":{\"keccak256\":\"0x8215e8fbaace5e06fdf0be26cd8ec224847cf03e89bd78dc8ba3ec2cb429d4fe\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cfe4869ad9a1a10aee499ed4ac74a19f9f95dd9173efa656f6b1728f6912a9ad\",\"dweb:/ipfs/QmbiKSxpNnKQv8jwEvGUJkksaLPp8UU8N1twbDimM3RhXr\"]},\"contracts/universal/StandardBridge.sol\":{\"keccak256\":\"0x84bd5ae0aba244d2826284f230ba9d5a361220453f472ff98dcf7952d4254907\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://92c535e0e1da2c643df3d7e70b49950d9f2a56e8b2f39856c1f4d367f8893fb5\",\"dweb:/ipfs/Qmf5cjRrY8w2WGCWSoDHcwhonGe29zUnMX4bDYQDRmc5D6\"]},\"contracts/universal/SupportedInterfaces.sol\":{\"keccak256\":\"0x68eb6cc2db8c22712c3912a2061d46c10600b3ded466d626acb2826e67354168\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b611eec13144ad11f1208f83055b84b142579d5761a9281e645c7294f4579bb3\",\"dweb:/ipfs/QmWVJ299etGEBEGE2v6HSt2CkoCrvcwNkY4jYFb4tnCAHS\"]},\"node_modules/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d7fc8396619de513c96b6e00301b88dd790e83542aab918425633a5f7297a15a\",\"dweb:/ipfs/QmXbP4kiZyp7guuS7xe8KaybnwkRPGrBc2Kbi3vhcTfpxb\"]},\"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x0203dcadc5737d9ef2c211d6fa15d18ebc3b30dfa51903b64870b01a062b0b4e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6eb2fd1e9894dbe778f4b8131adecebe570689e63cf892f4e21257bfe1252497\",\"dweb:/ipfs/QmXgUGNfZvrn6N2miv3nooSs7Jm34A41qz94fu2GtDFcx8\"]},\"node_modules/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"keccak256\":\"0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9c7d1f5e15633ab912b74c2f57e24559e66b03232300d4b27ff0f25bc452ecad\",\"dweb:/ipfs/QmYTJkc1cntYkKQ1Tu11nBcJLakiy93Tjytc4XHELo4GmR\"]},\"node_modules/@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"keccak256\":\"0x8cc03c5ac17e8a7396e487cda41fc1f1dfdb91db7d528e6da84bee3b6dd7e167\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://607818f1b44548c2d8268176f73cdb290e1faed971b1061930d92698366e2a11\",\"dweb:/ipfs/QmQibMe3r5no95b6q7isGT5R75V8xSofWEDLXzp95b7LgZ\"]},\"node_modules/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"keccak256\":\"0x611aa3f23e59cfdd1863c536776407b3e33d695152a266fa7cfb34440a29a8a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9b4b2110b7f2b3eb32951bc08046fa90feccffa594e1176cb91cdfb0e94726b4\",\"dweb:/ipfs/QmSxLwYjicf9zWFuieRc8WQwE4FisA1Um5jp1iSa731TGt\"]},\"node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c\",\"dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xe0c8b625a79bac0fe80f17cfb521e072805cc9cef1c96a5caf45b264e74812fa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://12fd1efc9ad061ef675bd50fb0c8e3c6f2952a09f8df0e3c688b8d81b8918838\",\"dweb:/ipfs/QmawN6PjTwy91pU7ANjCSgbsLc8TDA6hwu9GsFFaNSuhb5\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34\",\"dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a376d3dda2cb70536c0a45c208b29b34ac560c4cb4f513a42079f96ba47d2dd\",\"dweb:/ipfs/QmZQg6gn1sUpM8wHzwNvSnihumUCAhxD119MpXeKp8B9s8\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"keccak256\":\"0xc3d946432c0ddbb1f846a0d3985be71299df331b91d06732152117f62f0be2b5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4632c341a06ba5c079b51ca5a915efab4e6ab57735b37839b3e8365ff806a43e\",\"dweb:/ipfs/QmTHT3xHYed2wajEoA5qu7ii2BxLpPhQZHwAhtLK5Z7ANK\"]},\"node_modules/@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b3a57d0854b2fdce6ebff933a48dca2445643d1eccfc27f00292e937f26c6a58\",\"dweb:/ipfs/QmW45rZooS9TqR4YXUbjRbtf2Bpb5ouSarBvfW1LdGprvV\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x32c202bd28995dd20c4347b7c6467a6d3241c74c8ad3edcbb610cd9205916c45\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8179c356adb19e70d6b31a1eedc8c5c7f0c00e669e2540f4099e3844c6074d30\",\"dweb:/ipfs/QmWFbivarEobbqhS1go64ootVuHfVohBseerYy9FTEd1W2\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/ERC165Checker.sol\":{\"keccak256\":\"0xf7291d7213336b00ee7edbf7cd5034778dd7b0bda2a7489e664f1e5cacc6c24e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a3671a157cfdc73f334fc9e584862e1b3b48e8b771cde69d79834b03dc5c2826\",\"dweb:/ipfs/QmVJnMc3FLyYzJFktqwinaZes3pnRPuU1wKmBGvGRfh4rc\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://be161e54f24e5c6fae81a12db1a8ae87bc5ae1b0ddc805d82a1440a68455088f\",\"dweb:/ipfs/QmP7C3CHdY9urF4dEMb9wmsp1wMxHF6nhA2yQE5SKiPAdy\"]},\"node_modules/excessively-safe-call/src/ExcessivelySafeCall.sol\":{\"keccak256\":\"0x7d9d432e8f02168bf3f790e3dabcf36402782acf7ffa476cabe86fc4d8962eb2\",\"license\":\"MIT OR Apache-2.0\",\"urls\":[\"bzz-raw://1adc13e7f399f500ea5f81480ad149a50408fde7990a2c6347e6377486f389dc\",\"dweb:/ipfs/QmSvm5TUBJqknsqNJLLHqNS4MLSH5k3vNrbquVg6ZKSfx9\"]}},\"version\":1}", - "bytecode": "0x60e06040523480156200001157600080fd5b50604051620033a9380380620033a9833981016040819052620000349162000254565b6000608081905260a052600160c0526200004e8162000055565b5062000286565b600054610100900460ff1615808015620000765750600054600160ff909116105b80620000a6575062000093306200019e60201b620004961760201c565b158015620000a6575060005460ff166001145b6200010f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801562000133576000805461ff0019166101001790555b6200015382734200000000000000000000000000000000000010620001ad565b80156200019a576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b6001600160a01b03163b151590565b600054610100900460ff166200021a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840162000106565b6000805462010000600160b01b031916620100006001600160a01b0394851602179055600180546001600160a01b03191691909216179055565b6000602082840312156200026757600080fd5b81516001600160a01b03811681146200027f57600080fd5b9392505050565b60805160a05160c0516130f3620002b6600039600061112d01526000611104015260006110db01526130f36000f3fe6080604052600436106101485760003560e01c806387087623116100c0578063af565a1311610074578063c4d66de811610059578063c4d66de814610436578063c89701a214610456578063e11013dd1461048357600080fd5b8063af565a1314610403578063b1a1a8821461042357600080fd5b806391c49bf8116100a557806391c49bf8146103a55780639a2ac6d5146103d0578063a9f9e675146103e357600080fd5b8063870876231461033f5780638f601f661461035f57600080fd5b80633cb747bf1161011757806354fd4d50116100fc57806354fd4d50146102dd57806358a997f6146102ff578063838b25201461031f57600080fd5b80633cb747bf14610260578063540abf73146102bd57600080fd5b80630166a07a1461020757806309fc8843146102275780631532ec341461023a5780631635f5fd1461024d57600080fd5b3661020257333b156101e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084015b60405180910390fd5b61020033333462030d40604051806020016040528060008152506104b2565b005b600080fd5b34801561021357600080fd5b5061020061022236600461292a565b61064e565b6102006102353660046129db565b610999565b610200610248366004612a2e565b610a70565b61020061025b366004612a2e565b610c81565b34801561026c57600080fd5b506000546102939062010000900473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156102c957600080fd5b506102006102d8366004612aa1565b6110c4565b3480156102e957600080fd5b506102f26110d4565b6040516102b49190612b8e565b34801561030b57600080fd5b5061020061031a366004612ba1565b611177565b34801561032b57600080fd5b5061020061033a366004612aa1565b611216565b34801561034b57600080fd5b5061020061035a366004612ba1565b611226565b34801561036b57600080fd5b5061039761037a366004612c24565b600260209081526000928352604080842090915290825290205481565b6040519081526020016102b4565b3480156103b157600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff16610293565b6102006103de366004612c5d565b6112c5565b3480156103ef57600080fd5b506102006103fe36600461292a565b6112d8565b34801561040f57600080fd5b5061020061041e366004612cc0565b6114fd565b6102006104313660046129db565b61180a565b34801561044257600080fd5b50610200610451366004612d11565b6118a6565b34801561046257600080fd5b506001546102939073ffffffffffffffffffffffffffffffffffffffff1681565b610200610491366004612c5d565b611a4f565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f2849b43074093a05396b6f2a937dee8565b15a48a7b3d4bffb732a5017380af58584604051610511929190612d2e565b60405180910390a360005460015460405173ffffffffffffffffffffffffffffffffffffffff62010000909304831692633dbb202b9287929116907f1635f5fd0000000000000000000000000000000000000000000000000000000090610582908b908b9086908a90602401612d47565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e086901b909216825261061592918890600401612d86565b6000604051808303818588803b15801561062e57600080fd5b505af1158015610642573d6000803e3d6000fd5b50505050505050505050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff16331480156107305750600154600054604080517f6e296e45000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff938416936201000090930490921691636e296e45916004808201926020929091908290030181865afa1580156106f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107189190612dcb565b73ffffffffffffffffffffffffffffffffffffffff16145b6107e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101d8565b6040517faf565a1300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808916600483015280881660248301528516604482015260648101849052309063af565a1390608401600060405180830381600087803b15801561086057600080fd5b505af1925050508015610871575060015b61090d57610886878786888760008888611a92565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f2755817676249910615f0a6a240ad225abe5343df8d527f7294c4af36a92009a878787876040516109009493929190612e31565b60405180910390a4610990565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fd59c65b35445225835c83f50b6ede06a7be047d22e357073e250d9af537518cd878787876040516109879493929190612e31565b60405180910390a45b50505050505050565b333b15610a28576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101d8565b610a6b3333348686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506104b292505050565b505050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff1633148015610b525750600154600054604080517f6e296e45000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff938416936201000090930490921691636e296e45916004808201926020929091908290030181865afa158015610b16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3a9190612dcb565b73ffffffffffffffffffffffffffffffffffffffff16145b610c04576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101d8565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f2ac69ee804d9a7a0984249f508dfab7cb2534b465b6ce1580f99a38ba9c5e631858585604051610c6593929190612e67565b60405180910390a3610c7a8585858585610c81565b5050505050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff1633148015610d635750600154600054604080517f6e296e45000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff938416936201000090930490921691636e296e45916004808201926020929091908290030181865afa158015610d27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4b9190612dcb565b73ffffffffffffffffffffffffffffffffffffffff16145b610e15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101d8565b823414610ea4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5374616e646172644272696467653a20616d6f756e742073656e7420646f657360448201527f206e6f74206d6174636820616d6f756e7420726571756972656400000000000060648201526084016101d8565b3073ffffffffffffffffffffffffffffffffffffffff851603610f49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a2063616e6e6f742073656e6420746f207360448201527f656c66000000000000000000000000000000000000000000000000000000000060648201526084016101d8565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f31b2166ff604fc5672ea5df08a78081d2bc6d746cadce880747f3643d819e83d858585604051610faa93929190612e67565b60405180910390a36040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff8616908590604051610fe99190612eb9565b60006040518083038185875af1925050503d8060008114611026576040519150601f19603f3d011682016040523d82523d6000602084013e61102b565b606091505b50509050806110bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a20455448207472616e736665722066616960448201527f6c6564000000000000000000000000000000000000000000000000000000000060648201526084016101d8565b505050505050565b6109908787338888888888611c4f565b60606110ff7f0000000000000000000000000000000000000000000000000000000000000000611ef9565b6111287f0000000000000000000000000000000000000000000000000000000000000000611ef9565b6111517f0000000000000000000000000000000000000000000000000000000000000000611ef9565b60405160200161116393929190612ed5565b604051602081830303815290604052905090565b333b15611206576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101d8565b6110bc8686333388888888612036565b6109908787338888888888612036565b333b156112b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101d8565b6110bc8686333388888888611c4f565b6112d233858585856120c8565b50505050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff16331480156113ba5750600154600054604080517f6e296e45000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff938416936201000090930490921691636e296e45916004808201926020929091908290030181865afa15801561137e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a29190612dcb565b73ffffffffffffffffffffffffffffffffffffffff16145b61146c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101d8565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f3ceee06c1e37648fcbb6ed52e17b3e1f275a1f8c7b22a84b2b84732431e046b3878787876040516114e69493929190612e31565b60405180910390a46109908787878787878761064e565b33301461158c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642062792073656c660000000000000000000000000060648201526084016101d8565b3073ffffffffffffffffffffffffffffffffffffffff851603611631576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5374616e646172644272696467653a206c6f63616c20746f6b656e2063616e6e60448201527f6f742062652073656c660000000000000000000000000000000000000000000060648201526084016101d8565b61163a84612174565b156117885761164984846121a6565b6116fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a4016101d8565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390528516906340c10f1990604401600060405180830381600087803b15801561176b57600080fd5b505af115801561177f573d6000803e3d6000fd5b505050506112d2565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600260209081526040808320938716835292905220546117c6908290612f7a565b73ffffffffffffffffffffffffffffffffffffffff8086166000818152600260209081526040808320948916835293905291909120919091556112d290838361224d565b333b15611899576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101d8565b610a6b33338585856120c8565b600054610100900460ff16158080156118c65750600054600160ff909116105b806118e05750303b1580156118e0575060005460ff166001145b61196c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016101d8565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156119ca57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6119e882734200000000000000000000000000000000000010612321565b8015611a4b57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b6112d23385348686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506104b292505050565b60005460015460405173ffffffffffffffffffffffffffffffffffffffff62010000909304831692633dbb202b9216907f0166a07a0000000000000000000000000000000000000000000000000000000090611afe908c908e908d908d908d908c908c90602401612f91565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e085901b9092168252611b9192918890600401612d86565b600060405180830381600087803b158015611bab57600080fd5b505af1158015611bbf573d6000803e3d6000fd5b505050508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167f7ff126db8024424bbfd9826e8ab82ff59136289ea440b04b39a0df1b03b9cabf88888787604051611c3d9493929190612e31565b60405180910390a45050505050505050565b3073ffffffffffffffffffffffffffffffffffffffff891603611cf4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5374616e646172644272696467653a206c6f63616c20746f6b656e2063616e6e60448201527f6f742062652073656c660000000000000000000000000000000000000000000060648201526084016101d8565b611cfd88612174565b15611e4b57611d0c88886121a6565b611dbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a4016101d8565b6040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015260248201869052891690639dc29fac90604401600060405180830381600087803b158015611e2e57600080fd5b505af1158015611e42573d6000803e3d6000fd5b50505050611edf565b611e6d73ffffffffffffffffffffffffffffffffffffffff891687308761242d565b73ffffffffffffffffffffffffffffffffffffffff8089166000908152600260209081526040808320938b1683529290522054611eab908590612fee565b73ffffffffffffffffffffffffffffffffffffffff808a166000908152600260209081526040808320938c16835292905220555b611eef8888888888888888611a92565b5050505050505050565b606081600003611f3c57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611f665780611f5081613006565b9150611f5f9050600a8361306d565b9150611f40565b60008167ffffffffffffffff811115611f8157611f81612e8a565b6040519080825280601f01601f191660200182016040528015611fab576020820181803683370190505b5090505b841561202e57611fc0600183612f7a565b9150611fcd600a86613081565b611fd8906030612fee565b60f81b818381518110611fed57611fed613095565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612027600a8661306d565b9450611faf565b949350505050565b8573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167f718594027abd4eaed59f95162563e0cc6d0e8d5b86b1c7be8b1b0ac3343d0396888887876040516120b09493929190612e31565b60405180910390a4611eef8888888888888888611c4f565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f35d79ab81f2b2017e19afb5c5571778877782d7a8786f5907f93b0f4702f4f2334858560405161212993929190612e67565b60405180910390a3610c7a8585348686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506104b292505050565b60006121a0827f1d1d8b630000000000000000000000000000000000000000000000000000000061248b565b92915050565b60008273ffffffffffffffffffffffffffffffffffffffff1663c01e1bd66040518163ffffffff1660e01b8152600401602060405180830381865afa1580156121f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122179190612dcb565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610a6b9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526124ae565b600054610100900460ff166123b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016101d8565b600080547fffffffffffffffffffff0000000000000000000000000000000000000000ffff166201000073ffffffffffffffffffffffffffffffffffffffff94851602179055600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909216179055565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526112d29085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161229f565b6000612496836125ba565b80156124a757506124a7838361261e565b9392505050565b6000612510826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661275a9092919063ffffffff16565b805190915015610a6b578080602001905181019061252e91906130c4565b610a6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016101d8565b60006125e6827f01ffc9a70000000000000000000000000000000000000000000000000000000061261e565b80156121a05750612617827fffffffff0000000000000000000000000000000000000000000000000000000061261e565b1592915050565b604080517fffffffff00000000000000000000000000000000000000000000000000000000831660248083019190915282518083039091018152604490910182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a7000000000000000000000000000000000000000000000000000000001790529051600091908290819073ffffffffffffffffffffffffffffffffffffffff871690617530906126d8908690612eb9565b6000604051808303818686fa925050503d8060008114612714576040519150601f19603f3d011682016040523d82523d6000602084013e612719565b606091505b509150915060208151101561273457600093505050506121a0565b81801561275057508080602001905181019061275091906130c4565b9695505050505050565b606061202e84846000858573ffffffffffffffffffffffffffffffffffffffff85163b6127e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016101d8565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161280c9190612eb9565b60006040518083038185875af1925050503d8060008114612849576040519150601f19603f3d011682016040523d82523d6000602084013e61284e565b606091505b509150915061285e828286612869565b979650505050505050565b606083156128785750816124a7565b8251156128885782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d89190612b8e565b73ffffffffffffffffffffffffffffffffffffffff811681146128de57600080fd5b50565b60008083601f8401126128f357600080fd5b50813567ffffffffffffffff81111561290b57600080fd5b60208301915083602082850101111561292357600080fd5b9250929050565b600080600080600080600060c0888a03121561294557600080fd5b8735612950816128bc565b96506020880135612960816128bc565b95506040880135612970816128bc565b94506060880135612980816128bc565b93506080880135925060a088013567ffffffffffffffff8111156129a357600080fd5b6129af8a828b016128e1565b989b979a50959850939692959293505050565b803563ffffffff811681146129d657600080fd5b919050565b6000806000604084860312156129f057600080fd5b6129f9846129c2565b9250602084013567ffffffffffffffff811115612a1557600080fd5b612a21868287016128e1565b9497909650939450505050565b600080600080600060808688031215612a4657600080fd5b8535612a51816128bc565b94506020860135612a61816128bc565b935060408601359250606086013567ffffffffffffffff811115612a8457600080fd5b612a90888289016128e1565b969995985093965092949392505050565b600080600080600080600060c0888a031215612abc57600080fd5b8735612ac7816128bc565b96506020880135612ad7816128bc565b95506040880135612ae7816128bc565b945060608801359350612afc608089016129c2565b925060a088013567ffffffffffffffff8111156129a357600080fd5b60005b83811015612b33578181015183820152602001612b1b565b838111156112d25750506000910152565b60008151808452612b5c816020860160208601612b18565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006124a76020830184612b44565b60008060008060008060a08789031215612bba57600080fd5b8635612bc5816128bc565b95506020870135612bd5816128bc565b945060408701359350612bea606088016129c2565b9250608087013567ffffffffffffffff811115612c0657600080fd5b612c1289828a016128e1565b979a9699509497509295939492505050565b60008060408385031215612c3757600080fd5b8235612c42816128bc565b91506020830135612c52816128bc565b809150509250929050565b60008060008060608587031215612c7357600080fd5b8435612c7e816128bc565b9350612c8c602086016129c2565b9250604085013567ffffffffffffffff811115612ca857600080fd5b612cb4878288016128e1565b95989497509550505050565b60008060008060808587031215612cd657600080fd5b8435612ce1816128bc565b93506020850135612cf1816128bc565b92506040850135612d01816128bc565b9396929550929360600135925050565b600060208284031215612d2357600080fd5b81356124a7816128bc565b82815260406020820152600061202e6040830184612b44565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250836040830152608060608301526127506080830184612b44565b73ffffffffffffffffffffffffffffffffffffffff84168152606060208201526000612db56060830185612b44565b905063ffffffff83166040830152949350505050565b600060208284031215612ddd57600080fd5b81516124a7816128bc565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff85168152836020820152606060408201526000612750606083018486612de8565b838152604060208201526000612e81604083018486612de8565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008251612ecb818460208701612b18565b9190910192915050565b60008451612ee7818460208901612b18565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551612f23816001850160208a01612b18565b60019201918201528351612f3e816002840160208801612b18565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015612f8c57612f8c612f4b565b500390565b600073ffffffffffffffffffffffffffffffffffffffff808a1683528089166020840152808816604084015280871660608401525084608083015260c060a0830152612fe160c083018486612de8565b9998505050505050505050565b6000821982111561300157613001612f4b565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361303757613037612f4b565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261307c5761307c61303e565b500490565b6000826130905761309061303e565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156130d657600080fd5b815180151581146124a757600080fdfea164736f6c634300080f000a", - "deployedBytecode": "0x6080604052600436106101485760003560e01c806387087623116100c0578063af565a1311610074578063c4d66de811610059578063c4d66de814610436578063c89701a214610456578063e11013dd1461048357600080fd5b8063af565a1314610403578063b1a1a8821461042357600080fd5b806391c49bf8116100a557806391c49bf8146103a55780639a2ac6d5146103d0578063a9f9e675146103e357600080fd5b8063870876231461033f5780638f601f661461035f57600080fd5b80633cb747bf1161011757806354fd4d50116100fc57806354fd4d50146102dd57806358a997f6146102ff578063838b25201461031f57600080fd5b80633cb747bf14610260578063540abf73146102bd57600080fd5b80630166a07a1461020757806309fc8843146102275780631532ec341461023a5780631635f5fd1461024d57600080fd5b3661020257333b156101e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084015b60405180910390fd5b61020033333462030d40604051806020016040528060008152506104b2565b005b600080fd5b34801561021357600080fd5b5061020061022236600461292a565b61064e565b6102006102353660046129db565b610999565b610200610248366004612a2e565b610a70565b61020061025b366004612a2e565b610c81565b34801561026c57600080fd5b506000546102939062010000900473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156102c957600080fd5b506102006102d8366004612aa1565b6110c4565b3480156102e957600080fd5b506102f26110d4565b6040516102b49190612b8e565b34801561030b57600080fd5b5061020061031a366004612ba1565b611177565b34801561032b57600080fd5b5061020061033a366004612aa1565b611216565b34801561034b57600080fd5b5061020061035a366004612ba1565b611226565b34801561036b57600080fd5b5061039761037a366004612c24565b600260209081526000928352604080842090915290825290205481565b6040519081526020016102b4565b3480156103b157600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff16610293565b6102006103de366004612c5d565b6112c5565b3480156103ef57600080fd5b506102006103fe36600461292a565b6112d8565b34801561040f57600080fd5b5061020061041e366004612cc0565b6114fd565b6102006104313660046129db565b61180a565b34801561044257600080fd5b50610200610451366004612d11565b6118a6565b34801561046257600080fd5b506001546102939073ffffffffffffffffffffffffffffffffffffffff1681565b610200610491366004612c5d565b611a4f565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f2849b43074093a05396b6f2a937dee8565b15a48a7b3d4bffb732a5017380af58584604051610511929190612d2e565b60405180910390a360005460015460405173ffffffffffffffffffffffffffffffffffffffff62010000909304831692633dbb202b9287929116907f1635f5fd0000000000000000000000000000000000000000000000000000000090610582908b908b9086908a90602401612d47565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e086901b909216825261061592918890600401612d86565b6000604051808303818588803b15801561062e57600080fd5b505af1158015610642573d6000803e3d6000fd5b50505050505050505050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff16331480156107305750600154600054604080517f6e296e45000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff938416936201000090930490921691636e296e45916004808201926020929091908290030181865afa1580156106f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107189190612dcb565b73ffffffffffffffffffffffffffffffffffffffff16145b6107e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101d8565b6040517faf565a1300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808916600483015280881660248301528516604482015260648101849052309063af565a1390608401600060405180830381600087803b15801561086057600080fd5b505af1925050508015610871575060015b61090d57610886878786888760008888611a92565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f2755817676249910615f0a6a240ad225abe5343df8d527f7294c4af36a92009a878787876040516109009493929190612e31565b60405180910390a4610990565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fd59c65b35445225835c83f50b6ede06a7be047d22e357073e250d9af537518cd878787876040516109879493929190612e31565b60405180910390a45b50505050505050565b333b15610a28576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101d8565b610a6b3333348686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506104b292505050565b505050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff1633148015610b525750600154600054604080517f6e296e45000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff938416936201000090930490921691636e296e45916004808201926020929091908290030181865afa158015610b16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3a9190612dcb565b73ffffffffffffffffffffffffffffffffffffffff16145b610c04576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101d8565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f2ac69ee804d9a7a0984249f508dfab7cb2534b465b6ce1580f99a38ba9c5e631858585604051610c6593929190612e67565b60405180910390a3610c7a8585858585610c81565b5050505050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff1633148015610d635750600154600054604080517f6e296e45000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff938416936201000090930490921691636e296e45916004808201926020929091908290030181865afa158015610d27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4b9190612dcb565b73ffffffffffffffffffffffffffffffffffffffff16145b610e15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101d8565b823414610ea4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5374616e646172644272696467653a20616d6f756e742073656e7420646f657360448201527f206e6f74206d6174636820616d6f756e7420726571756972656400000000000060648201526084016101d8565b3073ffffffffffffffffffffffffffffffffffffffff851603610f49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a2063616e6e6f742073656e6420746f207360448201527f656c66000000000000000000000000000000000000000000000000000000000060648201526084016101d8565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f31b2166ff604fc5672ea5df08a78081d2bc6d746cadce880747f3643d819e83d858585604051610faa93929190612e67565b60405180910390a36040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff8616908590604051610fe99190612eb9565b60006040518083038185875af1925050503d8060008114611026576040519150601f19603f3d011682016040523d82523d6000602084013e61102b565b606091505b50509050806110bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a20455448207472616e736665722066616960448201527f6c6564000000000000000000000000000000000000000000000000000000000060648201526084016101d8565b505050505050565b6109908787338888888888611c4f565b60606110ff7f0000000000000000000000000000000000000000000000000000000000000000611ef9565b6111287f0000000000000000000000000000000000000000000000000000000000000000611ef9565b6111517f0000000000000000000000000000000000000000000000000000000000000000611ef9565b60405160200161116393929190612ed5565b604051602081830303815290604052905090565b333b15611206576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101d8565b6110bc8686333388888888612036565b6109908787338888888888612036565b333b156112b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101d8565b6110bc8686333388888888611c4f565b6112d233858585856120c8565b50505050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff16331480156113ba5750600154600054604080517f6e296e45000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff938416936201000090930490921691636e296e45916004808201926020929091908290030181865afa15801561137e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a29190612dcb565b73ffffffffffffffffffffffffffffffffffffffff16145b61146c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101d8565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f3ceee06c1e37648fcbb6ed52e17b3e1f275a1f8c7b22a84b2b84732431e046b3878787876040516114e69493929190612e31565b60405180910390a46109908787878787878761064e565b33301461158c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642062792073656c660000000000000000000000000060648201526084016101d8565b3073ffffffffffffffffffffffffffffffffffffffff851603611631576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5374616e646172644272696467653a206c6f63616c20746f6b656e2063616e6e60448201527f6f742062652073656c660000000000000000000000000000000000000000000060648201526084016101d8565b61163a84612174565b156117885761164984846121a6565b6116fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a4016101d8565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390528516906340c10f1990604401600060405180830381600087803b15801561176b57600080fd5b505af115801561177f573d6000803e3d6000fd5b505050506112d2565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600260209081526040808320938716835292905220546117c6908290612f7a565b73ffffffffffffffffffffffffffffffffffffffff8086166000818152600260209081526040808320948916835293905291909120919091556112d290838361224d565b333b15611899576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101d8565b610a6b33338585856120c8565b600054610100900460ff16158080156118c65750600054600160ff909116105b806118e05750303b1580156118e0575060005460ff166001145b61196c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016101d8565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156119ca57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6119e882734200000000000000000000000000000000000010612321565b8015611a4b57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b6112d23385348686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506104b292505050565b60005460015460405173ffffffffffffffffffffffffffffffffffffffff62010000909304831692633dbb202b9216907f0166a07a0000000000000000000000000000000000000000000000000000000090611afe908c908e908d908d908d908c908c90602401612f91565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e085901b9092168252611b9192918890600401612d86565b600060405180830381600087803b158015611bab57600080fd5b505af1158015611bbf573d6000803e3d6000fd5b505050508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167f7ff126db8024424bbfd9826e8ab82ff59136289ea440b04b39a0df1b03b9cabf88888787604051611c3d9493929190612e31565b60405180910390a45050505050505050565b3073ffffffffffffffffffffffffffffffffffffffff891603611cf4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5374616e646172644272696467653a206c6f63616c20746f6b656e2063616e6e60448201527f6f742062652073656c660000000000000000000000000000000000000000000060648201526084016101d8565b611cfd88612174565b15611e4b57611d0c88886121a6565b611dbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a4016101d8565b6040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015260248201869052891690639dc29fac90604401600060405180830381600087803b158015611e2e57600080fd5b505af1158015611e42573d6000803e3d6000fd5b50505050611edf565b611e6d73ffffffffffffffffffffffffffffffffffffffff891687308761242d565b73ffffffffffffffffffffffffffffffffffffffff8089166000908152600260209081526040808320938b1683529290522054611eab908590612fee565b73ffffffffffffffffffffffffffffffffffffffff808a166000908152600260209081526040808320938c16835292905220555b611eef8888888888888888611a92565b5050505050505050565b606081600003611f3c57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611f665780611f5081613006565b9150611f5f9050600a8361306d565b9150611f40565b60008167ffffffffffffffff811115611f8157611f81612e8a565b6040519080825280601f01601f191660200182016040528015611fab576020820181803683370190505b5090505b841561202e57611fc0600183612f7a565b9150611fcd600a86613081565b611fd8906030612fee565b60f81b818381518110611fed57611fed613095565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612027600a8661306d565b9450611faf565b949350505050565b8573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167f718594027abd4eaed59f95162563e0cc6d0e8d5b86b1c7be8b1b0ac3343d0396888887876040516120b09493929190612e31565b60405180910390a4611eef8888888888888888611c4f565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f35d79ab81f2b2017e19afb5c5571778877782d7a8786f5907f93b0f4702f4f2334858560405161212993929190612e67565b60405180910390a3610c7a8585348686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506104b292505050565b60006121a0827f1d1d8b630000000000000000000000000000000000000000000000000000000061248b565b92915050565b60008273ffffffffffffffffffffffffffffffffffffffff1663c01e1bd66040518163ffffffff1660e01b8152600401602060405180830381865afa1580156121f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122179190612dcb565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610a6b9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526124ae565b600054610100900460ff166123b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016101d8565b600080547fffffffffffffffffffff0000000000000000000000000000000000000000ffff166201000073ffffffffffffffffffffffffffffffffffffffff94851602179055600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909216179055565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526112d29085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161229f565b6000612496836125ba565b80156124a757506124a7838361261e565b9392505050565b6000612510826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661275a9092919063ffffffff16565b805190915015610a6b578080602001905181019061252e91906130c4565b610a6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016101d8565b60006125e6827f01ffc9a70000000000000000000000000000000000000000000000000000000061261e565b80156121a05750612617827fffffffff0000000000000000000000000000000000000000000000000000000061261e565b1592915050565b604080517fffffffff00000000000000000000000000000000000000000000000000000000831660248083019190915282518083039091018152604490910182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a7000000000000000000000000000000000000000000000000000000001790529051600091908290819073ffffffffffffffffffffffffffffffffffffffff871690617530906126d8908690612eb9565b6000604051808303818686fa925050503d8060008114612714576040519150601f19603f3d011682016040523d82523d6000602084013e612719565b606091505b509150915060208151101561273457600093505050506121a0565b81801561275057508080602001905181019061275091906130c4565b9695505050505050565b606061202e84846000858573ffffffffffffffffffffffffffffffffffffffff85163b6127e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016101d8565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161280c9190612eb9565b60006040518083038185875af1925050503d8060008114612849576040519150601f19603f3d011682016040523d82523d6000602084013e61284e565b606091505b509150915061285e828286612869565b979650505050505050565b606083156128785750816124a7565b8251156128885782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d89190612b8e565b73ffffffffffffffffffffffffffffffffffffffff811681146128de57600080fd5b50565b60008083601f8401126128f357600080fd5b50813567ffffffffffffffff81111561290b57600080fd5b60208301915083602082850101111561292357600080fd5b9250929050565b600080600080600080600060c0888a03121561294557600080fd5b8735612950816128bc565b96506020880135612960816128bc565b95506040880135612970816128bc565b94506060880135612980816128bc565b93506080880135925060a088013567ffffffffffffffff8111156129a357600080fd5b6129af8a828b016128e1565b989b979a50959850939692959293505050565b803563ffffffff811681146129d657600080fd5b919050565b6000806000604084860312156129f057600080fd5b6129f9846129c2565b9250602084013567ffffffffffffffff811115612a1557600080fd5b612a21868287016128e1565b9497909650939450505050565b600080600080600060808688031215612a4657600080fd5b8535612a51816128bc565b94506020860135612a61816128bc565b935060408601359250606086013567ffffffffffffffff811115612a8457600080fd5b612a90888289016128e1565b969995985093965092949392505050565b600080600080600080600060c0888a031215612abc57600080fd5b8735612ac7816128bc565b96506020880135612ad7816128bc565b95506040880135612ae7816128bc565b945060608801359350612afc608089016129c2565b925060a088013567ffffffffffffffff8111156129a357600080fd5b60005b83811015612b33578181015183820152602001612b1b565b838111156112d25750506000910152565b60008151808452612b5c816020860160208601612b18565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006124a76020830184612b44565b60008060008060008060a08789031215612bba57600080fd5b8635612bc5816128bc565b95506020870135612bd5816128bc565b945060408701359350612bea606088016129c2565b9250608087013567ffffffffffffffff811115612c0657600080fd5b612c1289828a016128e1565b979a9699509497509295939492505050565b60008060408385031215612c3757600080fd5b8235612c42816128bc565b91506020830135612c52816128bc565b809150509250929050565b60008060008060608587031215612c7357600080fd5b8435612c7e816128bc565b9350612c8c602086016129c2565b9250604085013567ffffffffffffffff811115612ca857600080fd5b612cb4878288016128e1565b95989497509550505050565b60008060008060808587031215612cd657600080fd5b8435612ce1816128bc565b93506020850135612cf1816128bc565b92506040850135612d01816128bc565b9396929550929360600135925050565b600060208284031215612d2357600080fd5b81356124a7816128bc565b82815260406020820152600061202e6040830184612b44565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250836040830152608060608301526127506080830184612b44565b73ffffffffffffffffffffffffffffffffffffffff84168152606060208201526000612db56060830185612b44565b905063ffffffff83166040830152949350505050565b600060208284031215612ddd57600080fd5b81516124a7816128bc565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff85168152836020820152606060408201526000612750606083018486612de8565b838152604060208201526000612e81604083018486612de8565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008251612ecb818460208701612b18565b9190910192915050565b60008451612ee7818460208901612b18565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551612f23816001850160208a01612b18565b60019201918201528351612f3e816002840160208801612b18565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015612f8c57612f8c612f4b565b500390565b600073ffffffffffffffffffffffffffffffffffffffff808a1683528089166020840152808816604084015280871660608401525084608083015260c060a0830152612fe160c083018486612de8565b9998505050505050505050565b6000821982111561300157613001612f4b565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361303757613037612f4b565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261307c5761307c61303e565b500490565b6000826130905761309061303e565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156130d657600080fd5b815180151581146124a757600080fdfea164736f6c634300080f000a", - "devdoc": { - "version": 1, - "kind": "dev", - "methods": { - "bridgeERC20(address,address,uint256,uint32,bytes)": { - "params": { - "_amount": "Amount of local tokens to deposit.", - "_extraData": "Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.", - "_localToken": "Address of the ERC20 on this chain.", - "_minGasLimit": "Minimum amount of gas that the bridge can be relayed with.", - "_remoteToken": "Address of the corresponding token on the remote chain." - } - }, - "bridgeERC20To(address,address,address,uint256,uint32,bytes)": { - "params": { - "_amount": "Amount of local tokens to deposit.", - "_extraData": "Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.", - "_localToken": "Address of the ERC20 on this chain.", - "_minGasLimit": "Minimum amount of gas that the bridge can be relayed with.", - "_remoteToken": "Address of the corresponding token on the remote chain.", - "_to": "Address of the receiver." - } - }, - "bridgeETH(uint32,bytes)": { - "params": { - "_extraData": "Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.", - "_minGasLimit": "Minimum amount of gas that the bridge can be relayed with." - } - }, - "bridgeETHTo(address,uint32,bytes)": { - "params": { - "_extraData": "Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.", - "_minGasLimit": "Minimum amount of gas that the bridge can be relayed with.", - "_to": "Address of the receiver." - } - }, - "completeOutboundTransfer(address,address,address,uint256)": { - "params": { - "_amount": "Amount of ETH being bridged.", - "_localToken": "Address of the ERC20 on this chain.", - "_remoteToken": "Address of the corresponding token on the remote chain.", - "_to": "Address of the receiver." - } - }, - "constructor": { - "params": { - "_messenger": "Address of the L1CrossDomainMessenger." - } - }, - "depositERC20(address,address,uint256,uint32,bytes)": { - "params": { - "_amount": "Amount of the ERC20 to deposit.", - "_extraData": "Optional data to forward to L2. Data supplied here will not be used to execute any code on L2 and is only emitted as extra data for the convenience of off-chain tooling.", - "_l1Token": "Address of the L1 token being deposited.", - "_l2Token": "Address of the corresponding token on L2.", - "_minGasLimit": "Minimum gas limit for the deposit message on L2." - } - }, - "depositERC20To(address,address,address,uint256,uint32,bytes)": { - "params": { - "_amount": "Amount of the ERC20 to deposit.", - "_extraData": "Optional data to forward to L2. Data supplied here will not be used to execute any code on L2 and is only emitted as extra data for the convenience of off-chain tooling.", - "_l1Token": "Address of the L1 token being deposited.", - "_l2Token": "Address of the corresponding token on L2.", - "_minGasLimit": "Minimum gas limit for the deposit message on L2.", - "_to": "Address of the recipient on L2." - } - }, - "depositETH(uint32,bytes)": { - "params": { - "_extraData": "Optional data to forward to L2. Data supplied here will not be used to execute any code on L2 and is only emitted as extra data for the convenience of off-chain tooling.", - "_minGasLimit": "Minimum gas limit for the deposit message on L2." - } - }, - "depositETHTo(address,uint32,bytes)": { - "params": { - "_extraData": "Optional data to forward to L2. Data supplied here will not be used to execute any code on L2 and is only emitted as extra data for the convenience of off-chain tooling.", - "_minGasLimit": "Minimum gas limit for the deposit message on L2.", - "_to": "Address of the recipient on L2." - } - }, - "finalizeBridgeERC20(address,address,address,address,uint256,bytes)": { - "params": { - "_amount": "Amount of ETH being bridged.", - "_extraData": "Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.", - "_from": "Address of the sender.", - "_localToken": "Address of the ERC20 on this chain.", - "_remoteToken": "Address of the corresponding token on the remote chain.", - "_to": "Address of the receiver." - } - }, - "finalizeBridgeETH(address,address,uint256,bytes)": { - "params": { - "_amount": "Amount of ETH being bridged.", - "_extraData": "Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.", - "_from": "Address of the sender.", - "_to": "Address of the receiver." - } - }, - "finalizeERC20Withdrawal(address,address,address,address,uint256,bytes)": { - "params": { - "_amount": "Amount of ETH to withdraw.", - "_extraData": "Optional data forwarded from L2.", - "_from": "Address of the withdrawer on L2.", - "_l1Token": "Address of the token on L1.", - "_l2Token": "Address of the corresponding token on L2.", - "_to": "Address of the recipient on L1." - } - }, - "finalizeETHWithdrawal(address,address,uint256,bytes)": { - "params": { - "_amount": "Amount of ETH to withdraw.", - "_extraData": "Optional data forwarded from L2.", - "_from": "Address of the withdrawer on L2.", - "_to": "Address of the recipient on L1." - } - }, - "initialize(address)": { - "params": { - "_messenger": "Address of the L1CrossDomainMessenger." - } - }, - "l2TokenBridge()": { - "returns": { - "_0": "Address of the corresponding L2 bridge contract." - } - }, - "version()": { - "returns": { - "_0": "Semver contract version as a string." - } - } - }, - "events": { - "ERC20DepositInitiated(address,address,address,address,uint256,bytes)": { - "params": { - "amount": "Amount of the ERC20 deposited.", - "extraData": "Extra data attached to the deposit.", - "from": "Address of the depositor.", - "l1Token": "Address of the token on L1.", - "l2Token": "Address of the corresponding token on L2.", - "to": "Address of the recipient on L2." - } - }, - "ERC20WithdrawalFinalized(address,address,address,address,uint256,bytes)": { - "params": { - "amount": "Amount of the ERC20 withdrawn.", - "extraData": "Extra data attached to the withdrawal.", - "from": "Address of the withdrawer.", - "l1Token": "Address of the token on L1.", - "l2Token": "Address of the corresponding token on L2.", - "to": "Address of the recipient on L1." - } - }, - "ETHDepositInitiated(address,address,uint256,bytes)": { - "params": { - "amount": "Amount of ETH deposited.", - "extraData": "Extra data attached to the deposit.", - "from": "Address of the depositor.", - "to": "Address of the recipient on L2." - } - }, - "ETHWithdrawalFinalized(address,address,uint256,bytes)": { - "params": { - "amount": "Amount of ETH withdrawn.", - "extraData": "Extra data attached to the withdrawal.", - "from": "Address of the withdrawer.", - "to": "Address of the recipient on L1." - } - } - } - }, - "userdoc": { - "version": 1, - "kind": "user", - "methods": { - "bridgeERC20(address,address,uint256,uint32,bytes)": { - "notice": "Sends ERC20 tokens to the sender's address on the other chain. Note that if the ERC20 token on the other chain does not recognize the local token as the correct pair token, the ERC20 bridge will fail and the tokens will be returned to sender on this chain." - }, - "bridgeERC20To(address,address,address,uint256,uint32,bytes)": { - "notice": "Sends ERC20 tokens to a receiver's address on the other chain. Note that if the ERC20 token on the other chain does not recognize the local token as the correct pair token, the ERC20 bridge will fail and the tokens will be returned to sender on this chain." - }, - "bridgeETH(uint32,bytes)": { - "notice": "Sends ETH to the sender's address on the other chain." - }, - "bridgeETHTo(address,uint32,bytes)": { - "notice": "Sends ETH to a receiver's address on the other chain. Note that if ETH is sent to a smart contract and the call fails, the ETH will be temporarily locked in the StandardBridge on the other chain until the call is replayed. If the call cannot be replayed with any amount of gas (call always reverts), then the ETH will be permanently locked in the StandardBridge on the other chain." - }, - "completeOutboundTransfer(address,address,address,uint256)": { - "notice": "Completes an outbound token transfer. Public function, but can only be called by this contract. It's security critical that there be absolutely no way for anyone to trigger this function, except by explicit trigger within this contract. Used as a simple way to be able to try/catch any type of revert that could occur during an ERC20 mint/transfer." - }, - "deposits(address,address)": { - "notice": "Mapping that stores deposits for a given pair of local and remote tokens." - }, - "finalizeBridgeERC20(address,address,address,address,uint256,bytes)": { - "notice": "Finalizes an ERC20 bridge on this chain. Can only be triggered by the other StandardBridge contract on the remote chain." - }, - "finalizeBridgeETH(address,address,uint256,bytes)": { - "notice": "Finalizes an ETH bridge on this chain. Can only be triggered by the other StandardBridge contract on the remote chain." - }, - "initialize(address)": { - "notice": "Initializer." - }, - "messenger()": { - "notice": "Messenger contract on this domain." - }, - "otherBridge()": { - "notice": "Corresponding bridge on the other domain." - }, - "version()": { - "notice": "Returns the full semver contract version." - } - }, - "events": { - "ERC20BridgeFailed(address,address,address,address,uint256,bytes)": { - "notice": "Emitted when an ERC20 bridge to this chain fails." - }, - "ERC20BridgeFinalized(address,address,address,address,uint256,bytes)": { - "notice": "Emitted when an ERC20 bridge is finalized on this chain." - }, - "ERC20BridgeInitiated(address,address,address,address,uint256,bytes)": { - "notice": "Emitted when an ERC20 bridge is initiated to the other chain." - }, - "ETHBridgeFinalized(address,address,uint256,bytes)": { - "notice": "Emitted when an ETH bridge is finalized on this chain." - }, - "ETHBridgeInitiated(address,address,uint256,bytes)": { - "notice": "Emitted when an ETH bridge is initiated to the other chain." - } - }, - "notice": "The L1StandardBridge is responsible for transfering ETH and ERC20 tokens between L1 and L2. ERC20 tokens deposited into L2 are escrowed within this contract until withdrawal. ETH is transferred to and escrowed within the OptimismPortal contract." - }, - "storageLayout": { - "storage": [ - { - "astId": 25872, - "contract": "contracts/L1/L1StandardBridge.sol:L1StandardBridge", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8" - }, - { - "astId": 25875, - "contract": "contracts/L1/L1StandardBridge.sol:L1StandardBridge", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 24958, - "contract": "contracts/L1/L1StandardBridge.sol:L1StandardBridge", - "label": "messenger", - "offset": 2, - "slot": "0", - "type": "t_contract(CrossDomainMessenger)23873" - }, - { - "astId": 24962, - "contract": "contracts/L1/L1StandardBridge.sol:L1StandardBridge", - "label": "otherBridge", - "offset": 0, - "slot": "1", - "type": "t_contract(StandardBridge)25640" - }, - { - "astId": 24969, - "contract": "contracts/L1/L1StandardBridge.sol:L1StandardBridge", - "label": "deposits", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_contract(CrossDomainMessenger)23873": { - "encoding": "inplace", - "label": "contract CrossDomainMessenger", - "numberOfBytes": "20" - }, - "t_contract(StandardBridge)25640": { - "encoding": "inplace", - "label": "contract StandardBridge", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "encoding": "mapping", - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "label": "mapping(address => uint256)", - "numberOfBytes": "32" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - } - } - } -} \ No newline at end of file diff --git a/packages/contracts-bedrock/deployments/goerli/OptimismPortal.json b/packages/contracts-bedrock/deployments/goerli/OptimismPortal.json deleted file mode 100644 index 23e2f8ae45bbf..0000000000000 --- a/packages/contracts-bedrock/deployments/goerli/OptimismPortal.json +++ /dev/null @@ -1,674 +0,0 @@ -{ - "address": "0x79C6C6b1844e3db7C30107f189CFb095Bd2c4B5d", - "abi": [ - { - "inputs": [ - { - "internalType": "contract L2OutputOracle", - "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": "contract L2OutputOracle", - "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": "struct Types.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": "withdrawerStorageRoot", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "latestBlockhash", - "type": "bytes32" - } - ], - "internalType": "struct Types.OutputRootProof", - "name": "_outputRootProof", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "_withdrawalProof", - "type": "bytes" - } - ], - "name": "finalizeWithdrawalTransaction", - "outputs": [], - "stateMutability": "payable", - "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" - } - ], - "transactionHash": "0x3ac590c822271c4ee52c3327f8154518b3a2d0ca0d4aeacbf74bc2a7a9bf0d5b", - "receipt": { - "to": null, - "from": "0xCFf7a9856DB3C60AB546b8F43dC5D1A4336786A0", - "contractAddress": "0x79C6C6b1844e3db7C30107f189CFb095Bd2c4B5d", - "transactionIndex": 0, - "gasUsed": "3481823", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000", - "blockHash": "0xd2afc46aa8ad4b9d42ff65f9e0b2e76a9864bdda53838da89d4ecead4ef54242", - "transactionHash": "0x3ac590c822271c4ee52c3327f8154518b3a2d0ca0d4aeacbf74bc2a7a9bf0d5b", - "logs": [ - { - "transactionIndex": 0, - "blockNumber": 7355246, - "transactionHash": "0x3ac590c822271c4ee52c3327f8154518b3a2d0ca0d4aeacbf74bc2a7a9bf0d5b", - "address": "0x79C6C6b1844e3db7C30107f189CFb095Bd2c4B5d", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0xd2afc46aa8ad4b9d42ff65f9e0b2e76a9864bdda53838da89d4ecead4ef54242" - } - ], - "blockNumber": 7355246, - "cumulativeGasUsed": "3481823", - "status": 1, - "byzantium": true - }, - "args": [ - "0x1Bf3F468e52aA31fd19BaF006B23c327c8fc7198", - 2 - ], - "numDeployments": 1, - "solcInputHash": "cd42cb04f3b6a78e5824c9f427d0a55d", - "metadata": "{\"compiler\":{\"version\":\"0.8.15+commit.e14f2714\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract L2OutputOracle\",\"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\":\"contract L2OutputOracle\",\"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\":\"struct Types.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\":\"withdrawerStorageRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"latestBlockhash\",\"type\":\"bytes32\"}],\"internalType\":\"struct Types.OutputRootProof\",\"name\":\"_outputRootProof\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"_withdrawalProof\",\"type\":\"bytes\"}],\"name\":\"finalizeWithdrawalTransaction\",\"outputs\":[],\"stateMutability\":\"payable\",\"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\"}],\"devdoc\":{\"custom:proxied\":\"@title OptimismPortal\",\"events\":{\"TransactionDeposited(address,address,uint256,bytes)\":{\"params\":{\"from\":\"Address that triggered the deposit transaction.\",\"opaqueData\":\"ABI encoded deposit data to be parsed off-chain.\",\"to\":\"Address that the deposit transaction is directed to.\",\"version\":\"Version of this deposit transaction event.\"}},\"WithdrawalFinalized(bytes32,bool)\":{\"params\":{\"success\":\"Whether the withdrawal transaction was successful.\",\"withdrawalHash\":\"Hash of the withdrawal transaction.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"custom:semver\":\"0.0.1\",\"params\":{\"_finalizationPeriodSeconds\":\"Output finalization time in seconds.\",\"_l2Oracle\":\"Address of the L2OutputOracle contract.\"}},\"depositTransaction(address,uint256,uint64,bool,bytes)\":{\"params\":{\"_data\":\"Data to trigger the recipient with.\",\"_gasLimit\":\"Minimum L2 gas limit (can be greater than or equal to this value).\",\"_isCreation\":\"Whether or not the transaction is a contract creation.\",\"_to\":\"Target address on L2.\",\"_value\":\"ETH value to send to the recipient.\"}},\"finalizeWithdrawalTransaction((uint256,address,address,uint256,uint256,bytes),uint256,(bytes32,bytes32,bytes32,bytes32),bytes)\":{\"params\":{\"_l2BlockNumber\":\"L2 block number of the outputRoot.\",\"_outputRootProof\":\"Inclusion proof of the withdrawer contracts storage root.\",\"_tx\":\"Withdrawal transaction to finalize.\",\"_withdrawalProof\":\"Inclusion proof for the given withdrawal in the withdrawer contract.\"}},\"isBlockFinalized(uint256)\":{\"params\":{\"_l2BlockNumber\":\"The number of the L2 block.\"}},\"version()\":{\"returns\":{\"_0\":\"Semver contract version as a string.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"TransactionDeposited(address,address,uint256,bytes)\":{\"notice\":\"Emitted when a transaction is deposited from L1 to L2. The parameters of this event are read by the rollup node and used to derive deposit transactions on L2.\"},\"WithdrawalFinalized(bytes32,bool)\":{\"notice\":\"Emitted when a withdrawal transaction is finalized.\"}},\"kind\":\"user\",\"methods\":{\"BASE_FEE_MAX_CHANGE_DENOMINATOR()\":{\"notice\":\"Denominator that determines max change on fee per block.\"},\"ELASTICITY_MULTIPLIER()\":{\"notice\":\"Along with the resource limit, determines the target resource limit.\"},\"FINALIZATION_PERIOD_SECONDS()\":{\"notice\":\"Minimum time (in seconds) that must elapse before a withdrawal can be finalized.\"},\"INITIAL_BASE_FEE()\":{\"notice\":\"Initial base fee value.\"},\"L2_ORACLE()\":{\"notice\":\"Address of the L2OutputOracle.\"},\"MAX_RESOURCE_LIMIT()\":{\"notice\":\"Maximum amount of the resource that can be used within this block.\"},\"MINIMUM_BASE_FEE()\":{\"notice\":\"Minimum base fee value, cannot go lower than this.\"},\"TARGET_RESOURCE_LIMIT()\":{\"notice\":\"Target amount of the resource that should be used within this block.\"},\"depositTransaction(address,uint256,uint64,bool,bytes)\":{\"notice\":\"Accepts deposits of ETH and data, and emits a TransactionDeposited event for use in deriving deposit transactions. Note that if a deposit is made by a contract, its address will be aliased when retrieved using `tx.origin` or `msg.sender`. Consider using the CrossDomainMessenger contracts for a simpler developer experience.\"},\"finalizeWithdrawalTransaction((uint256,address,address,uint256,uint256,bytes),uint256,(bytes32,bytes32,bytes32,bytes32),bytes)\":{\"notice\":\"Finalizes a withdrawal transaction.\"},\"finalizedWithdrawals(bytes32)\":{\"notice\":\"A list of withdrawal hashes which have been successfully finalized.\"},\"initialize()\":{\"notice\":\"Initializer;\"},\"isBlockFinalized(uint256)\":{\"notice\":\"Determine if a given block number is finalized. Reverts if the call to L2_ORACLE.getL2Output reverts. Returns a boolean otherwise.\"},\"l2Sender()\":{\"notice\":\"Address of the L2 account which initiated a withdrawal in this transaction. If the of this variable is the default L2 sender address, then we are NOT inside of a call to finalizeWithdrawalTransaction.\"},\"params()\":{\"notice\":\"EIP-1559 style gas parameters.\"},\"version()\":{\"notice\":\"Returns the full semver contract version.\"}},\"notice\":\"The OptimismPortal is a low-level contract responsible for passing messages between L1 and L2. Messages sent directly to the OptimismPortal have no form of replayability. Users are encouraged to use the L1CrossDomainMessenger for a higher-level interface.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/L1/OptimismPortal.sol\":\"OptimismPortal\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@eth-optimism/contracts-periphery/=node_modules/@eth-optimism/contracts-periphery/contracts/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/\",\":@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/\",\":@rari-capital/=node_modules/@rari-capital/\",\":@rari-capital/solmate/=node_modules/@rari-capital/solmate/\",\":contracts/=contracts/\",\":ds-test/=node_modules/ds-test/src/\",\":excessively-safe-call/=node_modules/excessively-safe-call/\",\":forge-std/=node_modules/forge-std/src/\"]},\"sources\":{\"contracts/L1/L2OutputOracle.sol\":{\"keccak256\":\"0xe3242f566b5c1ae0e983e734e053552b7ef53d73f23575b5c6bbad4505aacc61\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://45451a37d695b27f1e8d80f50a75d54be55b406538b24d913cb210c021a77876\",\"dweb:/ipfs/QmUqgkGNkDBZhGJQJjKdHWwuFUhg7Cu1qPpYUcRFWSi3Pr\"]},\"contracts/L1/OptimismPortal.sol\":{\"keccak256\":\"0xbdfc47a8ef7a1665d8aa25dabcc0281860ef88c5c9646a230e53af0d27248456\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0cad521349efcdd4ca4a0a937ce126cf40417f53373bf3235182f7d9a97df358\",\"dweb:/ipfs/QmbydUJzEtjR4xaPicsjFk5MunHz41peVCRrNR7GPDBEq2\"]},\"contracts/L1/ResourceMetering.sol\":{\"keccak256\":\"0xcbb34b35a67da37c07bc9ddf900012b94605491e6845a8811fd5d6d9fff8aed6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://84f801cd1c3d30f13a9a537c550898ffb170a810d640e2138ff6efe16c76a6ca\",\"dweb:/ipfs/QmYR49Qv7nJey69r726QmkpAWwqukAN7CBXj3xn5KxHUcV\"]},\"contracts/libraries/Burn.sol\":{\"keccak256\":\"0x54233b226ba6919dc46d438bc790108d8f855001002a1b9c3c37aed7a83e5f3f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4051a4baca357a9191a6c9e3aa1593a17b69dd7915966e23e4cb269e9c1d9ed4\",\"dweb:/ipfs/QmadKjGKvxm53abVHQdsxrXBc8e9jXywu6vvhkAgjsx59J\"]},\"contracts/libraries/Bytes.sol\":{\"keccak256\":\"0x90538c876448b34513ece8e91dc3d541291f17263813f2baf7a0e93b09993f31\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://16bd9e3249cd8659fdfe03a4c77b4d72ff9d3abbde81054dcd37710d1e176e8f\",\"dweb:/ipfs/QmbQ9VBUJfzWUK2KneSFNjtiH4dmPKChsZSQVNFAXJrrrZ\"]},\"contracts/libraries/Encoding.sol\":{\"keccak256\":\"0xca8dce21b608bac08ae75d42879e90f5e7865fb29587df181a22a3b14ce21985\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://29b093d22061b4c499566cb35ce2755cce241ab9f02716cf9cdbdd81f9c47871\",\"dweb:/ipfs/QmdF4DHQUEeEeW67ugmEC3AHn6QrBBNYtwV7UaHaSTe2pa\"]},\"contracts/libraries/Hashing.sol\":{\"keccak256\":\"0xef5d0156a50f96bf32d34ef7a217872791b1b3c11baa9c13183a6388356a918d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b7790ae2e79906d26924f7b69e8a3610031db48cef4b6e306e923431def8ba86\",\"dweb:/ipfs/QmSGJEBv5XsDtsr2QTJnwGKXAXxqZafYGeZcRKKfw1yrUc\"]},\"contracts/libraries/Types.sol\":{\"keccak256\":\"0x93045c0c97287a12e1bdde0685e26f185411b81b93b9df15c8cce90bccdcf77c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0c90b59d09f92aba5ab0862264efe2beb0f77fba750867f8d686a1f39ee6af2c\",\"dweb:/ipfs/QmW7Zj5d7NgDi5Mdv6jptJgfsUj8LvGroud9p2Z7vhcKLC\"]},\"contracts/libraries/rlp/RLPReader.sol\":{\"keccak256\":\"0xef51cf7340f3e3f6ff9f651d6b284831a38f1631635c5d72121ad9498caf15b3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://034c29eee4bc5ed4f0d013162d20c17cbc0ba5d26fd0cd477bcac0235e8266f0\",\"dweb:/ipfs/QmQZ1eFbqkVKAkKc4mXUCbGrdD6rE4sgzbzbSzS8RC4SCX\"]},\"contracts/libraries/rlp/RLPWriter.sol\":{\"keccak256\":\"0x5aa9d21c5b41c9786f23153f819d561ae809a1d55c7b0d423dfeafdfbacedc78\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://921c44e6a0982b9a4011900fda1bda2c06b7a85894967de98b407a83fe9f90c0\",\"dweb:/ipfs/QmSsHLKDUQ82kpKdqB6VntVGKuPDb4W9VdotsubuqWBzio\"]},\"contracts/libraries/trie/MerkleTrie.sol\":{\"keccak256\":\"0xbbf5b9e6b2ea942038ca5ed5722352c499019b0a0026edbda9a70f777aa2600d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2222d31689b9a41747a0082c8c8689ca7560ca69528f3901c73ca0d2efc2985f\",\"dweb:/ipfs/QmXHEZtsUkrGLGT9R5kHETRNwPURCVnrKKvbbmHpDUUHVj\"]},\"contracts/libraries/trie/SecureMerkleTrie.sol\":{\"keccak256\":\"0xd27ad3665179493bab93a4316bcd2a780bfec524f774226420e931acf8043ebb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b3ec639edab8c22e020dd7a108f69d7dc99f2e9d0bb9075e9aa41d4bd1f5cc03\",\"dweb:/ipfs/QmR9fMgKEVLNm4LPbpSEX9AepmELxX6JXNm2o8tCXceBSF\"]},\"contracts/universal/Semver.sol\":{\"keccak256\":\"0x8215e8fbaace5e06fdf0be26cd8ec224847cf03e89bd78dc8ba3ec2cb429d4fe\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cfe4869ad9a1a10aee499ed4ac74a19f9f95dd9173efa656f6b1728f6912a9ad\",\"dweb:/ipfs/QmbiKSxpNnKQv8jwEvGUJkksaLPp8UU8N1twbDimM3RhXr\"]},\"contracts/vendor/AddressAliasHelper.sol\":{\"keccak256\":\"0x6ecb83b4ec80fbe49c22f4f95d90482de64660ef5d422a19f4d4b04df31c1237\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://1d0885be6e473962f9a0622176a22300165ac0cc1a1d7f2e22b11c3d656ace88\",\"dweb:/ipfs/QmPRa3KmRpXW5P9ykveKRDgYN5zYo4cYLAYSnoqHX3KnXR\"]},\"node_modules/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d7fc8396619de513c96b6e00301b88dd790e83542aab918425633a5f7297a15a\",\"dweb:/ipfs/QmXbP4kiZyp7guuS7xe8KaybnwkRPGrBc2Kbi3vhcTfpxb\"]},\"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x0203dcadc5737d9ef2c211d6fa15d18ebc3b30dfa51903b64870b01a062b0b4e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6eb2fd1e9894dbe778f4b8131adecebe570689e63cf892f4e21257bfe1252497\",\"dweb:/ipfs/QmXgUGNfZvrn6N2miv3nooSs7Jm34A41qz94fu2GtDFcx8\"]},\"node_modules/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"keccak256\":\"0x611aa3f23e59cfdd1863c536776407b3e33d695152a266fa7cfb34440a29a8a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9b4b2110b7f2b3eb32951bc08046fa90feccffa594e1176cb91cdfb0e94726b4\",\"dweb:/ipfs/QmSxLwYjicf9zWFuieRc8WQwE4FisA1Um5jp1iSa731TGt\"]},\"node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c\",\"dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a\"]},\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x32c202bd28995dd20c4347b7c6467a6d3241c74c8ad3edcbb610cd9205916c45\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8179c356adb19e70d6b31a1eedc8c5c7f0c00e669e2540f4099e3844c6074d30\",\"dweb:/ipfs/QmWFbivarEobbqhS1go64ootVuHfVohBseerYy9FTEd1W2\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0xc995bddbca1ae19788db9f8b61e63385edd3fddf89693b612d5abd1a275974d2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ab84f13e6e6e0823854a0cddd49e96df052092d5919f95587607f0ed28a64cb6\",\"dweb:/ipfs/QmbNtqAq23ZDjCzHukQaa7B3y6rcobscm6FZF5PMQXcnVr\"]},\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0xb3ebde1c8d27576db912d87c3560dab14adfb9cd001be95890ec4ba035e652e7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a709421c4f5d4677db8216055d2d4dac96a613efdb08178a9f7041f0c5cef689\",\"dweb:/ipfs/QmYs2rStvVLDnSJs8HgaMD1ABwoKKWdiVbQyNfLfFWTjTy\"]},\"node_modules/@rari-capital/solmate/src/utils/FixedPointMathLib.sol\":{\"keccak256\":\"0x622fcd8a49e132df5ec7651cc6ae3aaf0cf59bdcd67a9a804a1b9e2485113b7d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://af77088eb606427d4c55e578984a615779c86bc30646a20f7bb27299ba390f7c\",\"dweb:/ipfs/QmZGQdhdQDtHc7gZXWrKXgA3govc74X8U63BiWhPQK3mK8\"]},\"node_modules/excessively-safe-call/src/ExcessivelySafeCall.sol\":{\"keccak256\":\"0x7d9d432e8f02168bf3f790e3dabcf36402782acf7ffa476cabe86fc4d8962eb2\",\"license\":\"MIT OR Apache-2.0\",\"urls\":[\"bzz-raw://1adc13e7f399f500ea5f81480ad149a50408fde7990a2c6347e6377486f389dc\",\"dweb:/ipfs/QmSvm5TUBJqknsqNJLLHqNS4MLSH5k3vNrbquVg6ZKSfx9\"]}},\"version\":1}", - "bytecode": "0x6101206040523480156200001257600080fd5b506040516200401238038062004012833981016040819052620000359162000261565b6000608081905260a052600160c0526001600160a01b0382166101005260e08190526200006162000069565b50506200029d565b600054610100900460ff16158080156200008a5750600054600160ff909116105b80620000ba5750620000a730620001af60201b6200127e1760201c565b158015620000ba575060005460ff166001145b620001235760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801562000147576000805461ff0019166101001790555b603380546001600160a01b03191661dead17905562000165620001be565b8015620001ac576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6001600160a01b03163b151590565b600054610100900460ff166200022b5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016200011a565b60408051606081018252633b9aca0080825260006020830152436001600160401b031691909201819052600160c01b0217600155565b600080604083850312156200027557600080fd5b82516001600160a01b03811681146200028d57600080fd5b6020939093015192949293505050565b60805160a05160c05160e05161010051613d1b620002f76000396000818161013401528181610b690152610d900152600081816103bd015261155701526000610918015260006108ef015260006108c60152613d1b6000f3fe6080604052600436106100f65760003560e01c8063a14238e71161008a578063cff0ab9611610059578063cff0ab96146102f7578063e9e05c4214610398578063f4daa291146103ab578063fdc9fe1d146103df57600080fd5b8063a14238e71461026d578063c4fc4798146102ad578063ca3e99ba146102cd578063cd7c9789146102e257600080fd5b80636bb0291e116100c65780636bb0291e146102005780638129fc1c14610215578063867ead131461022a5780639bf62d821461024057600080fd5b80621c2ff61461012257806313620abd1461018057806354fd4d50146101b957806364b79208146101db57600080fd5b3661011d5761011b3334620186a06000604051806020016040528060008152506103f2565b005b600080fd5b34801561012e57600080fd5b506101567f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561018c57600080fd5b50610198633b9aca0081565b6040516fffffffffffffffffffffffffffffffff9091168152602001610177565b3480156101c557600080fd5b506101ce6108bf565b604051610177919061336e565b3480156101e757600080fd5b506101f2627a120081565b604051908152602001610177565b34801561020c57600080fd5b506101f2600481565b34801561022157600080fd5b5061011b610962565b34801561023657600080fd5b506101f261271081565b34801561024c57600080fd5b506033546101569073ffffffffffffffffffffffffffffffffffffffff1681565b34801561027957600080fd5b5061029d610288366004613381565b60346020526000908152604090205460ff1681565b6040519015158152602001610177565b3480156102b957600080fd5b5061029d6102c8366004613381565b610b20565b3480156102d957600080fd5b506101f2610be5565b3480156102ee57600080fd5b506101f2600881565b34801561030357600080fd5b5060015461035f906fffffffffffffffffffffffffffffffff81169067ffffffffffffffff7001000000000000000000000000000000008204811691780100000000000000000000000000000000000000000000000090041683565b604080516fffffffffffffffffffffffffffffffff909416845267ffffffffffffffff9283166020850152911690820152606001610177565b61011b6103a63660046134c6565b6103f2565b3480156103b757600080fd5b506101f27f000000000000000000000000000000000000000000000000000000000000000081565b61011b6103ed3660046135b4565b610bf6565b8260005a905083156104a95773ffffffffffffffffffffffffffffffffffffffff8716156104a957604080517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482015260248101919091527f4f7074696d69736d506f7274616c3a206d7573742073656e6420746f2061646460448201527f72657373283029207768656e206372656174696e67206120636f6e747261637460648201526084015b60405180910390fd5b333281146104ca575033731111000000000000000000000000000000001111015b600034888888886040516020016104e59594939291906136a8565b604051602081830303815290604052905060008973ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fb3813568d9991fc951961fcb4c784893574240a28925604d09fc577c55bb7c3284604051610555919061336e565b60405180910390a45050600154600090610595907801000000000000000000000000000000000000000000000000900467ffffffffffffffff164361373c565b9050801561071e5760006105ad6004627a1200613782565b6001546105d89190700100000000000000000000000000000000900467ffffffffffffffff166137ea565b9050600060086105ec6004627a1200613782565b60015461060c9085906fffffffffffffffffffffffffffffffff1661385e565b6106169190613782565b6106209190613782565b60015490915060009061066c906106569061064e9085906fffffffffffffffffffffffffffffffff1661391a565b61271061129a565b6fffffffffffffffffffffffffffffffff6112b5565b905060018411156106df576106dc610656670de0b6b3a76400006106c8610694600883613782565b6106a690670de0b6b3a76400006137ea565b6106b160018a61373c565b6106c390670de0b6b3a764000061398e565b6112c4565b6106d2908561385e565b61064e9190613782565b90505b6fffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff4316021760015550505b60018054849190601090610751908490700100000000000000000000000000000000900467ffffffffffffffff166139cb565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550627a1200600160000160109054906101000a900467ffffffffffffffff1667ffffffffffffffff16131561082d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f5265736f757263654d65746572696e673a2063616e6e6f7420627579206d6f7260448201527f6520676173207468616e20617661696c61626c6520676173206c696d6974000060648201526084016104a0565b600154600090610859906fffffffffffffffffffffffffffffffff1667ffffffffffffffff86166139f7565b6fffffffffffffffffffffffffffffffff169050600061087d48633b9aca006112f5565b6108879083613a2f565b905060005a610896908661373c565b9050808211156108b2576108b26108ad828461373c565b611305565b5050505050505050505050565b60606108ea7f0000000000000000000000000000000000000000000000000000000000000000611333565b6109137f0000000000000000000000000000000000000000000000000000000000000000611333565b61093c7f0000000000000000000000000000000000000000000000000000000000000000611333565b60405160200161094e93929190613a43565b604051602081830303815290604052905090565b600054610100900460ff16158080156109825750600054600160ff909116105b8061099c5750303b15801561099c575060005460ff166001145b610a28576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016104a0565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610a8657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b603380547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055610aba611470565b8015610b1d57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6040517fa25ae55700000000000000000000000000000000000000000000000000000000815260048101829052600090819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063a25ae557906024016040805180830381865afa158015610baf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd39190613ab9565b9050610bde81611553565b9392505050565b610bf36004627a1200613782565b81565b60335473ffffffffffffffffffffffffffffffffffffffff1661dead14610c9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d506f7274616c3a2063616e206f6e6c79207472696767657260448201527f206f6e65207769746864726177616c20706572207472616e73616374696f6e0060648201526084016104a0565b3073ffffffffffffffffffffffffffffffffffffffff16856040015173ffffffffffffffffffffffffffffffffffffffff1603610d5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d506f7274616c3a20796f752063616e6e6f742073656e642060448201527f6d6573736167657320746f2074686520706f7274616c20636f6e74726163740060648201526084016104a0565b6040517fa25ae557000000000000000000000000000000000000000000000000000000008152600481018590526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a25ae557906024016040805180830381865afa158015610deb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0f9190613ab9565b9050610e1a81611553565b610ea6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4f7074696d69736d506f7274616c3a2070726f706f73616c206973206e6f742060448201527f7965742066696e616c697a65640000000000000000000000000000000000000060648201526084016104a0565b610ebd610eb836869003860186613b08565b61158d565b815114610f4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f7074696d69736d506f7274616c3a20696e76616c6964206f7574707574207260448201527f6f6f742070726f6f66000000000000000000000000000000000000000000000060648201526084016104a0565b6000610f57876115e9565b9050610f9e81866040013586868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061161992505050565b61102a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4f7074696d69736d506f7274616c3a20696e76616c696420776974686472617760448201527f616c20696e636c7573696f6e2070726f6f66000000000000000000000000000060648201526084016104a0565b60008181526034602052604090205460ff16156110c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f4f7074696d69736d506f7274616c3a207769746864726177616c20686173206160448201527f6c7265616479206265656e2066696e616c697a6564000000000000000000000060648201526084016104a0565b600081815260346020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055608087015161111290614e2090613b6e565b5a10156111a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4f7074696d69736d506f7274616c3a20696e73756666696369656e742067617360448201527f20746f2066696e616c697a65207769746864726177616c00000000000000000060648201526084016104a0565b8660200151603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000611206886040015189608001518a6060015160008c60a001516116e0565b50603380547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead17905560405190915082907fdb5c7652857aa163daadd670e116628fb42e869d8ac4251ef8971d9e5727df1b9061126c90841515815260200190565b60405180910390a25050505050505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6000818312156112aa57816112ac565b825b90505b92915050565b60008183126112aa57816112ac565b60006112ac670de0b6b3a7640000836112dc8661176b565b6112e6919061385e565b6112f09190613782565b6119af565b6000818310156112aa57816112ac565b6000805a90505b825a611318908361373c565b101561132e5761132782613b86565b915061130c565b505050565b60608160000361137657505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156113a0578061138a81613b86565b91506113999050600a83613a2f565b915061137a565b60008167ffffffffffffffff8111156113bb576113bb6133c3565b6040519080825280601f01601f1916602001820160405280156113e5576020820181803683370190505b5090505b8415611468576113fa60018361373c565b9150611407600a86613bbe565b611412906030613b6e565b60f81b81838151811061142757611427613bd2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611461600a86613a2f565b94506113e9565b949350505050565b600054610100900460ff16611507576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016104a0565b60408051606081018252633b9aca00808252600060208301524367ffffffffffffffff169190920181905278010000000000000000000000000000000000000000000000000217600155565b60007f000000000000000000000000000000000000000000000000000000000000000082602001516115859190613b6e565b421192915050565b600081600001518260200151836040015184606001516040516020016115cc949392919093845260208401929092526040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b80516020808301516040808501516060860151608087015160a088015193516000976115cc979096959101613c01565b604080516020810185905260009181018290528190606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828252805160209182012090830181905292506116d79101604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828201909152600182527f01000000000000000000000000000000000000000000000000000000000000006020830152908587611bee565b95945050505050565b6000606060008060008661ffff1667ffffffffffffffff811115611706576117066133c3565b6040519080825280601f01601f191660200182016040528015611730576020820181803683370190505b5090506000808751602089018b8e8ef191503d925086831115611751578692505b828152826000602083013e90999098509650505050505050565b60008082136117d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f554e444546494e4544000000000000000000000000000000000000000000000060448201526064016104a0565b600060606117e384611c12565b03609f8181039490941b90931c6c465772b2bbbb5f824b15207a3081018102606090811d6d0388eaa27412d5aca026815d636e018202811d6d0df99ac502031bf953eff472fdcc018202811d6d13cdffb29d51d99322bdff5f2211018202811d6d0a0f742023def783a307a986912e018202811d6d01920d8043ca89b5239253284e42018202811d6c0b7a86d7375468fac667a0a527016c29508e458543d8aa4df2abee7883018302821d6d0139601a2efabe717e604cbb4894018302821d6d02247f7a7b6594320649aa03aba1018302821d7fffffffffffffffffffffffffffffffffffffff73c0c716a594e00d54e3c4cbc9018302821d7ffffffffffffffffffffffffffffffffffffffdc7b88c420e53a9890533129f6f01830290911d7fffffffffffffffffffffffffffffffffffffff465fda27eb4d63ded474e5f832019091027ffffffffffffffff5f6af8f7b3396644f18e157960000000000000000000000000105711340daa0d5f769dba1915cef59f0815a5506027d0267a36c0c95b3975ab3ee5b203a7614a3f75373f047d803ae7b6687f2b393909302929092017d57115e47018c7177eebf7cd370a3356a1b7863008a5ae8028c72b88642840160ae1d92915050565b60007ffffffffffffffffffffffffffffffffffffffffffffffffdb731c958f34d94c182136119e057506000919050565b680755bf798b4a1bf1e58212611a52576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4558505f4f564552464c4f57000000000000000000000000000000000000000060448201526064016104a0565b6503782dace9d9604e83901b059150600060606bb17217f7d1cf79abc9e3b39884821b056b80000000000000000000000001901d6bb17217f7d1cf79abc9e3b39881029093037fffffffffffffffffffffffffffffffffffffffdbf3ccf1604d263450f02a550481018102606090811d6d0277594991cfc85f6e2461837cd9018202811d7fffffffffffffffffffffffffffffffffffffe5adedaa1cb095af9e4da10e363c018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d7ffffffffffffffffffffffffffffffffffffd38dc772608b0ae56cce01296c0eb018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084017ffffffffffffffffffffffffffffffffffffffe2c69812cf03b0763fd454a8f7e010290911d6e0587f503bb6ea29d25fcb7401964500190910279d835ebba824c98fb31b83b2ca45c000000000000000000000000010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b600080611bfa86611ce8565b9050611c0881868686611d1a565b9695505050505050565b6000808211611c7d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f554e444546494e4544000000000000000000000000000000000000000000000060448201526064016104a0565b5060016fffffffffffffffffffffffffffffffff821160071b82811c67ffffffffffffffff1060061b1782811c63ffffffff1060051b1782811c61ffff1060041b1782811c60ff10600390811b90911783811c600f1060021b1783811c909110821b1791821c111790565b60608180519060200120604051602001611d0491815260200190565b6040516020818303038152906040529050919050565b6000806000611d2a878686611d57565b91509150818015611d4c57508051602080830191909120875191880191909120145b979650505050505050565b600060606000611d6685611e72565b90506000806000611d78848a89611f6d565b81519295509093509150158080611d8c5750815b611e18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4d65726b6c65547269653a2070726f76696465642070726f6f6620697320696e60448201527f76616c696400000000000000000000000000000000000000000000000000000060648201526084016104a0565b600081611e345760405180602001604052806000815250611e60565b611e6086611e4360018861373c565b81518110611e5357611e53613bd2565b60200260200101516124f6565b919b919a509098505050505050505050565b60606000611e7f83612520565b90506000815167ffffffffffffffff811115611e9d57611e9d6133c3565b604051908082528060200260200182016040528015611ee257816020015b6040805180820190915260608082526020820152815260200190600190039081611ebb5790505b50905060005b8251811015611f65576000611f15848381518110611f0857611f08613bd2565b6020026020010151612553565b90506040518060400160405280828152602001611f3183612520565b815250838381518110611f4657611f46613bd2565b6020026020010181905250508080611f5d90613b86565b915050611ee8565b509392505050565b60006060818080611f7d8761261a565b90506000869050600080611fa4604051806040016040528060608152602001606081525090565b60005b8c518110156124b2578c8181518110611fc257611fc2613bd2565b602002602001015191508284611fd89190613b6e565b9350611fe5600188613b6e565b96508360000361206657815180516020909101208514612061576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4d65726b6c65547269653a20696e76616c696420726f6f74206861736800000060448201526064016104a0565b6121a2565b81515160201161210857815180516020909101208514612061576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4d65726b6c65547269653a20696e76616c6964206c6172676520696e7465726e60448201527f616c20686173680000000000000000000000000000000000000000000000000060648201526084016104a0565b8151859061211590613c58565b146121a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4d65726b6c65547269653a20696e76616c696420696e7465726e616c206e6f6460448201527f652068617368000000000000000000000000000000000000000000000000000060648201526084016104a0565b6121ae60106001613b6e565b8260200151510361222057855184146124b25760008685815181106121d5576121d5613bd2565b602001015160f81c60f81b60f81c9050600083602001518260ff168151811061220057612200613bd2565b602002602001015190506122138161279d565b96506001945050506124a0565b600282602001515103612418576000612238836127d3565b905060008160008151811061224f5761224f613bd2565b016020015160f81c90506000612266600283613c9a565b612271906002613cbc565b90506000612282848360ff166127f7565b905060006122908b8a6127f7565b9050600061229e838361282d565b905060ff8516600214806122b5575060ff85166003145b1561230b578083511480156122ca5750808251145b156122dc576122d9818b613b6e565b99505b507f800000000000000000000000000000000000000000000000000000000000000099506124b2945050505050565b60ff8516158061231e575060ff85166001145b15612390578251811461235a57507f800000000000000000000000000000000000000000000000000000000000000099506124b2945050505050565b612381886020015160018151811061237457612374613bd2565b602002602001015161279d565b9a5097506124a0945050505050565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4d65726b6c65547269653a2072656365697665642061206e6f6465207769746860448201527f20616e20756e6b6e6f776e20707265666978000000000000000000000000000060648201526084016104a0565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f4d65726b6c65547269653a20726563656976656420616e20756e70617273656160448201527f626c65206e6f646500000000000000000000000000000000000000000000000060648201526084016104a0565b806124aa81613b86565b915050611fa7565b507f80000000000000000000000000000000000000000000000000000000000000008414866124e187866127f7565b909e909d50909b509950505050505050505050565b602081015180516060916112af916125109060019061373c565b81518110611f0857611f08613bd2565b6040805180820182526000808252602091820152815180830190925282518252808301908201526060906112af906128d9565b6060600080600061256385612b32565b91945092509050600081600181111561257e5761257e613cdf565b1461260b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f524c505265616465723a20696e76616c696420524c502062797465732076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016104a0565b6116d78560200151848461301d565b606060008251600261262c919061398e565b67ffffffffffffffff811115612644576126446133c3565b6040519080825280601f01601f19166020018201604052801561266e576020820181803683370190505b50905060005b835181101561279657600484828151811061269157612691613bd2565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016901c826126c683600261398e565b815181106126d6576126d6613bd2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350601084828151811061271957612719613bd2565b016020015161272b919060f81c613c9a565b60f81b8261273a83600261398e565b612745906001613b6e565b8151811061275557612755613bd2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508061278e81613b86565b915050612674565b5092915050565b600060606020836000015110156127be576127b7836130fb565b90506127ca565b6127c783612553565b90505b610bde81613c58565b60606112af6127f28360200151600081518110611f0857611f08613bd2565b61261a565b60608251821061281657506040805160208101909152600081526112af565b6112ac8383848651612828919061373c565b613106565b6000805b8084511180156128415750808351115b80156128c2575082818151811061285a5761285a613bd2565b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191684828151811061289957612899613bd2565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016145b156112ac57806128d181613b86565b915050612831565b60606000806128e784612b32565b9193509091506001905081600181111561290357612903613cdf565b14612990576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f524c505265616465723a20696e76616c696420524c50206c6973742076616c7560448201527f650000000000000000000000000000000000000000000000000000000000000060648201526084016104a0565b6040805160208082526104208201909252600091816020015b60408051808201909152600080825260208201528152602001906001900390816129a95790505090506000835b8651811015612b275760208210612a6f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f524c505265616465723a2070726f766964656420524c50206c6973742065786360448201527f65656473206d6178206c697374206c656e67746800000000000000000000000060648201526084016104a0565b600080612aac6040518060400160405280858c60000151612a90919061373c565b8152602001858c60200151612aa59190613b6e565b9052612b32565b509150915060405180604001604052808383612ac89190613b6e565b8152602001848b60200151612add9190613b6e565b815250858581518110612af257612af2613bd2565b6020908102919091010152612b08600185613b6e565b9350612b148183613b6e565b612b1e9084613b6e565b925050506129d6565b508152949350505050565b600080600080846000015111612bca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f524c505265616465723a20524c50206974656d2063616e6e6f74206265206e7560448201527f6c6c00000000000000000000000000000000000000000000000000000000000060648201526084016104a0565b6020840151805160001a607f8111612bef576000600160009450945094505050613016565b60b78111612cab576000612c0460808361373c565b905080876000015111612c99576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f524c505265616465723a20696e76616c696420524c502073686f72742073747260448201527f696e67000000000000000000000000000000000000000000000000000000000060648201526084016104a0565b60019550935060009250613016915050565b60bf8111612e1a576000612cc060b78361373c565b905080876000015111612d55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67207374726960448201527f6e67206c656e677468000000000000000000000000000000000000000000000060648201526084016104a0565b600183015160208290036101000a9004612d6f8183613b6e565b885111612dfe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67207374726960448201527f6e6700000000000000000000000000000000000000000000000000000000000060648201526084016104a0565b612e09826001613b6e565b965094506000935061301692505050565b60f78111612ed5576000612e2f60c08361373c565b905080876000015111612ec4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f524c505265616465723a20696e76616c696420524c502073686f7274206c697360448201527f740000000000000000000000000000000000000000000000000000000000000060648201526084016104a0565b600195509350849250613016915050565b6000612ee260f78361373c565b905080876000015111612f77576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67206c69737460448201527f206c656e6774680000000000000000000000000000000000000000000000000060648201526084016104a0565b600183015160208290036101000a9004612f918183613b6e565b885111612ffa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67206c69737460448201526064016104a0565b613005826001613b6e565b965094506001935061301692505050565b9193909250565b606060008267ffffffffffffffff81111561303a5761303a6133c3565b6040519080825280601f01601f191660200182016040528015613064576020820181803683370190505b5090508051600003613077579050610bde565b60006130838587613b6e565b90506020820160005b613097602087613a2f565b8110156130ce57825182526130ad602084613b6e565b92506130ba602083613b6e565b9150806130c681613b86565b91505061308c565b5060006001602087066020036101000a039050808251168119845116178252839450505050509392505050565b60606112af826132de565b60608182601f011015613175576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f7700000000000000000000000000000000000060448201526064016104a0565b8282840110156131e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f7700000000000000000000000000000000000060448201526064016104a0565b8183018451101561324e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f736c6963655f6f75744f66426f756e647300000000000000000000000000000060448201526064016104a0565b60608215801561326d57604051915060008252602082016040526132d5565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156132a657805183526020928301920161328e565b5050858452601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016604052505b50949350505050565b60606112af82602001516000846000015161301d565b60005b8381101561330f5781810151838201526020016132f7565b8381111561331e576000848401525b50505050565b6000815180845261333c8160208601602086016132f4565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006112ac6020830184613324565b60006020828403121561339357600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146133be57600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160c0810167ffffffffffffffff81118282101715613415576134156133c3565b60405290565b600082601f83011261342c57600080fd5b813567ffffffffffffffff80821115613447576134476133c3565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561348d5761348d6133c3565b816040528381528660208588010111156134a657600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a086880312156134de57600080fd5b6134e78661339a565b945060208601359350604086013567ffffffffffffffff808216821461350c57600080fd5b909350606087013590811515821461352357600080fd5b9092506080870135908082111561353957600080fd5b506135468882890161341b565b9150509295509295909350565b60006080828403121561356557600080fd5b50919050565b60008083601f84011261357d57600080fd5b50813567ffffffffffffffff81111561359557600080fd5b6020830191508360208285010111156135ad57600080fd5b9250929050565b600080600080600060e086880312156135cc57600080fd5b853567ffffffffffffffff808211156135e457600080fd5b9087019060c0828a0312156135f857600080fd5b6136006133f2565b823581526136106020840161339a565b60208201526136216040840161339a565b6040820152606083013560608201526080830135608082015260a08301358281111561364c57600080fd5b6136588b82860161341b565b60a0830152509650602088013595506136748960408a01613553565b945060c088013591508082111561368a57600080fd5b506136978882890161356b565b969995985093965092949392505050565b8581528460208201527fffffffffffffffff0000000000000000000000000000000000000000000000008460c01b16604082015282151560f81b6048820152600082516136fc8160498501602087016132f4565b919091016049019695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561374e5761374e61370d565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261379157613791613753565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f8000000000000000000000000000000000000000000000000000000000000000831416156137e5576137e561370d565b500590565b6000808312837f8000000000000000000000000000000000000000000000000000000000000000018312811516156138245761382461370d565b837f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0183138116156138585761385861370d565b50500390565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60008413600084138583048511828216161561389f5761389f61370d565b7f800000000000000000000000000000000000000000000000000000000000000060008712868205881281841616156138da576138da61370d565b600087129250878205871284841616156138f6576138f661370d565b8785058712818416161561390c5761390c61370d565b505050929093029392505050565b6000808212827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038413811516156139545761395461370d565b827f80000000000000000000000000000000000000000000000000000000000000000384128116156139885761398861370d565b50500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156139c6576139c661370d565b500290565b600067ffffffffffffffff8083168185168083038211156139ee576139ee61370d565b01949350505050565b60006fffffffffffffffffffffffffffffffff80831681851681830481118215151615613a2657613a2661370d565b02949350505050565b600082613a3e57613a3e613753565b500490565b60008451613a558184602089016132f4565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551613a91816001850160208a016132f4565b60019201918201528351613aac8160028401602088016132f4565b0160020195945050505050565b600060408284031215613acb57600080fd5b6040516040810181811067ffffffffffffffff82111715613aee57613aee6133c3565b604052825181526020928301519281019290925250919050565b600060808284031215613b1a57600080fd5b6040516080810181811067ffffffffffffffff82111715613b3d57613b3d6133c3565b8060405250823581526020830135602082015260408301356040820152606083013560608201528091505092915050565b60008219821115613b8157613b8161370d565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613bb757613bb761370d565b5060010190565b600082613bcd57613bcd613753565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a0830152613c4c60c0830184613324565b98975050505050505050565b80516020808301519190811015613565577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60209190910360031b1b16919050565b600060ff831680613cad57613cad613753565b8060ff84160691505092915050565b600060ff821660ff841680821015613cd657613cd661370d565b90039392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea164736f6c634300080f000a", - "deployedBytecode": "0x6080604052600436106100f65760003560e01c8063a14238e71161008a578063cff0ab9611610059578063cff0ab96146102f7578063e9e05c4214610398578063f4daa291146103ab578063fdc9fe1d146103df57600080fd5b8063a14238e71461026d578063c4fc4798146102ad578063ca3e99ba146102cd578063cd7c9789146102e257600080fd5b80636bb0291e116100c65780636bb0291e146102005780638129fc1c14610215578063867ead131461022a5780639bf62d821461024057600080fd5b80621c2ff61461012257806313620abd1461018057806354fd4d50146101b957806364b79208146101db57600080fd5b3661011d5761011b3334620186a06000604051806020016040528060008152506103f2565b005b600080fd5b34801561012e57600080fd5b506101567f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561018c57600080fd5b50610198633b9aca0081565b6040516fffffffffffffffffffffffffffffffff9091168152602001610177565b3480156101c557600080fd5b506101ce6108bf565b604051610177919061336e565b3480156101e757600080fd5b506101f2627a120081565b604051908152602001610177565b34801561020c57600080fd5b506101f2600481565b34801561022157600080fd5b5061011b610962565b34801561023657600080fd5b506101f261271081565b34801561024c57600080fd5b506033546101569073ffffffffffffffffffffffffffffffffffffffff1681565b34801561027957600080fd5b5061029d610288366004613381565b60346020526000908152604090205460ff1681565b6040519015158152602001610177565b3480156102b957600080fd5b5061029d6102c8366004613381565b610b20565b3480156102d957600080fd5b506101f2610be5565b3480156102ee57600080fd5b506101f2600881565b34801561030357600080fd5b5060015461035f906fffffffffffffffffffffffffffffffff81169067ffffffffffffffff7001000000000000000000000000000000008204811691780100000000000000000000000000000000000000000000000090041683565b604080516fffffffffffffffffffffffffffffffff909416845267ffffffffffffffff9283166020850152911690820152606001610177565b61011b6103a63660046134c6565b6103f2565b3480156103b757600080fd5b506101f27f000000000000000000000000000000000000000000000000000000000000000081565b61011b6103ed3660046135b4565b610bf6565b8260005a905083156104a95773ffffffffffffffffffffffffffffffffffffffff8716156104a957604080517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482015260248101919091527f4f7074696d69736d506f7274616c3a206d7573742073656e6420746f2061646460448201527f72657373283029207768656e206372656174696e67206120636f6e747261637460648201526084015b60405180910390fd5b333281146104ca575033731111000000000000000000000000000000001111015b600034888888886040516020016104e59594939291906136a8565b604051602081830303815290604052905060008973ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fb3813568d9991fc951961fcb4c784893574240a28925604d09fc577c55bb7c3284604051610555919061336e565b60405180910390a45050600154600090610595907801000000000000000000000000000000000000000000000000900467ffffffffffffffff164361373c565b9050801561071e5760006105ad6004627a1200613782565b6001546105d89190700100000000000000000000000000000000900467ffffffffffffffff166137ea565b9050600060086105ec6004627a1200613782565b60015461060c9085906fffffffffffffffffffffffffffffffff1661385e565b6106169190613782565b6106209190613782565b60015490915060009061066c906106569061064e9085906fffffffffffffffffffffffffffffffff1661391a565b61271061129a565b6fffffffffffffffffffffffffffffffff6112b5565b905060018411156106df576106dc610656670de0b6b3a76400006106c8610694600883613782565b6106a690670de0b6b3a76400006137ea565b6106b160018a61373c565b6106c390670de0b6b3a764000061398e565b6112c4565b6106d2908561385e565b61064e9190613782565b90505b6fffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff4316021760015550505b60018054849190601090610751908490700100000000000000000000000000000000900467ffffffffffffffff166139cb565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550627a1200600160000160109054906101000a900467ffffffffffffffff1667ffffffffffffffff16131561082d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f5265736f757263654d65746572696e673a2063616e6e6f7420627579206d6f7260448201527f6520676173207468616e20617661696c61626c6520676173206c696d6974000060648201526084016104a0565b600154600090610859906fffffffffffffffffffffffffffffffff1667ffffffffffffffff86166139f7565b6fffffffffffffffffffffffffffffffff169050600061087d48633b9aca006112f5565b6108879083613a2f565b905060005a610896908661373c565b9050808211156108b2576108b26108ad828461373c565b611305565b5050505050505050505050565b60606108ea7f0000000000000000000000000000000000000000000000000000000000000000611333565b6109137f0000000000000000000000000000000000000000000000000000000000000000611333565b61093c7f0000000000000000000000000000000000000000000000000000000000000000611333565b60405160200161094e93929190613a43565b604051602081830303815290604052905090565b600054610100900460ff16158080156109825750600054600160ff909116105b8061099c5750303b15801561099c575060005460ff166001145b610a28576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016104a0565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610a8657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b603380547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055610aba611470565b8015610b1d57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6040517fa25ae55700000000000000000000000000000000000000000000000000000000815260048101829052600090819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063a25ae557906024016040805180830381865afa158015610baf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd39190613ab9565b9050610bde81611553565b9392505050565b610bf36004627a1200613782565b81565b60335473ffffffffffffffffffffffffffffffffffffffff1661dead14610c9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d506f7274616c3a2063616e206f6e6c79207472696767657260448201527f206f6e65207769746864726177616c20706572207472616e73616374696f6e0060648201526084016104a0565b3073ffffffffffffffffffffffffffffffffffffffff16856040015173ffffffffffffffffffffffffffffffffffffffff1603610d5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d506f7274616c3a20796f752063616e6e6f742073656e642060448201527f6d6573736167657320746f2074686520706f7274616c20636f6e74726163740060648201526084016104a0565b6040517fa25ae557000000000000000000000000000000000000000000000000000000008152600481018590526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a25ae557906024016040805180830381865afa158015610deb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0f9190613ab9565b9050610e1a81611553565b610ea6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4f7074696d69736d506f7274616c3a2070726f706f73616c206973206e6f742060448201527f7965742066696e616c697a65640000000000000000000000000000000000000060648201526084016104a0565b610ebd610eb836869003860186613b08565b61158d565b815114610f4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f7074696d69736d506f7274616c3a20696e76616c6964206f7574707574207260448201527f6f6f742070726f6f66000000000000000000000000000000000000000000000060648201526084016104a0565b6000610f57876115e9565b9050610f9e81866040013586868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061161992505050565b61102a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4f7074696d69736d506f7274616c3a20696e76616c696420776974686472617760448201527f616c20696e636c7573696f6e2070726f6f66000000000000000000000000000060648201526084016104a0565b60008181526034602052604090205460ff16156110c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f4f7074696d69736d506f7274616c3a207769746864726177616c20686173206160448201527f6c7265616479206265656e2066696e616c697a6564000000000000000000000060648201526084016104a0565b600081815260346020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055608087015161111290614e2090613b6e565b5a10156111a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4f7074696d69736d506f7274616c3a20696e73756666696369656e742067617360448201527f20746f2066696e616c697a65207769746864726177616c00000000000000000060648201526084016104a0565b8660200151603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000611206886040015189608001518a6060015160008c60a001516116e0565b50603380547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead17905560405190915082907fdb5c7652857aa163daadd670e116628fb42e869d8ac4251ef8971d9e5727df1b9061126c90841515815260200190565b60405180910390a25050505050505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6000818312156112aa57816112ac565b825b90505b92915050565b60008183126112aa57816112ac565b60006112ac670de0b6b3a7640000836112dc8661176b565b6112e6919061385e565b6112f09190613782565b6119af565b6000818310156112aa57816112ac565b6000805a90505b825a611318908361373c565b101561132e5761132782613b86565b915061130c565b505050565b60608160000361137657505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156113a0578061138a81613b86565b91506113999050600a83613a2f565b915061137a565b60008167ffffffffffffffff8111156113bb576113bb6133c3565b6040519080825280601f01601f1916602001820160405280156113e5576020820181803683370190505b5090505b8415611468576113fa60018361373c565b9150611407600a86613bbe565b611412906030613b6e565b60f81b81838151811061142757611427613bd2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611461600a86613a2f565b94506113e9565b949350505050565b600054610100900460ff16611507576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016104a0565b60408051606081018252633b9aca00808252600060208301524367ffffffffffffffff169190920181905278010000000000000000000000000000000000000000000000000217600155565b60007f000000000000000000000000000000000000000000000000000000000000000082602001516115859190613b6e565b421192915050565b600081600001518260200151836040015184606001516040516020016115cc949392919093845260208401929092526040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b80516020808301516040808501516060860151608087015160a088015193516000976115cc979096959101613c01565b604080516020810185905260009181018290528190606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828252805160209182012090830181905292506116d79101604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828201909152600182527f01000000000000000000000000000000000000000000000000000000000000006020830152908587611bee565b95945050505050565b6000606060008060008661ffff1667ffffffffffffffff811115611706576117066133c3565b6040519080825280601f01601f191660200182016040528015611730576020820181803683370190505b5090506000808751602089018b8e8ef191503d925086831115611751578692505b828152826000602083013e90999098509650505050505050565b60008082136117d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f554e444546494e4544000000000000000000000000000000000000000000000060448201526064016104a0565b600060606117e384611c12565b03609f8181039490941b90931c6c465772b2bbbb5f824b15207a3081018102606090811d6d0388eaa27412d5aca026815d636e018202811d6d0df99ac502031bf953eff472fdcc018202811d6d13cdffb29d51d99322bdff5f2211018202811d6d0a0f742023def783a307a986912e018202811d6d01920d8043ca89b5239253284e42018202811d6c0b7a86d7375468fac667a0a527016c29508e458543d8aa4df2abee7883018302821d6d0139601a2efabe717e604cbb4894018302821d6d02247f7a7b6594320649aa03aba1018302821d7fffffffffffffffffffffffffffffffffffffff73c0c716a594e00d54e3c4cbc9018302821d7ffffffffffffffffffffffffffffffffffffffdc7b88c420e53a9890533129f6f01830290911d7fffffffffffffffffffffffffffffffffffffff465fda27eb4d63ded474e5f832019091027ffffffffffffffff5f6af8f7b3396644f18e157960000000000000000000000000105711340daa0d5f769dba1915cef59f0815a5506027d0267a36c0c95b3975ab3ee5b203a7614a3f75373f047d803ae7b6687f2b393909302929092017d57115e47018c7177eebf7cd370a3356a1b7863008a5ae8028c72b88642840160ae1d92915050565b60007ffffffffffffffffffffffffffffffffffffffffffffffffdb731c958f34d94c182136119e057506000919050565b680755bf798b4a1bf1e58212611a52576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4558505f4f564552464c4f57000000000000000000000000000000000000000060448201526064016104a0565b6503782dace9d9604e83901b059150600060606bb17217f7d1cf79abc9e3b39884821b056b80000000000000000000000001901d6bb17217f7d1cf79abc9e3b39881029093037fffffffffffffffffffffffffffffffffffffffdbf3ccf1604d263450f02a550481018102606090811d6d0277594991cfc85f6e2461837cd9018202811d7fffffffffffffffffffffffffffffffffffffe5adedaa1cb095af9e4da10e363c018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d7ffffffffffffffffffffffffffffffffffffd38dc772608b0ae56cce01296c0eb018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084017ffffffffffffffffffffffffffffffffffffffe2c69812cf03b0763fd454a8f7e010290911d6e0587f503bb6ea29d25fcb7401964500190910279d835ebba824c98fb31b83b2ca45c000000000000000000000000010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b600080611bfa86611ce8565b9050611c0881868686611d1a565b9695505050505050565b6000808211611c7d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f554e444546494e4544000000000000000000000000000000000000000000000060448201526064016104a0565b5060016fffffffffffffffffffffffffffffffff821160071b82811c67ffffffffffffffff1060061b1782811c63ffffffff1060051b1782811c61ffff1060041b1782811c60ff10600390811b90911783811c600f1060021b1783811c909110821b1791821c111790565b60608180519060200120604051602001611d0491815260200190565b6040516020818303038152906040529050919050565b6000806000611d2a878686611d57565b91509150818015611d4c57508051602080830191909120875191880191909120145b979650505050505050565b600060606000611d6685611e72565b90506000806000611d78848a89611f6d565b81519295509093509150158080611d8c5750815b611e18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4d65726b6c65547269653a2070726f76696465642070726f6f6620697320696e60448201527f76616c696400000000000000000000000000000000000000000000000000000060648201526084016104a0565b600081611e345760405180602001604052806000815250611e60565b611e6086611e4360018861373c565b81518110611e5357611e53613bd2565b60200260200101516124f6565b919b919a509098505050505050505050565b60606000611e7f83612520565b90506000815167ffffffffffffffff811115611e9d57611e9d6133c3565b604051908082528060200260200182016040528015611ee257816020015b6040805180820190915260608082526020820152815260200190600190039081611ebb5790505b50905060005b8251811015611f65576000611f15848381518110611f0857611f08613bd2565b6020026020010151612553565b90506040518060400160405280828152602001611f3183612520565b815250838381518110611f4657611f46613bd2565b6020026020010181905250508080611f5d90613b86565b915050611ee8565b509392505050565b60006060818080611f7d8761261a565b90506000869050600080611fa4604051806040016040528060608152602001606081525090565b60005b8c518110156124b2578c8181518110611fc257611fc2613bd2565b602002602001015191508284611fd89190613b6e565b9350611fe5600188613b6e565b96508360000361206657815180516020909101208514612061576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4d65726b6c65547269653a20696e76616c696420726f6f74206861736800000060448201526064016104a0565b6121a2565b81515160201161210857815180516020909101208514612061576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4d65726b6c65547269653a20696e76616c6964206c6172676520696e7465726e60448201527f616c20686173680000000000000000000000000000000000000000000000000060648201526084016104a0565b8151859061211590613c58565b146121a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4d65726b6c65547269653a20696e76616c696420696e7465726e616c206e6f6460448201527f652068617368000000000000000000000000000000000000000000000000000060648201526084016104a0565b6121ae60106001613b6e565b8260200151510361222057855184146124b25760008685815181106121d5576121d5613bd2565b602001015160f81c60f81b60f81c9050600083602001518260ff168151811061220057612200613bd2565b602002602001015190506122138161279d565b96506001945050506124a0565b600282602001515103612418576000612238836127d3565b905060008160008151811061224f5761224f613bd2565b016020015160f81c90506000612266600283613c9a565b612271906002613cbc565b90506000612282848360ff166127f7565b905060006122908b8a6127f7565b9050600061229e838361282d565b905060ff8516600214806122b5575060ff85166003145b1561230b578083511480156122ca5750808251145b156122dc576122d9818b613b6e565b99505b507f800000000000000000000000000000000000000000000000000000000000000099506124b2945050505050565b60ff8516158061231e575060ff85166001145b15612390578251811461235a57507f800000000000000000000000000000000000000000000000000000000000000099506124b2945050505050565b612381886020015160018151811061237457612374613bd2565b602002602001015161279d565b9a5097506124a0945050505050565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4d65726b6c65547269653a2072656365697665642061206e6f6465207769746860448201527f20616e20756e6b6e6f776e20707265666978000000000000000000000000000060648201526084016104a0565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f4d65726b6c65547269653a20726563656976656420616e20756e70617273656160448201527f626c65206e6f646500000000000000000000000000000000000000000000000060648201526084016104a0565b806124aa81613b86565b915050611fa7565b507f80000000000000000000000000000000000000000000000000000000000000008414866124e187866127f7565b909e909d50909b509950505050505050505050565b602081015180516060916112af916125109060019061373c565b81518110611f0857611f08613bd2565b6040805180820182526000808252602091820152815180830190925282518252808301908201526060906112af906128d9565b6060600080600061256385612b32565b91945092509050600081600181111561257e5761257e613cdf565b1461260b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f524c505265616465723a20696e76616c696420524c502062797465732076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016104a0565b6116d78560200151848461301d565b606060008251600261262c919061398e565b67ffffffffffffffff811115612644576126446133c3565b6040519080825280601f01601f19166020018201604052801561266e576020820181803683370190505b50905060005b835181101561279657600484828151811061269157612691613bd2565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016901c826126c683600261398e565b815181106126d6576126d6613bd2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350601084828151811061271957612719613bd2565b016020015161272b919060f81c613c9a565b60f81b8261273a83600261398e565b612745906001613b6e565b8151811061275557612755613bd2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508061278e81613b86565b915050612674565b5092915050565b600060606020836000015110156127be576127b7836130fb565b90506127ca565b6127c783612553565b90505b610bde81613c58565b60606112af6127f28360200151600081518110611f0857611f08613bd2565b61261a565b60608251821061281657506040805160208101909152600081526112af565b6112ac8383848651612828919061373c565b613106565b6000805b8084511180156128415750808351115b80156128c2575082818151811061285a5761285a613bd2565b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191684828151811061289957612899613bd2565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016145b156112ac57806128d181613b86565b915050612831565b60606000806128e784612b32565b9193509091506001905081600181111561290357612903613cdf565b14612990576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f524c505265616465723a20696e76616c696420524c50206c6973742076616c7560448201527f650000000000000000000000000000000000000000000000000000000000000060648201526084016104a0565b6040805160208082526104208201909252600091816020015b60408051808201909152600080825260208201528152602001906001900390816129a95790505090506000835b8651811015612b275760208210612a6f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f524c505265616465723a2070726f766964656420524c50206c6973742065786360448201527f65656473206d6178206c697374206c656e67746800000000000000000000000060648201526084016104a0565b600080612aac6040518060400160405280858c60000151612a90919061373c565b8152602001858c60200151612aa59190613b6e565b9052612b32565b509150915060405180604001604052808383612ac89190613b6e565b8152602001848b60200151612add9190613b6e565b815250858581518110612af257612af2613bd2565b6020908102919091010152612b08600185613b6e565b9350612b148183613b6e565b612b1e9084613b6e565b925050506129d6565b508152949350505050565b600080600080846000015111612bca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f524c505265616465723a20524c50206974656d2063616e6e6f74206265206e7560448201527f6c6c00000000000000000000000000000000000000000000000000000000000060648201526084016104a0565b6020840151805160001a607f8111612bef576000600160009450945094505050613016565b60b78111612cab576000612c0460808361373c565b905080876000015111612c99576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f524c505265616465723a20696e76616c696420524c502073686f72742073747260448201527f696e67000000000000000000000000000000000000000000000000000000000060648201526084016104a0565b60019550935060009250613016915050565b60bf8111612e1a576000612cc060b78361373c565b905080876000015111612d55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67207374726960448201527f6e67206c656e677468000000000000000000000000000000000000000000000060648201526084016104a0565b600183015160208290036101000a9004612d6f8183613b6e565b885111612dfe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67207374726960448201527f6e6700000000000000000000000000000000000000000000000000000000000060648201526084016104a0565b612e09826001613b6e565b965094506000935061301692505050565b60f78111612ed5576000612e2f60c08361373c565b905080876000015111612ec4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f524c505265616465723a20696e76616c696420524c502073686f7274206c697360448201527f740000000000000000000000000000000000000000000000000000000000000060648201526084016104a0565b600195509350849250613016915050565b6000612ee260f78361373c565b905080876000015111612f77576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67206c69737460448201527f206c656e6774680000000000000000000000000000000000000000000000000060648201526084016104a0565b600183015160208290036101000a9004612f918183613b6e565b885111612ffa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f524c505265616465723a20696e76616c696420524c50206c6f6e67206c69737460448201526064016104a0565b613005826001613b6e565b965094506001935061301692505050565b9193909250565b606060008267ffffffffffffffff81111561303a5761303a6133c3565b6040519080825280601f01601f191660200182016040528015613064576020820181803683370190505b5090508051600003613077579050610bde565b60006130838587613b6e565b90506020820160005b613097602087613a2f565b8110156130ce57825182526130ad602084613b6e565b92506130ba602083613b6e565b9150806130c681613b86565b91505061308c565b5060006001602087066020036101000a039050808251168119845116178252839450505050509392505050565b60606112af826132de565b60608182601f011015613175576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f7700000000000000000000000000000000000060448201526064016104a0565b8282840110156131e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f7700000000000000000000000000000000000060448201526064016104a0565b8183018451101561324e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f736c6963655f6f75744f66426f756e647300000000000000000000000000000060448201526064016104a0565b60608215801561326d57604051915060008252602082016040526132d5565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156132a657805183526020928301920161328e565b5050858452601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016604052505b50949350505050565b60606112af82602001516000846000015161301d565b60005b8381101561330f5781810151838201526020016132f7565b8381111561331e576000848401525b50505050565b6000815180845261333c8160208601602086016132f4565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006112ac6020830184613324565b60006020828403121561339357600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146133be57600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160c0810167ffffffffffffffff81118282101715613415576134156133c3565b60405290565b600082601f83011261342c57600080fd5b813567ffffffffffffffff80821115613447576134476133c3565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561348d5761348d6133c3565b816040528381528660208588010111156134a657600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a086880312156134de57600080fd5b6134e78661339a565b945060208601359350604086013567ffffffffffffffff808216821461350c57600080fd5b909350606087013590811515821461352357600080fd5b9092506080870135908082111561353957600080fd5b506135468882890161341b565b9150509295509295909350565b60006080828403121561356557600080fd5b50919050565b60008083601f84011261357d57600080fd5b50813567ffffffffffffffff81111561359557600080fd5b6020830191508360208285010111156135ad57600080fd5b9250929050565b600080600080600060e086880312156135cc57600080fd5b853567ffffffffffffffff808211156135e457600080fd5b9087019060c0828a0312156135f857600080fd5b6136006133f2565b823581526136106020840161339a565b60208201526136216040840161339a565b6040820152606083013560608201526080830135608082015260a08301358281111561364c57600080fd5b6136588b82860161341b565b60a0830152509650602088013595506136748960408a01613553565b945060c088013591508082111561368a57600080fd5b506136978882890161356b565b969995985093965092949392505050565b8581528460208201527fffffffffffffffff0000000000000000000000000000000000000000000000008460c01b16604082015282151560f81b6048820152600082516136fc8160498501602087016132f4565b919091016049019695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561374e5761374e61370d565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261379157613791613753565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f8000000000000000000000000000000000000000000000000000000000000000831416156137e5576137e561370d565b500590565b6000808312837f8000000000000000000000000000000000000000000000000000000000000000018312811516156138245761382461370d565b837f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0183138116156138585761385861370d565b50500390565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60008413600084138583048511828216161561389f5761389f61370d565b7f800000000000000000000000000000000000000000000000000000000000000060008712868205881281841616156138da576138da61370d565b600087129250878205871284841616156138f6576138f661370d565b8785058712818416161561390c5761390c61370d565b505050929093029392505050565b6000808212827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038413811516156139545761395461370d565b827f80000000000000000000000000000000000000000000000000000000000000000384128116156139885761398861370d565b50500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156139c6576139c661370d565b500290565b600067ffffffffffffffff8083168185168083038211156139ee576139ee61370d565b01949350505050565b60006fffffffffffffffffffffffffffffffff80831681851681830481118215151615613a2657613a2661370d565b02949350505050565b600082613a3e57613a3e613753565b500490565b60008451613a558184602089016132f4565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551613a91816001850160208a016132f4565b60019201918201528351613aac8160028401602088016132f4565b0160020195945050505050565b600060408284031215613acb57600080fd5b6040516040810181811067ffffffffffffffff82111715613aee57613aee6133c3565b604052825181526020928301519281019290925250919050565b600060808284031215613b1a57600080fd5b6040516080810181811067ffffffffffffffff82111715613b3d57613b3d6133c3565b8060405250823581526020830135602082015260408301356040820152606083013560608201528091505092915050565b60008219821115613b8157613b8161370d565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613bb757613bb761370d565b5060010190565b600082613bcd57613bcd613753565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a0830152613c4c60c0830184613324565b98975050505050505050565b80516020808301519190811015613565577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60209190910360031b1b16919050565b600060ff831680613cad57613cad613753565b8060ff84160691505092915050565b600060ff821660ff841680821015613cd657613cd661370d565b90039392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea164736f6c634300080f000a", - "devdoc": { - "version": 1, - "kind": "dev", - "methods": { - "constructor": { - "params": { - "_finalizationPeriodSeconds": "Output finalization time in seconds.", - "_l2Oracle": "Address of the L2OutputOracle contract." - } - }, - "depositTransaction(address,uint256,uint64,bool,bytes)": { - "params": { - "_data": "Data to trigger the recipient with.", - "_gasLimit": "Minimum L2 gas limit (can be greater than or equal to this value).", - "_isCreation": "Whether or not the transaction is a contract creation.", - "_to": "Target address on L2.", - "_value": "ETH value to send to the recipient." - } - }, - "finalizeWithdrawalTransaction((uint256,address,address,uint256,uint256,bytes),uint256,(bytes32,bytes32,bytes32,bytes32),bytes)": { - "params": { - "_l2BlockNumber": "L2 block number of the outputRoot.", - "_outputRootProof": "Inclusion proof of the withdrawer contracts storage root.", - "_tx": "Withdrawal transaction to finalize.", - "_withdrawalProof": "Inclusion proof for the given withdrawal in the withdrawer contract." - } - }, - "isBlockFinalized(uint256)": { - "params": { - "_l2BlockNumber": "The number of the L2 block." - } - }, - "version()": { - "returns": { - "_0": "Semver contract version as a string." - } - } - }, - "events": { - "TransactionDeposited(address,address,uint256,bytes)": { - "params": { - "from": "Address that triggered the deposit transaction.", - "opaqueData": "ABI encoded deposit data to be parsed off-chain.", - "to": "Address that the deposit transaction is directed to.", - "version": "Version of this deposit transaction event." - } - }, - "WithdrawalFinalized(bytes32,bool)": { - "params": { - "success": "Whether the withdrawal transaction was successful.", - "withdrawalHash": "Hash of the withdrawal transaction." - } - } - } - }, - "userdoc": { - "version": 1, - "kind": "user", - "methods": { - "BASE_FEE_MAX_CHANGE_DENOMINATOR()": { - "notice": "Denominator that determines max change on fee per block." - }, - "ELASTICITY_MULTIPLIER()": { - "notice": "Along with the resource limit, determines the target resource limit." - }, - "FINALIZATION_PERIOD_SECONDS()": { - "notice": "Minimum time (in seconds) that must elapse before a withdrawal can be finalized." - }, - "INITIAL_BASE_FEE()": { - "notice": "Initial base fee value." - }, - "L2_ORACLE()": { - "notice": "Address of the L2OutputOracle." - }, - "MAX_RESOURCE_LIMIT()": { - "notice": "Maximum amount of the resource that can be used within this block." - }, - "MINIMUM_BASE_FEE()": { - "notice": "Minimum base fee value, cannot go lower than this." - }, - "TARGET_RESOURCE_LIMIT()": { - "notice": "Target amount of the resource that should be used within this block." - }, - "depositTransaction(address,uint256,uint64,bool,bytes)": { - "notice": "Accepts deposits of ETH and data, and emits a TransactionDeposited event for use in deriving deposit transactions. Note that if a deposit is made by a contract, its address will be aliased when retrieved using `tx.origin` or `msg.sender`. Consider using the CrossDomainMessenger contracts for a simpler developer experience." - }, - "finalizeWithdrawalTransaction((uint256,address,address,uint256,uint256,bytes),uint256,(bytes32,bytes32,bytes32,bytes32),bytes)": { - "notice": "Finalizes a withdrawal transaction." - }, - "finalizedWithdrawals(bytes32)": { - "notice": "A list of withdrawal hashes which have been successfully finalized." - }, - "initialize()": { - "notice": "Initializer;" - }, - "isBlockFinalized(uint256)": { - "notice": "Determine if a given block number is finalized. Reverts if the call to L2_ORACLE.getL2Output reverts. Returns a boolean otherwise." - }, - "l2Sender()": { - "notice": "Address of the L2 account which initiated a withdrawal in this transaction. If the of this variable is the default L2 sender address, then we are NOT inside of a call to finalizeWithdrawalTransaction." - }, - "params()": { - "notice": "EIP-1559 style gas parameters." - }, - "version()": { - "notice": "Returns the full semver contract version." - } - }, - "events": { - "TransactionDeposited(address,address,uint256,bytes)": { - "notice": "Emitted when a transaction is deposited from L1 to L2. The parameters of this event are read by the rollup node and used to derive deposit transactions on L2." - }, - "WithdrawalFinalized(bytes32,bool)": { - "notice": "Emitted when a withdrawal transaction is finalized." - } - }, - "notice": "The OptimismPortal is a low-level contract responsible for passing messages between L1 and L2. Messages sent directly to the OptimismPortal have no form of replayability. Users are encouraged to use the L1CrossDomainMessenger for a higher-level interface." - }, - "storageLayout": { - "storage": [ - { - "astId": 25872, - "contract": "contracts/L1/OptimismPortal.sol:OptimismPortal", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8" - }, - { - "astId": 25875, - "contract": "contracts/L1/OptimismPortal.sol:OptimismPortal", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 1389, - "contract": "contracts/L1/OptimismPortal.sol:OptimismPortal", - "label": "params", - "offset": 0, - "slot": "1", - "type": "t_struct(ResourceParams)1359_storage" - }, - { - "astId": 1394, - "contract": "contracts/L1/OptimismPortal.sol:OptimismPortal", - "label": "__gap", - "offset": 0, - "slot": "2", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 961, - "contract": "contracts/L1/OptimismPortal.sol:OptimismPortal", - "label": "l2Sender", - "offset": 0, - "slot": "51", - "type": "t_address" - }, - { - "astId": 974, - "contract": "contracts/L1/OptimismPortal.sol:OptimismPortal", - "label": "finalizedWithdrawals", - "offset": 0, - "slot": "52", - "type": "t_mapping(t_bytes32,t_bool)" - }, - { - "astId": 979, - "contract": "contracts/L1/OptimismPortal.sol:OptimismPortal", - "label": "__gap", - "offset": 0, - "slot": "53", - "type": "t_array(t_uint256)48_storage" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_uint256)48_storage": { - "encoding": "inplace", - "label": "uint256[48]", - "numberOfBytes": "1536" - }, - "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 => bool)", - "numberOfBytes": "32" - }, - "t_struct(ResourceParams)1359_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" - } - } - } -} \ No newline at end of file From 6bd1c85f6fd63d880ab27495fe730a2062dd7fa0 Mon Sep 17 00:00:00 2001 From: Javed Khan Date: Mon, 12 Sep 2022 16:34:14 +0530 Subject: [PATCH 32/32] indexer: scan eth/standard bridge for deposits (#3350) * indexer: scan eth/standard bridge for deposits * indexer: fix standard bridge addr, add eth bridge * indexer: use predeploy addr const * indexer: map chainID -> default bridge address * indexer: l2 - map chainID to bridge addresses Co-authored-by: Matthew Slipper --- indexer/db/sql.go | 2 +- indexer/services/l1/bridge/bridge.go | 37 +++++++++++++++++----------- indexer/services/l1/service.go | 8 ++++-- indexer/services/l2/bridge/bridge.go | 9 ++++--- indexer/services/l2/service.go | 2 +- 5 files changed, 36 insertions(+), 22 deletions(-) diff --git a/indexer/db/sql.go b/indexer/db/sql.go index 2bd161df879d7..8a85abcb3f633 100644 --- a/indexer/db/sql.go +++ b/indexer/db/sql.go @@ -65,7 +65,7 @@ CREATE TABLE IF NOT EXISTS withdrawals ( log_index INTEGER NOT NULL, l1_block_hash VARCHAR REFERENCES l1_blocks(hash), l2_block_hash VARCHAR NOT NULL REFERENCES l2_blocks(hash), - tx_hash VARCHAR NOT NULL, + tx_hash VARCHAR NOT NULL ) ` diff --git a/indexer/services/l1/bridge/bridge.go b/indexer/services/l1/bridge/bridge.go index 9c130bc0c91f3..5e05d62025c23 100644 --- a/indexer/services/l1/bridge/bridge.go +++ b/indexer/services/l1/bridge/bridge.go @@ -7,6 +7,7 @@ import ( "github.com/ethereum-optimism/optimism/indexer/db" "github.com/ethereum-optimism/optimism/op-bindings/bindings" + "github.com/ethereum-optimism/optimism/op-bindings/predeploys" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -25,37 +26,42 @@ type Bridge interface { type implConfig struct { name string impl string - addr common.Address + addr string } -var addrs map[string]common.Address +var defaultBridgeCfgs = map[uint64][]*implConfig{ + // Devnet + 900: { + {"Standard", "StandardBridge", predeploys.DevL1StandardBridge}, + {"ETH", "ETHBridge", predeploys.DevL1StandardBridge}, + }, +} var customBridgeCfgs = map[uint64][]*implConfig{ // Mainnet 1: { - {"BitBTC", "StandardBridge", common.HexToAddress("0xaBA2c5F108F7E820C049D5Af70B16ac266c8f128")}, - {"DAI", "StandardBridge", common.HexToAddress("0x10E6593CDda8c58a1d0f14C5164B376352a55f2F")}, + {"BitBTC", "StandardBridge", "0xaBA2c5F108F7E820C049D5Af70B16ac266c8f128"}, + {"DAI", "StandardBridge", "0x10E6593CDda8c58a1d0f14C5164B376352a55f2F"}, }, // Kovan 42: { - {"BitBTC", "StandardBridge", common.HexToAddress("0x0b651A42F32069d62d5ECf4f2a7e5Bd3E9438746")}, - {"USX", "StandardBridge", common.HexToAddress("0x40E862341b2416345F02c41Ac70df08525150dC7")}, - {"DAI", "StandardBridge", common.HexToAddress("0xb415e822C4983ecD6B1c1596e8a5f976cf6CD9e3")}, + {"BitBTC", "StandardBridge", "0x0b651A42F32069d62d5ECf4f2a7e5Bd3E9438746"}, + {"USX", "StandardBridge", "0x40E862341b2416345F02c41Ac70df08525150dC7"}, + {"DAI", "StandardBridge", "0xb415e822C4983ecD6B1c1596e8a5f976cf6CD9e3"}, }, } func BridgesByChainID(chainID *big.Int, client bind.ContractBackend, ctx context.Context) (map[string]Bridge, error) { - allCfgs := []*implConfig{ - {"Standard", "StandardBridge", addrs["L1StandardBridge"]}, - {"ETH", "ETHBridge", addrs["L1StandardBridge"]}, - } + allCfgs := make([]*implConfig, 0) + allCfgs = append(allCfgs, defaultBridgeCfgs[chainID.Uint64()]...) allCfgs = append(allCfgs, customBridgeCfgs[chainID.Uint64()]...) bridges := make(map[string]Bridge) for _, bridge := range allCfgs { switch bridge.impl { case "StandardBridge": - l1StandardBridgeFilter, err := bindings.NewL1StandardBridgeFilterer(bridge.addr, client) + l1StandardBridgeAddress := common.HexToAddress(bridge.addr) + l1StandardBridgeFilter, err := bindings.NewL1StandardBridgeFilterer(l1StandardBridgeAddress, client) if err != nil { return nil, err } @@ -63,13 +69,14 @@ func BridgesByChainID(chainID *big.Int, client bind.ContractBackend, ctx context standardBridge := &StandardBridge{ name: bridge.name, ctx: ctx, - address: bridge.addr, + address: l1StandardBridgeAddress, client: client, filterer: l1StandardBridgeFilter, } bridges[bridge.name] = standardBridge case "ETHBridge": - l1EthBridgeFilter, err := bindings.NewL1StandardBridgeFilterer(bridge.addr, client) + l1StandardBridgeAddress := common.HexToAddress(bridge.addr) + l1EthBridgeFilter, err := bindings.NewL1StandardBridgeFilterer(l1StandardBridgeAddress, client) if err != nil { return nil, err } @@ -77,7 +84,7 @@ func BridgesByChainID(chainID *big.Int, client bind.ContractBackend, ctx context ethBridge := &EthBridge{ name: bridge.name, ctx: ctx, - address: bridge.addr, + address: l1StandardBridgeAddress, client: client, filterer: l1EthBridgeFilter, } diff --git a/indexer/services/l1/service.go b/indexer/services/l1/service.go index 710af12365233..7d026528ba650 100644 --- a/indexer/services/l1/service.go +++ b/indexer/services/l1/service.go @@ -113,7 +113,11 @@ func NewService(cfg ServiceConfig) (*Service, error) { return nil, fmt.Errorf("chain ID configured with %d but got %d", cfg.ChainID, chainID) } - var bridges map[string]bridge.Bridge + bridges, err := bridge.BridgesByChainID(cfg.ChainID, cfg.L1Client, ctx) + if err != nil { + cancel() + return nil, err + } logger.Info("Scanning bridges for deposits", "bridges", bridges) confirmedHeaderSelector, err := NewConfirmedHeaderSelector(HeaderSelectorConfig{ @@ -278,7 +282,7 @@ func (s *Service) Update(newHeader *types.Header) error { } receives++ - if receives == len(s.bridges) { + if receives == 2*len(s.bridges) { break } } diff --git a/indexer/services/l2/bridge/bridge.go b/indexer/services/l2/bridge/bridge.go index ff420a352967f..635248ff7f1f6 100644 --- a/indexer/services/l2/bridge/bridge.go +++ b/indexer/services/l2/bridge/bridge.go @@ -28,8 +28,11 @@ type implConfig struct { addr string } -var defaultBridgeCfgs = []*implConfig{ - {"Standard", "StandardBridge", L2StandardBridgeAddr}, +var defaultBridgeCfgs = map[uint64][]*implConfig{ + // Devnet + 901: { + {"Standard", "StandardBridge", L2StandardBridgeAddr}, + }, } var customBridgeCfgs = map[uint64][]*implConfig{ @@ -48,7 +51,7 @@ var customBridgeCfgs = map[uint64][]*implConfig{ func BridgesByChainID(chainID *big.Int, client bind.ContractFilterer, ctx context.Context) (map[string]Bridge, error) { allCfgs := make([]*implConfig, 0) - allCfgs = append(allCfgs, defaultBridgeCfgs...) + allCfgs = append(allCfgs, defaultBridgeCfgs[chainID.Uint64()]...) allCfgs = append(allCfgs, customBridgeCfgs[chainID.Uint64()]...) bridges := make(map[string]Bridge) diff --git a/indexer/services/l2/service.go b/indexer/services/l2/service.go index a6a24f13f996a..410b5179ca7ed 100644 --- a/indexer/services/l2/service.go +++ b/indexer/services/l2/service.go @@ -278,7 +278,7 @@ func (s *Service) Update(newHeader *types.Header) error { } receives++ - if receives == len(s.bridges) { + if receives == 2*len(s.bridges) { break } }